GithubHelp home page GithubHelp logo

Error handling about erc721a HOT 3 CLOSED

chiru-labs avatar chiru-labs commented on August 26, 2024
Error handling

from erc721a.

Comments (3)

Vectorized avatar Vectorized commented on August 26, 2024 3

@cygaar

For the next version (after upgradeable), I plan to add Natspec for all custom errors and move them into the class level instead of the file level.

Tests won't be affected.

This will give meaningful error messages in logging where supported (e.g. Remix console).

from erc721a.

kyokosdream avatar kyokosdream commented on August 26, 2024

When solc compiles the contract, comments are not included in the compiled bytecode. Comments do not add any gas usage. I don't know of any popular languages that would compile comments.

The errors are self-descriptive and I'm not sure why we would need comments added to them. It might help beginner users understand the ERC721A contract just slightly better but seems rather unnecessary.

from erc721a.

Vectorized avatar Vectorized commented on August 26, 2024

May probably add NatSpec to the custom errors, someday in the far future, like: https://twitter.com/pcaversaccio/status/1505479350363332611?s=21

For now, we’ll just leave it as it is.

The names are simply the original revert messages in camelCase, so there is no loss of semantic information. As custom errors drastically reduces deployment gas costs, we merged it ASAP.

from erc721a.

Related Issues (20)

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.