# Token Burn Guard

&#x20;If the payer does not have the required amount of tokens to burn, minting will fail.

Burn tokens from

the payer's token account

Core Candy Machine

Owner: Core Candy Machine Core Program

Candy Guard

Owner: Core Candy Guard Program

GuardsToken Burn- Amount- Mint...

Mint Account

Owner: Token Program

Mint from

*Core Candy Guard Program*

Access Control

Mint from

*Core Candy Machine Program*

Mint Logic

Asset

[React Flow](https://reactflow.dev/)

### Guard Settings <a href="#guard-settings" id="guard-settings"></a>

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

JavaScript

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

API References: [create](https://mpl-core-candy-machine.typedoc.metaplex.com/functions/create.html), [TokenBurn](https://mpl-core-candy-machine.typedoc.metaplex.com/types/TokenBurnArgs.html)

### Mint Settings <a href="#mint-settings" id="mint-settings"></a>

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](https://github.com/metaplex-foundation/mpl-core-candy-machine/tree/main/programs/candy-guard#tokenburn) for more details.

Mint with the NFT Burn Guard

JavaScript

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

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

API References: [mintV1](https://mpl-core-candy-machine.typedoc.metaplex.com/functions/mintV1.html), [TokenBurnMintArgs](https://mpl-core-candy-machine.typedoc.metaplex.com/types/TokenBurnMintArgs.html)

### Route Instruction <a href="#route-instruction" id="route-instruction"></a>

*The Token Burn guard does not support the route instruction.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://8bit-1.gitbook.io/solibrary/token-burn-guard.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
