pub struct TokenBuyExactOutBuilder { /* private fields */ }Expand description
Instruction builder for TokenBuyExactOut.
§Accounts:
[writable, signer]buyer[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 TokenBuyExactOutBuilder
impl TokenBuyExactOutBuilder
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 TokenBuyExactOutBuilder
impl Clone for TokenBuyExactOutBuilder
Source§fn clone(&self) -> TokenBuyExactOutBuilder
fn clone(&self) -> TokenBuyExactOutBuilder
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 TokenBuyExactOutBuilder
impl Debug for TokenBuyExactOutBuilder
Source§impl Default for TokenBuyExactOutBuilder
impl Default for TokenBuyExactOutBuilder
Source§fn default() -> TokenBuyExactOutBuilder
fn default() -> TokenBuyExactOutBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TokenBuyExactOutBuilder
impl RefUnwindSafe for TokenBuyExactOutBuilder
impl Send for TokenBuyExactOutBuilder
impl Sync for TokenBuyExactOutBuilder
impl Unpin for TokenBuyExactOutBuilder
impl UnwindSafe for TokenBuyExactOutBuilder
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