-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change quantities to uint24 #192
Conversation
|
Codecov Report
@@ Coverage Diff @@
## master #192 +/- ##
=======================================
Coverage 90.36% 90.36%
=======================================
Files 10 10
Lines 301 301
Branches 44 44
=======================================
Hits 272 272
Misses 24 24
Partials 5 5
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. Ok i see
PRO-387 Make use of MaseMinter aux storage
BaseMinter has 168 bits of available storage in it’s struct. By making this space available for auxilary storage, fields in the minters can be packed into it to reduce a storage slot being used. This will save ~20k gas for each mint schedule that is configured and ~5k for each mint operation If exposed as aux storage: To serialize and deserialize these 168 bits into fields we care about in a clean way, can we use user defined value types? So have a type like |
PRO-388 Change quantity fields to uint24
2^24 is 16,777,216 which is a sufficient quantity upper bound |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the 16,777,216 limit could become a problem in the future, like if Taylor Swift wanted to airdrop an edition to all her fans.
However by that point most activity will be on layer 2 and we'll have new contracts, so optimizing for current users is probably the right move. 👍
This reverts commit 510289c.
2^24 is 16,777,216 which is a sufficient quantity upper bound
Changing these fields from uint32 -> uint24 will aid in followup change to pack data into BaseMinter aux storage
Fixes: PRO-388