-
Notifications
You must be signed in to change notification settings - Fork 113
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
NEP-11 properties method inconsistency #141
Comments
I agree. I think that for the sake of adoption, a serialized JSON string should be the return type for There are likely to be numerous casual third-party NFT tools created, and if every developer of those tools has to learn how to deserialize NVM objects, many will be discouraged if they don't already have a background in low-level smart contract VM interaction. The Map object return is only slightly better since they still have to base64-decode every field individually before they can utilize the data. NFTs can bring a lot of new interest in Neo. We should make it easy for anyone who has mostly only experience working with fetching JSON objects in a front-end application to interact with Neo NFTs. |
I totally agree with this. A serialized JSON string would be so much accessible. The easier it is for devs to interact with NFTs, the more we'll see NFTs based DApp on NEO, and I think that this proposal goes perfectly in that direction. |
I agree. I've tested both ways and JSON string is much simpler. I couldn't even find a way to deserialize NVM at frontend. I was lost because some NGD sample nft contracts don't follow the standard description. |
Try to solve in the neo-project/neo-modules#651 |
If we are going to consider changes to NEP11, can we also consider solving neo-project/neo-devpack-dotnet#647 and neo-project/neo-modules#629? |
I believe the NEP-11 standard could use some clarification when it comes to the
properties
method.The official standard (here: https://github.com/neo-project/proposals/blob/master/nep-11.mediawiki) states that for the properties method:
Returns a serialized NVM object containing the properties for the given NFT. The NVM object must conform to the "NEO NFT Metadata JSON Schema"
It also shows a signature like this
So this is the first issue, it's inconsistent, in one case it says a serialized NVM object, in the other it says a Map.
Also, I think for ease of use by wallets and dapps, one way to make it easier would be to allow the properties method to return a serialized json object, as it is way easier to deal with that, than to deal with a map / nvm objects directly (to avoid having to convert all base64 etc). A serialized json object also technically conforms to the standard since it is technically an NVM object, that also conforms with the json standard.
Thoughts?
The text was updated successfully, but these errors were encountered: