Comments (6)
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.
Here's a start
https://twitter.com/fulldecent/status/1491506122565595141
Did this manually, we can make good tooling for this.
from erc721a.
@fulldecent @Vectorized check this issue, if we good with the proposal I can do
from erc721a.
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.
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.
@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)
- Broken link in about this project section?
- expose internal method for checking whether an address is authorized to act on behalf of an nft
- ERC721A Contracts Classified as ERC-20 Tokens in Etherscan HOT 2
- Batch burning with ERC721ABurnable implementation HOT 1
- I cannot compile my contract with hardhat
- Incorrect Twitter Link (twitter.com/AzukiOfficial > twitter.com/Azuki)
- OK, I'll give it a try. HOT 1
- fail mint in other contract HOT 1
- Please help me ERC721A team. I'm stuck on infinite loading in my current deployment with Hardhat....
- Please support ERC4906
- We were not able to estimate gas. There might be an error in the contract and this transaction may fail
- ERC721A interface id
- Precalculate TokenIds? HOT 1
- add support for ERC165 HOT 1
- Need a way to dynamically set value for `_startTokenId` in constructor HOT 6
- How can i add royaltyInfo? HOT 1
- Why is value of `_tokenApprovals` mapping a struct with one parameter instead simply an address? HOT 2
- How may not be clean upper bits of `from` address in `transferFrom` function? HOT 2
- What is the purpose of this function on L911? HOT 2
- is there an IERC721Enumerable implementation ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from erc721a.