I came across this forum while researching NFT standards and wanted to ask or at least firm up my understanding of a few things regarding the differences/capabilities of the standard and these contracts in general.
I have read through the other posts on here and I can understand the limitation but wanted to get peoples opinions on some ideas I had for onchain data and general minting rules.
As we see generally minting a token in an ERC1155 will give you back an id. (0x01) lets say. So this is ID of one type of contract and a qty of 1.
In this case I can have multiples minted of ID=0x01 and these can be assigned to multiple addresses?
How then to only have one ID=0x01 NFT issues? These are preminted with a total of 1?
I have seen some NFT examples where they place some constants in the contract to describe the ID types (card types for example, special, legendary etc). This would be good if all those cards were idempotent/similar stats/details so the ID resolves to a common JSON metadata file they all share.
- Have some uniqueness in the stats off chain?
- Have some uniqueness in the stats on chain?
In this I mean, perhaps you generate a class of card (special card10) and then you have some element of random stats given to that card (XP boosts etc). At this point I think you are going to have to create a unique ID for each and every card in your universe?
Now the ID space is a 64 bit hex number so there are plenty in there so I think that would fine.
Would any issues come using such large numbers when packing and sending them onto other addresses or is the O(1) lookup and searching happening in the code here? There is no time costs to larger and larger IDs?
In the case of stats on chain, how best to store that? Say you wanted to store 4-6 values on the NFT on chain for some use in a smart contract in such a way the JSON metadata is not a possibility? Would you store that in the same NFT as an array to ID mapping or would you embed it in the ID using some kind of bitwise shift? (Top 3/4 of the ID are the monotonically incrementing ID counter and the bottom 1/4 is the array of stats in 4byte blocks or something).
I hope these questions make sense, I’m trying to understand how the universe of NFTs can be generated and stored, any performance considerations along side using them.
And also, some on-chain data storage for pertinent data that we would like to have on-chain attached to an NFT, how best would that be achieved in a clear and concise manner that isn’t too costly.