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: fix standard bridge token pair checking #4932

Merged
merged 6 commits into from
Mar 9, 2023

Conversation

tynes
Copy link
Contributor

@tynes tynes commented Feb 22, 2023

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 tynes requested a review from a team as a code owner February 22, 2023 00:07
@changeset-bot
Copy link

changeset-bot bot commented Feb 22, 2023

⚠️ No Changeset found

Latest commit: 43918ef

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

@codecov
Copy link

codecov bot commented Feb 22, 2023

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%) ⬆️
contracts-bedrock-tests 50.00% <72.72%> (+0.25%) ⬆️
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%) ⬇️
op-node/heartbeat/service.go 57.89% <0.00%> (+2.63%) ⬆️

@mergify
Copy link
Contributor

mergify bot commented Feb 22, 2023

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

@mergify mergify bot added the conflict label Feb 22, 2023
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.
Also fix compiler warning
@tynes tynes force-pushed the fix/is-correct-token-pair branch from b331c92 to 3380a61 Compare March 9, 2023 01:40
@mergify mergify bot removed the conflict label Mar 9, 2023
@tynes
Copy link
Contributor Author

tynes commented Mar 9, 2023

@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

@mergify
Copy link
Contributor

mergify bot commented Mar 9, 2023

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

@mergify
Copy link
Contributor

mergify bot commented Mar 9, 2023

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

@mergify mergify bot merged commit 7eba9ad into develop Mar 9, 2023
@mergify mergify bot deleted the fix/is-correct-token-pair branch March 9, 2023 03:52
@mergify mergify bot removed the on-merge-train label Mar 9, 2023
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