-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.js
139 lines (136 loc) · 3.28 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
require("@nomicfoundation/hardhat-toolbox");
require("@openzeppelin/hardhat-upgrades");
require("@nomiclabs/hardhat-solhint");
require("hardhat-gas-reporter");
require("@nomiclabs/hardhat-ethers");
// require("@nomiclabs/hardhat-waffle");
require("dotenv/config");
const accounts = {
mnemonic: "",
};
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
abiExporter: {
path: "./build/abi",
//clear: true,
flat: true,
// only: [],
// except: []
},
gasReporter: {
enabled: true,
currency: "USD",
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
excludeContracts: ["contracts/mocks/", "contracts/libraries/"],
url: "https://polygon-rpc.com/",
token: "MATIC",
gasPriceApi:
"https://api.polygonscan.com/api?module=proxy&action=eth_gasPrice",
// gasPrice: 160
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: {
//ethereum
mainnet: process.env.ETHERSCAN_API_KEY,
ropsten: process.env.ETHERSCAN_API_KEY,
rinkeby: process.env.ETHERSCAN_API_KEY,
goerli: process.env.ETHERSCAN_API_KEY,
kovan: process.env.ETHERSCAN_API_KEY,
sepolia: process.env.ETHERSCAN_API_KEY,
//polygon
polygon: process.env.POLYGONSCAN_API_KEY,
polygonMumbai: process.env.POLYGONSCAN_API_KEY,
},
customChains: [],
},
networks: {
hardhat: {
chainId: 31337,
// accounts,
},
mainnet: {
url: `https://eth-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
accounts,
from: "",
chainId: 1,
live: true,
saveDeployments: true,
tags: ["mainnet"],
gasPrice: 20000000000,
gasMultiplier: 5,
timeout: 200000,
},
goerli: {
url: `https://eth-goerli.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
accounts: [process.env.PRIVATE_KEY], //add private key in this
chainId: 5,
live: true,
saveDeployments: true,
tags: ["staging"],
gasPrice: 20000000000,
gasMultiplier: 2,
},
mumbai: {
url: `https://rpc.ankr.com/polygon_mumbai`,
accounts: [process.env.PRIVATE_KEY], //add private key in this
chainId: 80001,
live: true,
saveDeployments: true,
tags: ["staging"],
gasPrice: 3000000000,
gasMultiplier: 2,
timeout: 100000
},
polygon: {
url: `https://polygon-mainnet.chainstacklabs.com`,
accounts: [process.env.PRIVATE_KEY], //add private key in this
chainId: 137,
live: true,
saveDeployments: true,
tags: ["mainnet"],
gasPrice: 300000000000,
},
},
solidity: {
compilers: [
{
version: "0.8.0",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: "0.8.1",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: "0.8.9",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
mocha: {
timeout: 40000,
},
};