pub struct MintStrategy2CpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for MintStrategy2 via CPI.
§Accounts:
[writable, signer]user[optional]admin_permissions[writable]main[writable]strategy_controller[writable]receipt_mint[writable]user_receipt_ata[writable]user_earn_ata[writable]strategy_controller_earn_token_account[]token_program[]associated_token_program[]instruction_sysvar_account[]system_program
Implementations§
Source§impl<'a, 'b> MintStrategy2CpiBuilder<'a, 'b>
impl<'a, 'b> MintStrategy2CpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
pub fn user(&mut self, user: &'b AccountInfo<'a>) -> &mut Self
Sourcepub fn admin_permissions(
&mut self,
admin_permissions: Option<&'b AccountInfo<'a>>,
) -> &mut Self
pub fn admin_permissions( &mut self, admin_permissions: Option<&'b AccountInfo<'a>>, ) -> &mut Self
[optional account]
pub fn main(&mut self, main: &'b AccountInfo<'a>) -> &mut Self
pub fn strategy_controller( &mut self, strategy_controller: &'b AccountInfo<'a>, ) -> &mut Self
pub fn receipt_mint(&mut self, receipt_mint: &'b AccountInfo<'a>) -> &mut Self
pub fn user_receipt_ata( &mut self, user_receipt_ata: &'b AccountInfo<'a>, ) -> &mut Self
pub fn user_earn_ata(&mut self, user_earn_ata: &'b AccountInfo<'a>) -> &mut Self
pub fn strategy_controller_earn_token_account( &mut self, strategy_controller_earn_token_account: &'b AccountInfo<'a>, ) -> &mut Self
pub fn token_program(&mut self, token_program: &'b AccountInfo<'a>) -> &mut Self
pub fn associated_token_program( &mut self, associated_token_program: &'b AccountInfo<'a>, ) -> &mut Self
pub fn instruction_sysvar_account( &mut self, instruction_sysvar_account: &'b AccountInfo<'a>, ) -> &mut Self
pub fn system_program( &mut self, system_program: &'b AccountInfo<'a>, ) -> &mut Self
pub fn usdt_deposit_amount(&mut self, usdt_deposit_amount: u64) -> &mut Self
pub fn min_receipt_receive(&mut self, min_receipt_receive: 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 MintStrategy2CpiBuilder<'a, 'b>
impl<'a, 'b> Clone for MintStrategy2CpiBuilder<'a, 'b>
Source§fn clone(&self) -> MintStrategy2CpiBuilder<'a, 'b>
fn clone(&self) -> MintStrategy2CpiBuilder<'a, 'b>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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> !RefUnwindSafe for MintStrategy2CpiBuilder<'a, 'b>
impl<'a, 'b> !Send for MintStrategy2CpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for MintStrategy2CpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for MintStrategy2CpiBuilder<'a, 'b>
impl<'a, 'b> Freeze for MintStrategy2CpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for MintStrategy2CpiBuilder<'a, 'b>
impl<'a, 'b> UnsafeUnpin for MintStrategy2CpiBuilder<'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