I'm trying to write a game item contract where the player can upgrade the items. For this, I need to be able to clearly distinct the different instances of the same tokenID.

Let me explain, if : ID=0 -> weapon=sword

But if PlayerA owns a sword I don't want him to be able to upgrade all the swords of the game, only the specific "instance ID" in the tokenID=0 :D

So far I kinda get what mapping and logic I need to implement but I don't know how to "pass" the instance ID to my token when I actually mint it :/

Any help would be really appreciated :)

1 Answer 1


What i do currently is override the tokenURI function from ERC721 manipulating externaly the metadata of each token, then i redeploy the metadata on ifps reatributing stats for the gameable NFT, but you can also mint a new token that represents the evolution of that previously tokenID.

There are a couple of solution you just need to use your imagination to abstract it.

  • Thanks mate but it doesn't really solve my problem. I already have my way to deal with the stats for my ERC721 Characters. My issue is that unlike 721 tokens (which can be easily identified by their unique tokenID) ERC1155 token instances are referred to as their "type" ID not their "unique instance" ID Aug 6, 2023 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.