Skip to main content

Burning / Destroying Tokens and Collections

"Burning" refers to the process of decreasing a token's supply and removing it from circulation, or in some cases, even removing the token from the blockchain entirely.
Burning a token with ENJ Infusion

(often called "Melting") releases the Infused ENJ to the holder.

What you'll need:
  • Some Enjin Coin on Enjin Matrixchain to pay for Transaction Fees.
    You can obtain cENJ (Canary ENJ) for testing from the Canary faucet.
  • An Enjin Platform Account.
  • A Collection or a Token to burn/destroy.

There are two ways to Burn a token:

  1. Using the Platform User Interface
  2. Using the GraphQL API

Option A. Using the Enjin Dashboard

Burning token's supply

In the Platform menu, navigate to "Tokens".
Locate the token you wish to burn, click the 3 vertical dots () to it's right, then click the "Burn" button.

Burning a Token

Insert the amount of tokens to Burn, and click on the "Burn" button.

Burn Token Form

The Transaction Request will then appear in the "Transactions" menu.

Burn Transaction Request Banner

Pending Burn Transaction

Since this request requires a Transaction

, it'll need to be signed with your Wallet.

  • If a Wallet Daemon is running and configured, the transaction request will be signed automatically.
  • If a wallet is connected such as the Enjin Wallet or Polkadot.js, the transaction must be signed manually by clicking the "Sign" button and approving the signature request in your wallet.

Destroying a token and removing it from the Blockchain

To destroy a token, these requirements must be met:
  • The caller is the collection owner
  • The token has no attributes
    • If the token has attributes, you can remove the attributes by clicking the 3 vertical dots () next to the token, followed by "Attributes" and selecting "Remove All".
  • The token has 0 supply
    • If the token has supply, you can follow the above guide Burning token's supply to remove all token supply (as long as you own all of the token's supply)
      Note - you can remove the supply and destroy the token in the same Burn transaction.

Burning a token and destroying it are two different actions.
The action demonstrated above is the action of burning a token, which decreases it's circulating supply.
While destroying a token removes the token from the blockchain, and retrieves the Storage Deposit

to the collection owner.

To destroy a token, follow the above instructions for Burning a token, but make sure to tick the Remove Token Storage box.

Destroying a Token

Destroying a collection

To destroy a collection, these requirements must be met:
  • The caller is the collection owner
  • The collection has no attributes
    • If the collection has attributes, you can remove the attributes by clicking the 3 vertical dots () next to the collection, followed by "Attributes" and selecting "Remove All".
  • The collection has 0 tokens in storage

In the Platform menu, navigate to "Collections".
Locate the collection you wish to destroy, click the 3 vertical dots () to it's right, then click the "Destroy" button.

Destroying a Collection

Then, confirm by clicking the "Destroy" button

Destroy Collection Form

The Transaction Request will then appear in the "Transactions" menu

Destroy Collection Transaction Request Banner

Pending Destroy Collection Transaction

Since this request requires a Transaction

, it'll need to be signed with your Wallet.

  • If a Wallet Daemon is running and configured, the transaction request will be signed automatically.
  • If a wallet is connected such as the Enjin Wallet or Polkadot.js, the transaction must be signed manually by clicking the "Sign" button and approving the signature request in your wallet.

Option B. Using the Enjin API & SDKs

Burning token's supply

Use the Burn mutation:

mutation BurnToken{
Burn(
collectionId: 68844 #Specify the Collection ID
params: {
tokenId: {integer: 0} #Specify the Token ID
amount: 1 #Specify the amount of supply to burn
}
) {
id
method
state
}
}

Once the transaction is executed, the token supply will be burned

Destroying a token and removing it from the Blockchain

To destroy a token, these requirements must be met:
  • The caller is the collection owner
  • The token has no attributes
    • If the token has attributes, they can be removed using the RemoveAllAttributes mutation
  • The token has 0 supply
    • You can remove the supply and destroy the token in the same Burn transaction.

Use the Burn mutation, and add removeTokenStorage: true property

mutation DestroyToken{
Burn(
collectionId: 68844 #Specify the Collection ID
params: {
tokenId: {integer: 0} #Specify the Token ID
amount: 1 #Specify the amount of supply to burn
removeTokenStorage: true
}
) {
id
method
state
}
}

Once the transaction is executed, the token will be destroyed and the Storage Deposit

will be retrieved.

Destroying a collection

To destroy a collection, these requirements must be met:
  • The caller is the collection owner
  • The collection has no attributes
    • If the collection has attributes, they can be removed using the RemoveAllAttributes mutation
  • The collection has 0 tokens in storage
    • If the collection has some tokens, you can the above instructions for Destroying a token for each of the tokens in the collection, to destroy them all.
mutation DestroyCollection {
DestroyCollection(
collectionId: 68844 #Specify the Collection ID
) {
id
method
state
}
}

Once the transaction is executed, the collection will be destroyed.