-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
75 lines (69 loc) · 1.84 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
const {requirePath} = require("require-or-mock");
// if missed, it sets a mock up
requirePath(".env");
requirePath("export/deployed.json", "{}");
require("dotenv").config();
const taskName = process.argv[2];
if (/(run|console)/.test(taskName)) {
require("cryptoenv").parse();
}
require("solidity-coverage");
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-etherscan");
require("@openzeppelin/hardhat-upgrades");
if (process.env.GAS_REPORT === "yes") {
require("hardhat-gas-reporter");
}
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
networks: {
hardhat: {
blockGasLimit: 10000000,
},
localhost: {
url: "http://localhost:8545",
chainId: 1337,
},
goerli: {
url: `https://goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: [process.env.FOR_TESTNET, process.env.FOR_TESTNET_NEW],
},
ethereum: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: [process.env.NDUJA],
},
mumbai: {
url: "https://matic-mumbai.chainstacklabs.com",
chainId: 80001,
gasPrice: 20000000000,
accounts: [process.env.FOR_TESTNET, process.env.FOR_TESTNET_NEW],
},
matic: {
url: `https://polygon-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
chainId: 137,
accounts: [process.env.NDUJA],
},
},
etherscan: {
// apiKey: process.env.ETHERSCAN_KEY
apiKey: process.env.POLYGONSCAN_APIKEY,
// apiKey: process.env.BSCSCAN_KEY
},
gasReporter: {
currency: "USD",
coinmarketcap: process.env.COIN_MARKET_CAP_APIKEY,
},
};