-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
52 lines (44 loc) · 1.17 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
import dotenv from 'dotenv';
import { HardhatUserConfig, task } from 'hardhat/config';
import '@nomiclabs/hardhat-waffle';
import '@typechain/hardhat';
import '@nomiclabs/hardhat-etherscan';
import 'hardhat-gas-reporter';
import 'solidity-coverage';
dotenv.config();
const privateAcc = process.env.ETH_PRIVATE_KEY !== undefined ? [process.env.ETH_PRIVATE_KEY] : [];
const config: HardhatUserConfig = {
solidity: {
version: '0.8.11',
settings: {
optimizer: {
enabled: true,
runs: 500,
},
},
},
networks: {
rinkeby: {
url: process.env.RINKEBY_URL || '',
accounts: privateAcc,
},
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY || '',
},
gasReporter: {
currency: 'USD',
gasPrice: 120,
showTimeSpent: true,
enabled: process.env.REPORT_GAS ? true : false,
coinmarketcap: process.env.COIN_MARKET_CAP_API_KEY || '',
excludeContracts: ['mocks/MinterMock.sol'],
},
};
task('accounts', 'Prints the list of accounts', async (args, hre) => {
const accounts = await hre.ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
export default config;