-
Notifications
You must be signed in to change notification settings - Fork 71
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
Optimize IpRoyaltyVaultStorage struct #100
Comments
We expect For |
We could also do condense the nested mappings into 1 level by hashing
becomes
with the key being
|
Would keep it as ERC20 has - uint256. In future, we could be whitelisting a token that may need it? |
agree with timestamp being uint40 |
After further measurements by @ Ramarti we decided not to make this change |
can be rewritten as:
This saves a storage slot.
If you want to save 2 more slots for the majority of the case (e.g.
tokens
is small), I have add a drop-in replacement forEnumerableSet.AddressSet
in Solady v0.0.191. It's underEnumerableSetLib.AddressSet
. It has been heavily fuzz tested, but not audited.The text was updated successfully, but these errors were encountered: