You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`uint256 totalSupply = totalSupply();` reads state and is a step where we could save on gas by replacing with an immutable variable of the vault - ie. `TOTAL_SUPPLY`
And then can eliminate uint256 totalSupply = totalSupply(); and use TOTAL_SUPPLY directly
Given all vaults have the same total supply and it stays constant over the lifetime of the vault (no minting and no burning) - this is possible to do to save gas on every royalty token transfer.
PS: optionally can also override totalSupply() and have it return TOTAL_SUPPLY but it is not entirely necessary
And then can eliminate
uint256 totalSupply = totalSupply();
and useTOTAL_SUPPLY
directlyGiven all vaults have the same total supply and it stays constant over the lifetime of the vault (no minting and no burning) - this is possible to do to save gas on every royalty token transfer.
PS: optionally can also override totalSupply() and have it return
TOTAL_SUPPLY
but it is not entirely necessaryOriginally posted by @Spablob in #291 (comment)
The text was updated successfully, but these errors were encountered: