Skip to content

Feat/add stellar bridge controller#8625

Open
Julink-eth wants to merge 8 commits intomainfrom
feat/add-stellar-bridge-controller
Open

Feat/add stellar bridge controller#8625
Julink-eth wants to merge 8 commits intomainfrom
feat/add-stellar-bridge-controller

Conversation

@Julink-eth
Copy link
Copy Markdown
Contributor

@Julink-eth Julink-eth commented Apr 29, 2026

Explanation

Adds Stellar support to @metamask/bridge-controller, following the existing non-EVM patterns for Solana, Bitcoin, and Tron. This includes Stellar chain/native asset constants, CAIP formatting, default token metadata, quote validation, non-EVM fee handling via snap computeFee, and targeted test coverage.
Also aligns Stellar asset formatting with the Bridge API contract:

  • Native XLM: stellar:pubnet/slip44:148
  • Classic assets: stellar:pubnet/asset:CODE-ISSUER
  • Soroban contracts: stellar:pubnet/sep41:C...

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Introduces a new non‑EVM chain path (chainId/assetId formatting and quote validation), which could affect quote fetching/validation across supported chains if mappings are incorrect.

Overview
Adds Stellar (XLM pubnet) as a supported non‑EVM chain for @metamask/bridge-controller, including new ChainId.STELLAR, updated allowed chain lists/ranking, and native token metadata (symbol/decimals + SLIP-44 mapping).

Extends bridge/CAIP utilities to recognize Stellar chainIds (isStellarChainId, inclusion in isNonEvmChainId), convert Stellar chainIds to CAIP (stellar:pubnet), and format Stellar asset IDs for classic assets (asset:CODE-ISSUER) and Soroban contracts (sep41:C...). Quote request validation is tightened to require destWalletAddress when bridging to or from Stellar, and tests are added/updated to cover Stellar fee computation via Snap computeFee and the new formatting/feature-flag scenarios.

Reviewed by Cursor Bugbot for commit 54a48b6. Bugbot is set up for automated code reviews on this repo. Configure here.

@Julink-eth Julink-eth requested review from a team as code owners April 29, 2026 07:00
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0b037a5. Configure here.

Comment thread packages/bridge-controller/CHANGELOG.md Outdated
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.

1 participant