-
Notifications
You must be signed in to change notification settings - Fork 17
/
hardhat.config.js
77 lines (73 loc) · 1.85 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
// configuration for hardhat project
const dotenv = require('dotenv');
dotenv.config();
require('@nomiclabs/hardhat-truffle5');
require('@nomiclabs/hardhat-waffle'); // for deployment
require("@nomiclabs/hardhat-etherscan");
require('hardhat-gas-reporter');
require('hardhat-contract-sizer');
require('solidity-coverage');
const { INFURA_KEY, ETHERSCAN_KEY, POLYGONSCAN_KEY, OPTIMISTIC_ETHERSCAN_KEY } = process.env;
module.exports = {
solidity: {
version: '0.8.18',
settings: {
optimizer: {
enabled: true,
runs: 10000
}
}
},
networks: {
goerli: {
url: `https://goerli.infura.io/v3/${INFURA_KEY}`,
chainId: 5,
gas: 1000000000, // 1 gwei
priority: 100000000, // 0.1 gwei
},
mainnet: {
url: `https://mainnet.infura.io/v3/${INFURA_KEY}`,
chainId: 1,
gas: 20000000000, // 20 gwei
priority: 1000000000, // 1 gwei
},
polygon: {
url: `https://polygon-mainnet.infura.io/v3/${INFURA_KEY}`,
chainId: 137,
gas: 200000000000, // 200 gwei
priority: 50000000000, // 50 gwei
},
optimism: {
url: `https://optimism-mainnet.infura.io/v3/${INFURA_KEY}`,
chainId: 10,
gas: 1000000, // 0.001 gwei
priority: 1000, // 0.000001 gwei
}
},
gasReporter: {
enabled: true,
outputFile: 'gas_report.txt',
forceConsoleOutput: true,
excludeContracts: [
'TestToken',
'TestLiquidityToken',
'TestIndivisibleToken',
'TestReentrantToken',
'TestReentrantProxy',
'TestERC721',
'TestERC1155',
'TestFeeToken',
'TestElasticToken',
'TestStakeUnstake',
'TestTemplateToken',
]
},
etherscan: {
apiKey: {
mainnet: ETHERSCAN_KEY,
goerli: ETHERSCAN_KEY,
polygon: POLYGONSCAN_KEY,
optimisticEthereum: OPTIMISTIC_ETHERSCAN_KEY
}
},
};