Posts

How to burn an Hive Engine NFT (a Hive Punk for example)

avatar of @themarkymark
25
@themarkymark
·
·
0 views
·
3 min read

I have been asked a few times on how to burn a Hive Punk, and currently someone is trying to do it so I here is a guide on how to do it.

Currently no punks have been burned after minting as most people don't want to burn their punks and you cannot simply transfer punks to @null as the Hive Engine NFT contract doesn't allow it.

Around 20 punks got burned during the minting process due to user error, oddly the Hive Engine NFT contract allows you to mint to null but not transfer.

There is however a specific transaction called BURN that allows you to send a NFT to null, I will walk you through an easy way to do this using Hive Keychain with no programming knowledge at all.

The operation we will use is formatted like this:

{ 
    "contractName": "nft", 
    "contractAction": "burn", 
    "contractPayload": { 
        "nfts": [ {"symbol":"TESTNFT", "ids":["666"]} ] 
    } 
} 

We are going to adjust this to fit our needs. I purchased a super cheap NFT from DCity to use as an example.

  • NFT Symbol: CITY
  • ID: 1616262

Using my HiveEngine bot, you can see I currently own this NFT.

C:\Users\Mal\Desktop>python hiveengine.py --symbol CITY --nft 1616262 
{   '_id': 1616262, 
    'account': 'themarkymark', 
    'lockedTokens': {'SIM': '5'}, 
    'ownedBy': 'u', 
    'previousAccount': 'nftmarket', 
    'previousOwnedBy': 'c', 
    'properties': {'name': 'Basic Accounting', 'type': 'tech'}} 

If I try to transfer this NFT to @null, it will fail.

I am going to customize the burn operation to reflect this NFT.

{ 
    "contractName": "nft", 
    "contractAction": "burn", 
    "contractPayload": { 
        "nfts": [ {"symbol":"CITY", "ids":["1616262"]} ] 
    } 
} 

First you will need to access your browsers dev console, this is typically done by hitting F12 in Windows.

You should see a window that looks like this:

From here you want to type the previously modified command prefixed by json =, for example.

After you hit enter, you will just see a strange line confirming the previous operation. If you want to know what we just did, we set the variable json to a json object that represents the operation we want to do. This actually does nothing but prepare for the next operation that will broadcast what we want to the blockchain.

Seeing as Hive Keychain is injected into every page when you have the browser extension, we can simply call it to broadcast our requested operation.

hive_keychain.requestCustomJson('themarkymark', 'ssc-mainnet-hive', 'Active', JSON.stringify(json), 'Burn NFT', console.log)

You will want to change the username used to broadcast, otherwise everything else should be fine. You will be prompted by Keychain to confirm, and you click DATA to confirm the operation requested.

If you confirm the operation, you should get an output similar to this.

This means the broadcast was sent, it does not mean the operation completed successfully. The way Hive Engine works, all actions are "requests" in the form of custom jsons. If you own the NFT, and did everything correctly, Hive Engine will then take care of the operation on your behalf and do the transfer. Custom jsons are not guarantee an operation happened, I could easily make a request to sell 10M Leo tokens, but if I don't have them Hive Engine will ignore my request.

Let's go back to my HiveEngine bot and confirm the current state of CITY nft ID 1616262

C:\Users\Mal\Desktop>python hiveengine.py --symbol CITY --nft 1616262 
{   '_id': 1616262, 
    'account': 'null', 
    'lockedTokens': {}, 
    'ownedBy': 'u', 
    'previousAccount': 'themarkymark', 
    'previousOwnedBy': 'u', 
    'properties': {'name': 'Basic Accounting', 'type': 'tech'}} 

As you can see here, the current owner of the nft is @null and previous owner was @themarkymark.

You can use this same process to burn a Hive Punk or any other NFT you like from Hive Engine.

Warning, this process is unreversible and will result in you losing the NFT for good.

Posted Using LeoFinance Beta