-
Notifications
You must be signed in to change notification settings - Fork 137
L2 integration #1643
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
L2 integration #1643
Conversation
|
Hey @yrong! Looks very cool! Would we need to deploy these adapter, receiver, etc contracts on Mainnet? Would that be through Polkadot governance, or how do you imagine that would work? |
No governance at all, no upgrades, we just deploy the contracts. Then route xcm to the deployed contracts to complete the transfer. We build the xcm offchain so no governance required to route to these contracts. If we need to upgrade, we deploy a new set of contracts and then change the xcm to route to those contracts. |
|
I think whats missing from this, is a script which issues a transact from asset hub, that uses the composer to send ETH to base. |
Yeah, I assume governance control won’t be required. For transactions from P to E, the user-controlled agent will communicate with the adaptor to perform certain L2 calls. This is just a proof of concept to demonstrate the integration of a transfer and how to compose a message that is later executed on the destination side. For a pure token transfer from P to Ethereum L2, we might not even need the receiver contract. For the reverse direction—from L2 back to Polkadot—the receiver on Ethereum L1 will forward the XCM and invoke the send function on the Gateway. |
We've done this before in the canonical bridge integration here: https://github.com/Snowfork/snowbridge/blob/main/smoketest/tests/v2/transact_p2e_l2.rs I'll add another test for this integration as well. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1643 +/- ##
=======================================
Coverage 85.94% 85.94%
=======================================
Files 21 21
Lines 925 925
Branches 162 162
=======================================
Hits 795 795
Misses 104 104
Partials 26 26
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I'd assume Stargate is a high-level ommichain protocol that leverages appropriate underlying messaging protocols such as LayerZero or Circle’s CCTP to execute the cross-chain token transfers. Based on the code and comments here, it appears that this functionality is already supported. |
|
Closed in favor of #1649 |
Resolves: https://linear.app/snowfork/issue/SNO-1656
Context
This PR includes a POC demonstrating L2 integration using the Stargate composability call, based primarily on the following documentation:
https://docs.stargate.finance/developers/protocol-docs/composability
The dependent contract components have already been deployed on Sepolia (Ethereum and Optimism). We only need to configure the
.envfile in thecontractsdirectory and run this command:L1 transaction
https://sepolia.etherscan.io/tx/0x8659d5360b65aaaa5d0f7d435a596da702db60f84ab227e49f5469909eecab73
L2 transact
https://testnet-explorer.optimism.io/tx/0x05fe693c2888a961f33797415cd1910070384410bd63ee11c3b810f7e7ff0e97