optimism icon indicating copy to clipboard operation
optimism copied to clipboard

contracts-bedrock: fix standard bridge token pair checking

Open tynes opened this issue 2 years ago • 3 comments

Description

This ensures that the legacy interface is only used for legacy tokens and that the modern interface can be used on the OptimismMintableERC20 token.

Note that this is not the gas efficient way to implement this, but its ok for now as we are focused on minimal diff changes.

In the future we could refactor this code to ensure that the ERC165Checker calls a minimal amount of times.

Fixes CLI-3370

tynes avatar Feb 22 '23 00:02 tynes

⚠️ No Changeset found

Latest commit: 43918ef2da49666665787b9528cc1a6a0edfae5a

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

changeset-bot[bot] avatar Feb 22 '23 00:02 changeset-bot[bot]

Codecov Report

Merging #4932 (43918ef) into develop (45f9fe4) will increase coverage by 0.01%. The diff coverage is 72.72%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4932      +/-   ##
===========================================
+ Coverage    40.99%   41.01%   +0.01%     
===========================================
  Files          339      340       +1     
  Lines        20789    20799      +10     
  Branches       771      772       +1     
===========================================
+ Hits          8523     8531       +8     
- Misses       11609    11612       +3     
+ Partials       657      656       -1     
Flag Coverage Δ
bedrock-go-tests 36.67% <ø> (+<0.01%) :arrow_up:
contracts-bedrock-tests 50.00% <72.72%> (+0.25%) :arrow_up:
contracts-tests 98.86% <ø> (ø)
core-utils-tests 60.41% <ø> (ø)
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 Δ
...s-bedrock/contracts/legacy/LegacyMintableERC20.sol 71.42% <71.42%> (ø)
...cts-bedrock/contracts/universal/StandardBridge.sol 83.33% <75.00%> (-1.52%) :arrow_down:
op-node/heartbeat/service.go 57.89% <0.00%> (+2.63%) :arrow_up:

codecov[bot] avatar Feb 22 '23 01:02 codecov[bot]

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

mergify[bot] avatar Feb 22 '23 22:02 mergify[bot]

@maurelian I've added tests for legacy tokens and included the impl of the legacy token since this has been waiting in review for awhile, I figured I'd just push the commit here

tynes avatar Mar 09 '23 02:03 tynes

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

mergify[bot] avatar Mar 09 '23 03:03 mergify[bot]

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

mergify[bot] avatar Mar 09 '23 03:03 mergify[bot]