pub struct MigrateCpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for Migrate via CPI.
§Accounts:
[writable, signer]caller[writable]bonding_curve[writable]base_mint[]quote_mint[writable]base_vault[writable]quote_vault[]dex_program[]migration_authority[writable]pool[writable]lp_mint[writable]pool_base_vault[writable]pool_quote_vault[writable]pool_lp_account[]dex_event_authority[]nexus_program[writable]creator_fee_config[]base_token_program[]quote_token_program[]associated_token_program[]system_program[]event_authority[]program[writable]dex_creator_fee_config
Implementations§
Source§impl<'a, 'b> MigrateCpiBuilder<'a, 'b>
impl<'a, 'b> MigrateCpiBuilder<'a, 'b>
pub fn new( __program: &'b AccountInfo<'a>, caller: &'b AccountInfo<'a>, bonding_curve: &'b AccountInfo<'a>, base_mint: &'b AccountInfo<'a>, quote_mint: &'b AccountInfo<'a>, base_vault: &'b AccountInfo<'a>, quote_vault: &'b AccountInfo<'a>, dex_program: &'b AccountInfo<'a>, migration_authority: &'b AccountInfo<'a>, pool: &'b AccountInfo<'a>, lp_mint: &'b AccountInfo<'a>, pool_base_vault: &'b AccountInfo<'a>, pool_quote_vault: &'b AccountInfo<'a>, pool_lp_account: &'b AccountInfo<'a>, dex_event_authority: &'b AccountInfo<'a>, nexus_program: &'b AccountInfo<'a>, creator_fee_config: &'b AccountInfo<'a>, base_token_program: &'b AccountInfo<'a>, quote_token_program: &'b AccountInfo<'a>, associated_token_program: &'b AccountInfo<'a>, system_program: &'b AccountInfo<'a>, event_authority: &'b AccountInfo<'a>, program: &'b AccountInfo<'a>, dex_creator_fee_config: &'b AccountInfo<'a>, ) -> Self
Sourcepub fn add_remaining_account(
&mut self,
account: &'b AccountInfo<'a>,
is_writable: bool,
is_signer: bool,
) -> &mut Self
pub fn add_remaining_account( &mut self, account: &'b AccountInfo<'a>, is_writable: bool, is_signer: bool, ) -> &mut Self
Add an additional account to the instruction.
Sourcepub fn add_remaining_accounts(
&mut self,
accounts: &[(&'b AccountInfo<'a>, bool, bool)],
) -> &mut Self
pub fn add_remaining_accounts( &mut self, accounts: &[(&'b AccountInfo<'a>, bool, bool)], ) -> &mut Self
Add additional accounts to the instruction.
Each account is represented by a tuple of the AccountInfo, a bool indicating whether the account is writable or not,
and a bool indicating whether the account is a signer or not.
pub fn invoke(&self) -> ProgramResult
pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> ProgramResult
Trait Implementations§
Source§impl<'a, 'b> Clone for MigrateCpiBuilder<'a, 'b>
impl<'a, 'b> Clone for MigrateCpiBuilder<'a, 'b>
Auto Trait Implementations§
impl<'a, 'b> !RefUnwindSafe for MigrateCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for MigrateCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for MigrateCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for MigrateCpiBuilder<'a, 'b>
impl<'a, 'b> Freeze for MigrateCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for MigrateCpiBuilder<'a, 'b>
impl<'a, 'b> UnsafeUnpin for MigrateCpiBuilder<'a, 'b>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more