-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.js
76 lines (75 loc) · 1.2 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
require('@nomiclabs/hardhat-waffle')
require('@nomiclabs/hardhat-ethers')
require('hardhat-deploy')
require('dotenv').config()
require('hardhat-watcher')
module.exports = {
defaultNetwork: 'hardhat',
networks: {
hardhat: { chainId: 31337 },
localhost: { chainId: 31337 },
ganache: {
url: 'http://127.0.0.1:7545'
},
rinkeby: {
url: process.env.NETWORK_RPC_URL,
accounts: [process.env.ACCOUNT_PRIVATE_KEY],
chainId: NETWORK_CHAIN_ID
}
},
solidity: {
version: '0.8.9',
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
namedAccounts: {
deployer: {
default: 0,
1: 0, // Mainnet
4: 0 // Rinkeby
},
user1: {
default: 1,
1: 1, // Mainnet
4: 1 // Rinkeby
},
user2: {
default: 2,
1: 2, // Mainnet
4: 2 // Rinkeby
},
user3: {
default: 3,
1: 3, // Mainnet
4: 3 // Rinkeby
}
},
watcher: {
retest: {
tasks: [
{
command: 'test',
params: {
testFiles: ['{path}']
}
}
],
files: ['./test/**.*test.js'],
verbose: true
},
recompile: {
tasks: ['compile'],
files: ['./contracts'],
verbose: true
},
redeploy: {
tasks: ['deploy'],
files: ['./deploy'],
verbose: true
}
}
}