-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
208 lines (201 loc) · 4.92 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-ethers");
require("@openzeppelin/hardhat-upgrades");
require("hardhat-gas-reporter");
require("hardhat-tracer");
require("ethers");
require("solidity-coverage");
//require('hardhat-docgen');
require("solidity-docgen");
require("./tasks/general.js");
require("./tasks/consent.js");
require("./tasks/crumbs.js");
require("./tasks/utils.js");
require("./tasks/sift.js");
require("./tasks/reward.js");
require("./tasks/layer-zero-rewards.js");
require("dotenv").config();
// Remote RPC URL
const urlOverride = process.env.ETH_PROVIDER_URL;
// seed phrase for your HD wallet
const mnemonic =
process.env.MNEMONIC ||
"test test test test test test test test test test test junk";
// alternative to mnemonic, set a specific private key
const key = process.env.ETH_PRIVATE_KEY;
// if no private key is found in .env, use the public known mnemonic
const accounts = key ? [key] : { mnemonic };
// 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.20",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
networks: {
hardhat: {
chainId: 31337,
mining: {
auto: true,
interval: 5000,
},
},
local: {
accounts: accounts,
chainId: 31337,
url: "http://127.0.0.1:8569",
gas: 6000000,
gasPrice: 8000000000,
},
localcli: {
accounts: accounts,
chainId: 31338,
url: "http://127.0.0.1:8545",
gas: 6000000,
gasPrice: 8000000000,
},
dev: {
accounts: accounts,
chainId: 31337,
url: "http://127.0.0.1:8569",
gas: 6000000,
gasPrice: 8000000000,
},
doodle: {
accounts: accounts,
chainId: 31337,
url: "https://doodlechain.dev.snickerdoodle.dev",
gas: 6000000,
gasPrice: 8000000000,
},
subnet: {
accounts: accounts,
chainId: 36,
url: "http://127.0.0.1:9650/ext/bc/5o2XBwQGRWwrnM3KQoXSbpztjJJdnbN73MtD7nHtxFgZ77ict/rpc",
},
mainnet: {
// ethereum mainnet
accounts: accounts,
chainId: 8453,
url: urlOverride || "http://127.0.0.1:8549",
},
base: {
accounts: accounts,
chainId: 8453,
},
sepolia: {
//ethereum testnet
accounts: accounts,
chainId: 11155111,
url: urlOverride || "https://rpc.sepolia.org",
},
rinkeby: {
// ethereum testnet
accounts: accounts,
chainId: 4,
url: urlOverride || "http://127.0.0.1:8549",
},
mumbai: {
// polygon testnet
accounts: accounts,
chainId: 80001,
url: urlOverride || "https://rpc.ankr.com/polygon_mumbai",
gas: 6000000,
gasPrice: 8000000000,
},
polygon: {
// polygon mainnet
accounts: accounts,
chainId: 137,
url: urlOverride || "http://127.0.0.1:8549",
},
fuji: {
// avalanche testnet
accounts: accounts,
chainId: 43113,
url: urlOverride || "https://api.avax-test.network/ext/bc/C/rpc",
},
avalanche: {
// avalanche mainnet
accounts: accounts,
chainId: 43114,
url: urlOverride || "http://127.0.0.1:8549",
},
fantom: {
// fantom mainnet
accounts: accounts,
chainId: 250,
url: urlOverride || "http://127.0.0.1:8549",
},
gnosis: {
// gnosis mainnet
accounts: accounts,
chainId: 100,
url: urlOverride || "http://127.0.0.1:8549",
},
binance: {
// binance mainnet - BNB
accounts: accounts,
chainId: 56,
url: urlOverride || "http://127.0.0.1:8549",
},
moonbeam: {
// moonbeam mainnet - GLMR
accounts: accounts,
chainId: 1284,
url: urlOverride || "http://127.0.0.1:8549",
},
arbitrum: {
// arbitrum mainnet - ARB
accounts: accounts,
chainId: 42161,
url: urlOverride || "http://127.0.0.1:8549",
},
optimism: {
// optimism mainnet
accounts: accounts,
chainId: 10,
url: urlOverride || "http://127.0.0.1:8549",
},
astar: {
// astar mainnet
accounts: accounts,
chainId: 592,
url: urlOverride || "http://127.0.0.1:8549",
},
sui: {
// sui mainnet
accounts: accounts,
chainId: 101,
url: urlOverride || "http://127.0.0.1:8549",
},
zkSyncEraTestnet: {
// zksync mainnet testnet
accounts: accounts,
chainId: 300,
url: urlOverride || "https://sepolia.era.zksync.dev",
},
},
gasReporter: {
enabled: true,
currency: "USD",
coinmarketcap: "7b7b93e9-c654-4c62-a93d-0a52bc92c239",
token: "AVAX",
gasPriceApi:
"https://api.snowtrace.io/api?module=proxy&action=eth_gasPrice",
},
docgen: {
path: "./docs",
clear: true,
runOnCompile: true,
pages: "files",
},
};