ibc icon indicating copy to clipboard operation
ibc copied to clipboard

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

Open yito88 opened this issue 1 year ago • 3 comments

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

yito88 avatar Jan 19 '24 10:01 yito88

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

crodriguezvega avatar Jan 23 '24 19:01 crodriguezvega

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

dreamer-zq avatar Mar 31 '24 07:03 dreamer-zq

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.

manofthemooon avatar Apr 19 '24 10:04 manofthemooon