Skip to content

Commit a057073

Browse files
feat: add SEI network support in @metamask/bridge-controller (#5695)
## Explanation This PR is to adding SEI support in Bridge Controller - Add `SEI` into constants `ALLOWED_BRIDGE_CHAIN_IDS`, `SWAPS_TOKEN_OBJECT` and `NETWORK_TO_NAME_MAP` <!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? * Are there any changes whose purpose might not obvious to those unfamiliar with the domain? * If your primary goal was to update one package but you found you had to update another one along the way, why did you do so? * If you had to upgrade a dependency, why did you do so? --> ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? Are there client or consumer pull requests to adopt any breaking changes? For example: * Fixes #12345 * Related to #67890 --> ## Changelog <!-- THIS SECTION IS NO LONGER NEEDED. The process for updating changelogs has changed. Please consult the "Updating changelogs" section of the Contributing doc for more. --> ## 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](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [ ] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes
1 parent f16ddbe commit a057073

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

packages/bridge-controller/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Add `SEI` network support ([#5695](https://github.com/MetaMask/core/pull/5695))
13+
- Add `SEI` into constants `ALLOWED_BRIDGE_CHAIN_IDS`, `SWAPS_TOKEN_OBJECT` and `NETWORK_TO_NAME_MAP`
14+
1015
## [30.0.0]
1116

1217
### Changed

packages/bridge-controller/src/constants/bridge.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const ALLOWED_BRIDGE_CHAIN_IDS = [
1616
CHAIN_IDS.ARBITRUM,
1717
CHAIN_IDS.LINEA_MAINNET,
1818
CHAIN_IDS.BASE,
19+
CHAIN_IDS.SEI,
1920
SolScope.Mainnet,
2021
] as const;
2122

packages/bridge-controller/src/constants/chains.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export const INK_DISPLAY_NAME = 'Ink Mainnet';
123123
export const SONEIUM_DISPLAY_NAME = 'Soneium Mainnet';
124124
export const MODE_SEPOLIA_DISPLAY_NAME = 'Mode Sepolia';
125125
export const MODE_DISPLAY_NAME = 'Mode Mainnet';
126+
export const SEI_DISPLAY_NAME = 'Sei Network';
126127

127128
export const NETWORK_TO_NAME_MAP = {
128129
[NETWORK_TYPES.GOERLI]: GOERLI_DISPLAY_NAME,
@@ -154,4 +155,5 @@ export const NETWORK_TO_NAME_MAP = {
154155
[CHAIN_IDS.METACHAIN_ONE]: METACHAIN_ONE_DISPLAY_NAME,
155156
[CHAIN_IDS.LISK]: LISK_DISPLAY_NAME,
156157
[CHAIN_IDS.LISK_SEPOLIA]: LISK_SEPOLIA_DISPLAY_NAME,
158+
[CHAIN_IDS.SEI]: SEI_DISPLAY_NAME,
157159
} as const;

packages/bridge-controller/src/constants/tokens.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const CURRENCY_SYMBOLS = {
5252
MOONRIVER: 'MOVR',
5353
ONE: 'ONE',
5454
SOL: 'SOL',
55+
SEI: 'SEI',
5556
} as const;
5657

5758
const ETH_SWAPS_TOKEN_OBJECT = {
@@ -138,6 +139,14 @@ const SOLANA_SWAPS_TOKEN_OBJECT = {
138139
iconUrl: '',
139140
} as const;
140141

142+
const SEI_SWAPS_TOKEN_OBJECT = {
143+
symbol: CURRENCY_SYMBOLS.SEI,
144+
name: 'Sei',
145+
address: DEFAULT_TOKEN_ADDRESS,
146+
decimals: 18,
147+
iconUrl: '',
148+
} as const;
149+
141150
const SWAPS_TESTNET_CHAIN_ID = '0x539';
142151

143152
export const SWAPS_CHAINID_DEFAULT_TOKEN_MAP = {
@@ -153,6 +162,7 @@ export const SWAPS_CHAINID_DEFAULT_TOKEN_MAP = {
153162
[CHAIN_IDS.ZKSYNC_ERA]: ZKSYNC_ERA_SWAPS_TOKEN_OBJECT,
154163
[CHAIN_IDS.LINEA_MAINNET]: LINEA_SWAPS_TOKEN_OBJECT,
155164
[CHAIN_IDS.BASE]: BASE_SWAPS_TOKEN_OBJECT,
165+
[CHAIN_IDS.SEI]: SEI_SWAPS_TOKEN_OBJECT,
156166
[SolScope.Mainnet]: SOLANA_SWAPS_TOKEN_OBJECT,
157167
} as const;
158168

@@ -175,4 +185,5 @@ export const SYMBOL_TO_SLIP44_MAP: Record<
175185
BNB: 'slip44:714',
176186
AVAX: 'slip44:9000',
177187
TESTETH: 'slip44:60',
188+
SEI: 'slip44:19000118',
178189
};

0 commit comments

Comments
 (0)