ethereum-optimism / optimistic-specs

Optimistic: Bedrock, is a protocol that strives to be an extremely simple optimistic rollup that maintains 1:1 compatibility with Ethereum
MIT License
167 stars 35 forks source link

contracts: Fix Medium OZ audit findings #452

Closed maurelian closed 2 years ago

maurelian commented 2 years ago

This PR fixes the Medium severity issues issues in the OpenZeppelin audit (which is not yet public). Each commit in this PR clearly references the finding that it addresses.

In order to review, I suggest comparing between the audit report (see the Open Zeppelin Audit Resolution doc in Notion), and the commit which mentions it.

This PR builds on #455, but is split out to keep the review manageable.

codecov-commenter commented 2 years ago

Codecov Report

Merging #452 (1c4a414) into m/low-oz-fixes (a70faaf) will increase coverage by 0.03%. The diff coverage is n/a.

:exclamation: Current head 1c4a414 differs from pull request most recent head 26796a5. Consider uploading reports for the commit 26796a5 to get more accurate results

@@                Coverage Diff                 @@
##           m/low-oz-fixes     #452      +/-   ##
==================================================
+ Coverage           52.18%   52.22%   +0.03%     
==================================================
  Files                  70       70              
  Lines                7855     7855              
==================================================
+ Hits                 4099     4102       +3     
+ Misses               3202     3200       -2     
+ Partials              554      553       -1     
Flag Coverage Δ
unittests 52.22% <ø> (+0.03%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
op-bindings/deposit/deposit_feed_raw.go 11.40% <ø> (ø)
op-node/p2p/discovery.go 68.86% <0.00%> (+1.09%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a70faaf...26796a5. Read the comment docs.