diff --git a/src/app/components/select-network-button/select-network-button.tsx b/src/app/components/select-network-button/select-network-button.tsx index 9a907d9c..bc6a84b9 100644 --- a/src/app/components/select-network-button/select-network-button.tsx +++ b/src/app/components/select-network-button/select-network-button.tsx @@ -28,7 +28,7 @@ export function SelectNetworkButton({ {enabledEthereumNetworks.map((network, id) => { return ( handleClick(network)}> - {network.name} + {network.displayName} ); })} diff --git a/src/app/hooks/use-endpoints.ts b/src/app/hooks/use-endpoints.ts index 961357c1..d19ab6b8 100644 --- a/src/app/hooks/use-endpoints.ts +++ b/src/app/hooks/use-endpoints.ts @@ -99,6 +99,16 @@ export function useEndpoints(): NetworkEndpoints { bitcoinNetwork, bitcoinNetworkName, }; + case EthereumNetworkID.ArbSepolia: + return { + attestorAPIURLs, + ethereumExplorerAPIURL: 'https://sepolia.arbiscan.io/tx/', + ethereumAttestorChainID: 'evm-arbsepolia', + bitcoinExplorerAPIURL, + bitcoinBlockchainAPIURL, + bitcoinNetwork, + bitcoinNetworkName, + }; default: throw new Error(`Unsupported network: ${network?.name}`); } diff --git a/src/app/store/slices/vault/vault.slice.ts b/src/app/store/slices/vault/vault.slice.ts index 52e5d7bb..fbccfee4 100644 --- a/src/app/store/slices/vault/vault.slice.ts +++ b/src/app/store/slices/vault/vault.slice.ts @@ -14,6 +14,7 @@ const initialVaultState: VaultSliceState = { [EthereumNetworkID.Goerli]: [], [EthereumNetworkID.Sepolia]: [], [EthereumNetworkID.X1Testnet]: [], + [EthereumNetworkID.ArbSepolia]: [], }, status: 'idle', error: null, diff --git a/src/shared/models/ethereum-network.ts b/src/shared/models/ethereum-network.ts index 1bad0041..09e3dc4b 100644 --- a/src/shared/models/ethereum-network.ts +++ b/src/shared/models/ethereum-network.ts @@ -1,6 +1,7 @@ export interface EthereumNetwork { id: EthereumNetworkID; name: string; + displayName: string; } export enum EthereumNetworkID { @@ -8,33 +9,45 @@ export enum EthereumNetworkID { Goerli = '5', Sepolia = '11155111', X1Testnet = '195', + ArbSepolia = '421614', } const ethereumOKXTestnet: EthereumNetwork = { name: 'X1Test', + displayName: 'X1 Testnet', id: EthereumNetworkID.X1Testnet, }; const ethereumMainnet: EthereumNetwork = { name: 'Mainnet', + displayName: 'ETH Mainnet', id: EthereumNetworkID.Mainnet, }; const ethereumGoerli: EthereumNetwork = { name: 'Goerli', + displayName: 'Goerli', id: EthereumNetworkID.Goerli, }; const ethereumSepolia: EthereumNetwork = { name: 'Sepolia', + displayName: 'Sepolia', id: EthereumNetworkID.Sepolia, }; +const ethereumArbSepolia: EthereumNetwork = { + name: 'ArbSepolia', + displayName: 'Arbitrum Sepolia', + id: EthereumNetworkID.ArbSepolia, +}; + export const ethereumNetworks: EthereumNetwork[] = [ ethereumMainnet, ethereumGoerli, ethereumSepolia, ethereumOKXTestnet, + ethereumArbSepolia, ]; export const hexChainIDs: { [key in EthereumNetworkID]: string } = { @@ -42,9 +55,24 @@ export const hexChainIDs: { [key in EthereumNetworkID]: string } = { [EthereumNetworkID.Goerli]: '0x5', [EthereumNetworkID.Sepolia]: '0xAA36A7', [EthereumNetworkID.X1Testnet]: '0x3C', + [EthereumNetworkID.ArbSepolia]: '0x66eee', }; export const addNetworkParams = { + [EthereumNetworkID.ArbSepolia]: [ + { + chainId: '0x66eee', + rpcUrls: ['https://sepolia-rollup.arbitrum.io/rpc', 'https://arb-sepolia.infura.io/v3/'], + chainName: 'Arbitrum Sepolia Testnet', + nativeCurrency: { + name: 'ETH', + symbol: 'ETH', + decimals: 18, + }, + blockExplorerUrls: ['https://sepolia.arbiscan.io/'], + }, + ], + [EthereumNetworkID.X1Testnet]: [ { chainId: '0xC3',