pub struct SpendingLimitUse<'info> {
pub multisig: Box<Account<'info, Multisig>>,
pub member: Signer<'info>,
pub spending_limit: Account<'info, SpendingLimit>,
pub vault: AccountInfo<'info>,
pub destination: AccountInfo<'info>,
pub system_program: Option<Program<'info, System>>,
pub mint: Option<InterfaceAccount<'info, Mint>>,
pub vault_token_account: Option<InterfaceAccount<'info, TokenAccount>>,
pub destination_token_account: Option<InterfaceAccount<'info, TokenAccount>>,
pub token_program: Option<Interface<'info, TokenInterface>>,
}Fields§
§multisig: Box<Account<'info, Multisig>>The multisig account the spending_limit is for.
member: Signer<'info>§spending_limit: Account<'info, SpendingLimit>The SpendingLimit account to use.
vault: AccountInfo<'info>Multisig vault account to transfer tokens from. CHECK: All the required checks are done by checking the seeds.
destination: AccountInfo<'info>Destination account to transfer tokens to.
CHECK: We do the checks in SpendingLimitUse::validate.
system_program: Option<Program<'info, System>>In case spending_limit.mint is SOL.
mint: Option<InterfaceAccount<'info, Mint>>The mint of the tokens to transfer in case spending_limit.mint is an SPL token.
CHECK: We do the checks in SpendingLimitUse::validate.
vault_token_account: Option<InterfaceAccount<'info, TokenAccount>>Multisig vault token account to transfer tokens from in case spending_limit.mint is an SPL token.
destination_token_account: Option<InterfaceAccount<'info, TokenAccount>>Destination token account in case spending_limit.mint is an SPL token.
token_program: Option<Interface<'info, TokenInterface>>In case spending_limit.mint is an SPL token.
Implementations§
Source§impl SpendingLimitUse<'_>
impl SpendingLimitUse<'_>
Sourcepub fn spending_limit_use(
ctx: Context<'_, '_, '_, '_, Self>,
args: SpendingLimitUseArgs,
) -> Result<()>
pub fn spending_limit_use( ctx: Context<'_, '_, '_, '_, Self>, args: SpendingLimitUseArgs, ) -> Result<()>
Use a spending limit to transfer tokens from a multisig vault to a destination account.
Trait Implementations§
Source§impl<'info> Accounts<'info, SpendingLimitUseBumps> for SpendingLimitUse<'info>where
'info: 'info,
impl<'info> Accounts<'info, SpendingLimitUseBumps> for SpendingLimitUse<'info>where
'info: 'info,
Source§fn try_accounts(
__program_id: &Pubkey,
__accounts: &mut &'info [AccountInfo<'info>],
__ix_data: &[u8],
__bumps: &mut SpendingLimitUseBumps,
__reallocs: &mut BTreeSet<Pubkey>,
) -> Result<Self>
fn try_accounts( __program_id: &Pubkey, __accounts: &mut &'info [AccountInfo<'info>], __ix_data: &[u8], __bumps: &mut SpendingLimitUseBumps, __reallocs: &mut BTreeSet<Pubkey>, ) -> Result<Self>
Mint account from the SPL token program in a particular
field, then it should be impossible for this method to return Ok if
any other account type is given–from the SPL token program or elsewhere. Read moreSource§impl<'info> AccountsExit<'info> for SpendingLimitUse<'info>where
'info: 'info,
impl<'info> AccountsExit<'info> for SpendingLimitUse<'info>where
'info: 'info,
Source§impl<'info> Bumps for SpendingLimitUse<'info>where
'info: 'info,
impl<'info> Bumps for SpendingLimitUse<'info>where
'info: 'info,
Source§type Bumps = SpendingLimitUseBumps
type Bumps = SpendingLimitUseBumps
Source§impl<'info> ToAccountInfos<'info> for SpendingLimitUse<'info>where
'info: 'info,
impl<'info> ToAccountInfos<'info> for SpendingLimitUse<'info>where
'info: 'info,
fn to_account_infos(&self) -> Vec<AccountInfo<'info>>
Source§impl<'info> ToAccountMetas for SpendingLimitUse<'info>
impl<'info> ToAccountMetas for SpendingLimitUse<'info>
Source§fn to_account_metas(&self, is_signer: Option<bool>) -> Vec<AccountMeta>
fn to_account_metas(&self, is_signer: Option<bool>) -> Vec<AccountMeta>
is_signer is given as an optional override for the signer meta field.
This covers the edge case when a program-derived-address needs to relay
a transaction from a client to another program but sign the transaction
before the relay. The client cannot mark the field as a signer, and so
we have to override the is_signer meta field given by the client.Auto Trait Implementations§
impl<'info> Freeze for SpendingLimitUse<'info>
impl<'info> !RefUnwindSafe for SpendingLimitUse<'info>
impl<'info> !Send for SpendingLimitUse<'info>
impl<'info> !Sync for SpendingLimitUse<'info>
impl<'info> Unpin for SpendingLimitUse<'info>
impl<'info> !UnwindSafe for SpendingLimitUse<'info>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more