-
Notifications
You must be signed in to change notification settings - Fork 16
/
hardhat.config.js
118 lines (116 loc) · 3.1 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
require("dotenv").config();
//usePlugin("hardhat-deploy");
require("solidity-coverage");
require("hardhat-gas-reporter");
require("@nomiclabs/hardhat-web3");
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-solhint");
require("@nomiclabs/hardhat-etherscan");
require("hardhat-spdx-license-identifier");
require("@openzeppelin/hardhat-upgrades");
const DEFAULT_MNEMONIC =
"explain tackle mirror kit van hammer degree position ginger unfair soup bonus";
module.exports = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
blockGasLimit: 12500000,
allowUnlimitedContractSize: true,
},
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
localhostMnemonic: {
url: "http://127.0.0.1:8545",
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
ganache: {
url: "http://localhost:8565",
accounts: {
mnemonic:
"dismiss similar fury minute fantasy boy deputy there taxi salmon body later",
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
reporter: {
gas: 5000000,
url: "http://localhost:8545",
},
coverage: {
url: "http://localhost:8555",
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
goerli: {
url: `https://goerli.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
ropsten: {
url: `https://ropsten.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
},
etherscan: {
// The url for the Etherscan API you want to use.
// For example, here we're using the one for the Ropsten test network
//url: "https://api-rinkeby.etherscan.io/api",
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: process.env.ETHERSCAN_API_KEY,
},
solidity: {
version: "0.6.12",
settings: {
optimizer: {
enabled: true, // Default: false
runs: 200, // Default: 200
},
}
},
gasReporter: {
currency: "USD",
coinmarketcap: process.env.COINMARKETCAP_KEY,
enabled: process.env.REPORT_GAS ? true : false,
excludeContracts: [
"ERC20Mock",
"PayableRevert",
"ERC777Mock",
"ERC20MockFake",
],
},
spdxLicenseIdentifier: {
overwrite: true,
runOnCompile: true,
},
};