pub struct TokenSellExactOutBuilder { /* private fields */ }Expand description
Instruction builder for TokenSellExactOut.
§Accounts:
[writable, signer]seller[writable]bonding_curve[writable]base_mint[writable]base_ata[]quote_mint[writable]quote_vault[writable]quote_ata[optional]system_program (default to11111111111111111111111111111111)[optional]ata_program (default toATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL)[]base_token_program[]quote_token_program
Implementations§
Source§impl TokenSellExactOutBuilder
impl TokenSellExactOutBuilder
pub fn new() -> Self
Sourcepub fn bonding_curve(&mut self, bonding_curve: Pubkey) -> &mut Self
pub fn bonding_curve(&mut self, bonding_curve: Pubkey) -> &mut Self
The bonding curve account
Sourcepub fn quote_mint(&mut self, quote_mint: Pubkey) -> &mut Self
pub fn quote_mint(&mut self, quote_mint: Pubkey) -> &mut Self
The quote token mint account
Sourcepub fn quote_vault(&mut self, quote_vault: Pubkey) -> &mut Self
pub fn quote_vault(&mut self, quote_vault: Pubkey) -> &mut Self
The quote token vault
Sourcepub fn system_program(&mut self, system_program: Pubkey) -> &mut Self
pub fn system_program(&mut self, system_program: Pubkey) -> &mut Self
[optional account, default to '11111111111111111111111111111111']
System program
Sourcepub fn ata_program(&mut self, ata_program: Pubkey) -> &mut Self
pub fn ata_program(&mut self, ata_program: Pubkey) -> &mut Self
[optional account, default to 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL']
The associated token account program
Sourcepub fn base_token_program(&mut self, base_token_program: Pubkey) -> &mut Self
pub fn base_token_program(&mut self, base_token_program: Pubkey) -> &mut Self
The token program for the base token
Sourcepub fn quote_token_program(&mut self, quote_token_program: Pubkey) -> &mut Self
pub fn quote_token_program(&mut self, quote_token_program: Pubkey) -> &mut Self
The token program for the quote token
pub fn amount_out(&mut self, amount_out: u64) -> &mut Self
pub fn max_amount_in(&mut self, max_amount_in: u64) -> &mut Self
Sourcepub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
pub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
Add an additional account to the instruction.
Sourcepub fn add_remaining_accounts(&mut self, accounts: &[AccountMeta]) -> &mut Self
pub fn add_remaining_accounts(&mut self, accounts: &[AccountMeta]) -> &mut Self
Add additional accounts to the instruction.
pub fn instruction(&self) -> Instruction
Trait Implementations§
Source§impl Clone for TokenSellExactOutBuilder
impl Clone for TokenSellExactOutBuilder
Source§fn clone(&self) -> TokenSellExactOutBuilder
fn clone(&self) -> TokenSellExactOutBuilder
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 moreSource§impl Debug for TokenSellExactOutBuilder
impl Debug for TokenSellExactOutBuilder
Source§impl Default for TokenSellExactOutBuilder
impl Default for TokenSellExactOutBuilder
Source§fn default() -> TokenSellExactOutBuilder
fn default() -> TokenSellExactOutBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TokenSellExactOutBuilder
impl RefUnwindSafe for TokenSellExactOutBuilder
impl Send for TokenSellExactOutBuilder
impl Sync for TokenSellExactOutBuilder
impl Unpin for TokenSellExactOutBuilder
impl UnwindSafe for TokenSellExactOutBuilder
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