Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 976 Bytes

Unnecessary `require` statements.md

File metadata and controls

27 lines (22 loc) · 976 Bytes

There are several instances in the code base where the require statements or conditional checks are unnecessary.

For instance: In the OracleRelayer contract, the require statement in the modifyParameters function at line 189 checks if the input parameter data > 0.

This is unnecessary since the same condition is already checked in the require statement at line 187.

Recommendation:

To simplify the code and prevent wastage of gas, consider removing the unnecessary checks.


Slide Screenshot

194.jpg


Slide Text

  • OpenZeppelin GEB Protocol Finding N03
  • Error Checking
  • Catch Clause Not Handled
  • Emit Event
  • Handle Error

References


Tags