-
Notifications
You must be signed in to change notification settings - Fork 69
/
Copy pathhardhat.config.js
62 lines (57 loc) · 1.28 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
// hardhat.config.js
require('hardhat-deploy');
require('hardhat-deploy-ethers');
require('hardhat-gas-reporter');
require('@nomiclabs/hardhat-ethers');
require('@nomiclabs/hardhat-waffle');
require('hardhat-contract-sizer');
require('dotenv').config();
const ACCOUNTS_HD = {
mnemonic: 'test test test test test test test test test test test junk',
};
task('accounts', 'Prints the list of accounts', async () => {
const accounts = await ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
task('blockNumber', 'Prints the current block number', async (_, { ethers }) => {
await ethers.provider.getBlockNumber().then((blockNumber) => {
console.log('Current block number: ' + blockNumber);
});
});
module.exports = {
solidity: {
version: '0.6.12',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
networks: {
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: ACCOUNTS_HD,
chainId: 1,
},
bsc: {
url: process.env.BSC_MAINNET_RPC,
chainId: 56,
},
},
paths: {
deploy: 'scripts',
deployments: 'deployments',
},
mocha: {
timeout: 800000,
enableTimeouts: false,
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
disambiguatePaths: false,
},
};