pub struct TokenCollectFeesCpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for TokenCollectFees via CPI.
§Accounts:
[writable, signer]signer[]fee_authority[writable]fee_authority_ata[]bonding_curve[]base_mint[]quote_mint[writable]quote_vault[]config[]system_program[]ata_program[]quote_token_program
Implementations§
Source§impl<'a, 'b> TokenCollectFeesCpiBuilder<'a, 'b>
impl<'a, 'b> TokenCollectFeesCpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
Sourcepub fn signer(&mut self, signer: &'b AccountInfo<'a>) -> &mut Self
pub fn signer(&mut self, signer: &'b AccountInfo<'a>) -> &mut Self
The signer of the transaction
The fee authority of the program
The fee authority associated token account
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 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 config(&mut self, config: &'b AccountInfo<'a>) -> &mut Self
pub fn config(&mut self, config: &'b AccountInfo<'a>) -> &mut Self
The config account
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 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 quote token program
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 TokenCollectFeesCpiBuilder<'a, 'b>
impl<'a, 'b> Clone for TokenCollectFeesCpiBuilder<'a, 'b>
Source§fn clone(&self) -> TokenCollectFeesCpiBuilder<'a, 'b>
fn clone(&self) -> TokenCollectFeesCpiBuilder<'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 TokenCollectFeesCpiBuilder<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for TokenCollectFeesCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for TokenCollectFeesCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for TokenCollectFeesCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for TokenCollectFeesCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for TokenCollectFeesCpiBuilder<'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