2.3 Burning Mechanism

The handle/sub-handle gets burned and are issued a new token ID when another user mints an expired handle/sub-handle using the mintHandle or mintSubhandle function. It's crucial for owners to renew before the expiration date to prevent reclamation through the mint function. When a parent handle gets reclaimed by another user, the previous parent handle owner loses any upcoming revenue share from sub-handle owners, which is then transferred to the new owner of the handle. Burn Handle:


/**
    * Function to burn an expired handle.
    * @param tokenId The token ID associated with the handle.
    */
    function burnHandle(uint256 tokenId) internal {
        // Get the handle name with suffix and the corresponding handle.
        string memory handleWithSuffix = handleNames[tokenId];
        Handle storage handle = handles[handleWithSuffix];

        // Check if the handle is registered.
        require(handle.tokenId != 0, "Handle not registered");
        // Check if the handle is expired.
        require(handle.expirationTimestamp <= block.timestamp, "Handle is not expired");

        address owner = ownerOf(tokenId); // Get the owner of the token.

        // Mark the token as burned
        burnedTokenIds[tokenId] = true;

        // Burn the token
        _burn(tokenId);

        emit HandleBurned(owner, handleWithSuffix, tokenId);
    }
                                                                

Burn Sub-Handle:

Example:

0xAb...835cb2 < Token Id 1 = testing123.₿ < Burned < Minted < Token Id 2 Issued = testing123.₿ < 0x4B...2C02db

Last updated