pub struct SwapCpi<'a, 'b> {Show 16 fields
pub __program: &'b AccountInfo<'a>,
pub token_program_a: &'b AccountInfo<'a>,
pub token_program_b: &'b AccountInfo<'a>,
pub memo_program: &'b AccountInfo<'a>,
pub token_authority: &'b AccountInfo<'a>,
pub fusion_pool: &'b AccountInfo<'a>,
pub token_mint_a: &'b AccountInfo<'a>,
pub token_mint_b: &'b AccountInfo<'a>,
pub token_owner_account_a: &'b AccountInfo<'a>,
pub token_owner_account_b: &'b AccountInfo<'a>,
pub token_vault_a: &'b AccountInfo<'a>,
pub token_vault_b: &'b AccountInfo<'a>,
pub tick_array0: &'b AccountInfo<'a>,
pub tick_array1: &'b AccountInfo<'a>,
pub tick_array2: &'b AccountInfo<'a>,
pub __args: SwapInstructionArgs,
}
Expand description
swap
CPI instruction.
Fields§
§__program: &'b AccountInfo<'a>
The program to invoke.
token_program_a: &'b AccountInfo<'a>
§token_program_b: &'b AccountInfo<'a>
§memo_program: &'b AccountInfo<'a>
§fusion_pool: &'b AccountInfo<'a>
§token_mint_a: &'b AccountInfo<'a>
§token_mint_b: &'b AccountInfo<'a>
§token_owner_account_a: &'b AccountInfo<'a>
§token_owner_account_b: &'b AccountInfo<'a>
§token_vault_a: &'b AccountInfo<'a>
§token_vault_b: &'b AccountInfo<'a>
§tick_array0: &'b AccountInfo<'a>
§tick_array1: &'b AccountInfo<'a>
§tick_array2: &'b AccountInfo<'a>
§__args: SwapInstructionArgs
The arguments for the instruction.
Implementations§
Source§impl<'a, 'b> SwapCpi<'a, 'b>
impl<'a, 'b> SwapCpi<'a, 'b>
pub fn new( program: &'b AccountInfo<'a>, accounts: SwapCpiAccounts<'a, 'b>, args: SwapInstructionArgs, ) -> Self
pub fn invoke(&self) -> ProgramResult
pub fn invoke_with_remaining_accounts( &self, remaining_accounts: &[(&'b AccountInfo<'a>, bool, bool)], ) -> ProgramResult
pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> ProgramResult
pub fn invoke_signed_with_remaining_accounts( &self, signers_seeds: &[&[&[u8]]], remaining_accounts: &[(&'b AccountInfo<'a>, bool, bool)], ) -> ProgramResult
Auto Trait Implementations§
impl<'a, 'b> Freeze for SwapCpi<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for SwapCpi<'a, 'b>
impl<'a, 'b> !Send for SwapCpi<'a, 'b>
impl<'a, 'b> !Sync for SwapCpi<'a, 'b>
impl<'a, 'b> Unpin for SwapCpi<'a, 'b>
impl<'a, 'b> !UnwindSafe for SwapCpi<'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