pub struct BurnChecked<'a> {
pub account: &'a AccountView<'a>,
pub mint: &'a AccountView<'a>,
pub authority: &'a AccountView<'a>,
pub amount: u64,
pub decimals: u8,
}Expand description
Builder for SPL Token BurnChecked (instruction index 15).
Decimals-verified counterpart to the legacy Burn builder. Prefer this over
Burn whenever the mint’s decimals are known to the caller,
so the SPL token program can reject a mis-routed call at CPI time.
Fields§
§account: &'a AccountView<'a>§mint: &'a AccountView<'a>§amount: u64§decimals: u8Implementations§
Source§impl BurnChecked<'_>
impl BurnChecked<'_>
pub fn invoke(&self) -> ProgramResult
Sourcepub fn invoke_strict(&self) -> ProgramResult
pub fn invoke_strict(&self) -> ProgramResult
Strict invoke: signer pre-check plus token-account ownership
verification. See TransferChecked::invoke_strict for the
full rationale.
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
Sourcepub fn invoke_signed_strict(&self, signers: &[Signer<'_, '_>]) -> ProgramResult
pub fn invoke_signed_strict(&self, signers: &[Signer<'_, '_>]) -> ProgramResult
Strict PDA-signed invoke. Pre-check the burn-source owner before the CPI so a misrouted signer surfaces a Hopper-branded error instead of an opaque SPL failure.
Source§impl BurnChecked<'_>
impl BurnChecked<'_>
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
account
(one 32-byte compare). Any other owner is refused with
IncorrectProgramId before the CPI.