import { ethers } from "ethers"; export const networks: Record = { mainnet: "https://rpc.ankr.com/eth", polygon: "https://rpc.ankr.com/polygon", avalanche: "https://rpc.ankr.com/avalanche", fantom: "https://rpc.ankr.com/fantom", optimism: "https://rpc.ankr.com/optimism", arbitrum: "https://rpc.ankr.com/arbitrum", gnosis: "https://rpc.ankr.com/gnosis", bsc: "https://rpc.ankr.com/bsc", }; export const networkScanBaseUrl: Record = { mainnet: "https://etherscan.io/", polygon: "https://polygonscan.com/", avalanche: "https://snowtrace.io/", fantom: "https://ftmscan.com/", optimism: "https://optimistic.etherscan.io/", arbitrum: "https://arbiscan.io/", gnosis: "https://gnosisscan.io/", bsc: "https://bscscan.com/", }; export type Network = keyof typeof networks; export const gnosisSafeAbi = [ { inputs: [], name: "getOwners", outputs: [{ internalType: "address[]", name: "", type: "address[]" }], stateMutability: "view", type: "function", }, { inputs: [], name: "getThreshold", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function", }, ]; export const networkProviderMap = Object.keys(networks).reduce((acc, curr) => { acc[curr] = new ethers.providers.JsonRpcProvider(networks[curr]); return acc; }, {} as Record);