Venly API
Search…
How to burn an NFT
Small guide on how to burn an NFT
This guide assumes that the NFT that is going to be burned was created by our NFT API and therefore uses functions that are available in our contracts.
In order to burn an NFT, we will need to execute a function on the NFT contract. In the example below we are calling the contract 0xe80f3baa739c18fd4ebf97716529a4b85be464dd and more specifically the function burn.
As input parameters we have
  • Token id (Token id that will get burned)
  • Contract address (Address of the contract that is managing the token)
  • Amount (Number of tokens to be burned, in case of an ERC1155 token)
Endpoint
1
POST: https://api.arkane.network/api/transactions/execute
Copied!
Request Body
1
{
2
"pincode": "1234",
3
"transactionRequest": {
4
"type": "CONTRACT_EXECUTION",
5
"walletId": "7a9a754e-6331-46a7-a5ac-e74b04df18d0",
6
"to": "0xe80f3baa739c18fd4ebf97716529a4b85be464dd",
7
"secretType": "MATIC",
8
"functionName": "burn",
9
"inputs": [
10
{
11
"type": "uint256",
12
"value": "402"
13
},
14
{
15
"type": "address",
16
"value": "0xe80f3baa739c18fd4ebf97716529a4b85be464dd"
17
},
18
{
19
"type": "uint256",
20
"value": "1"
21
}
22
]
23
}
24
}
Copied!

Burning multiple tokens

Our contract also allows you to burn multiple tokens with one transaction. For we use the burnBatch function instead of the burn function. The burnBatch function used Arrays as an input parameter for id and amount.
Last modified 2mo ago
Copy link