mirror of
https://github.com/lens-protocol/core.git
synced 2026-04-22 03:02:03 -04:00
37 lines
1.4 KiB
TypeScript
37 lines
1.4 KiB
TypeScript
import {
|
|
eEthereumNetwork,
|
|
ePolygonNetwork,
|
|
eXDaiNetwork,
|
|
iParamsPerNetwork,
|
|
} from './helpers/types';
|
|
|
|
import dotenv from 'dotenv';
|
|
dotenv.config({});
|
|
|
|
const INFURA_KEY = process.env.INFURA_KEY || '';
|
|
const ALCHEMY_KEY = process.env.ALCHEMY_KEY || '';
|
|
const TENDERLY_FORK_ID = process.env.TENDERLY_FORK_ID || '';
|
|
|
|
const GWEI = 1000 * 1000 * 1000;
|
|
|
|
export const NETWORKS_RPC_URL: iParamsPerNetwork<string> = {
|
|
[eEthereumNetwork.kovan]: ALCHEMY_KEY
|
|
? `https://eth-kovan.alchemyapi.io/v2/${ALCHEMY_KEY}`
|
|
: `https://kovan.infura.io/v3/${INFURA_KEY}`,
|
|
[eEthereumNetwork.ropsten]: ALCHEMY_KEY
|
|
? `https://eth-ropsten.alchemyapi.io/v2/${ALCHEMY_KEY}`
|
|
: `https://ropsten.infura.io/v3/${INFURA_KEY}`,
|
|
[eEthereumNetwork.main]: ALCHEMY_KEY
|
|
? `https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_KEY}`
|
|
: `https://mainnet.infura.io/v3/${INFURA_KEY}`,
|
|
[eEthereumNetwork.hardhat]: 'http://localhost:8545',
|
|
[eEthereumNetwork.harhatevm]: 'http://localhost:8545',
|
|
[eEthereumNetwork.tenderlyMain]: `https://rpc.tenderly.co/fork/${TENDERLY_FORK_ID}`,
|
|
[ePolygonNetwork.mumbai]: ALCHEMY_KEY
|
|
? `https://polygon-mumbai.g.alchemy.com/v2/${ALCHEMY_KEY}`
|
|
: `https://polygon-mumbai.infura.io/v3/${INFURA_KEY}`,
|
|
[ePolygonNetwork.matic]: ALCHEMY_KEY
|
|
? `https://polygon-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}`
|
|
: `https://polygon-mainnet.infura.io/v3/${INFURA_KEY}`,
|
|
[eXDaiNetwork.xdai]: 'https://rpc.xdaichain.com/',
|
|
}; |