-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
104 lines (100 loc) · 2.13 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import { HardhatUserConfig, task } from "hardhat/config";
import "hardhat-gas-reporter";
import "solidity-coverage";
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-etherscan";
import "@typechain/hardhat";
import * as dotenv from "dotenv";
dotenv.config();
const { ETHERSCAN_API_KEY, POLYGONSCAN_API_KEY } = process.env;
const {
FORK_URL,
ROPSTEN_URL,
ROPSTEN_PRIV_KEY,
KOVAN_URL,
KOVAN_PRIV_KEY,
RINKEBY_URL,
RINKEBY_PRIV_KEY,
GOERLI_URL,
GOERLI_PRIV_KEY,
MAINNET_URL,
MAINNET_PRIV_KEY,
POLYGON_URL,
POLYGON_PRIV_KEY,
} = process.env;
const config: HardhatUserConfig = {
solidity: {
version: "0.8.13",
settings: {
optimizer: {
enabled: true,
runs: 999999,
// Uncomment this for coverage tests (otherwise "stack too deep" appears):
// details: {
// yul: true,
// yulDetails: {
// stackAllocation: true,
// },
// },
},
},
},
networks: {
hardhat: {
forking: FORK_URL
? {
url: FORK_URL,
blockNumber: 12927325,
}
: undefined,
},
mainnet: {
chainId: 1,
url: MAINNET_URL!,
accounts: [MAINNET_PRIV_KEY!],
},
ropsten: {
chainId: 3,
url: ROPSTEN_URL!,
accounts: [ROPSTEN_PRIV_KEY!],
},
rinkeby: {
chainId: 4,
url: RINKEBY_URL!,
accounts: [RINKEBY_PRIV_KEY!],
},
goerli: {
chainId: 5,
url: GOERLI_URL!,
accounts: [GOERLI_PRIV_KEY!],
},
kovan: {
chainId: 42,
url: KOVAN_URL!,
accounts: [KOVAN_PRIV_KEY!],
},
polygon: {
chainId: 137,
url: POLYGON_URL!,
accounts: [POLYGON_PRIV_KEY!],
},
},
mocha: {
timeout: 9999999999,
},
etherscan: {
apiKey: {
//ethereum
mainnet: ETHERSCAN_API_KEY,
ropsten: ETHERSCAN_API_KEY,
rinkeby: ETHERSCAN_API_KEY,
goerli: ETHERSCAN_API_KEY,
kovan: ETHERSCAN_API_KEY,
//polygon
polygon: POLYGONSCAN_API_KEY,
polygonMumbai: POLYGONSCAN_API_KEY,
},
},
};
export default config;