Skip to content

across-snowbridge: route + builder for L2 → Hydration#320

Open
mrq1911 wants to merge 22 commits into
masterfrom
across-integration
Open

across-snowbridge: route + builder for L2 → Hydration#320
mrq1911 wants to merge 22 commits into
masterfrom
across-integration

Conversation

@mrq1911

@mrq1911 mrq1911 commented May 12, 2026

Copy link
Copy Markdown
Member

Summary

Adds an end-to-end Across-Snowbridge bridge-of-bridges route: Across V3 fast-fill on a supported L2 (Base) → Snowfork's deployed SnowbridgeL2Adaptor.sendTokenAndCall on the L2 → Across MulticallHandler on Ethereum → Uniswap V3 swap to fund the Snowbridge fee → Gateway.v2_sendMessage → AssetHub → XCM InitiateTransfer to Hydration.

Based on feat/snowbridge-v2 to reuse the native polkadot-api XCM construction; no runtime dep on @snowbridge/api.

Commits

xc-core Across primitive + L1/L2 Adaptor ABIs + Arb/Op chain configs scaffolding
xc-cfg Across-Snowbridge builder (sendTokenAndCall + sendEtherAndCall) SCALE-encoded V5 XCM via Snowbridge V2 helpers
Uniswap V3 exactOutputSingle calldata + Quoter ABI live-verified against mainnet
FeeAmountBuilder.AcrossSnowbridge.calculateFee composes Snowbridge inbound + Uniswap Quoter
Across /suggested-fees HTTPS call at contract build time amount-dependent relayer fee
Base USDC → Hydration + Base ETH → Hydration route templates Tag.Across_Snowbridge
Changeset (minor bump for xc-core / xc-cfg / xc-sdk)
Chopsticks integration spec XCM weight-check on AssetHub + Hydration

Test plan

Unit: npm test in packages/xc-core (26 specs) and packages/xc-cfg (26 specs) — all green.

Live preflight checks (run from CLI):

  1. Across /suggested-fees — passes; 100 USDC Base→Eth returns relayer fee 306,761 (~0.31 USDC), fill time 2s, SpokePool addresses match our chain configs.
  2. Uniswap V3 Quoter — passes; USDC/WETH pool fee 500 valid on Ethereum mainnet, quoteExactOutputSingle returns sane price.

Chopsticks XCM dry-run (in integration-tests/xc-test):

npm run spec:across-snowbridge

Forks AssetHub + Hydration via chopsticks, builds the contract call, decodes SendParams.xcm, runs XcmPaymentApi.query_xcm_weight on both chains. 5/5 pass in ~37 s with:

🥢 AssetHub weight: refTime=1,182,518,000, proofSize=21,000
🥢 Hydration remote_xcm weight: refTime=300,000,000, proofSize=0

Confirms the V5 XCM bytes decode cleanly and every instruction's weighter resolves on both chains.

What's deferred (follow-up PRs)

  • anvil-forked Base sendTokenAndCall simulation — last remaining preflight gate before mainnet canary
  • Arbitrum + Optimism route templates — chain configs exist on this branch (xc-cfg/chains/evm/arbitrum.ts, optimism.ts) and SWAP_REGISTRY includes USDC entries, but no route wiring yet
  • Additional asset coverage on Base (USDT / WBTC / DAI / WETH)
  • Outbound SnowbridgeL1Adaptor.depositToken builder — gated on L1Adaptor funding-model decision

Rebase note

Sits on feat/snowbridge-v2. Once that merges to master, this rebases cleanly onto master with no expected conflicts.

@changeset-bot

changeset-bot Bot commented May 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cf5318e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@galacticcouncil/xc-core Minor
@galacticcouncil/xc-cfg Minor
@galacticcouncil/xc-sdk Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mrq1911
mrq1911 changed the base branch from feat/snowbridge-v2 to master May 12, 2026 15:31
@mrq1911
mrq1911 temporarily deployed to upgrade-ui-master May 12, 2026 15:35 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown

🧚 Live preview: galacticcouncil/hydration-ui#3800

@mrq1911
mrq1911 had a problem deploying to upgrade-ui-master May 12, 2026 22:07 — with GitHub Actions Failure
@mrq1911
mrq1911 temporarily deployed to upgrade-ui-master May 13, 2026 09:39 — with GitHub Actions Inactive
@mrq1911
mrq1911 had a problem deploying to upgrade-ui-master May 13, 2026 10:08 — with GitHub Actions Failure
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