Burn an NFT
In this guide we will go through the process of burning an NFT
What are NFTs?
NFT, or non-fungible token, refers to a distinctive digital asset typically constructed on blockchain platforms. Unlike cryptocurrencies like Bitcoin or Ethereum, which are interchangeable and have identical values, NFTs are unique and cannot be duplicated or swapped for other assets. This characteristic makes them well-suited for representing digital assets such as art, collectibles, or other exclusive items.
NFTs are commonly established using the ERC721 standard on the Ethereum blockchain. This standard outlines a set of regulations and functions that an NFT contract must adhere to, enabling different NFTs to be compatible and easily traded. Additionally, the concept of ERC1155 has also gained prominence in the blockchain community. ERC1155 is a more advanced token standard that allows for the creation of both fungible and non-fungible tokens within the same smart contract.
This has led to the development of more efficient and cost-effective ways of managing and trading multiple tokens on the blockchain. Our NFT API deploys our battle tested ERC1155 Contracts, allowing you to enjoy its functionality to its fullest potential.
Several popular applications for NFTs include collecting and exchanging digital art, generating distinctive in-game items for video games, and authenticating ownership of tangible assets like real estate or luxury goods.
📘For token creation we support ERC1155 for most of the chains, except for IMX which uses ERC721
Reasons for Burning an NFT
An NFT can’t be ‘deleted’, however it can be ‘burned’. Once an NFT is minted or uploaded to the blockchain, it is considered immutable; this means it will exist on the blockchain forever. An NFT can be ‘burned’ by being sent to an inaccessible address, as it is removed from circulation.
There exist various justifications for the desire to burn an NFT (non-fungible token). Some potential explanations encompass:
Disposing of an unwanted or unnecessary NFT: If in possession of an NFT that is no longer desirable or required, burning serves as a means to permanently eliminate it from circulation. This action proves beneficial, particularly when the NFT occupies unnecessary space on the blockchain or when ensuring its non-utilization by any other party in the future is crucial.
Demonstrating ownership of an NFT: In specific instances, burning an NFT can serve as proof of ownership. For instance, when an NFT symbolizes a physical asset, such as artwork or a collectible, incinerating the NFT serves as evidence of ownership over the physical asset and the right to dispose of it.
Diminishing the supply of a specific NFT: Occasionally, burning an NFT aids in reducing its overall supply, potentially driving up its value. For example, if a limited quantity of a particular NFT is accessible, burning some of them heightens the scarcity of the remaining NFTs, thereby potentially enhancing their value.
Engaging in creative expression: Some individuals opt to burn NFTs as a form of artistic expression. For instance, an artist might create an NFT and subsequently incinerate it as part of a performance or installation. In this context, the act of burning the NFT constitutes an artistic expression in itself.
On the whole, the decision to burn an NFT is a personal choice, contingent upon individual circumstances and objectives bound to your actual use case. It is crucial to thoroughly contemplate the implications of this irreversible action before proceeding.
📘The owner of the token has the right to burn it.
How to burn an NFT?
To burn an NFT, the wallet that owns the NFT needs to execute the burn
function on the NFT Contract.
🚧
Requirements:
ID
of the wallet that holds the NFTThe public wallet
address
that holds the NFTToken
ID
that is to be burnedContract address
of the NFT
As input parameters of the burn function we have:
id
: Token ID of the NFT that will get burnedaccount (
address
): Wallet address where the NFT is heldamount
: Number of tokens to be burned, in case of an ERC1155 token
Following the documentation, we can see the burn
function:
To call the burn
function on the contract, we have to prepare the endpoint for that. We will do it at a later stage.
We can use the endpoint to list the NFTs, then we can choose from the list the NFT we want to burn.
More importantly, from the response we will fetch the Token ID
and the Contract Address
of the NFT, both required parameters to call the burn
function.
Let’s do this step by step.
1. List the NFTs for a wallet
Call the following endpoint to list all NFTs held in the wallet:
HTTP
Path Variables:
walletId
: This is the ID of a wallet.
Response Body:
📘From here we choose the NFT that will be burned, thus, we take the required parameters for the
burn
function:
result.
id
: This is the token ID of the NFTresult.contract.
address
: This is the contract address of the NFT
JSON
👍Now you should have the following:
Token
ID
of the NFTContract
address
of the NFTWallet
ID
that holds the NFTPublic wallet
address
that holds the NFT
2. Burn
Now we need to prepare the execute function to call the burn function as follows:
HTTP
Signing-Method
Header
id:value
id
: This is the ID of the signing method
value
: This is the value of the signing method
Request Body:
transactionRequest.type
This will be CONTRACT_EXECUTION
String
✅
transactionRequest.walletId
The ID
of the wallet holding the NFT
String
✅
transactionRequest.to
The contract address of the NFT
String
✅
transactionRequest.secretType
The blockchain of the NFT (in this case, its MATIC
)
String
✅
transactionRequest.functionName
This will be burn
String
✅
transactionRequest.inputs
An array of inputs for the burn
function (see example below)
Array
✅
JSON
3. Burn Batch (Burn multiple NFTs at once)
Last but not least, for the NFT Contracts that were created using ERC1155, we can burn multiple tokens at once. To do so, instead of the burn
function, we need to call burnbatch
, as shown in here.
The burnBatch
function uses Arrays
as an input parameter for id
and amount
.
📘The NFTs have to be from the same contract address in order to batch burn them all.
As input parameters of the burn function we have:
ids
: Token ID's of the NFT that will get burnedaccount (
address
): Wallet address where the NFTs are heldamounts
: Number of tokens to be burned, in case of an ERC1155 token
Call the following endpoint to burn multiple NFTs together.
HTTP
Signing-Method
Header
id:value
id
: This is the ID of the signing method
value
: This is the value of the signing method
Request Body:
transactionRequest.type
This will be CONTRACT_EXECUTION
String
✅
transactionRequest.walletId
The ID
of the wallet holding the NFT
String
✅
transactionRequest.to
The contract address of the NFT
String
✅
transactionRequest.secretType
The blockchain of the NFT (in this case, its MATIC
)
String
✅
transactionRequest.functionName
This will be burnBatch
String
✅
transactionRequest.inputs
An array of inputs for the burn
function (see example below)
Array
✅
JSON
Last updated