Best practice to burn two tokens to make one?

I would like to create a simple game where players can burn two separate 1155 NFTs to mint one new 1155 token.

What is the best way to achieve this? I am obviously a beginner so any help is greatly appreciated!

To say this in a heuristic way, you can create a function called melt, in which the burn function of ERC1155 contract is called twice for the two NFTs respectively. Then a mint function is called to create a new 1155 NFT. Some conditions might be checked in this process, but the general procedure is pretty straightforward.

2 Likes

Perfect thank you for your explanation!

1 Like