-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.js
75 lines (73 loc) · 1.87 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
require('dotenv').config()
require('@nomiclabs/hardhat-ethers')
require('@nomiclabs/hardhat-etherscan')
require('@nomiclabs/hardhat-waffle')
require('hardhat-gas-reporter')
const getEnvironmentVariable = (_envVar) => process.env[_envVar]
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
version: '0.7.3',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
networks: {
local: {
/*forking: {
url: `${getEnvironmentVariable('ETH_MAINNET_NODE')}`,
},*/
url: `http://127.0.0.1:8545`,
},
ropsten: {
url: `${getEnvironmentVariable('ROPSTEN_NODE')}`,
accounts: [getEnvironmentVariable('ROPSTEN_PRIVATE_KEY')],
gas: 200e9,
gasPrice: 10e9,
},
mainnet: {
url: `${getEnvironmentVariable('ETH_MAINNET_NODE')}`,
accounts: [getEnvironmentVariable('MAINNET_PRIVATE_KEY')],
gasPrice: 85e9,
gas: 200e9,
},
bsc: {
url: getEnvironmentVariable('BSC_MAINNET_NODE'),
accounts: [getEnvironmentVariable('BSC_MAINNET_PRIVATE_KEY')],
gasPrice: 7e9,
gas: 200e9,
},
polygon: {
url: getEnvironmentVariable('POLYGON_MAINNET_NODE'),
accounts: [getEnvironmentVariable('POLYGON_MAINNET_PRIVATE_KEY')],
gasPrice: 7e9,
gas: 200e9,
},
fantom: {
url: getEnvironmentVariable('FANTOM_MAINNET_NODE'),
accounts: [getEnvironmentVariable('FANTOM_MAINNET_PRIVATE_KEY')],
gasPrice: 280e9,
gas: 200e9,
},
avalanchec: {
url: getEnvironmentVariable('AVALANCHEC_MAINNET_NODE'),
accounts: [getEnvironmentVariable('AVALANCHEC_MAINNET_PRIVATE_KEY')],
gasPrice: 25e9,
gas: 200e9,
},
},
etherscan: {
apiKey: getEnvironmentVariable('ETHERSCAN_API_KEY'),
},
gasReporter: {
enabled: true,
},
mocha: {
timeout: 200000,
},
}