pub fn burn_simple<'info>(
mint: AccountInfo<'info>,
token_program_id: AccountInfo<'info>,
source_pubkey: AccountInfo<'info>,
authority_pubkey: AccountInfo<'info>,
amount: u64,
signer_seeds: &[&[u8]],
) -> Result<()>Expand description
Burns SPL tokens from an account.
This function allows you to burn (destroy) a specified number of SPL tokens from
a source account. The transaction is signed using the provided signer_seeds.
§Arguments
mint- The mint account of the token.token_program_id- The token program account (usuallyspl_token).source_pubkey- The account from which tokens will be burned.authority_pubkey- The account authorized to burn the tokens.amount- The amount of tokens to burn.signer_seeds- A slice of slices of seeds for signing the transaction.
§Example
use simplespl::burn_simple;
use anchor_lang::solana_program::account_info::AccountInfo;
burn_simple(
mint_account_info,
token_program_id,
source_account_info,
authority_account_info,
1000, // Burn 1000 tokens
&[&signer_seeds],
).unwrap();