Declare keccak
variables as immutable
#105
Labels
bug
Something isn't working
G (Gas Optimization)
invalid
This doesn't seem right
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
pmerkleplant
Vulnerability details
Impact
Access roles marked as constant results in computing the
keccak
operationeach time the variables are used, which increases gas costs.
Changing the variables to
immutable
results in computing the hash onlyonce on deployment, leading to gas savings.
For more information, see ethereum/solidity#9232 (comment).
The following declarations could be refactored:
Tools used
grep -rn "keccak256(" .
The text was updated successfully, but these errors were encountered: