Platform: Code4rena
Start Date: 27/01/2022
Pot Size: $75,000 USDT
Total HM: 6
Participants: 29
Period: 7 days
Judge: leastwood
Total Solo HM: 6
Id: 72
League: ETH
Rank: 24/29
Findings: 2
Award: $14.21
🌟 Selected for report: 0
🚀 Solo Findings: 0
p4st13r4
In constructor of OLETokenLock.sol
, the variable i
is incremented using i++
. It is known that using ++i costs less gas per iteration than i++.
Editor
Replace i++
with ++i
#0 - ColaM12
2022-02-02T06:16:16Z
duplicate to #13
p4st13r4
Timelock.sol
has two functions that emit an event using a variable read from storage, while they could re-use an already declared local variable to achieve the same result
Editor
function setDelay(uint delay_) public { require(msg.sender == address(this), "Call must come from Timelock"); require(delay_ >= MINIMUM_DELAY, "Delay must exceed minimum"); require(delay_ <= MAXIMUM_DELAY, "Delay must not exceed maximum"); delay = delay_; emit NewDelay(delay_); }
function setPendingAdmin(address pendingAdmin_) public { if (admin_initialized) { require(msg.sender == address(this), "Call must come from Timelock"); } else { require(msg.sender == admin, "Call must come from admin"); admin_initialized = true; } pendingAdmin = pendingAdmin_; emit NewPendingAdmin(pendingAdmin_); }
#0 - ColaM12
2022-02-02T06:14:30Z
Duplicate to #137