-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
62 lines (55 loc) · 1.44 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
import { HardhatUserConfig } from 'hardhat/types/config';
import { task } from 'hardhat/config';
require('hardhat-gas-reporter');
require('@nomiclabs/hardhat-etherscan');
import '@nomiclabs/hardhat-waffle';
import '@typechain/hardhat';
import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-waffle';
import 'hardhat-contract-sizer';
import 'hardhat-gas-reporter';
import '@nomiclabs/hardhat-etherscan';
task('accounts', 'Prints the list of accounts', async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
const INFURA_URL = 'https://rinkeby.infura.io/v3/b8d988be9f2d4bdf9f13f4d1341f1060';
const PRIVATE_KEY = '7563313c3fdc1fbda51327c8f14420b7af84c7650c7cb38b353361d2b5185ea3';
const config: HardhatUserConfig = {
solidity: {
version: '0.8.4',
settings: {
optimizer: {
enabled: true,
runs: 20,
},
},
},
networks: {
rinkeby: {
url: INFURA_URL,
accounts: [PRIVATE_KEY],
gas: 30000000,
},
localhost: {
url: 'http://127.0.0.1:8545',
gas: 20000000,
},
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
disambiguatePaths: false,
},
// etherscan: {
// apiKey: ETHERSCAN_API_KEY,
// },
// gasReporter: {
// currency: "USD",
// gasPrice: 100,
// // enabled: process.env.REPORT_GAS ? true : false,
// },
};
export default config;