pub struct TokenSellExactInCpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for TokenSellExactIn via CPI.
§Accounts:
[writable, signer]seller[writable]bonding_curve[writable]base_mint[writable]base_ata[]quote_mint[writable]quote_vault[writable]quote_ata[]system_program[]ata_program[]base_token_program[]quote_token_program
Implementations§
Source§impl<'a, 'b> TokenSellExactInCpiBuilder<'a, 'b>
impl<'a, 'b> TokenSellExactInCpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
Sourcepub fn seller(&mut self, seller: &'b AccountInfo<'a>) -> &mut Self
pub fn seller(&mut self, seller: &'b AccountInfo<'a>) -> &mut Self
The seller of the token
Sourcepub fn bonding_curve(&mut self, bonding_curve: &'b AccountInfo<'a>) -> &mut Self
pub fn bonding_curve(&mut self, bonding_curve: &'b AccountInfo<'a>) -> &mut Self
The bonding curve account
Sourcepub fn base_mint(&mut self, base_mint: &'b AccountInfo<'a>) -> &mut Self
pub fn base_mint(&mut self, base_mint: &'b AccountInfo<'a>) -> &mut Self
The base token mint account
Sourcepub fn base_ata(&mut self, base_ata: &'b AccountInfo<'a>) -> &mut Self
pub fn base_ata(&mut self, base_ata: &'b AccountInfo<'a>) -> &mut Self
The base token ata for the seller
Sourcepub fn quote_mint(&mut self, quote_mint: &'b AccountInfo<'a>) -> &mut Self
pub fn quote_mint(&mut self, quote_mint: &'b AccountInfo<'a>) -> &mut Self
The quote token mint account
Sourcepub fn quote_vault(&mut self, quote_vault: &'b AccountInfo<'a>) -> &mut Self
pub fn quote_vault(&mut self, quote_vault: &'b AccountInfo<'a>) -> &mut Self
The quote token vault
Sourcepub fn quote_ata(&mut self, quote_ata: &'b AccountInfo<'a>) -> &mut Self
pub fn quote_ata(&mut self, quote_ata: &'b AccountInfo<'a>) -> &mut Self
The quote token ata for the seller
Sourcepub fn system_program(
&mut self,
system_program: &'b AccountInfo<'a>,
) -> &mut Self
pub fn system_program( &mut self, system_program: &'b AccountInfo<'a>, ) -> &mut Self
System program
Sourcepub fn ata_program(&mut self, ata_program: &'b AccountInfo<'a>) -> &mut Self
pub fn ata_program(&mut self, ata_program: &'b AccountInfo<'a>) -> &mut Self
The associated token account program
Sourcepub fn base_token_program(
&mut self,
base_token_program: &'b AccountInfo<'a>,
) -> &mut Self
pub fn base_token_program( &mut self, base_token_program: &'b AccountInfo<'a>, ) -> &mut Self
The token program for the base token
Sourcepub fn quote_token_program(
&mut self,
quote_token_program: &'b AccountInfo<'a>,
) -> &mut Self
pub fn quote_token_program( &mut self, quote_token_program: &'b AccountInfo<'a>, ) -> &mut Self
The token program for the quote token
pub fn amount_in(&mut self, amount_in: u64) -> &mut Self
pub fn min_amount_out(&mut self, min_amount_out: u64) -> &mut 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 TokenSellExactInCpiBuilder<'a, 'b>
impl<'a, 'b> Clone for TokenSellExactInCpiBuilder<'a, 'b>
Source§fn clone(&self) -> TokenSellExactInCpiBuilder<'a, 'b>
fn clone(&self) -> TokenSellExactInCpiBuilder<'a, 'b>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a, 'b> Freeze for TokenSellExactInCpiBuilder<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for TokenSellExactInCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for TokenSellExactInCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for TokenSellExactInCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for TokenSellExactInCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for TokenSellExactInCpiBuilder<'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