From 6d69a2c1cb55ffbbe44fd6d8f54d7327913c18f2 Mon Sep 17 00:00:00 2001 From: Hao Date: Thu, 20 Mar 2025 01:47:59 +1100 Subject: [PATCH] Add flow into chains.ts --- src/core/chains.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/core/chains.ts b/src/core/chains.ts index fa0c725..c6e7ede 100644 --- a/src/core/chains.ts +++ b/src/core/chains.ts @@ -30,6 +30,7 @@ import { zora, aurora, canto, + flowMainnet // Testnets sepolia, @@ -52,7 +53,8 @@ import { zoraSepolia, celoAlfajores, goerli, - holesky + holesky, + flowTestnet } from 'viem/chains'; // Default configuration values @@ -91,6 +93,7 @@ export const chainMap: Record = { 7777777: zora, 1313161554: aurora, 7700: canto, + 747: flowMainnet // Testnets 11155111: sepolia, @@ -113,7 +116,8 @@ export const chainMap: Record = { 999999999: zoraSepolia, 44787: celoAlfajores, 5: goerli, - 17000: holesky + 17000: holesky, + 545: flowTestnet }; // Map network names to chain IDs for easier reference @@ -160,6 +164,7 @@ export const networkNameMap: Record = { 'zora': 7777777, 'aurora': 1313161554, 'canto': 7700, + 'flow': 747 // Testnets 'sepolia': 11155111, @@ -202,7 +207,8 @@ export const networkNameMap: Record = { 'celoalfajores': 44787, 'alfajores': 44787, 'goerli': 5, - 'holesky': 17000 + 'holesky': 17000, + 'flow-testnet': 545 }; // Map chain IDs to RPC URLs @@ -237,6 +243,7 @@ export const rpcUrlMap: Record = { 7777777: 'https://rpc.zora.energy', 1313161554: 'https://mainnet.aurora.dev', 7700: 'https://canto.gravitychain.io', + 747: 'https://mainnet.evm.nodes.onflow.org' // Testnets 11155111: 'https://sepolia.drpc.org', @@ -259,7 +266,8 @@ export const rpcUrlMap: Record = { 999999999: 'https://sepolia.rpc.zora.energy', 44787: 'https://alfajores-forno.celo-testnet.org', 5: 'https://rpc.ankr.com/eth_goerli', - 17000: 'https://ethereum-holesky.publicnode.com' + 17000: 'https://ethereum-holesky.publicnode.com', + 545: 'https://testnet.evm.nodes.onflow.org' }; /** @@ -333,4 +341,4 @@ export function getSupportedNetworks(): string[] { return Object.keys(networkNameMap) .filter(name => name.length > 2) // Filter out short aliases .sort(); -} \ No newline at end of file +}