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

feat(protocol): Fix new token migration change #15470

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

adaki2004
Copy link
Contributor

Current scenario:

  1. Canonical token X lives on L1.
  2. No bridged counterpart is bridged to L2 - yet. (Hence noone bridged token X just yet.)
  3. We decide to pre-deploy a native X on L2 and we call the changeBridgedToken() in ERC20Vault afterwards.
  4. It would call (wrongly) the IBridgedERC20(btokenNew).changeMigrationStatus(address(0), false); but in BridgedERC20Base.sol , this check would revert - because inbound is false, and migratingAddress is address(0) (exactly how we call that BridgedERC20Base..)
        if (addr == migratingAddress && inbound == migratingInbound) {
            revert BB_INVALID_PARAMS();
        }

Copy link

vercel bot commented Jan 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
bridge-ui-v2-a5 ✅ Ready (Inspect) Visit Preview Jan 9, 2024 1:21pm
bridge-ui-v2-a6 ✅ Ready (Inspect) Visit Preview Jan 9, 2024 1:21pm
bridge-ui-v2-internal ✅ Ready (Inspect) Visit Preview Jan 9, 2024 1:21pm

@dantaik dantaik enabled auto-merge January 9, 2024 13:14
@dantaik dantaik added this pull request to the merge queue Jan 9, 2024
Merged via the queue into alpha-6 with commit a7a93c1 Jan 9, 2024
13 checks passed
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.

3 participants