-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathhardhat.config.js
98 lines (97 loc) · 2.42 KB
/
hardhat.config.js
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
require("@nomiclabs/hardhat-truffle5");
require("@nomiclabs/hardhat-web3");
require("hardhat-gas-reporter");
require("@nomiclabs/hardhat-ethers");
require("hardhat-deploy");
module.exports = {
solidity: {
version: "0.5.17",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
networks: {
hardhat: {
live: false,
saveDeployments: true,
allowUnlimitedContractSize: true,
tags: ["test", "local"],
},
localhost: {
url: `http://127.0.0.1:8545`,
chainId: 31337,
saveDeployments: true,
tags: ["test", "local"],
},
mumbai: {
live: false,
saveDeployments: true,
tags: ["test", "local"],
url: `https://matic-mumbai.chainstacklabs.com`,
chainId: 80001,
accounts:
process.env.PRIVATE_KEY_GOVERNOR !== undefined && process.env.PRIVATE_KEY_DEPLOYER !== undefined
? [process.env.PRIVATE_KEY_GOVERNOR, process.env.PRIVATE_KEY_DEPLOYER]
: [],
etherscan: {
apiKey: process.env.POLYGONSCAN_API_KEY,
},
},
goerli: {
chainId: 5,
url: `https://goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts:
process.env.PRIVATE_KEY_GOVERNOR !== undefined && process.env.PRIVATE_KEY_DEPLOYER !== undefined
? [process.env.PRIVATE_KEY_GOVERNOR, process.env.PRIVATE_KEY_DEPLOYER]
: [],
live: true,
saveDeployments: true,
tags: ["staging", "foreign", "layer1"],
},
mainnet: {
chainId: 1,
url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts:
process.env.PRIVATE_KEY_GOVERNOR !== undefined && process.env.PRIVATE_KEY_DEPLOYER !== undefined
? [process.env.PRIVATE_KEY_GOVERNOR, process.env.PRIVATE_KEY_DEPLOYER]
: [],
live: true,
saveDeployments: true,
tags: ["production", "foreign", "layer1"],
},
},
namedAccounts: {
governor: {
default: 0,
},
requester: {
default: 1,
},
challenger: {
default: 2,
},
governor2: {
default: 3,
},
other: {
default: 4,
},
deployer: {
default: 5,
},
},
gasReporter: {
enabled: process.env.REPORT_GAS ? true : false,
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
currency: "USD",
gasPrice: 100,
},
verify: {
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
},
};