Comments (3)
Gas Benchmarking
nidhhoggr/ERC721PsiReports@master...feature/baseContractConstantRemoval
from erc721psi.
@nidhhoggr Not sure if this is true, but I think this can overflow in your implementation.
uint256 end = nextTokenId + quantity;
from erc721psi.
As mentioned previously, this code was grabbed from the latest commit to ERC721A where the same code is used. I've taken a look at the code and I don't think overflow is possible, here is why.
In the same function the following line is executed before the unchecked block.
_currentIndex += quantity;
At this point _currentIndex
and nextTokenId
are the same value. If quantity exceeded 2**256 the transaction would automatically revert before the unchecked block is reached. Looking more closely at the code in this commit, we could also get rid of end
and just use _currentIndex
because they are the same value.
from erc721psi.
Related Issues (17)
- _exists function HOT 3
- balanceOf can run out of gas HOT 1
- gas reporting HOT 1
- using Solady LibBitmap speeds burn by several hunded (~500 avg) gas HOT 9
- Gas savings for mint HOT 3
- Update test suite to improve coverage and code reusability HOT 1
- update benchmark scripts HOT 1
- use bytemap in place of the AddressData struct for further optimizations HOT 5
- In Burnable extension, the gas cost of totalSupply() increases as the number of tokens increases. HOT 2
- Use IERC721ReceiverUpgradeable HOT 1
- Spelling Issue
- Compilation problem HOT 1
- _beforeTokenTransfers should be _beforeTokenTransfer
- _processRandomnessFulfillment in ERC721PsiRandomSeed missing virtual keyword HOT 3
- I can set token ID start at 1 ? HOT 1
- minting function with specific tokenID intervals (1-200, 200-400) based off a function "tier" argument (1 or 2) HOT 2
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 erc721psi.