-
Notifications
You must be signed in to change notification settings - Fork 3
/
hardhat.config.js
104 lines (102 loc) · 3.29 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/**
* @type import('hardhat/config').HardhatUserConfig
*/
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-ethers");
require("@openzeppelin/hardhat-upgrades");
require("hardhat-gas-reporter");
require("hardhat-contract-sizer");
require("hardhat-deploy");
require("solidity-coverage");
require("dotenv").config();
// tasks
require("./tasks/gasDelta");
require("./tasks/accounts");
module.exports = {
networks: {
hardhat: {
accounts: {
mnemonic: "test test test test test test test test test test test junk"
},
allowUnlimitedContractSize: true
},
rinkeby: {
url: "https://rinkeby.infura.io/v3/" + process.env.INFURA_ID,
accounts: process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
: {
mnemonic: process.env.MNEMONIC ? process.env.MNEMONIC : process.env.MNEMONIC_TEST
}
},
kovan: {
url: "https://kovan.infura.io/v3/" + process.env.INFURA_ID,
accounts: process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
: {
mnemonic: process.env.MNEMONIC ? process.env.MNEMONIC : process.env.MNEMONIC_TEST
}
},
arbitrumRinkeby: {
url: "https://rinkeby.arbitrum.io/rpc",
accounts: process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
: {
mnemonic: process.env.MNEMONIC ? process.env.MNEMONIC : process.env.MNEMONIC_TEST
}
},
arbitrum: {
url: "https://arb1.arbitrum.io/rpc",
accounts: process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
: {
mnemonic: process.env.MNEMONIC ? process.env.MNEMONIC : process.env.MNEMONIC_TEST
}
},
mainnet: {
url: "https://mainnet.infura.io/v3/" + process.env.INFURA_ID,
accounts: process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
: {
mnemonic: process.env.MNEMONIC ? process.env.MNEMONIC : process.env.MNEMONIC_TEST
}
}
},
solidity: {
compilers: [
{
version: "0.8.4",
settings: {
optimizer: {
enabled: true,
runs: 100
},
evmVersion: "istanbul"
}
}
]
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts"
},
gasReporter: {
currency: "USD",
gasPrice: 100,
coinmarketcap: process.env.COINMARKETCAP_API_KEY
},
contractSizer: {
runOnCompile: true
},
namedAccounts: {
deployer: {
default: 0, // here this will by default take the first account as deployer
1: 0, // similarly on mainnet it will take the first account as deployer. Note though that depending on how hardhat network are configured, the account 0 on one network can be different than on another
4: 0
}
},
mocha: {
timeout: 0
}
};