noReenter
gas optimization
#200
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
G (Gas Optimization)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
0xsanson
Vulnerability details
The current implementation uses
_locked = 0
for the unlocked state and_locked = 1
for the locked one. It's better to have two non-zero values from an optimization point of view; it can surprisingly save thousands of gas in some test cases.Consider rewriting the modifier to:
(also add a
_locked = 1
in the constructor).Tools Used
hardhat gas reporter
The text was updated successfully, but these errors were encountered: