Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yito88 opened this issue Jan 19, 2024 · 3 comments
Open

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

yito88 opened this issue Jan 19, 2024 · 3 comments

Comments

@yito88
Copy link

yito88 commented Jan 19, 2024

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. public-awesome/cw-ics721#79

@crodriguezvega
Copy link
Contributor

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

@dreamer-zq
Copy link

@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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

4 participants