Skip to content

feat: wire across to scroll and megaeth#12144

Merged
gomesalexandre merged 4 commits intodevelopfrom
feat/across-more-chains
Mar 12, 2026
Merged

feat: wire across to scroll and megaeth#12144
gomesalexandre merged 4 commits intodevelopfrom
feat/across-more-chains

Conversation

@gomesalexandre
Copy link
Copy Markdown
Contributor

@gomesalexandre gomesalexandre commented Mar 11, 2026

Description

Does what it says on the box. Across supports Scroll (534352) and MegaETH (4326) which we already have as chains but weren't wired up.

Verified via Across available-routes API:

  • Scroll: WETH bridge route confirmed
  • MegaETH: 3 routes confirmed (WETH, native ETH, USDT)

closes #12140

Risk

Low - config changes behind existing feature flags.

Testing

Engineering

Verify type-check and lint pass. ACROSS_SUPPORTED_CHAIN_IDS now includes Scroll and MegaETH.

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Summary by CodeRabbit

  • New Features
    • Added support for Mega ETH and Scroll chains in the swapper, enabling users to execute swaps on these blockchain networks.

Add Scroll and MegaETH to the Across swapper chain mapping.
Both chains confirmed via Across available-routes API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gomesalexandre gomesalexandre requested a review from a team as a code owner March 11, 2026 18:15
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 488e9596-6898-4a9e-a71f-28dfc077bac8

📥 Commits

Reviewing files that changed from the base of the PR and between ead6a6f and 4cdb55a.

📒 Files selected for processing (1)
  • packages/swapper/src/swappers/AcrossSwapper/constant.ts

📝 Walkthrough

Walkthrough

Adds support for two new blockchain chains (Scroll and MegaETH) to the AcrossSwapper by importing their chain identifiers and extending the chainIdToAcrossChainId mapping with corresponding Across protocol chain identifiers.

Changes

Cohort / File(s) Summary
AcrossSwapper Chain Support
packages/swapper/src/swappers/AcrossSwapper/constant.ts
Imports scrollChainId and megaEthChainId from caip, imports scroll from viem/chains, and adds two new chain mappings to chainIdToAcrossChainId: scrollChainId→534352 and megaEthChainId→4326.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

Across the chains we hop with glee,
Scroll and MegaETH, wild and free!
New mappings added, simple and neat,
Config changes make swaps complete. 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: wire across to scroll and megaeth' clearly and concisely summarizes the main change of adding Scroll and MegaETH chain support to the Across swapper mapping.
Linked Issues check ✅ Passed The pull request implementation aligns with all coding requirements from issue #12140: imports scrollChainId and megaEthChainId from caip, adds mappings to chainIdToAcrossChainId with correct values (scrollChainId -> 534352, megaEthChainId -> 4326), and follows the append-only convention.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue objectives of wiring Scroll and MegaETH into the Across swapper mapping with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/across-more-chains

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gomesalexandre
Copy link
Copy Markdown
Contributor Author

QA Verification - Across quotes on localhost

Ran local dev server on this branch and verified Across returns quotes for Scroll.

Test: ETH -> SCR on Scroll via Across

  • Pay With: 0.01 ETH (~$20.73)
  • You Get: 496.45 SCR (~$20.78, +0.23%)
  • Protocol: Across (confirmed in the UI)
  • Rate: 1 ETH = 49,644.93 SCR
  • Fee: $0.120

Scroll chain is properly wired and Across is returning quotes. MegaETH couldn't be tested via UI (limited token pairs) but the route was verified via Across available-routes API (3 routes: WETH, native ETH, USDT).

Copy link
Copy Markdown
Collaborator

@NeOMakinG NeOMakinG left a comment

Choose a reason for hiding this comment

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

✅ Code Review — LGTM

Changes: Add Scroll and MegaETH to Across swapper chain mapping.

Verification:

  • Chain IDs match Across available-routes API (scroll.id = 534352, MegaETH custom ID 4326)
  • Simple mapping addition, no logic changes
  • CI passes ✅

Clean config addition.

@gomesalexandre gomesalexandre enabled auto-merge (squash) March 12, 2026 10:30
@gomesalexandre gomesalexandre merged commit 1b148c0 into develop Mar 12, 2026
4 checks passed
@gomesalexandre gomesalexandre deleted the feat/across-more-chains branch March 12, 2026 11:25
stuuagentclaw added a commit to stuuagentclaw/web that referenced this pull request Mar 25, 2026
Enable VITE_FEATURE_MEGAETH feature flag to activate MegaETH (chainId 4326)
as a supported chain in the app.

MegaETH is already wired in:
- RelaySwapper (PR shapeshift#11904 area)
- AcrossSwapper (PR shapeshift#12144)
- DebridgeSwapper (PR shapeshift#12143)

Routes verified:
- Relay: active, MegaETH chainId 4326 mapped
- Across: 81 routes from 20 source chains (ETH, WETH, USDT)
- deBridge: chain registered as 100000031

This enables the chain in the UI. Individual swapper availability depends
on their respective feature flags (ACROSS_SWAP, DEBRIDGE_SWAP).
stuuagentclaw added a commit to stuuagentclaw/web that referenced this pull request Mar 25, 2026
Enable VITE_FEATURE_ACROSS_SWAP and VITE_FEATURE_DEBRIDGE_SWAP feature flags.

Both swappers are fully implemented and wired to multiple chains:
- Across: supports 20+ EVM chains including MegaETH, Scroll, Base, Arbitrum
- deBridge: supports 12+ EVM chains including MegaETH, Berachain, Sonic

These swappers have been in the codebase since PR shapeshift#11941 (deBridge) and
earlier (Across), with chain wiring expanded in PRs shapeshift#12143 and shapeshift#12144.

Enabling them adds competitive route options alongside Relay, THORChain,
and Chainflip for best-price routing.
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.

feat: wire across to scroll and megaeth

2 participants