go-bitsong
go-bitsong copied to clipboard
NFT structure
Here I'm posting some reasonings about the structure of the object for the nft module.
By points:
- Why do we use the
coll_id(Collection ID) inside theMetadatastructure? Is it a matter of linking the metadata to the collection to generate a sort of versioning of the metadata for a collection? - What about separating the MetadataID from the collectionID?
I mean, could it be better to use a global ID counter for the MetadataID instead of having a list of metadataID for each collection? This also causes the need for a
last_metadata_idsarray. - What about using the
update_authority(same formetadata_authority) field to see if a collection (same for metadata) is mutable or not? In thefantokenmodule, the authority address is used such that if it is empty, the asset cannot be modified anymore. What about using the same pattern here too? Is it possible, and moreover, is it a good choice? - What about using the
minternaming instead ofmintAuthorityandauthorityinstead ofmetadata_authorityorupdate_authority? It would match the same naming used on thefantokenmodule. - Why do we choose to use
CollID,MetadataIDandSeqin theNFTID, which in this case are three integers? - Since the
metadatacontains thecollectionID, which is the sense of repeating thecollectionIDon the NFT too?
- We use collection id on metadata to start metadata id from 1 per collection. If metadata id is used globally, collection creators won't know that what their metadata ids will be for their collections.
- Originally, it used to use global metadata id, but for the reason
1, global metadata id is converted to local metadata id per collection. - metadata could be updated while it's in auction, and that's why mint authority and update authority has been seprated
- I think it make sense to change the term to
minterandauthority
- Why this (namely "[...]collection creators won't know that what their metadata ids will be for their collections.") should be a problem? We could query
Metadataby Authority for example. What do you think? - Sorry, I was not clear enough in the explanation. I was meaning:
What about using only the
update_authorityfield to see if a collection is mutable or not, instead of also using theis_mutableattribute? We could set theupdate_authorityto an empty address to disable themutability. You can see an example of implementation in thefantokenmodule (here there is a short to the docs, where you can find a slightly different explanation) What do you think about it? - Nice! 💪