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
168 stars 36 forks source link

contracts: add backup logic for deposits #428

Closed smartcontracts closed 2 years ago

smartcontracts commented 2 years ago

Description Introduces backup logic for deposits that prevents users from accidentally making bad deposits. Deposits that don't complete successfully will be returned back to the layer where the deposits were made.

codecov-commenter commented 2 years ago

Codecov Report

Merging #428 (e34ed09) into main (55db896) will decrease coverage by 1.25%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #428      +/-   ##
==========================================
- Coverage   53.12%   51.86%   -1.26%     
==========================================
  Files          62       63       +1     
  Lines        6500     6696     +196     
==========================================
+ Hits         3453     3473      +20     
- Misses       2608     2784     +176     
  Partials      439      439              
Impacted Files Coverage Δ
opnode/cmd/main.go 7.89% <0.00%> (-0.56%) :arrow_down:
opnode/service.go 0.00% <0.00%> (ø)
opnode/cmd/stateviz/main.go 0.00% <0.00%> (ø)
opnode/node/node.go 60.15% <0.00%> (+0.15%) :arrow_up:
opnode/rollup/driver/state.go 72.99% <0.00%> (+1.75%) :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 55db896...e34ed09. Read the comment docs.

tynes commented 2 years ago

You will need to run forge snapshot and then commit in the diff to the .gas-snapshot