feat: wire across to scroll and megaeth#12144
Conversation
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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds 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
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
QA Verification - Across quotes on localhostRan local dev server on this branch and verified Across returns quotes for Scroll. Test: ETH -> SCR on Scroll via Across
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). |
NeOMakinG
left a comment
There was a problem hiding this comment.
✅ 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.
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).
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.
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:
closes #12140
Risk
Low - config changes behind existing feature flags.
Testing
Engineering
Verify type-check and lint pass.
ACROSS_SUPPORTED_CHAIN_IDSnow includes Scroll and MegaETH.Operations
Summary by CodeRabbit