-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhardhat.config.ts
102 lines (100 loc) · 2.33 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
import 'hardhat-deploy'
import '@nomiclabs/hardhat-waffle'
import '@nomiclabs/hardhat-etherscan'
import 'solidity-coverage'
import 'hardhat-gas-reporter'
import '@openzeppelin/hardhat-upgrades'
import '@typechain/hardhat'
import '@nomiclabs/hardhat-web3'
require('dotenv').config()
const addressses = require('@stabilitydao/addresses/index.cjs')
const { POLYGON, ROPSTEN, RINKEBY, GOERLI, KOVAN, MUMBAI } = addressses
const accounts = {
mnemonic:
process.env.MNEMONIC ||
'syrup test test test test test test test test test test test',
}
module.exports = {
solidity: {
version: '0.8.9',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
gasReporter: {
currency: 'USD',
enabled: process.env.REPORT_GAS === 'true',
gasPrice: 120,
gasMultiplier: 2,
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
},
namedAccounts: {
deployer: {
default: 0,
},
devFund: {
hardhat: 1,
polygon: addressses[POLYGON].devFund,
ropsten: addressses[ROPSTEN].devFund,
rinkeby: addressses[RINKEBY].devFund,
goerli: addressses[GOERLI].devFund,
kovan: addressses[KOVAN].devFund,
mumbai: addressses[ROPSTEN].devFund,
},
tester: {
default: 2,
},
},
networks: {
mainnet: {
url: `${process.env.URL_MAINNET}`,
saveDeployments: true,
accounts,
gasPrice: 113000000000,
},
polygon: {
chainId: 137,
url: `${process.env.URL_POLYGON}`,
saveDeployments: true,
accounts,
gasPrice: 100000000000, // 100 gwei
},
ropsten: {
url: `${process.env.URL_ROPSTEN}`,
saveDeployments: true,
accounts,
gasPrice: 20000000000,
},
rinkeby: {
url: `${process.env.URL_RINKEBY}`,
saveDeployments: true,
accounts,
},
goerli: {
url: `${process.env.URL_GOERLI}`,
saveDeployments: true,
accounts,
},
kovan: {
url: `${process.env.URL_KOVAN}`,
saveDeployments: true,
accounts,
},
mumbai: {
chainId: 80001,
url: `${process.env.URL_MUMBAI}`,
saveDeployments: true,
accounts,
// gasPrice: 110000000000,
},
hardhat: {
chainId: 1337, // https://hardhat.org/metamask-issue.html
},
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
}