SPLTokenProgram.burnChecked constructor
SPLTokenProgram.burnChecked({
- required SPLTokenBurnCheckedLayout layout,
- required SolAddress account,
- required SolAddress mint,
- required SolAddress owner,
- SolAddress programId = SPLTokenProgramConst.tokenProgramId,
- List<
SolAddress> multiSigners = const [],
Burns tokens by removing them from an account. SPLTokenProgram.burnChecked does not support accounts associated with the native mint, use SPLTokenProgram.closeAccount instead.
This instruction differs from Burn in that the decimals value is checked by the caller.
Implementation
factory SPLTokenProgram.burnChecked({
required SPLTokenBurnCheckedLayout layout,
/// The account to burn from.
required SolAddress account,
/// The token mint.
required SolAddress mint,
/// The account's owner/delegate.
required SolAddress owner,
SolAddress programId = SPLTokenProgramConst.tokenProgramId,
/// Multisignature owner/delegate
List<SolAddress> multiSigners = const [],
}) {
return SPLTokenProgram(
layout: layout,
keys: SPLTokenUtils.buildKeys(keys: [
account.toWritable(),
mint.toWritable(),
], owner: owner, multiSigners: multiSigners),
programId: programId);
}