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