-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
53 lines (48 loc) · 1.07 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
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const dotenv = require("dotenv");
dotenv.config();
dotenv.config({ path: `.env.${process.env.NODE_ENV}`, overide: true });
const networks = process.env.CI
? { hardhat: {} }
: {
mainnet: {
url: process.env.MAINNET_ENDPOINT,
accounts: [process.env.PRIVATE_KEY],
},
rinkeby: {
url: process.env.RINKEBY_ENDPOINT,
accounts: [process.env.PRIVATE_KEY],
},
};
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-etherscan");
if (process.env.REPORT_GAS) {
require("hardhat-gas-reporter");
}
module.exports = {
paths: {
sources: "./{contracts,test/fixtures}",
},
solidity: {
version: "0.8.9",
settings: {
// optimizer: {
// enabled: false,
// runs: 200,
// details: {
// yul: false,
// },
// },
},
},
networks,
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
gasReporter: {
enabled: !!process.env.REPORT_GAS,
},
};