@benji @skilesare @dieter.sommer @cryptoschindler , developers on this community.
In the ICRC-7 standard, the icrc7_token_metadata
method returns metadata for a given set of tokens. The 7mint
block schema also contains this same metadata.
This results in an issue, where for any given token the method could return metadata that is different from the block schema metadata. Which means the history blocks cannot recreate a given ledger state at any point in time.
To resolve this issue I had the following ideas in mind. Please respond to this forum post and poll to indicate which idea would have your preference, which ideas you’d object to and if you have any other ideas.
1. Make metadata static
Update the spec to require the metadata of a token to never change. For dynamic metadata, another extension standard like ICRC-60 would add support for dynamic metadata with another method and block schema at a later time.
Optionally, the spec could be defined as SHOULD
instead of MUST
to provide for a stopgap that allows for dynamic metadata until a standard for dynamic metadata is available and can be migrated to.
Since static metadata doesn’t change, this data can be indexed without the need to ever update this data again. Though since the ICRC-3 history is a single chain, an indexer could just as well process metadata changes since it already need to keep track of mints and burns anyway.
2. Add metadata changed block
Update the spec to add an additional block for metadata changes. Optionally, the collection metadata could have an entry to indicate that token metadata is dynamic or static.
This would mean though that a ledger can only have static or dynamic token metadata but not both. One example where you might want both could be an NFT token of a game character that has base stats that never change and dynamic stats that change e.g. level.
On the other hand, nothing prevents a ledger implementation to go out of spec and modify token metadata anyway even though it indicates the data is static. So maybe the collection metadata to indicate this isn’t really needed and users must rely on what the developer communicates regarding this, possibly verifying this by checking the ledger implementation and deployed WASM hash to verify which metadata is dynamic and which static.
3. Remove metadata from mint block
Update spec to remove metadata from mint block. This would mean that the metadata could be any value at any time and is not tracked in canister history. Personally I wouldn’t really opt for this option, making it untracked makes it similar to off-chain metadata, you can’t track it and rely on it on-chain.
4. Other
Please let me know in the comments below if you have any other ideas regarding this.
Poll to indicate preference
- 1 Make metadata static
- 2 Add metadata changed block
- 3 Remove metadata from mint block
- 4 Other, please respond below with any ideas