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.
Auto Trait Implementations§
impl<'a> !Send for BurnChecked<'a>
impl<'a> !Sync for BurnChecked<'a>
impl<'a> Freeze for BurnChecked<'a>
impl<'a> RefUnwindSafe for BurnChecked<'a>
impl<'a> Unpin for BurnChecked<'a>
impl<'a> UnsafeUnpin for BurnChecked<'a>
impl<'a> UnwindSafe for BurnChecked<'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