GithubHelp home page GithubHelp logo

Comments (6)

alephao avatar alephao commented on July 4, 2024 2

Hello, I made a benchmark that is more precise than the one showing here and compares gas usage with other implementations. It compares not only mint but also transferFrom on many cases and all other methods so the developers have a better picture of what the gas usage will be when using this or any other contract.

Feel free to grab the results or link the codebase, I think it's more trustworthy than the one showing on README since all comparisons are made using the same process, and by someone not involved in this project (so no bias in favor of this proj).

https://github.com/alephao/solidity-benchmarks
https://github.com/alephao/solidity-benchmarks/blob/main/ERC721.md

from erc721a.

fulldecent avatar fulldecent commented on July 4, 2024 1

Here's a start

https://twitter.com/fulldecent/status/1491506122565595141

Did this manually, we can make good tooling for this.

from erc721a.

0xsudo-eth avatar 0xsudo-eth commented on July 4, 2024 1

@fulldecent @Vectorized check this issue, if we good with the proposal I can do

from erc721a.

Vectorized avatar Vectorized commented on July 4, 2024

The more popular the project, the more gas ERC721A can save.

The gas savings during mint (high BASEFEE period) can be way more than
the extra overhead incurred when transferring tokens (low BASEFEE period).

A general rule-of-thumb to minimize gas is to transfer in ascending tokenId order.

Also, it has the indirect effect of discouraging dumping (promoting hodling), especially for those who mint large batches. ;)

from erc721a.

caffeinum avatar caffeinum commented on July 4, 2024

I wonder how it scales in the future? Most of the benchmarks are only interested in 100 tokens; but when Ethereum NFT is the base for (m)etaverse, and we need collections of billions NFTs, some people owning millions of them, how many gas transfer will eat? Even if the block gas limit is raised to 100_000_000 gas, is it possible to being "locked out" of your tokens?

from erc721a.

Vectorized avatar Vectorized commented on July 4, 2024

@caffeinum If you mint at the block gas limit (about 16K tokens for now on ETH), you won’t be able to directly transfer the last token in the batch. This is because the LOG4 opcode (1875 gas) emitted per mint costs less than a SLOAD opcode (2100 gas).

You can however, transfer a token in the middle of the batch to initialize it so that the token at the end can be transferred within the block gas limit.

In an upcoming PR #272, we will have a function to directly initialize a token without transferring it.

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.