Code Monkey home page Code Monkey logo

Comments (6)

fracek avatar fracek commented on September 26, 2024 2

I agree it's time to have a SIMP to solve this issue otherwise there will be 20 different, slightly incompatible implementations by the end of summer :)

My main concern is that by diverging from the ERC721 spec now we condemn ourselves to supporting two versions of it forever (which is even worse than having a confusing spec for a few months IMHO). I want to avoid the situation 2 years from now where all code needs to check if an NFT was created before or after strings were introduced in Cairo.

My two proposals address this issue in two different ways:

  • proposing a string encoding means we can push for starkware to base their string type on our spec. This means that tokenURI return value will be binary compatible with the future string type.
  • with a separate method (metadataURI) contracts can simply decide if they want to support old (pre strings) NFTs.

from snips.

fracek avatar fracek commented on September 26, 2024

If the proposal to return felt* from tokenURI goes forward I propose to include a strict requirement on how strings should be encoded (should that be another SIMP?) into felts to avoid future issues. For example, a string with 94 characters can be serialized in 4 felts but also in 3 depending on the implementation. Also, should strings be zero terminated or not?

from snips.

rzmahmood avatar rzmahmood commented on September 26, 2024

If the proposal to return felt* from tokenURI goes forward I propose to include a strict requirement on how strings should be encoded (should that be another SIMP?) into felts to avoid future issues. For example, a string with 94 characters can be serialized in 4 felts but also in 3 depending on the implementation. Also, should strings be zero terminated or not?

Agreed that the proposal should be accompanied with a strict standard on the encoding. The nuances can be discussed if this moves ahead. Let me know if there is anything else you would like to see in the encoding standard.

from snips.

fracek avatar fracek commented on September 26, 2024

Another option is to introduce a new method for StarkNet NFTs (like metadataURI) so that tokens are still ERC721 complaint (by not implementing the optional ERC721Metadata interface). I can see this being very confusing for developers so I don't really like it even if it checks all boxes.

from snips.

rzmahmood avatar rzmahmood commented on September 26, 2024

Another option is to introduce a new method for StarkNet NFTs (like metadataURI) so that tokens are still ERC721 complaint (by not implementing the optional ERC721Metadata interface). I can see this being very confusing for developers so I don't really like it even if it checks all boxes.

The developer experience of this specialized knowledge on ERC721 encoding is not ideal, but the alternative is complete unusability. Furthermore, this specialized knowledge can be paired with the ERC721 SIMP.

It's better that it gets used by those who know how than be unusable by everyone. Also currently, there is no standard for encoding and without some community alignment, every organisation will have their own which is a worse outcome.

from snips.

github-actions avatar github-actions commented on September 26, 2024

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍
Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs.
Thank you for your contributions!

from snips.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.