export enum SupportedChainId { MAINNET = 1, ROPSTEN = 3, RINKEBY = 4, GOERLI = 5, CRONOS = 25, KOVAN = 42, BSC = 56, AVAX = 43114, ARBITRUM_ONE = 42161, ARBITRUM_RINKEBY = 421611, OPTIMISM = 10, OPTIMISTIC_KOVAN = 69, POLYGON = 137, } export const ALL_SUPPORTED_CHAIN_IDS: SupportedChainId[] = [ SupportedChainId.MAINNET, SupportedChainId.ROPSTEN, SupportedChainId.RINKEBY, SupportedChainId.GOERLI, SupportedChainId.KOVAN, SupportedChainId.BSC, SupportedChainId.AVAX, SupportedChainId.CRONOS, SupportedChainId.ARBITRUM_ONE, SupportedChainId.ARBITRUM_RINKEBY, SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISTIC_KOVAN, SupportedChainId.POLYGON, ] export const L1_CHAIN_IDS = [ SupportedChainId.MAINNET, SupportedChainId.ROPSTEN, SupportedChainId.RINKEBY, SupportedChainId.GOERLI, SupportedChainId.KOVAN, SupportedChainId.BSC, SupportedChainId.AVAX, SupportedChainId.CRONOS, ] as const export type SupportedL1ChainId = typeof L1_CHAIN_IDS[number] export const L2_CHAIN_IDS = [] as const export type SupportedL2ChainId = typeof L2_CHAIN_IDS[number] export interface L1ChainInfo { readonly docs: string readonly explorer: string readonly infoLink: string readonly label: string readonly rpcUrls?: string[] } export interface L2ChainInfo extends L1ChainInfo { readonly bridge: string readonly logoUrl: string } type ChainInfo = { readonly [chainId: number]: L1ChainInfo | L2ChainInfo } & { readonly [chainId in SupportedL1ChainId]: L1ChainInfo } export const CHAIN_INFO: ChainInfo = { [SupportedChainId.MAINNET]: { docs: 'https://docs.uniswap.org/', explorer: 'https://etherscan.io/', infoLink: 'https://info.uniswap.org/#/', label: 'Mainnet', }, [SupportedChainId.RINKEBY]: { docs: 'https://docs.uniswap.org/', explorer: 'https://rinkeby.etherscan.io/', infoLink: 'https://info.uniswap.org/#/', label: 'Rinkeby', }, [SupportedChainId.ROPSTEN]: { docs: 'https://docs.uniswap.org/', explorer: 'https://ropsten.etherscan.io/', infoLink: 'https://info.uniswap.org/#/', label: 'Ropsten', }, [SupportedChainId.KOVAN]: { docs: 'https://docs.uniswap.org/', explorer: 'https://kovan.etherscan.io/', infoLink: 'https://info.uniswap.org/#/', label: 'Kovan', }, [SupportedChainId.GOERLI]: { docs: 'https://docs.uniswap.org/', explorer: 'https://goerli.etherscan.io/', infoLink: 'https://info.uniswap.org/#/', label: 'Görli', }, [SupportedChainId.CRONOS]: { docs: 'https://docs.uniswap.org/', explorer: 'https://cronoscan.com/', infoLink: 'https://info.uniswap.org/#/', label: 'CRONOS', }, [SupportedChainId.BSC]: { docs: 'https://docs.uniswap.org/', explorer: 'https://bscscan.com/', infoLink: 'https://info.uniswap.org/#/', label: 'Bsc', }, [SupportedChainId.AVAX]: { docs: 'https://docs.uniswap.org/', explorer: 'https://snowtrace.io/', infoLink: 'https://info.uniswap.org/#/', label: 'Görli', }, [SupportedChainId.OPTIMISM]: { docs: 'https://community.optimism.io/', explorer: 'https://optimistic.etherscan.io/', infoLink: 'https://www.optimism.io/', label: 'Optimism', } }