Token Burning
Burn Contract with ERC721 Confirmation
Data Flow: Token Burning Procedure:
User initiates the burn mechanism, defining both the quantity and specific ID of the ERC1155 tokens designated for destruction.
The specified ERC1155 tokens undergo removal from the user's possession.
Subsequently, an ERC721 token gets minted, bearing the proof-of-burn, and then gets allocated to the user's address.
Proof-of-Burn via ERC721:
The minted ERC721 token encompasses a metadata payload that encapsulates the entirety of the burn event. This includes:
The exact quantity of the ERC1155 tokens annihilated.
The precise ID attached to the ERC1155 tokens.
A timestamp marking the event.
The initiator's Ethereum address.
Functions:
burnTokensAndGetProof:
Objective: Authorize users to eradicate their ERC1155 tokens and subsequently obtain an ERC721 token as a proof-of-burn.
Input Parameters:
erc1155TokenId
: ERC1155 token's distinctive identifier that's set for burn.amount
: Quantity of ERC1155 tokens marked for annihilation.
Output: Deploys an ERC721 token and registers it under the user's address.
Internal Actions: The function begins by torching the specified ERC1155 tokens from the user's stash. It then mints a unique ERC721 token, links it with a distinct URI representing the burn details, and finally allocates it to the user.
Last updated