Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contracts-bedrock: L2StandardBridge legacy withdraw #4909

Merged
merged 4 commits into from
Feb 17, 2023

Conversation

tynes
Copy link
Contributor

@tynes tynes commented Feb 16, 2023

Description

Adds a test for the legacy withdraw functionality on the L2StandardBridge. Previously there were no tests for withdrawing ether via withdraw. This adds coverage. Also natspec is added to describe that these functions are not useful for being able to withdraw native L2 tokens. The modern functions must be used to withdraw native L2 tokens, the legacy functions assume that the withdrawal is working on a OptimismMintableERC20 token.

Also regenerate the bindings for the slight change to the bytecode where we save a call in the withdrawal path if we don't need to make the call.

Closes CLI-3333

@tynes tynes requested a review from a team as a code owner February 16, 2023 23:34
@changeset-bot
Copy link

changeset-bot bot commented Feb 16, 2023

⚠️ No Changeset found

Latest commit: a6a6d00

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mergify
Copy link
Contributor

mergify bot commented Feb 17, 2023

Hey @tynes! This PR has merge conflicts. Please fix them before continuing review.

@mergify mergify bot added the conflict label Feb 17, 2023
Adds a test for the legacy withdraw functionality on the
L2StandardBridge. Previously there were no tests for
withdrawing ether via `withdraw`. This adds coverage.
Also natspec is added to describe that these functions
are not useful for being able to withdraw native L2 tokens.
The modern functions must be used to withdraw native
L2 tokens, the legacy functions assume that the withdrawal
is working on a OptimismMintableERC20 token.

Also regenerate the bindings for the slight change to the
bytecode where we save a call in the withdrawal path
if we don't need to make the call.
@codecov
Copy link

codecov bot commented Feb 17, 2023

Codecov Report

❗ No coverage uploaded for pull request base (develop@4ce9197). Click here to learn what that means.
The diff coverage is 100.00%.

❗ Current head 972af58 differs from pull request most recent head a6a6d00. Consider uploading reports for the commit a6a6d00 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #4909   +/-   ##
==========================================
  Coverage           ?   39.81%           
==========================================
  Files              ?      302           
  Lines              ?    18920           
  Branches           ?      646           
==========================================
  Hits               ?     7533           
  Misses             ?    10780           
  Partials           ?      607           
Flag Coverage Δ
bedrock-go-tests 35.75% <ø> (?)
contracts-bedrock-tests 48.17% <100.00%> (?)
contracts-tests 98.86% <ø> (?)
dtl-tests 47.15% <ø> (?)
fault-detector-tests 33.88% <ø> (?)
sdk-tests 38.74% <ø> (?)

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

Impacted Files Coverage Δ
...ontracts-bedrock/contracts/L2/L2StandardBridge.sol 83.33% <100.00%> (ø)

@mergify
Copy link
Contributor

mergify bot commented Feb 17, 2023

This PR has been added to the merge queue, and will be merged soon.

@smartcontracts smartcontracts added do-not-merge C-protocol-critical Category: Modifies protocol-critical code and removed 2-reviewers labels Feb 17, 2023
@mergify
Copy link
Contributor

mergify bot commented Feb 17, 2023

This PR is next in line to be merged, and will be merged as soon as checks pass.

@github-actions github-actions bot removed the C-protocol-critical Category: Modifies protocol-critical code label Feb 17, 2023
@mergify mergify bot removed the on-merge-train label Feb 17, 2023
@tynes tynes merged commit 094ca13 into develop Feb 17, 2023
@tynes tynes deleted the ctb/fix-legacy-withdraw branch February 17, 2023 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants