pub struct MintToChecked<'a> {
pub mint: &'a AccountView<'a>,
pub account: &'a AccountView<'a>,
pub mint_authority: &'a AccountView<'a>,
pub amount: u64,
pub decimals: u8,
}Expand description
Builder for SPL Token MintToChecked (instruction index 14).
Checks decimals through the classic SPL Token program, like TransferChecked.
For Token-2022, use invoke_on(TokenProgram::Token2022, ..) or invoke_for_owner.
Fields§
§mint: &'a AccountView<'a>§account: &'a AccountView<'a>§amount: u64§decimals: u8Implementations§
Source§impl MintToChecked<'_>
impl MintToChecked<'_>
pub fn invoke(&self) -> ProgramResult
pub fn invoke_signed(&self, signers: &[Signer<'_, '_>]) -> ProgramResult
pub fn invoke_multisig( &self, multisig_signers: &[&AccountView<'_>], ) -> ProgramResult
pub fn invoke_signed_multisig( &self, multisig_signers: &[&AccountView<'_>], signers: &[Signer<'_, '_>], ) -> ProgramResult
Source§impl MintToChecked<'_>
impl MintToChecked<'_>
Sourcepub fn invoke_on(
&self,
program: TokenProgram,
multisig_signers: &[&AccountView<'_>],
signers: &[Signer<'_, '_>],
) -> ProgramResult
pub fn invoke_on( &self, program: TokenProgram, multisig_signers: &[&AccountView<'_>], signers: &[Signer<'_, '_>], ) -> ProgramResult
Send this instruction to an explicit token program.
multisig_signers is empty for a single-key authority; when
signers is empty the authority (or every multisig signer)
must have signed the transaction directly.
Sourcepub fn invoke_for_owner(
&self,
multisig_signers: &[&AccountView<'_>],
signers: &[Signer<'_, '_>],
) -> ProgramResult
pub fn invoke_for_owner( &self, multisig_signers: &[&AccountView<'_>], signers: &[Signer<'_, '_>], ) -> ProgramResult
Send this instruction to whichever token program owns
mint
(one 32-byte compare). Any other owner is refused with
IncorrectProgramId before the CPI.
Trait Implementations§
Source§impl<'a, 'x: 'a> TokenInstruction<'a> for MintToChecked<'x>
impl<'a, 'x: 'a> TokenInstruction<'a> for MintToChecked<'x>
fn emit( &self, multisig_signers: &[&'a AccountView<'a>], sink: &mut impl TokenSink<'a>, ) -> ProgramResult
Auto Trait Implementations§
impl<'a> !Send for MintToChecked<'a>
impl<'a> !Sync for MintToChecked<'a>
impl<'a> Freeze for MintToChecked<'a>
impl<'a> RefUnwindSafe for MintToChecked<'a>
impl<'a> Unpin for MintToChecked<'a>
impl<'a> UnsafeUnpin for MintToChecked<'a>
impl<'a> UnwindSafe for MintToChecked<'a>
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