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: support SpokePoolVerifier contract for native and enabled routes #861

Merged
merged 8 commits into from
Oct 11, 2023

Conversation

dohaki
Copy link
Contributor

@dohaki dohaki commented Oct 5, 2023

This PR uses the deposit of a SpokePoolVerifier contract if enabled via the routes.json config file and if the sending token is a native one.

Closes ACX-1589

Needs across-protocol/scraper-api#266 before it can be merged.

@linear
Copy link

linear bot commented Oct 5, 2023

ACX-1584 Deploy SpokePoolVerifiers via create2

  • deploy SpokePoolVerifier via create2 to each chain
  • Change FE to route to these contracts for native token deposits

This will prevent cases where native ETH is sent to an address that isn't a contract on a chain. In this case currently, the chain interprets the ETH send as a transfer to an EOA, so the user's ETH is lost.

Deploying the SpokePoolVerifier to the same address for each chain ensures that a user's deposit of ETH is always sent to a chain's SpokePoolVerifier which then checks that the user issending to the intended spoke pool address

This does require that the FE routes all native eth deposits to the spoke pool verifier as opposed to directly to the spoke pool

@vercel
Copy link

vercel bot commented Oct 5, 2023

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

Name Status Preview Comments Updated (UTC)
frontend-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 11, 2023 0:38am
goerli-frontend-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 11, 2023 0:38am

@linear
Copy link

linear bot commented Oct 6, 2023

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should reflect this addition to the Goerli route for consistency

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed here 33a177c

src/utils/bridge.ts Outdated Show resolved Hide resolved
src/utils/bridge.ts Outdated Show resolved Hide resolved
src/utils/bridge.ts Outdated Show resolved Hide resolved
src/utils/bridge.ts Outdated Show resolved Hide resolved
src/utils/bridge.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@james-a-morris james-a-morris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments

Copy link
Contributor

@james-a-morris james-a-morris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for reviewing my comments

@dohaki dohaki merged commit 84f306c into master Oct 11, 2023
6 checks passed
@dohaki dohaki deleted the dong-ha/acx-1584-deploy-spokepoolverifiers-via-create2 branch October 11, 2023 15:58
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