Platform: Code4rena
Start Date: 20/01/2022
Pot Size: $80,000 USDC
Total HM: 5
Participants: 37
Period: 7 days
Judge: Jack the Pug
Total Solo HM: 1
Id: 76
League: ETH
Rank: 20/37
Findings: 2
Award: $203.66
🌟 Selected for report: 1
🚀 Solo Findings: 0
🌟 Selected for report: gzeon
gzeon
struct Claim { uint256 created; uint256 updated; address initiator; bytes32 protocol; uint256 amount; address receiver; uint32 timestamp; State state; bytes ancillaryData; }
can be reordered to save 1 storage slot
struct Claim { uint256 created; uint256 updated; uint256 amount; address initiator; bytes32 protocol; address receiver; uint32 timestamp; State state; bytes ancillaryData; }
gzeon
if (claimCallbacks.length == MAX_CALLBACKS) revert InvalidState(); // Checks to see if this callback contract already exists for (uint256 i; i < claimCallbacks.length; i++) { if (claimCallbacks[i] == _callback) revert InvalidArgument(); }
to
uint _len = claimCallbacks.length; if (_len == MAX_CALLBACKS) revert InvalidState(); // Checks to see if this callback contract already exists for (uint256 i; i < _len; i++) { if (claimCallbacks[i] == _callback) revert InvalidArgument(); }
#0 - jack-the-pug
2022-03-26T06:54:14Z
Dup #231