Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/bridge-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add `ARC` network support ([#9007](https://github.com/MetaMask/core/pull/9007))
- Add `ARC` into constants `ALLOWED_BRIDGE_CHAIN_IDS`, `SWAPS_TOKEN_OBJECT` and `NETWORK_TO_NAME_MAP`

## [73.2.1]

### Changed
Expand Down
2 changes: 2 additions & 0 deletions packages/bridge-controller/src/constants/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const ALLOWED_BRIDGE_CHAIN_IDS = [
CHAIN_IDS.MONAD,
CHAIN_IDS.HYPEREVM,
CHAIN_IDS.MEGAETH,
CHAIN_IDS.ARC,
SolScope.Mainnet,
BtcScope.Mainnet,
TrxScope.Mainnet,
Expand Down Expand Up @@ -66,6 +67,7 @@ export const DEFAULT_CHAIN_RANKING = [
{ chainId: 'eip155:1329', name: 'Sei' },
{ chainId: 'eip155:999', name: 'HyperEVM' },
{ chainId: 'eip155:4326', name: 'MegaETH' },
{ chainId: 'eip155:5042', name: 'Arc' },
{ chainId: 'eip155:324', name: 'zkSync' },
] as const;

Expand Down
3 changes: 3 additions & 0 deletions packages/bridge-controller/src/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const CHAIN_IDS = {
MONAD: '0x8f',
HYPEREVM: '0x3e7',
MEGAETH: '0x10e6',
ARC: '0x13b2',
} as const;

export const NETWORK_TYPES = {
Expand Down Expand Up @@ -130,6 +131,7 @@ export const SEI_DISPLAY_NAME = 'Sei Network';
export const MONAD_DISPLAY_NAME = 'Monad';
export const HYPEREVM_DISPLAY_NAME = 'HyperEVM';
export const MEGAETH_DISPLAY_NAME = 'MegaETH';
export const ARC_DISPLAY_NAME = 'Arc';

export const NETWORK_TO_NAME_MAP = {
[NETWORK_TYPES.GOERLI]: GOERLI_DISPLAY_NAME,
Expand Down Expand Up @@ -165,4 +167,5 @@ export const NETWORK_TO_NAME_MAP = {
[CHAIN_IDS.MONAD]: MONAD_DISPLAY_NAME,
[CHAIN_IDS.HYPEREVM]: HYPEREVM_DISPLAY_NAME,
[CHAIN_IDS.MEGAETH]: MEGAETH_DISPLAY_NAME,
[CHAIN_IDS.ARC]: ARC_DISPLAY_NAME,
} as const;
12 changes: 12 additions & 0 deletions packages/bridge-controller/src/constants/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const CURRENCY_SYMBOLS = {
MON: 'MON',
HYPE: 'HYPE',
MEGAETH: 'ETH',
ARC: 'USDC',
} as const;

const ETH_SWAPS_TOKEN_OBJECT = {
Expand Down Expand Up @@ -189,6 +190,14 @@ const MEGAETH_SWAPS_TOKEN_OBJECT = {
...ETH_SWAPS_TOKEN_OBJECT,
} as const;

const ARC_SWAPS_TOKEN_OBJECT = {
symbol: CURRENCY_SYMBOLS.USDC,
name: 'USDC',
address: DEFAULT_TOKEN_ADDRESS,
decimals: 18,
iconUrl: '',
} as const;

export const SWAPS_CHAINID_DEFAULT_TOKEN_MAP = {
[CHAIN_IDS.MAINNET]: ETH_SWAPS_TOKEN_OBJECT,
[CHAIN_IDS.LOCALHOST]: TEST_ETH_SWAPS_TOKEN_OBJECT,
Expand All @@ -206,6 +215,7 @@ export const SWAPS_CHAINID_DEFAULT_TOKEN_MAP = {
[CHAIN_IDS.MONAD]: MONAD_SWAPS_TOKEN_OBJECT,
[CHAIN_IDS.HYPEREVM]: HYPEREVM_SWAPS_TOKEN_OBJECT,
[CHAIN_IDS.MEGAETH]: MEGAETH_SWAPS_TOKEN_OBJECT,
[CHAIN_IDS.ARC]: ARC_SWAPS_TOKEN_OBJECT,
[SolScope.Mainnet]: SOLANA_SWAPS_TOKEN_OBJECT,
[SolScope.Devnet]: SOLANA_SWAPS_TOKEN_OBJECT,
[BtcScope.Mainnet]: BTC_SWAPS_TOKEN_OBJECT,
Expand Down Expand Up @@ -236,4 +246,6 @@ export const SYMBOL_TO_SLIP44_MAP: Record<
TRX: 'slip44:195',
MON: 'slip44:268435779',
HYPE: 'slip44:2457',
// No slip44 for USDC but I believe the intention is to produce CAIP format
USDC: 'erc20:0x0000000000000000000000000000000000000000',
};
1 change: 1 addition & 0 deletions packages/bridge-controller/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ export enum ChainId {
MONAD = 143,
HYPEREVM = 999,
MEGAETH = 4326,
ARC = 5052,
}

export type FeatureFlagsPlatformConfig = Infer<typeof PlatformConfigSchema>;
Expand Down
Loading