> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# Mint & Burn Tokens

## Overview

Minting and burning control a TIP-20 token's circulating supply. Accounts with the issuer role can
mint new supply to any account and burn supply from their own balance, while issuers can also burn
funds that a transfer policy has blocked.

[See the TIP-20 specification](https://docs.tempo.xyz/protocol/tip20/overview)

## Recipes

These recipes assume you have [set up a Tempo client](/tempo).

### Mint Tokens

Issue new supply with [`token.mintSync`](/tempo/actions/token.mint). The caller must hold the issuer
role for the token. Amounts are base-unit bigints, or a `{ formatted }`
object parsed with the token's declared decimals.

:::code-group
```ts twoslash [example.ts]
import { client } from './viem.config'

const { receipt } = await client.token.mintSync({
  amount: { formatted: '10.5' },
  to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb',
  token: '0x20c0000000000000000000000000000000000000',
})
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
// [!include ~/snippets/tempo/viem.config.ts:setup]
```
:::

### Burn Tokens

Destroy tokens from your own balance with [`token.burnSync`](/tempo/actions/token.burn). Holders of
the issuer role can also burn funds that a transfer policy has blocked with
[`token.burnBlockedSync`](/tempo/actions/token.burnBlocked).

:::code-group
```ts twoslash [example.ts]
import { client } from './viem.config'

const { receipt } = await client.token.burnSync({
  amount: { formatted: '10.5' },
  token: '0x20c0000000000000000000000000000000000000',
})
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
// [!include ~/snippets/tempo/viem.config.ts:setup]
```
:::

## Best Practices

### Always Use Base Units

Token amounts are integers in the token's smallest unit. Pass `{ formatted }` amounts (with
explicit `decimals` for tokens the Client does not declare), and format base units back for
display with [`Value.format`](/docs/utilities/value) to avoid off-by-magnitude errors.

### Respect the Supply Cap

If the token has a supply cap, mints that would exceed it revert. Read the cap and current total
supply with [`token.getMetadata`](/tempo/actions/token.getMetadata) before minting large amounts.

### Burn Blocked Funds Deliberately

`token.burnBlocked` permanently removes funds that a transfer policy has frozen. Use it only as part
of a documented compliance process, since the burn cannot be reversed.

## See More

<Cards>
  <Card icon="lucide:arrow-left-right" title="Transfer Tokens" description="Move balances and authorize spenders for your token." to="/tempo/guides/transfer-tokens" />

  <Card icon="lucide:user-cog" title="Manage Token Roles & Supply" description="Grant the issuer role required to mint and burn." to="/tempo/guides/manage-token-roles" />

  <Card icon="lucide:square-function" title="token.mint" description="Mint new TIP-20 token supply." to="/tempo/actions/token.mint" />

  <Card icon="lucide:book-open" title="Tempo Docs: TIP-20" description="The TIP-20 stablecoin token standard." to="https://docs.tempo.xyz/protocol/tip20/overview" />
</Cards>
