Skip to main content

Burn NFT

When you burn an NFT, you permanently remove it from the ledger state, rendering it unusable and nontransferable. The associated storage deposit will automatically be returned to its original account.

irreversible

Burning an NFT is irreversible and signifies the destruction of its digital representation and associated ownership rights.

Example Code

The following example will:

  1. Instantiate a Wallet, get Alice's Account which was created in the first guide and sync it.
  2. Set the nft_id as the first NFT in the balance.
sdk/examples/how_tos/nfts/burn_nft.rs
loading...
  1. Burn the NFT by calling the Account.burn() function.
sdk/examples/how_tos/nfts/burn_nft.rs
loading...

Full Example Code

sdk/examples/how_tos/nfts/burn_nft.rs
loading...

Expected Output

Transaction sent: 0xed7955f0c2d1a1e267b61b0a1859b58a9b5112385c18feae1a198f3a9992d19e
Block included: https://explorer.shimmer.network/testnet/block/0x1c4fe528677089eeffaa01eefe34eda4a75f7c6f2020d83af61221571979f616
Burned NFT 0xd2356323fad25efa3ec772a341d122eaf5ea3bf1cba48b70a1038b7d00bc385d