How to use/interact with metadata of ERC721

Hi all,

I’m trying to do a simple proof of concept where I have 2 different NFTs and want to combine them in some way to make a brand new 3rd NFT. I can’t seem to find a good tutorial on how to do something like this.

NFT-A metadata armor value = 5
NFT-B metadata armor boost = +1
Combining NFT-A and NFT-B should yield NFT-C with metadata armor value = 6.

I don’t know how to do this with a smart contract. I’m very new to programming so I’m sure this is easier to do off chain, but I’m not sure how to do that yet either.

Can anyone point me to an example of how to use the metadata for these NFTs so that they can be used for more than just art?

This could be done with a contract function

  • Function arguments: tokenIds to combine
  • Burns input tokens by sending to zero address 0x0....
  • Creates a new NFT with the combined stats and transfers it to the caller
  • Returns the new NFT tokenId
  • Throws if the caller does not own the input NFTs or the NFTs are not allowed to be combined