Available Guards

Token Burn

Overview

The Token Burn guard allows minting by burning some of the payer’s tokens from a configured mint account. If the payer does not have the required amount of tokens to burn, minting will fail.

Guard Settings

The Token Burn guard contains the following settings:

  • Amount: The number of tokens to burn.
  • Mint: The address of the mint account defining the SPL Token we want to burn.

Set up a Candy Machine using the NFT Burn guard

create(umi, {
  // ...
  guards: {
    tokenBurn: some({
      amount: 300,
      mint: tokenMint.publicKey,
    }),
  },
});

API References: create, TokenBurn

Mint Settings

The Token Burn guard contains the following Mint Settings:

  • Mint: The address of the mint account defining the SPL Token we want to burn.

Note that, if you’re planning on constructing instructions without the help of our SDKs, you will need to provide these Mint Settings and more as a combination of instruction arguments and remaining accounts. See the Candy Guard’s program documentation for more details.

Mint with the NFT Burn Guard

You may pass the Mint Settings of the Token Burn guard using the mintArgs argument like so.

mintV2(umi, {
  // ...
  mintArgs: {
    tokenBurn: some({ mint: tokenMint.publicKey }),
  },
});

API References: mintV2, TokenBurnMintArgs

Route Instruction

The Token Burn guard does not support the route instruction.

Previous
Third Party Signer