Gas Optimizations #23
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Use private variables to save gas
Currently many constants (including
WEEK
,MONTH
and more) are declared as public. declaring those internally used constants as private for gas savings (since public variables will create view functions).Proof of Concept
https://github.com/code-423n4/2022-03-paladin/blob/main/contracts/HolyPaladinToken.sol#L16-L42
Recommendation
Declare variables that don't need to be queried by other contracts as private.
The text was updated successfully, but these errors were encountered: