-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.ts
84 lines (79 loc) · 2.28 KB
/
hardhat.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import * as dotenv from 'dotenv';
import { HardhatUserConfig } from 'hardhat/config';
import '@nomiclabs/hardhat-etherscan';
import '@nomiclabs/hardhat-waffle';
import '@typechain/hardhat';
import 'hardhat-gas-reporter';
import 'solidity-coverage';
import 'hardhat-abi-exporter';
dotenv.config();
const { INFURA_API_KEY, POLYGONSCAN_API_KEY, MAINNET_ETHERSCAN_API_KEY, OP_ETHERSCAN_API_KEY } = process.env;
const PRIVATE_KEY = process.env.PRIVATE_KEY as `0x${string}`;
const config: HardhatUserConfig = {
solidity: {
version: '0.8.9',
settings: {
optimizer: {
enabled: true,
runs: 1000,
},
},
},
networks: {
// goerli: {
// url: `https://eth-goerli.alchemyapi.io/v2/${INFURA_API_KEY}`,
// accounts: [PRIVATE_KEY],
// },
mainnet: {
url: `https://mainnet.infura.io/v3/${INFURA_API_KEY}`,
accounts: [PRIVATE_KEY],
},
// polygon_mumbai: {
// url: "https://rpc-mumbai.maticvigil.com",
// accounts: [process.env.PRIVATE_KEY],
// },
polygon: {
url: `https://polygon-mainnet.infura.io/v3/${INFURA_API_KEY}`,
accounts: [PRIVATE_KEY],
},
optimisticSepolia: {
chainId: 11155420,
url: `https://optimism-sepolia.infura.io/v3/${INFURA_API_KEY}`,
accounts: [PRIVATE_KEY]
},
optimisticEthereum: {
chainId: 10,
url: `https://optimism-mainnet.infura.io/v3/${INFURA_API_KEY}`,
accounts: [PRIVATE_KEY]
}
},
etherscan: {
apiKey: {
goerli: MAINNET_ETHERSCAN_API_KEY as string,
mainnet: MAINNET_ETHERSCAN_API_KEY as string,
polygon: POLYGONSCAN_API_KEY as string,
// polygon_mumbai: POLYGONSCAN_API_KEY,
optimisticEthereum: OP_ETHERSCAN_API_KEY as string,
optimisticSepolia: OP_ETHERSCAN_API_KEY as string
},
customChains: [
{
network: 'optimisticSepolia',
chainId: 11155420,
urls: {
apiURL: 'https://api-sepolia-optimistic.etherscan.io/api',
browserURL: 'https://sepolia-optimism.etherscan.io',
},
},
{
network: 'optimisticEthereum',
chainId: 10,
urls: {
apiURL: 'https://api-optimistic.etherscan.io/api',
browserURL: 'https://optimistic.etherscan.io',
},
},
],
},
};
export default config;