Hello, for an ERC1155 contract, each tokenId can have 1 minted token or many minted tokens under it, but how do I uniquely identify each token that was minted under the tokenId?
I see at the end of the mint
operation, there is a bytes data
option, and I'm wondering if this is how to give each minted token under the token Id a unique identifier - OpenZeppelin ERC1155
If I can set the bytes data
of each minted token under the tokenId
, how do I get the bytes data
of each token under that tokenId? This would then allow me to map attributes to each token that was minted under each tokenId.
For example (psuedocode):
NFT-like tokens (need identifiers) = tokenId1 -> [token1, token2, token3, token4]
ERC20-like tokens (don't need identifiers) = tokenId2 -> [1,000,000 tokens]
Instead of just tokenId1 -> [(abstractly existing token only identifiable by balanceOf(account,tokenId1)), (abstractly existing token only identifiable by balanceOf(account,tokenId1)), (abstractly existing token only identifiable by balanceOf(account,tokenId1)), (abstractly existing token only identifiable by balanceOf(account,tokenId1))]