/
hardhat.config.js
57 lines (54 loc) · 1.18 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
require('@nomiclabs/hardhat-waffle');
require("@nomiclabs/hardhat-etherscan");
require('hardhat-gas-reporter');
const config = require('./.config.json');
const mainnetAccounts = [
config.accounts.mainnet.privateKey
];
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
defaultNetwork: 'hardhat',
networks: {
hardhat: {
forking: {
url: `https://eth-mainnet.alchemyapi.io/v2/${config.alchemy.mainnet.apiKey}`,
}
},
mainnet: {
url: `https://eth-mainnet.alchemyapi.io/v2/${config.alchemy.mainnet.apiKey}`,
accounts: mainnetAccounts,
gasMultiplier: 1.1,
gasPrice: 55000000000, // 55 gwei
}
},
solidity: {
compilers: [
{
version: '0.6.8',
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
{
version: '0.5.17',
}
]
},
mocha: {
timeout: 5*60*1000 // 5 minutes
},
gasReporter: {
enabled: (process.env.REPORT_GAS) ? true : false,
currency: 'USD',
gasPrice: 42,
coinmarketcap: `${config.coinmarketcap.apiKey}`,
},
etherscan: {
apiKey: `${config.etherscan.apiKey}`
},
};