Skip to content

feat: wire debridge to 9 additional evm chains#12143

Merged
gomesalexandre merged 2 commits intodevelopfrom
feat/debridge-more-chains
Mar 12, 2026
Merged

feat: wire debridge to 9 additional evm chains#12143
gomesalexandre merged 2 commits intodevelopfrom
feat/debridge-more-chains

Conversation

@gomesalexandre
Copy link
Copy Markdown
Contributor

@gomesalexandre gomesalexandre commented Mar 11, 2026

Description

Does what it says on the box. deBridge supports these chains that we already have in the codebase but weren't wired up in the swapper mapping. Pure config work - just adding entries to chainIdToDebridgeChainId.

Chains added: Mantle, Cronos, Berachain, Linea, Bob, Sonic, Story, Flow EVM, MegaETH

All chains verified returning valid quotes from deBridge API:

  • ETH -> Mantle: ~2,929 MNT per ETH
  • ETH -> Cronos: ~26.9M CRO per ETH
  • ETH -> Linea: ~0.999 ETH (bridge)
  • ETH -> Berachain: ~3.5M BERA per ETH
  • ETH -> Sonic: valid quote confirmed

Skipped Solana/Tron for now (non-EVM, needs separate investigation for deposit-address flow).

closes #12139

Risk

Low - config changes behind existing feature flags, no new on-chain interactions.

Testing

Engineering

Verify type-check and lint pass. Verify that DEBRIDGE_SUPPORTED_CHAIN_IDS now includes the 9 new chains by checking the constant derives from the mapping keys.

Operations

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

All 9 chains are gated behind their respective feature flags (VITE_FEATURE_MANTLE, VITE_FEATURE_CRONOS, etc.).

Summary by CodeRabbit

  • New Features
    • Added support for 9 additional blockchain networks: Mantle, Cronos, Berachain, Linea, BOB, Sonic, Story, Flow EVM, and Megaeth for swapping operations.

Add Mantle, Cronos, Berachain, Linea, Bob, Sonic, Story, Flow EVM,
and MegaETH to the deBridge swapper chain mapping. All chains are
already supported in the codebase behind feature flags - this just
enables cross-chain bridging routes through deBridge for them.

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:10
@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: 9dc67413-5142-40ec-8eee-e3958c10653c

📥 Commits

Reviewing files that changed from the base of the PR and between ead6a6f and 3cff3f5.

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

📝 Walkthrough

Walkthrough

Extended the deBridge swapper's chain ID mapping to support nine additional EVM chains: Mantle, Cronos, Berachain, Linea, Bob, Sonic, Story, Flow EVM, and MegaETH. Added corresponding chain ID imports and mapping entries for each chain.

Changes

Cohort / File(s) Summary
deBridge Chain Support
packages/swapper/src/swappers/DebridgeSwapper/constant.ts
Added imports for 9 new chain IDs (mantleChainId, cronosChainId, berachainChainId, lineaChainId, bobChainId, sonicChainId, storyChainId, flowEvmChainId, megaethChainId). Extended chainIdToDebridgeChainId mapping with entries for each chain and their corresponding deBridge chain identifiers.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Nine chains join the bridge so grand,
From Mantle to Sonic, across the land,
Config files updated with care,
New paths for swaps everywhere! 🌉✨

🚥 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 PR title accurately describes the main change: adding deBridge support for 9 additional EVM chains through configuration mappings.
Linked Issues check ✅ Passed The PR successfully implements all coding requirements from issue #12139: imports 9 chain IDs and adds correct mappings for Mantle, Cronos, Berachain, Linea, Bob, Sonic, Story, Flow EVM, and MegaETH with their deBridge chain IDs.
Out of Scope Changes check ✅ Passed All changes are in-scope: only the chainIdToDebridgeChainId constant file was modified to add the required EVM chain mappings, with no unrelated alterations.
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/debridge-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 - deBridge quotes on localhost

Ran local dev server on this branch and verified deBridge returns quotes for the new chains.

Test: ETH -> MNT on Mantle via deBridge

  • Pay With: 0.01 ETH (~$20.68)
  • You Get: 29.41 MNT (~$20.56)
  • Protocol: deBridge (confirmed in the UI)
  • Rate: 1 ETH = 2,941.38 MNT
  • Fee: $0.724

Also verified via deBridge API that all 9 chains return valid quotes:

  • Mantle (100000023): 1 ETH -> ~2,929 MNT
  • Cronos (100000019): 1 ETH -> ~26.9M CRO
  • Berachain (100000020): 1 ETH -> ~3.5M BERA
  • Linea (59144): 1 ETH -> ~0.999 ETH (bridge)
  • Sonic (100000014): valid quote confirmed

All looking gucci ser.

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 9 EVM chains to deBridge swapper:

  • Mantle, Cronos, Berachain, Linea, Bob, Sonic, Story, Flow EVM, MegaETH

Verification:

  • Chain IDs match deBridge's supported chains (verified via API)
  • All chains already supported in codebase behind feature flags
  • Simple mapping addition, no logic changes
  • CI passes ✅

Good expansion of cross-chain bridging support.

@gomesalexandre gomesalexandre enabled auto-merge (squash) March 12, 2026 10:35
@gomesalexandre gomesalexandre merged commit 8d4db22 into develop Mar 12, 2026
4 checks passed
@gomesalexandre gomesalexandre deleted the feat/debridge-more-chains branch March 12, 2026 10:45
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 deBridge to 11 additional supported chains

2 participants