-
Notifications
You must be signed in to change notification settings - Fork 20
/
hardhat.config.js
50 lines (46 loc) · 1.21 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
const { config } = require("dotenv");
require("solidity-coverage");
require("hardhat-gas-reporter");
require("@nomiclabs/hardhat-etherscan");
require("@nomiclabs/hardhat-waffle");
require("./tasks/deploy-standalone");
config();
const infuraId = process.env.INFURA_ID;
const accounts = process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : [];
const hardhatConfig = {
networks: {
mainnet: {
url: `https://mainnet.infura.io/v3/${infuraId}`,
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${infuraId}`,
accounts,
},
xdai: {
url: "https://rpc.xdaichain.com/",
accounts,
gasPrice: 1000000000,
},
},
solidity: {
compilers: [
{
version: "0.8.12",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
gasReporter: {
currency: "USD",
enabled: process.env.GAS_REPORT_ENABLED === "true",
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
};
module.exports = hardhatConfig;