cosmos / ibc

Interchain Standards (ICS) for the Cosmos network & interchain ecosystem.
Other
919 stars 382 forks source link

ICS721: Clarify the JSON structure in `ClassData` and `TokenData` #1070

Open yito88 opened 7 months ago

yito88 commented 7 months ago

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

crodriguezvega commented 7 months ago

@dreamer-zq do you have answer to this question?

dreamer-zq commented 5 months ago

@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.

manofthemooon commented 4 months ago

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.