Struct quarry_merge_mine::WithdrawTokens [−][src]
pub struct WithdrawTokens<'info> {
pub owner: Signer<'info>,
pub pool: Account<'info, MergePool>,
pub mm: Account<'info, MergeMiner>,
pub withdraw_mint: Account<'info, Mint>,
pub mm_token_account: Account<'info, TokenAccount>,
pub token_destination: Account<'info, TokenAccount>,
pub token_program: Program<'info, Token>,
}
Expand description
quarry_merge_mine::withdraw_tokens accounts
Fields
owner: Signer<'info>
Owner of the MergeMiner.
pool: Account<'info, MergePool>
The MergePool to withdraw from.
mm: Account<'info, MergeMiner>
The MergeMiner to withdraw from.
withdraw_mint: Account<'info, Mint>
The Mint being withdrawn from the MergeMiner.
mm_token_account: Account<'info, TokenAccount>
A TokenAccount owned by the MergeMiner to withdraw from. Must be the [Pool::primary_mint] or a replica mint.
token_destination: Account<'info, TokenAccount>
Account to send tokens to.
token_program: Program<'info, Token>
The token program
Implementations
Conversion.
Trait Implementations
fn try_accounts(
program_id: &Pubkey,
accounts: &mut &[AccountInfo<'info>],
ix_data: &[u8]
) -> Result<Self, ProgramError>
fn try_accounts(
program_id: &Pubkey,
accounts: &mut &[AccountInfo<'info>],
ix_data: &[u8]
) -> Result<Self, ProgramError>
Returns the validated accounts struct. What constitutes “valid” is
program dependent. However, users of these types should never have to
worry about account substitution attacks. For example, if a program
expects a 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 more
program_id
is the currently executing program.
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. Read more
Validates the account struct.