-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.js
52 lines (49 loc) · 1.18 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
const { providers } = require("ethers");
require("@nomiclabs/hardhat-waffle");
require("dotenv").config({ path: ".env" });
require("@nomiclabs/hardhat-etherscan");
const POLYGON_INFURA_ENDPOINT = process.env.POLYGON_INFURA_ENDPOINT;
const GOERLI_INFURA_ENDPOINT = process.env.GOERLI_INFURA_ENDPOINT;
const POLYGONSCAN_API_KEY = process.env.POLYGONSCAN_API_KEY;
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY;
const PRIVATE_KEY = process.env.PRIVATE_KEY;
module.exports = {
defaultNetwork: "localhost",
networks: {
localhost: {
url: "http://127.0.0.1:8545",
},
goerli: {
url: GOERLI_INFURA_ENDPOINT,
accounts: [PRIVATE_KEY],
gas: "auto",
},
polygon: {
url: POLYGON_INFURA_ENDPOINT,
accounts: [PRIVATE_KEY],
gas: "auto",
},
},
solidity: {
version: "0.8.13",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
etherscan: {
apiKey: { polygon: POLYGONSCAN_API_KEY,
goerli: ETHERSCAN_API_KEY }
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
mocha: {
timeout: 2000000,
},
};