import { BLAST_API_KEY, RONIN_API_KEY } from "./isomorphic-config";

export const getContractAddress = (networkId: number) =>
  isSupportedNetwork(networkId)
    ? NETWORK_INFO[networkId].contractAddress
    : undefined;

export const getRpcUrl = (networkId: number) =>
  isSupportedNetwork(networkId) ? NETWORK_INFO[networkId].rpcUrl : undefined;

const isSupportedNetwork = (
  networkId: number,
): networkId is keyof typeof NETWORK_INFO => networkId in NETWORK_INFO;

type NetworkInfo = {
  name: string;
  rpcUrl: string;
  isMainnet: boolean;
  contractAddress: `0x${string}`;
};

// TODO Currently, contract_manager is designed in a way that does not work in
// any js environment except nodejs, including browsers and the Edge runtime.
// So the network info here is just restructured info from contract_manager.
// However, once contract_manager is refactored to work on web, we should
// replace this and should use contract_manager to drive all this info instead.
export const NETWORK_INFO = {
  [1]: {
    name: "ethereum",
    rpcUrl: `https://eth-mainnet.blastapi.io/${BLAST_API_KEY}`,
    isMainnet: true,
    contractAddress: "0x4305FB66699C3B2702D4d05CF36551390A4c69C6",
  },
  [10]: {
    name: "optimism",
    rpcUrl: "https://rpc.ankr.com/optimism",
    isMainnet: true,
    contractAddress: "0xff1a0f4744e8582DF1aE09D5611b887B6a12925C",
  },
  [25]: {
    name: "cronos",
    rpcUrl: "https://cronosrpc-1.xstaking.sg",
    isMainnet: true,
    contractAddress: "0xE0d0e68297772Dd5a1f1D99897c581E2082dbA5B",
  },
  [56]: {
    name: "bsc",
    rpcUrl: "https://rpc.ankr.com/bsc",
    isMainnet: true,
    contractAddress: "0x4D7E825f80bDf85e913E0DD2A2D54927e9dE1594",
  },
  [71]: {
    name: "conflux_espace_testnet",
    rpcUrl: "https://evmtestnet.confluxrpc.com",
    isMainnet: false,
    contractAddress: "0xDd24F84d36BF92C65F92307595335bdFab5Bbd21",
  },
  [82]: {
    name: "meter",
    rpcUrl: "https://meter.blockpi.network/v1/rpc/public",
    isMainnet: true,
    contractAddress: "0xbFe3f445653f2136b2FD1e6DdDb5676392E3AF16",
  },
  [83]: {
    name: "meter_testnet",
    rpcUrl: "https://rpctest.meter.io",
    isMainnet: false,
    contractAddress: "0x5a71C07a0588074443545eE0c08fb0375564c3E4",
  },
  [88]: {
    name: "viction",
    rpcUrl: "https://viction.blockpi.network/v1/rpc/public",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [97]: {
    name: "bsc_testnet",
    rpcUrl: "https://rpc.ankr.com/bsc_testnet_chapel",
    isMainnet: false,
    contractAddress: "0x5744Cbf430D99456a0A8771208b674F27f8EF0Fb",
  },
  [100]: {
    name: "gnosis",
    rpcUrl: "https://rpc.gnosischain.com",
    isMainnet: true,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [137]: {
    name: "polygon",
    rpcUrl: "https://polygon-rpc.com",
    isMainnet: true,
    contractAddress: "0xff1a0f4744e8582DF1aE09D5611b887B6a12925C",
  },
  [148]: {
    name: "shimmer",
    rpcUrl: "https://json-rpc.evm.shimmer.network",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [169]: {
    name: "manta",
    rpcUrl: "https://pacific-rpc.manta.network/http",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [199]: {
    name: "bttc",
    rpcUrl: "https://rpc.bt.io",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [204]: {
    name: "opbnb",
    rpcUrl: "https://opbnb-mainnet-rpc.bnbchain.org",
    isMainnet: true,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [250]: {
    name: "fantom",
    rpcUrl: "https://rpc.ankr.com/fantom",
    isMainnet: true,
    contractAddress: "0xff1a0f4744e8582DF1aE09D5611b887B6a12925C",
  },
  [288]: {
    name: "boba",
    rpcUrl: "https://replica.boba.network",
    isMainnet: true,
    contractAddress: "0x4374e5a8b9C22271E9EB878A2AA31DE97DF15DAF",
  },
  [295]: {
    name: "hedera",
    rpcUrl: "https://mainnet.hashio.io/api",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [296]: {
    name: "hedera_testnet",
    rpcUrl: "https://testnet.hashio.io/api",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [300]: {
    name: "zksync_sepolia",
    rpcUrl: "https://sepolia.era.zksync.dev/",
    isMainnet: false,
    contractAddress: "0x056f829183Ec806A78c26C98961678c24faB71af",
  },
  [314]: {
    name: "filecoin",
    rpcUrl: "https://rpc.ankr.com/filecoin",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [321]: {
    name: "kcc",
    rpcUrl: "https://rpc-mainnet.kcc.network",
    isMainnet: true,
    contractAddress: "0xE0d0e68297772Dd5a1f1D99897c581E2082dbA5B",
  },
  [322]: {
    name: "kcc_testnet",
    rpcUrl: "https://rpc-testnet.kcc.network",
    isMainnet: false,
    contractAddress: "0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E",
  },
  [324]: {
    name: "zksync",
    rpcUrl: "https://zksync2-mainnet.zksync.io",
    isMainnet: true,
    contractAddress: "0xf087c864AEccFb6A2Bf1Af6A0382B0d0f6c5D834",
  },
  [336]: {
    name: "movement_evm_devnet",
    rpcUrl: "https://mevm.devnet.m1.movementlabs.xyz/v1",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [338]: {
    name: "cronos_testnet",
    rpcUrl: "https://evm-t3.cronos.org",
    isMainnet: false,
    contractAddress: "0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320",
  },
  [646]: {
    name: "flow_previewnet",
    rpcUrl: "https://previewnet.evm.nodes.onflow.org",
    isMainnet: true,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [919]: {
    name: "mode_testnet",
    rpcUrl: "https://sepolia.mode.network/",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [987]: {
    name: "orange_testnet",
    rpcUrl: "https://subnets.avax.network/orangetest/testnet/rpc",
    isMainnet: false,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [1001]: {
    name: "klaytn_testnet",
    rpcUrl: "https://rpc.ankr.com/klaytn_testnet",
    isMainnet: false,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [1024]: {
    name: "parallel",
    rpcUrl: "https://rpc.parallel.fi/",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [1029]: {
    name: "bttc_testnet",
    rpcUrl: "https://pre-rpc.bt.io",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [1030]: {
    name: "conflux_espace",
    rpcUrl: "https://evm.confluxrpc.org",
    isMainnet: true,
    contractAddress: "0xe9d69CdD6Fe41e7B621B4A688C5D1a68cB5c8ADc",
  },
  [1073]: {
    name: "shimmer_testnet",
    rpcUrl: "https://json-rpc.evm.testnet.shimmer.network",
    isMainnet: false,
    contractAddress: "0x8D254a21b3C86D32F7179855531CE99164721933",
  },
  [1101]: {
    name: "polygon_zkevm",
    rpcUrl: "https://zkevm-rpc.com",
    isMainnet: true,
    contractAddress: "0xC5E56d6b40F3e3B5fbfa266bCd35C37426537c65",
  },
  [1111]: {
    name: "wemix",
    rpcUrl: "https://api.wemix.com",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [1112]: {
    name: "wemix_testnet",
    rpcUrl: "https://api.test.wemix.com",
    isMainnet: false,
    contractAddress: "0x26DD80569a8B23768A1d80869Ed7339e07595E85",
  },
  [1115]: {
    name: "coredao_testnet",
    rpcUrl: "https://rpc.test.btcs.network",
    isMainnet: false,
    contractAddress: "0x8D254a21b3C86D32F7179855531CE99164721933",
  },
  [1116]: {
    name: "coredao",
    rpcUrl: "https://rpc.coredao.org",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [1328]: {
    name: "sei_evm_testnet",
    rpcUrl: "https://evm-rpc-testnet.sei-apis.com",
    isMainnet: false,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [1329]: {
    name: "sei_evm_mainnet",
    rpcUrl: "https://evm-rpc.sei-apis.com",
    isMainnet: true,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [1442]: {
    name: "polygon_zkevm_testnet",
    rpcUrl: "https://rpc.public.zkevm-test.net",
    isMainnet: false,
    contractAddress: "0xFf255f800044225f54Af4510332Aa3D67CC77635",
  },
  [1625]: {
    name: "gravity",
    rpcUrl: "https://rpc.gravity.xyz/",
    isMainnet: true,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [1890]: {
    name: "lightlink_phoenix",
    rpcUrl: "https://replicator.phoenix.lightlink.io/rpc/v1",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [1891]: {
    name: "lightlink_pegasus_testnet",
    rpcUrl: "https://replicator.pegasus.lightlink.io/rpc/v1",
    isMainnet: false,
    contractAddress: "0x5D289Ad1CE59fCC25b6892e7A303dfFf3a9f7167",
  },
  [2020]: {
    name: "ronin",
    rpcUrl: `https://api-gateway.skymavis.com/rpc?apikey=${RONIN_API_KEY}`,
    isMainnet: true,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [2021]: {
    name: "saigon",
    rpcUrl: `https://api-gateway.skymavis.com/rpc/testnet?apikey=${RONIN_API_KEY}`,
    isMainnet: false,
    contractAddress: "0xEbe57e8045F2F230872523bbff7374986E45C486",
  },
  [2221]: {
    name: "kava_testnet",
    rpcUrl: "https://evm.testnet.kava.io",
    isMainnet: false,
    contractAddress: "0xfA25E653b44586dBbe27eE9d252192F0e4956683",
  },
  [2222]: {
    name: "kava",
    rpcUrl: "https://kava-evm.publicnode.com",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [2424]: {
    name: "injective_inevm_testnet",
    rpcUrl: "https://inevm-testnet.rpc.caldera.xyz/http",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [2525]: {
    name: "injective_inevm",
    rpcUrl: "https://inevm.calderachain.xyz/http",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [2710]: {
    name: "morph_testnet",
    rpcUrl: "https://rpc-testnet.morphl2.io",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [2810]: {
    name: "morph_holesky_testnet",
    rpcUrl: "https://rpc-holesky.morphl2.io",
    isMainnet: false,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [2888]: {
    name: "boba_goerli",
    rpcUrl: "https://goerli.boba.network",
    isMainnet: false,
    contractAddress: "0x8D254a21b3C86D32F7179855531CE99164721933",
  },
  [3776]: {
    name: "astar_zkevm",
    rpcUrl: "https://rpc.startale.com/astar-zkevm",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [4002]: {
    name: "fantom_testnet",
    rpcUrl: `https://fantom-testnet.blastapi.io/${BLAST_API_KEY}`,
    isMainnet: false,
    contractAddress: "0x5744Cbf430D99456a0A8771208b674F27f8EF0Fb",
  },
  [4200]: {
    name: "merlin",
    rpcUrl: "https://rpc.merlinchain.io",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [5000]: {
    name: "mantle",
    rpcUrl: "https://rpc.mantle.xyz/",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [5003]: {
    name: "mantle_sepolia",
    rpcUrl: "https://rpc.sepolia.mantle.xyz",
    isMainnet: false,
    contractAddress: "0x98046Bd286715D3B0BC227Dd7a956b83D8978603",
  },
  [5611]: {
    name: "opbnb_testnet",
    rpcUrl: "https://opbnb-testnet-rpc.bnbchain.org",
    isMainnet: false,
    contractAddress: "0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c",
  },
  [7000]: {
    name: "zetachain",
    rpcUrl: "https://zetachain-evm.blockpi.network/v1/rpc/public",
    isMainnet: true,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [7001]: {
    name: "zetachain_testnet",
    rpcUrl: "https://zetachain-athens-evm.blockpi.network/v1/rpc/public",
    isMainnet: false,
    contractAddress: "0x0708325268dF9F66270F1401206434524814508b",
  },
  [7332]: {
    name: "horizen_eon",
    rpcUrl: "https://rpc.ankr.com/horizen_eon",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [7700]: {
    name: "canto",
    rpcUrl: "https://canto.slingshot.finance",
    isMainnet: true,
    contractAddress: "0x98046Bd286715D3B0BC227Dd7a956b83D8978603",
  },
  [7701]: {
    name: "canto_testnet",
    rpcUrl: "https://canto-testnet.plexnode.wtf",
    isMainnet: false,
    contractAddress: "0x26DD80569a8B23768A1d80869Ed7339e07595E85",
  },
  [8008]: {
    name: "polynomial",
    rpcUrl: "https://rpc.polynomial.fi/",
    isMainnet: true,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [8217]: {
    name: "klaytn",
    rpcUrl: "https://rpc.ankr.com/klaytn",
    isMainnet: true,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [8453]: {
    name: "base",
    rpcUrl: "https://developer-access-mainnet.base.org/",
    isMainnet: true,
    contractAddress: "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a",
  },
  [9000]: {
    name: "evmos_testnet",
    rpcUrl: "https://jsonrpc-evmos-testnet.mzonder.com",
    isMainnet: false,
    contractAddress: "0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E",
  },
  [9001]: {
    name: "evmos",
    rpcUrl: "https://evmos-evm.publicnode.com",
    isMainnet: true,
    contractAddress: "0x354bF866A4B006C9AF9d9e06d9364217A8616E12",
  },
  [9393]: {
    name: "dela_deperp_testnet",
    rpcUrl: "https://sepolia-dela.deperp.com",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [9659]: {
    name: "parallel_testnet",
    rpcUrl: "https://rpc-accused-coffee-koala-b9fn1dik76.t.conduit.xyz",
    isMainnet: false,
    contractAddress: "0x23f0e8FAeE7bbb405E7A7C3d60138FCfd43d7509",
  },
  [10_200]: {
    name: "chiado",
    rpcUrl: "https://rpc.chiadochain.net",
    isMainnet: false,
    contractAddress: "0x98046Bd286715D3B0BC227Dd7a956b83D8978603",
  },
  [15_557]: {
    name: "eos_testnet",
    rpcUrl: "https://api.testnet.evm.eosnetwork.com",
    isMainnet: false,
    contractAddress: "0x0708325268dF9F66270F1401206434524814508b",
  },
  [17_777]: {
    name: "eos",
    rpcUrl: "https://api.evm.eosnetwork.com",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [33_612]: {
    name: "dela_mithreum_deperp_testnet",
    rpcUrl: "https://mithreum-rpc-sepolia.deperp.com",
    isMainnet: false,
    contractAddress: "0xe9d69CdD6Fe41e7B621B4A688C5D1a68cB5c8ADc",
  },
  [34_443]: {
    name: "mode",
    rpcUrl: "https://mainnet.mode.network/",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [42_161]: {
    name: "arbitrum",
    rpcUrl: "https://arb1.arbitrum.io/rpc",
    isMainnet: true,
    contractAddress: "0xff1a0f4744e8582DF1aE09D5611b887B6a12925C",
  },
  [42_220]: {
    name: "celo",
    rpcUrl: "https://forno.celo.org",
    isMainnet: true,
    contractAddress: "0xff1a0f4744e8582DF1aE09D5611b887B6a12925C",
  },
  [42_766]: {
    name: "zkfair",
    rpcUrl: "https://rpc.zkfair.io",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [42_793]: {
    name: "etherlink",
    rpcUrl: "https://node.mainnet.etherlink.com/",
    isMainnet: true,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [43_113]: {
    name: "fuji",
    rpcUrl: "https://api.avax-test.network/ext/bc/C/rpc",
    isMainnet: false,
    contractAddress: "0x23f0e8FAeE7bbb405E7A7C3d60138FCfd43d7509",
  },
  [43_114]: {
    name: "avalanche",
    rpcUrl: "https://api.avax.network/ext/bc/C/rpc",
    isMainnet: true,
    contractAddress: "0x4305FB66699C3B2702D4d05CF36551390A4c69C6",
  },
  [43_851]: {
    name: "zkfair_testnet",
    rpcUrl: "https://testnet-rpc.zkfair.io",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [44_787]: {
    name: "celo_alfajores_testnet",
    rpcUrl: "https://alfajores-forno.celo-testnet.org",
    isMainnet: false,
    contractAddress: "0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E",
  },
  [59_140]: {
    name: "linea_goerli",
    rpcUrl: `https://linea-goerli.blastapi.io/${BLAST_API_KEY}`,
    isMainnet: false,
    contractAddress: "0xdF21D137Aadc95588205586636710ca2890538d5",
  },
  [59_141]: {
    name: "linea_sepolia",
    rpcUrl: "https://rpc.sepolia.linea.build",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [59_144]: {
    name: "linea",
    rpcUrl: "https://linea.rpc.thirdweb.com",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [64_002]: {
    name: "idex_xchain_testnet",
    rpcUrl: "https://xchain-testnet-rpc.idex.io",
    isMainnet: false,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [64_165]: {
    name: "fantom_sonic_testnet",
    rpcUrl: "https://rpc.sonic.fantom.network/",
    isMainnet: false,
    contractAddress: "0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320",
  },
  [80_001]: {
    name: "mumbai",
    rpcUrl: `https://polygon-testnet.blastapi.io/${BLAST_API_KEY}`,
    isMainnet: false,
    contractAddress: "0xFC6bd9F9f0c6481c6Af3A7Eb46b296A5B85ed379",
  },
  [80_002]: {
    name: "polygon_amoy",
    rpcUrl: "https://polygon-amoy-bor-rpc.publicnode.com",
    isMainnet: false,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [80_008]: {
    name: "polynomial_testnet",
    rpcUrl: "https://rpc-polynomial-network-testnet-x0tryg8u1c.t.conduit.xyz",
    isMainnet: false,
    contractAddress: "0x23f0e8FAeE7bbb405E7A7C3d60138FCfd43d7509",
  },
  [80_084]: {
    name: "berachain_testnet_v2",
    rpcUrl: "https://evm-rpc-bera.rhino-apis.com/",
    isMainnet: false,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [80_085]: {
    name: "berachain_testnet",
    rpcUrl: "https://rpc.ankr.com/berachain_testnet",
    isMainnet: false,
    contractAddress: "0x8D254a21b3C86D32F7179855531CE99164721933",
  },
  [81_457]: {
    name: "blast",
    rpcUrl: "https://rpc.blast.io",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [84_532]: {
    name: "base_sepolia",
    rpcUrl: "https://sepolia.base.org",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [88_882]: {
    name: "chiliz_spicy",
    rpcUrl: "https://spicy-rpc.chiliz.com",
    isMainnet: false,
    contractAddress: "0x23f0e8FAeE7bbb405E7A7C3d60138FCfd43d7509",
  },
  [88_888]: {
    name: "chiliz",
    rpcUrl: "https://rpc.ankr.com/chiliz",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [128_123]: {
    name: "etherlink_testnet",
    rpcUrl: "https://node.ghostnet.etherlink.com/",
    isMainnet: false,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [167_000]: {
    name: "taiko_mainnet",
    rpcUrl: "https://rpc.mainnet.taiko.xyz",
    isMainnet: true,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [167_009]: {
    name: "taiko_hekla",
    rpcUrl: "https://rpc.hekla.taiko.xyz/",
    isMainnet: false,
    contractAddress: "0x2880aB155794e7179c9eE2e38200202908C17B43",
  },
  [314_159]: {
    name: "filecoin_calibration",
    rpcUrl: "https://rpc.ankr.com/filecoin_testnet",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [412_346]: {
    name: "syndr_nitro_testnet",
    rpcUrl: "https://syndr-nitro-testnet.calderachain.xyz/http",
    isMainnet: false,
    contractAddress: "0xEbe57e8045F2F230872523bbff7374986E45C486",
  },
  [421_614]: {
    name: "arbitrum_sepolia",
    rpcUrl: "https://sepolia-rollup.arbitrum.io/rpc",
    isMainnet: false,
    contractAddress: "0x4374e5a8b9C22271E9EB878A2AA31DE97DF15DAF",
  },
  [534_351]: {
    name: "scroll_sepolia",
    rpcUrl: "https://sepolia-rpc.scroll.io/",
    isMainnet: false,
    contractAddress: "0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c",
  },
  [534_352]: {
    name: "scroll",
    rpcUrl: "https://rpc.scroll.io",
    isMainnet: true,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [686_868]: {
    name: "merlin_testnet",
    rpcUrl: "https://testnet-rpc.merlinchain.io/",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [1_261_120]: {
    name: "astar_zkevm_testnet",
    rpcUrl: "https://rpc.zkatana.gelato.digital",
    isMainnet: false,
    contractAddress: "0x8D254a21b3C86D32F7179855531CE99164721933",
  },
  [3_441_005]: {
    name: "manta_testnet",
    rpcUrl: "https://manta-pacific-testnet.drpc.org",
    isMainnet: false,
    contractAddress: "0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c",
  },
  [3_441_006]: {
    name: "manta_sepolia",
    rpcUrl: "https://manta-sepolia.rpc.caldera.xyz/http",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [8_101_902]: {
    name: "olive_testnet",
    rpcUrl: "https://olive-network-testnet.rpc.caldera.xyz/http",
    isMainnet: false,
    contractAddress: "0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c",
  },
  [11_155_111]: {
    name: "sepolia",
    rpcUrl: `https://eth-sepolia.blastapi.io/${BLAST_API_KEY}`,
    isMainnet: false,
    contractAddress: "0xDd24F84d36BF92C65F92307595335bdFab5Bbd21",
  },
  [11_155_420]: {
    name: "optimism_sepolia",
    rpcUrl: "https://sepolia.optimism.io",
    isMainnet: false,
    contractAddress: "0x0708325268dF9F66270F1401206434524814508b",
  },
  [94_204_209]: {
    name: "polygon_blackberry",
    rpcUrl: "https://rpc.polygon-blackberry.gelato.digital",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [123_420_111]: {
    name: "optimism_celestia_raspberry",
    rpcUrl: "https://rpc.opcelestia-raspberry.gelato.digital",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [168_587_773]: {
    name: "blast_s2_testnet",
    rpcUrl: "https://sepolia.blast.io",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
  [245_022_926]: {
    name: "neon_devnet",
    rpcUrl: "https://devnet.neonevm.org",
    isMainnet: false,
    contractAddress: "0x0708325268dF9F66270F1401206434524814508b",
  },
  [245_022_934]: {
    name: "neon",
    rpcUrl: "https://neon-evm.drpc.org",
    isMainnet: true,
    contractAddress: "0x7f2dB085eFC3560AFF33865dD727225d91B4f9A5",
  },
  [1_313_161_554]: {
    name: "aurora",
    rpcUrl: "https://mainnet.aurora.dev",
    isMainnet: true,
    contractAddress: "0xF89C7b475821EC3fDC2dC8099032c05c6c0c9AB9",
  },
  [1_313_161_555]: {
    name: "aurora_testnet",
    rpcUrl: "https://testnet.aurora.dev",
    isMainnet: false,
    contractAddress: "0x74f09cb3c7e2A01865f424FD14F6dc9A14E3e94E",
  },
  [1_802_203_764]: {
    name: "kakarot_sepolia",
    rpcUrl: "https://sepolia-rpc-priority.kakarot.org",
    isMainnet: false,
    contractAddress: "0xD458261E832415CFd3BAE5E416FdF3230ce6F134",
  },
  [88_153_591_557]: {
    name: "arbitrum_blueberry",
    rpcUrl: "https://rpc.arb-blueberry.gelato.digital",
    isMainnet: false,
    contractAddress: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
  },
} satisfies Record<number, NetworkInfo>;

export const NETWORK_IDS = Object.keys(NETWORK_INFO).map((key) =>
  Number.parseInt(key, 10),
);
