ibc
ibc copied to clipboard
ICS721: Clarify the JSON structure in `ClassData` and `TokenData`
According to ICS-721 spec,
Both tokenData entries and classData MUST be Base64 encoded strings which SHOULD have the following JSON structure:
{
"key1" : { "value":"...", "mime":"..." },
"key2" : { "value":"...", "mime":"..." },
...
}
Is this a mandatory spec? Some implementations set other structures in these data. It seems that the current go implementation bianjieai/nft-transfer doesn't validate this structure for now.
Ref. https://github.com/public-awesome/cw-ics721/issues/79
@dreamer-zq do you have answer to this question?
@yito88 , mainly considering that such non-compliant NFTs may already exist before the specification is made. In order to support these NFTs and cross-chains, there is currently no mandatory verification, but in order for other chains in the ecosystem to be able to parse your metadata, It is best to unify the format according to the spec.
It appears that there's a discrepancy between the specification and the actual implementations regarding the format of tokenData and classData entries. The specification mandates that both tokenData and classData must be Base64-encoded strings with a specific JSON structure, including keys such as "value" and "mime". However, some implementations deviate from this requirement, allowing for different structures.