Skip to main content

Burn Native Tokens

You may want to burn some native tokens. To do so, you will need to call the Account.burn(burn, options) function.

Destroying Foundry

A foundry can only be destroyed (and its storage deposit be claimed) if the circulating supply is zero. Therefore if you control the foundry and want to destroy it in the future, you should consider melting your native tokens instead of burning them.

Code Example

The following example will:

  1. Create a wallet.
  2. Get Alice's account which was created in the first guide.
  3. Get the account's balance.
  4. Burn 1 native token of the first ID with enough funds.
sdk/examples/how_tos/native_tokens/burn.rs
loading...

Expected Output

Balance before burning: 30
Transaction sent: 0x8c93b86b003b0476266f1d4d0c486dfcbbb72d4991eb5d63d5466a6cad93e9f2
Block included: https://explorer.shimmer.network/testnet/block/0x49e2ec7ac5a88b1b0ffcde20bff437b53ef74f38368c28af402435f45dd5b138
Balance after burning: 29