@wagmi/core 0.3.2 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chains/dist/wagmi-core-chains.cjs.d.ts +1 -0
- package/chains/dist/wagmi-core-chains.cjs.dev.js +22 -0
- package/chains/dist/wagmi-core-chains.cjs.js +7 -0
- package/chains/dist/wagmi-core-chains.cjs.prod.js +22 -0
- package/chains/dist/wagmi-core-chains.esm.js +2 -0
- package/chains/package.json +4 -0
- package/connectors/coinbaseWallet/dist/wagmi-core-connectors-coinbaseWallet.cjs.dev.js +4 -3
- package/connectors/coinbaseWallet/dist/wagmi-core-connectors-coinbaseWallet.cjs.prod.js +4 -3
- package/connectors/coinbaseWallet/dist/wagmi-core-connectors-coinbaseWallet.esm.js +2 -1
- package/connectors/metaMask/dist/wagmi-core-connectors-metaMask.cjs.dev.js +3 -2
- package/connectors/metaMask/dist/wagmi-core-connectors-metaMask.cjs.prod.js +3 -2
- package/connectors/metaMask/dist/wagmi-core-connectors-metaMask.esm.js +3 -2
- package/connectors/mock/dist/wagmi-core-connectors-mock.cjs.dev.js +4 -3
- package/connectors/mock/dist/wagmi-core-connectors-mock.cjs.prod.js +4 -3
- package/connectors/mock/dist/wagmi-core-connectors-mock.esm.js +2 -1
- package/connectors/walletConnect/dist/wagmi-core-connectors-walletConnect.cjs.dev.js +9 -6
- package/connectors/walletConnect/dist/wagmi-core-connectors-walletConnect.cjs.prod.js +9 -6
- package/connectors/walletConnect/dist/wagmi-core-connectors-walletConnect.esm.js +7 -4
- package/dist/base-321ac87a.cjs.dev.js +288 -0
- package/dist/base-41fb6637.esm.js +265 -0
- package/dist/base-6841ebe0.cjs.prod.js +288 -0
- package/dist/chains-0dd661ab.cjs.prod.js +349 -0
- package/dist/chains-98e2e613.cjs.dev.js +349 -0
- package/dist/chains-a0a80d94.esm.js +329 -0
- package/dist/{client-edc73358.cjs.prod.js → client-4172f963.cjs.dev.js} +4 -3
- package/dist/{client-1ab99bf8.esm.js → client-87c1ff8b.esm.js} +2 -1
- package/dist/{client-db513093.cjs.dev.js → client-a06c45f3.cjs.prod.js} +4 -3
- package/dist/declarations/src/actions/network-status/fetchFeeData.d.ts +3 -3
- package/dist/declarations/src/chains.d.ts +1 -0
- package/dist/declarations/src/constants/chains.d.ts +33 -2
- package/dist/declarations/src/index.d.ts +2 -3
- package/dist/declarations/src/types/index.d.ts +9 -2
- package/dist/declarations/src/{chains → utils}/configureChains.d.ts +0 -0
- package/dist/declarations/src/utils/index.d.ts +2 -0
- package/dist/wagmi-core.cjs.dev.js +121 -120
- package/dist/wagmi-core.cjs.prod.js +121 -120
- package/dist/wagmi-core.esm.js +111 -109
- package/package.json +12 -7
- package/dist/base-3a506159.cjs.dev.js +0 -602
- package/dist/base-997b4fec.esm.js +0 -573
- package/dist/base-cb4198f3.cjs.prod.js +0 -602
- package/dist/declarations/src/chains/index.d.ts +0 -2
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var rpcs = require('./rpcs-b3c52116.cjs.prod.js');
|
|
4
|
+
|
|
5
|
+
const etherscanBlockExplorers = {
|
|
6
|
+
mainnet: {
|
|
7
|
+
name: 'Etherscan',
|
|
8
|
+
url: 'https://etherscan.io'
|
|
9
|
+
},
|
|
10
|
+
ropsten: {
|
|
11
|
+
name: 'Etherscan',
|
|
12
|
+
url: 'https://ropsten.etherscan.io'
|
|
13
|
+
},
|
|
14
|
+
rinkeby: {
|
|
15
|
+
name: 'Etherscan',
|
|
16
|
+
url: 'https://rinkeby.etherscan.io'
|
|
17
|
+
},
|
|
18
|
+
goerli: {
|
|
19
|
+
name: 'Etherscan',
|
|
20
|
+
url: 'https://goerli.etherscan.io'
|
|
21
|
+
},
|
|
22
|
+
kovan: {
|
|
23
|
+
name: 'Etherscan',
|
|
24
|
+
url: 'https://kovan.etherscan.io'
|
|
25
|
+
},
|
|
26
|
+
optimism: {
|
|
27
|
+
name: 'Etherscan',
|
|
28
|
+
url: 'https://optimistic.etherscan.io'
|
|
29
|
+
},
|
|
30
|
+
optimismKovan: {
|
|
31
|
+
name: 'Etherscan',
|
|
32
|
+
url: 'https://kovan-optimistic.etherscan.io'
|
|
33
|
+
},
|
|
34
|
+
polygon: {
|
|
35
|
+
name: 'PolygonScan',
|
|
36
|
+
url: 'https://polygonscan.com'
|
|
37
|
+
},
|
|
38
|
+
polygonMumbai: {
|
|
39
|
+
name: 'PolygonScan',
|
|
40
|
+
url: 'https://mumbai.polygonscan.com'
|
|
41
|
+
},
|
|
42
|
+
arbitrum: {
|
|
43
|
+
name: 'Arbiscan',
|
|
44
|
+
url: 'https://arbiscan.io'
|
|
45
|
+
},
|
|
46
|
+
arbitrumRinkeby: {
|
|
47
|
+
name: 'Arbiscan',
|
|
48
|
+
url: 'https://testnet.arbiscan.io'
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const chainId = {
|
|
53
|
+
mainnet: 1,
|
|
54
|
+
ropsten: 3,
|
|
55
|
+
rinkeby: 4,
|
|
56
|
+
goerli: 5,
|
|
57
|
+
kovan: 42,
|
|
58
|
+
optimism: 10,
|
|
59
|
+
optimismKovan: 69,
|
|
60
|
+
polygon: 137,
|
|
61
|
+
polygonMumbai: 80001,
|
|
62
|
+
arbitrum: 42161,
|
|
63
|
+
arbitrumRinkeby: 421611,
|
|
64
|
+
localhost: 1337,
|
|
65
|
+
hardhat: 31337
|
|
66
|
+
};
|
|
67
|
+
const mainnet = {
|
|
68
|
+
id: chainId.mainnet,
|
|
69
|
+
name: 'Ethereum',
|
|
70
|
+
network: 'homestead',
|
|
71
|
+
nativeCurrency: {
|
|
72
|
+
name: 'Ether',
|
|
73
|
+
symbol: 'ETH',
|
|
74
|
+
decimals: 18
|
|
75
|
+
},
|
|
76
|
+
rpcUrls: {
|
|
77
|
+
alchemy: rpcs.alchemyRpcUrls.mainnet,
|
|
78
|
+
infura: rpcs.infuraRpcUrls.mainnet,
|
|
79
|
+
default: "".concat(rpcs.alchemyRpcUrls.mainnet, "/").concat(rpcs.defaultAlchemyId)
|
|
80
|
+
},
|
|
81
|
+
blockExplorers: {
|
|
82
|
+
etherscan: etherscanBlockExplorers.mainnet,
|
|
83
|
+
default: etherscanBlockExplorers.mainnet
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const ropsten = {
|
|
87
|
+
id: chainId.ropsten,
|
|
88
|
+
name: 'Ropsten',
|
|
89
|
+
network: 'ropsten',
|
|
90
|
+
nativeCurrency: {
|
|
91
|
+
name: 'Ropsten Ether',
|
|
92
|
+
symbol: 'ropETH',
|
|
93
|
+
decimals: 18
|
|
94
|
+
},
|
|
95
|
+
rpcUrls: {
|
|
96
|
+
alchemy: rpcs.alchemyRpcUrls.ropsten,
|
|
97
|
+
infura: rpcs.infuraRpcUrls.ropsten,
|
|
98
|
+
default: "".concat(rpcs.alchemyRpcUrls.ropsten, "/").concat(rpcs.defaultAlchemyId)
|
|
99
|
+
},
|
|
100
|
+
blockExplorers: {
|
|
101
|
+
etherscan: etherscanBlockExplorers.ropsten,
|
|
102
|
+
default: etherscanBlockExplorers.ropsten
|
|
103
|
+
},
|
|
104
|
+
testnet: true
|
|
105
|
+
};
|
|
106
|
+
const rinkeby = {
|
|
107
|
+
id: chainId.rinkeby,
|
|
108
|
+
name: 'Rinkeby',
|
|
109
|
+
network: 'rinkeby',
|
|
110
|
+
nativeCurrency: {
|
|
111
|
+
name: 'Rinkeby Ether',
|
|
112
|
+
symbol: 'rETH',
|
|
113
|
+
decimals: 18
|
|
114
|
+
},
|
|
115
|
+
rpcUrls: {
|
|
116
|
+
alchemy: rpcs.alchemyRpcUrls.rinkeby,
|
|
117
|
+
infura: rpcs.infuraRpcUrls.rinkeby,
|
|
118
|
+
default: "".concat(rpcs.alchemyRpcUrls.rinkeby, "/").concat(rpcs.defaultAlchemyId)
|
|
119
|
+
},
|
|
120
|
+
blockExplorers: {
|
|
121
|
+
etherscan: etherscanBlockExplorers.rinkeby,
|
|
122
|
+
default: etherscanBlockExplorers.rinkeby
|
|
123
|
+
},
|
|
124
|
+
testnet: true
|
|
125
|
+
};
|
|
126
|
+
const goerli = {
|
|
127
|
+
id: chainId.goerli,
|
|
128
|
+
name: 'Goerli',
|
|
129
|
+
network: 'goerli',
|
|
130
|
+
nativeCurrency: {
|
|
131
|
+
name: 'Goerli Ether',
|
|
132
|
+
symbol: 'gETH',
|
|
133
|
+
decimals: 18
|
|
134
|
+
},
|
|
135
|
+
rpcUrls: {
|
|
136
|
+
alchemy: rpcs.alchemyRpcUrls.goerli,
|
|
137
|
+
infura: rpcs.infuraRpcUrls.goerli,
|
|
138
|
+
default: "".concat(rpcs.alchemyRpcUrls.goerli, "/").concat(rpcs.defaultAlchemyId)
|
|
139
|
+
},
|
|
140
|
+
blockExplorers: {
|
|
141
|
+
etherscan: etherscanBlockExplorers.goerli,
|
|
142
|
+
default: etherscanBlockExplorers.goerli
|
|
143
|
+
},
|
|
144
|
+
testnet: true
|
|
145
|
+
};
|
|
146
|
+
const kovan = {
|
|
147
|
+
id: chainId.kovan,
|
|
148
|
+
name: 'Kovan',
|
|
149
|
+
network: 'kovan',
|
|
150
|
+
nativeCurrency: {
|
|
151
|
+
name: 'Kovan Ether',
|
|
152
|
+
symbol: 'kETH',
|
|
153
|
+
decimals: 18
|
|
154
|
+
},
|
|
155
|
+
rpcUrls: {
|
|
156
|
+
alchemy: rpcs.alchemyRpcUrls.kovan,
|
|
157
|
+
infura: rpcs.infuraRpcUrls.kovan,
|
|
158
|
+
default: "".concat(rpcs.alchemyRpcUrls.kovan, "/").concat(rpcs.defaultAlchemyId)
|
|
159
|
+
},
|
|
160
|
+
blockExplorers: {
|
|
161
|
+
etherscan: etherscanBlockExplorers.kovan,
|
|
162
|
+
default: etherscanBlockExplorers.kovan
|
|
163
|
+
},
|
|
164
|
+
testnet: true
|
|
165
|
+
};
|
|
166
|
+
const optimism = {
|
|
167
|
+
id: chainId.optimism,
|
|
168
|
+
name: 'Optimism',
|
|
169
|
+
network: 'optimism',
|
|
170
|
+
nativeCurrency: {
|
|
171
|
+
name: 'Ether',
|
|
172
|
+
symbol: 'ETH',
|
|
173
|
+
decimals: 18
|
|
174
|
+
},
|
|
175
|
+
rpcUrls: {
|
|
176
|
+
alchemy: rpcs.alchemyRpcUrls.optimism,
|
|
177
|
+
infura: rpcs.infuraRpcUrls.optimism,
|
|
178
|
+
default: 'https://mainnet.optimism.io'
|
|
179
|
+
},
|
|
180
|
+
blockExplorers: {
|
|
181
|
+
etherscan: etherscanBlockExplorers.optimism,
|
|
182
|
+
default: etherscanBlockExplorers.optimism
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const optimismKovan = {
|
|
186
|
+
id: chainId.optimismKovan,
|
|
187
|
+
name: 'Optimism Kovan',
|
|
188
|
+
network: 'optimism-kovan',
|
|
189
|
+
nativeCurrency: {
|
|
190
|
+
name: 'Kovan Ether',
|
|
191
|
+
symbol: 'KOR',
|
|
192
|
+
decimals: 18
|
|
193
|
+
},
|
|
194
|
+
rpcUrls: {
|
|
195
|
+
alchemy: rpcs.alchemyRpcUrls.optimismKovan,
|
|
196
|
+
infura: rpcs.infuraRpcUrls.optimismKovan,
|
|
197
|
+
default: 'https://kovan.optimism.io'
|
|
198
|
+
},
|
|
199
|
+
blockExplorers: {
|
|
200
|
+
etherscan: etherscanBlockExplorers.optimismKovan,
|
|
201
|
+
default: etherscanBlockExplorers.optimismKovan
|
|
202
|
+
},
|
|
203
|
+
testnet: true
|
|
204
|
+
};
|
|
205
|
+
const polygon = {
|
|
206
|
+
id: chainId.polygon,
|
|
207
|
+
name: 'Polygon',
|
|
208
|
+
network: 'matic',
|
|
209
|
+
nativeCurrency: {
|
|
210
|
+
name: 'MATIC',
|
|
211
|
+
symbol: 'MATIC',
|
|
212
|
+
decimals: 18
|
|
213
|
+
},
|
|
214
|
+
rpcUrls: {
|
|
215
|
+
alchemy: rpcs.alchemyRpcUrls.polygon,
|
|
216
|
+
infura: rpcs.infuraRpcUrls.polygon,
|
|
217
|
+
default: 'https://polygon-rpc.com'
|
|
218
|
+
},
|
|
219
|
+
blockExplorers: {
|
|
220
|
+
etherscan: etherscanBlockExplorers.polygon,
|
|
221
|
+
default: etherscanBlockExplorers.polygon
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
const polygonMumbai = {
|
|
225
|
+
id: chainId.polygonMumbai,
|
|
226
|
+
name: 'Polygon Mumbai',
|
|
227
|
+
network: 'maticmum',
|
|
228
|
+
nativeCurrency: {
|
|
229
|
+
name: 'MATIC',
|
|
230
|
+
symbol: 'MATIC',
|
|
231
|
+
decimals: 18
|
|
232
|
+
},
|
|
233
|
+
rpcUrls: {
|
|
234
|
+
alchemy: rpcs.alchemyRpcUrls.polygonMumbai,
|
|
235
|
+
infura: rpcs.infuraRpcUrls.polygonMumbai,
|
|
236
|
+
default: 'https://matic-mumbai.chainstacklabs.com'
|
|
237
|
+
},
|
|
238
|
+
blockExplorers: {
|
|
239
|
+
etherscan: etherscanBlockExplorers.polygonMumbai,
|
|
240
|
+
default: etherscanBlockExplorers.polygonMumbai
|
|
241
|
+
},
|
|
242
|
+
testnet: true
|
|
243
|
+
};
|
|
244
|
+
const arbitrum = {
|
|
245
|
+
id: chainId.arbitrum,
|
|
246
|
+
name: 'Arbitrum',
|
|
247
|
+
network: 'arbitrum',
|
|
248
|
+
nativeCurrency: {
|
|
249
|
+
name: 'Ether',
|
|
250
|
+
symbol: 'AETH',
|
|
251
|
+
decimals: 18
|
|
252
|
+
},
|
|
253
|
+
rpcUrls: {
|
|
254
|
+
alchemy: rpcs.alchemyRpcUrls.arbitrum,
|
|
255
|
+
infura: rpcs.infuraRpcUrls.arbitrum,
|
|
256
|
+
default: 'https://arb1.arbitrum.io/rpc'
|
|
257
|
+
},
|
|
258
|
+
blockExplorers: {
|
|
259
|
+
arbitrum: {
|
|
260
|
+
name: 'Arbitrum Explorer',
|
|
261
|
+
url: 'https://explorer.arbitrum.io'
|
|
262
|
+
},
|
|
263
|
+
etherscan: etherscanBlockExplorers.arbitrum,
|
|
264
|
+
default: etherscanBlockExplorers.arbitrum
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
const arbitrumRinkeby = {
|
|
268
|
+
id: chainId.arbitrumRinkeby,
|
|
269
|
+
name: 'Arbitrum Rinkeby',
|
|
270
|
+
network: 'arbitrum-rinkeby',
|
|
271
|
+
nativeCurrency: {
|
|
272
|
+
name: 'Arbitrum Rinkeby Ether',
|
|
273
|
+
symbol: 'ARETH',
|
|
274
|
+
decimals: 18
|
|
275
|
+
},
|
|
276
|
+
rpcUrls: {
|
|
277
|
+
alchemy: rpcs.alchemyRpcUrls.arbitrumRinkeby,
|
|
278
|
+
infura: rpcs.infuraRpcUrls.arbitrumRinkeby,
|
|
279
|
+
default: 'https://rinkeby.arbitrum.io/rpc'
|
|
280
|
+
},
|
|
281
|
+
blockExplorers: {
|
|
282
|
+
arbitrum: {
|
|
283
|
+
name: 'Arbitrum Explorer',
|
|
284
|
+
url: 'https://rinkeby-explorer.arbitrum.io'
|
|
285
|
+
},
|
|
286
|
+
etherscan: etherscanBlockExplorers.arbitrumRinkeby,
|
|
287
|
+
default: etherscanBlockExplorers.arbitrumRinkeby
|
|
288
|
+
},
|
|
289
|
+
testnet: true
|
|
290
|
+
};
|
|
291
|
+
const localhost = {
|
|
292
|
+
id: chainId.localhost,
|
|
293
|
+
name: 'Localhost',
|
|
294
|
+
network: 'localhost',
|
|
295
|
+
rpcUrls: {
|
|
296
|
+
default: 'http://127.0.0.1:8545'
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
const hardhat = {
|
|
300
|
+
id: chainId.hardhat,
|
|
301
|
+
name: 'Hardhat',
|
|
302
|
+
network: 'hardhat',
|
|
303
|
+
rpcUrls: {
|
|
304
|
+
default: 'http://127.0.0.1:8545'
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* Common chains for convenience
|
|
309
|
+
* Should not contain all possible chains
|
|
310
|
+
*/
|
|
311
|
+
|
|
312
|
+
const chain = {
|
|
313
|
+
mainnet,
|
|
314
|
+
ropsten,
|
|
315
|
+
rinkeby,
|
|
316
|
+
goerli,
|
|
317
|
+
kovan,
|
|
318
|
+
optimism,
|
|
319
|
+
optimismKovan,
|
|
320
|
+
polygon,
|
|
321
|
+
polygonMumbai,
|
|
322
|
+
arbitrum,
|
|
323
|
+
arbitrumRinkeby,
|
|
324
|
+
localhost,
|
|
325
|
+
hardhat
|
|
326
|
+
};
|
|
327
|
+
const allChains = Object.values(chain);
|
|
328
|
+
const defaultChains = [chain.mainnet, chain.ropsten, chain.rinkeby, chain.goerli, chain.kovan];
|
|
329
|
+
const defaultL2Chains = [chain.arbitrum, chain.arbitrumRinkeby, chain.optimism, chain.optimismKovan];
|
|
330
|
+
|
|
331
|
+
exports.allChains = allChains;
|
|
332
|
+
exports.arbitrum = arbitrum;
|
|
333
|
+
exports.arbitrumRinkeby = arbitrumRinkeby;
|
|
334
|
+
exports.chain = chain;
|
|
335
|
+
exports.chainId = chainId;
|
|
336
|
+
exports.defaultChains = defaultChains;
|
|
337
|
+
exports.defaultL2Chains = defaultL2Chains;
|
|
338
|
+
exports.etherscanBlockExplorers = etherscanBlockExplorers;
|
|
339
|
+
exports.goerli = goerli;
|
|
340
|
+
exports.hardhat = hardhat;
|
|
341
|
+
exports.kovan = kovan;
|
|
342
|
+
exports.localhost = localhost;
|
|
343
|
+
exports.mainnet = mainnet;
|
|
344
|
+
exports.optimism = optimism;
|
|
345
|
+
exports.optimismKovan = optimismKovan;
|
|
346
|
+
exports.polygon = polygon;
|
|
347
|
+
exports.polygonMumbai = polygonMumbai;
|
|
348
|
+
exports.rinkeby = rinkeby;
|
|
349
|
+
exports.ropsten = ropsten;
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var rpcs = require('./rpcs-9c4eb960.cjs.dev.js');
|
|
4
|
+
|
|
5
|
+
const etherscanBlockExplorers = {
|
|
6
|
+
mainnet: {
|
|
7
|
+
name: 'Etherscan',
|
|
8
|
+
url: 'https://etherscan.io'
|
|
9
|
+
},
|
|
10
|
+
ropsten: {
|
|
11
|
+
name: 'Etherscan',
|
|
12
|
+
url: 'https://ropsten.etherscan.io'
|
|
13
|
+
},
|
|
14
|
+
rinkeby: {
|
|
15
|
+
name: 'Etherscan',
|
|
16
|
+
url: 'https://rinkeby.etherscan.io'
|
|
17
|
+
},
|
|
18
|
+
goerli: {
|
|
19
|
+
name: 'Etherscan',
|
|
20
|
+
url: 'https://goerli.etherscan.io'
|
|
21
|
+
},
|
|
22
|
+
kovan: {
|
|
23
|
+
name: 'Etherscan',
|
|
24
|
+
url: 'https://kovan.etherscan.io'
|
|
25
|
+
},
|
|
26
|
+
optimism: {
|
|
27
|
+
name: 'Etherscan',
|
|
28
|
+
url: 'https://optimistic.etherscan.io'
|
|
29
|
+
},
|
|
30
|
+
optimismKovan: {
|
|
31
|
+
name: 'Etherscan',
|
|
32
|
+
url: 'https://kovan-optimistic.etherscan.io'
|
|
33
|
+
},
|
|
34
|
+
polygon: {
|
|
35
|
+
name: 'PolygonScan',
|
|
36
|
+
url: 'https://polygonscan.com'
|
|
37
|
+
},
|
|
38
|
+
polygonMumbai: {
|
|
39
|
+
name: 'PolygonScan',
|
|
40
|
+
url: 'https://mumbai.polygonscan.com'
|
|
41
|
+
},
|
|
42
|
+
arbitrum: {
|
|
43
|
+
name: 'Arbiscan',
|
|
44
|
+
url: 'https://arbiscan.io'
|
|
45
|
+
},
|
|
46
|
+
arbitrumRinkeby: {
|
|
47
|
+
name: 'Arbiscan',
|
|
48
|
+
url: 'https://testnet.arbiscan.io'
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const chainId = {
|
|
53
|
+
mainnet: 1,
|
|
54
|
+
ropsten: 3,
|
|
55
|
+
rinkeby: 4,
|
|
56
|
+
goerli: 5,
|
|
57
|
+
kovan: 42,
|
|
58
|
+
optimism: 10,
|
|
59
|
+
optimismKovan: 69,
|
|
60
|
+
polygon: 137,
|
|
61
|
+
polygonMumbai: 80001,
|
|
62
|
+
arbitrum: 42161,
|
|
63
|
+
arbitrumRinkeby: 421611,
|
|
64
|
+
localhost: 1337,
|
|
65
|
+
hardhat: 31337
|
|
66
|
+
};
|
|
67
|
+
const mainnet = {
|
|
68
|
+
id: chainId.mainnet,
|
|
69
|
+
name: 'Ethereum',
|
|
70
|
+
network: 'homestead',
|
|
71
|
+
nativeCurrency: {
|
|
72
|
+
name: 'Ether',
|
|
73
|
+
symbol: 'ETH',
|
|
74
|
+
decimals: 18
|
|
75
|
+
},
|
|
76
|
+
rpcUrls: {
|
|
77
|
+
alchemy: rpcs.alchemyRpcUrls.mainnet,
|
|
78
|
+
infura: rpcs.infuraRpcUrls.mainnet,
|
|
79
|
+
default: "".concat(rpcs.alchemyRpcUrls.mainnet, "/").concat(rpcs.defaultAlchemyId)
|
|
80
|
+
},
|
|
81
|
+
blockExplorers: {
|
|
82
|
+
etherscan: etherscanBlockExplorers.mainnet,
|
|
83
|
+
default: etherscanBlockExplorers.mainnet
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const ropsten = {
|
|
87
|
+
id: chainId.ropsten,
|
|
88
|
+
name: 'Ropsten',
|
|
89
|
+
network: 'ropsten',
|
|
90
|
+
nativeCurrency: {
|
|
91
|
+
name: 'Ropsten Ether',
|
|
92
|
+
symbol: 'ropETH',
|
|
93
|
+
decimals: 18
|
|
94
|
+
},
|
|
95
|
+
rpcUrls: {
|
|
96
|
+
alchemy: rpcs.alchemyRpcUrls.ropsten,
|
|
97
|
+
infura: rpcs.infuraRpcUrls.ropsten,
|
|
98
|
+
default: "".concat(rpcs.alchemyRpcUrls.ropsten, "/").concat(rpcs.defaultAlchemyId)
|
|
99
|
+
},
|
|
100
|
+
blockExplorers: {
|
|
101
|
+
etherscan: etherscanBlockExplorers.ropsten,
|
|
102
|
+
default: etherscanBlockExplorers.ropsten
|
|
103
|
+
},
|
|
104
|
+
testnet: true
|
|
105
|
+
};
|
|
106
|
+
const rinkeby = {
|
|
107
|
+
id: chainId.rinkeby,
|
|
108
|
+
name: 'Rinkeby',
|
|
109
|
+
network: 'rinkeby',
|
|
110
|
+
nativeCurrency: {
|
|
111
|
+
name: 'Rinkeby Ether',
|
|
112
|
+
symbol: 'rETH',
|
|
113
|
+
decimals: 18
|
|
114
|
+
},
|
|
115
|
+
rpcUrls: {
|
|
116
|
+
alchemy: rpcs.alchemyRpcUrls.rinkeby,
|
|
117
|
+
infura: rpcs.infuraRpcUrls.rinkeby,
|
|
118
|
+
default: "".concat(rpcs.alchemyRpcUrls.rinkeby, "/").concat(rpcs.defaultAlchemyId)
|
|
119
|
+
},
|
|
120
|
+
blockExplorers: {
|
|
121
|
+
etherscan: etherscanBlockExplorers.rinkeby,
|
|
122
|
+
default: etherscanBlockExplorers.rinkeby
|
|
123
|
+
},
|
|
124
|
+
testnet: true
|
|
125
|
+
};
|
|
126
|
+
const goerli = {
|
|
127
|
+
id: chainId.goerli,
|
|
128
|
+
name: 'Goerli',
|
|
129
|
+
network: 'goerli',
|
|
130
|
+
nativeCurrency: {
|
|
131
|
+
name: 'Goerli Ether',
|
|
132
|
+
symbol: 'gETH',
|
|
133
|
+
decimals: 18
|
|
134
|
+
},
|
|
135
|
+
rpcUrls: {
|
|
136
|
+
alchemy: rpcs.alchemyRpcUrls.goerli,
|
|
137
|
+
infura: rpcs.infuraRpcUrls.goerli,
|
|
138
|
+
default: "".concat(rpcs.alchemyRpcUrls.goerli, "/").concat(rpcs.defaultAlchemyId)
|
|
139
|
+
},
|
|
140
|
+
blockExplorers: {
|
|
141
|
+
etherscan: etherscanBlockExplorers.goerli,
|
|
142
|
+
default: etherscanBlockExplorers.goerli
|
|
143
|
+
},
|
|
144
|
+
testnet: true
|
|
145
|
+
};
|
|
146
|
+
const kovan = {
|
|
147
|
+
id: chainId.kovan,
|
|
148
|
+
name: 'Kovan',
|
|
149
|
+
network: 'kovan',
|
|
150
|
+
nativeCurrency: {
|
|
151
|
+
name: 'Kovan Ether',
|
|
152
|
+
symbol: 'kETH',
|
|
153
|
+
decimals: 18
|
|
154
|
+
},
|
|
155
|
+
rpcUrls: {
|
|
156
|
+
alchemy: rpcs.alchemyRpcUrls.kovan,
|
|
157
|
+
infura: rpcs.infuraRpcUrls.kovan,
|
|
158
|
+
default: "".concat(rpcs.alchemyRpcUrls.kovan, "/").concat(rpcs.defaultAlchemyId)
|
|
159
|
+
},
|
|
160
|
+
blockExplorers: {
|
|
161
|
+
etherscan: etherscanBlockExplorers.kovan,
|
|
162
|
+
default: etherscanBlockExplorers.kovan
|
|
163
|
+
},
|
|
164
|
+
testnet: true
|
|
165
|
+
};
|
|
166
|
+
const optimism = {
|
|
167
|
+
id: chainId.optimism,
|
|
168
|
+
name: 'Optimism',
|
|
169
|
+
network: 'optimism',
|
|
170
|
+
nativeCurrency: {
|
|
171
|
+
name: 'Ether',
|
|
172
|
+
symbol: 'ETH',
|
|
173
|
+
decimals: 18
|
|
174
|
+
},
|
|
175
|
+
rpcUrls: {
|
|
176
|
+
alchemy: rpcs.alchemyRpcUrls.optimism,
|
|
177
|
+
infura: rpcs.infuraRpcUrls.optimism,
|
|
178
|
+
default: 'https://mainnet.optimism.io'
|
|
179
|
+
},
|
|
180
|
+
blockExplorers: {
|
|
181
|
+
etherscan: etherscanBlockExplorers.optimism,
|
|
182
|
+
default: etherscanBlockExplorers.optimism
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const optimismKovan = {
|
|
186
|
+
id: chainId.optimismKovan,
|
|
187
|
+
name: 'Optimism Kovan',
|
|
188
|
+
network: 'optimism-kovan',
|
|
189
|
+
nativeCurrency: {
|
|
190
|
+
name: 'Kovan Ether',
|
|
191
|
+
symbol: 'KOR',
|
|
192
|
+
decimals: 18
|
|
193
|
+
},
|
|
194
|
+
rpcUrls: {
|
|
195
|
+
alchemy: rpcs.alchemyRpcUrls.optimismKovan,
|
|
196
|
+
infura: rpcs.infuraRpcUrls.optimismKovan,
|
|
197
|
+
default: 'https://kovan.optimism.io'
|
|
198
|
+
},
|
|
199
|
+
blockExplorers: {
|
|
200
|
+
etherscan: etherscanBlockExplorers.optimismKovan,
|
|
201
|
+
default: etherscanBlockExplorers.optimismKovan
|
|
202
|
+
},
|
|
203
|
+
testnet: true
|
|
204
|
+
};
|
|
205
|
+
const polygon = {
|
|
206
|
+
id: chainId.polygon,
|
|
207
|
+
name: 'Polygon',
|
|
208
|
+
network: 'matic',
|
|
209
|
+
nativeCurrency: {
|
|
210
|
+
name: 'MATIC',
|
|
211
|
+
symbol: 'MATIC',
|
|
212
|
+
decimals: 18
|
|
213
|
+
},
|
|
214
|
+
rpcUrls: {
|
|
215
|
+
alchemy: rpcs.alchemyRpcUrls.polygon,
|
|
216
|
+
infura: rpcs.infuraRpcUrls.polygon,
|
|
217
|
+
default: 'https://polygon-rpc.com'
|
|
218
|
+
},
|
|
219
|
+
blockExplorers: {
|
|
220
|
+
etherscan: etherscanBlockExplorers.polygon,
|
|
221
|
+
default: etherscanBlockExplorers.polygon
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
const polygonMumbai = {
|
|
225
|
+
id: chainId.polygonMumbai,
|
|
226
|
+
name: 'Polygon Mumbai',
|
|
227
|
+
network: 'maticmum',
|
|
228
|
+
nativeCurrency: {
|
|
229
|
+
name: 'MATIC',
|
|
230
|
+
symbol: 'MATIC',
|
|
231
|
+
decimals: 18
|
|
232
|
+
},
|
|
233
|
+
rpcUrls: {
|
|
234
|
+
alchemy: rpcs.alchemyRpcUrls.polygonMumbai,
|
|
235
|
+
infura: rpcs.infuraRpcUrls.polygonMumbai,
|
|
236
|
+
default: 'https://matic-mumbai.chainstacklabs.com'
|
|
237
|
+
},
|
|
238
|
+
blockExplorers: {
|
|
239
|
+
etherscan: etherscanBlockExplorers.polygonMumbai,
|
|
240
|
+
default: etherscanBlockExplorers.polygonMumbai
|
|
241
|
+
},
|
|
242
|
+
testnet: true
|
|
243
|
+
};
|
|
244
|
+
const arbitrum = {
|
|
245
|
+
id: chainId.arbitrum,
|
|
246
|
+
name: 'Arbitrum',
|
|
247
|
+
network: 'arbitrum',
|
|
248
|
+
nativeCurrency: {
|
|
249
|
+
name: 'Ether',
|
|
250
|
+
symbol: 'AETH',
|
|
251
|
+
decimals: 18
|
|
252
|
+
},
|
|
253
|
+
rpcUrls: {
|
|
254
|
+
alchemy: rpcs.alchemyRpcUrls.arbitrum,
|
|
255
|
+
infura: rpcs.infuraRpcUrls.arbitrum,
|
|
256
|
+
default: 'https://arb1.arbitrum.io/rpc'
|
|
257
|
+
},
|
|
258
|
+
blockExplorers: {
|
|
259
|
+
arbitrum: {
|
|
260
|
+
name: 'Arbitrum Explorer',
|
|
261
|
+
url: 'https://explorer.arbitrum.io'
|
|
262
|
+
},
|
|
263
|
+
etherscan: etherscanBlockExplorers.arbitrum,
|
|
264
|
+
default: etherscanBlockExplorers.arbitrum
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
const arbitrumRinkeby = {
|
|
268
|
+
id: chainId.arbitrumRinkeby,
|
|
269
|
+
name: 'Arbitrum Rinkeby',
|
|
270
|
+
network: 'arbitrum-rinkeby',
|
|
271
|
+
nativeCurrency: {
|
|
272
|
+
name: 'Arbitrum Rinkeby Ether',
|
|
273
|
+
symbol: 'ARETH',
|
|
274
|
+
decimals: 18
|
|
275
|
+
},
|
|
276
|
+
rpcUrls: {
|
|
277
|
+
alchemy: rpcs.alchemyRpcUrls.arbitrumRinkeby,
|
|
278
|
+
infura: rpcs.infuraRpcUrls.arbitrumRinkeby,
|
|
279
|
+
default: 'https://rinkeby.arbitrum.io/rpc'
|
|
280
|
+
},
|
|
281
|
+
blockExplorers: {
|
|
282
|
+
arbitrum: {
|
|
283
|
+
name: 'Arbitrum Explorer',
|
|
284
|
+
url: 'https://rinkeby-explorer.arbitrum.io'
|
|
285
|
+
},
|
|
286
|
+
etherscan: etherscanBlockExplorers.arbitrumRinkeby,
|
|
287
|
+
default: etherscanBlockExplorers.arbitrumRinkeby
|
|
288
|
+
},
|
|
289
|
+
testnet: true
|
|
290
|
+
};
|
|
291
|
+
const localhost = {
|
|
292
|
+
id: chainId.localhost,
|
|
293
|
+
name: 'Localhost',
|
|
294
|
+
network: 'localhost',
|
|
295
|
+
rpcUrls: {
|
|
296
|
+
default: 'http://127.0.0.1:8545'
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
const hardhat = {
|
|
300
|
+
id: chainId.hardhat,
|
|
301
|
+
name: 'Hardhat',
|
|
302
|
+
network: 'hardhat',
|
|
303
|
+
rpcUrls: {
|
|
304
|
+
default: 'http://127.0.0.1:8545'
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* Common chains for convenience
|
|
309
|
+
* Should not contain all possible chains
|
|
310
|
+
*/
|
|
311
|
+
|
|
312
|
+
const chain = {
|
|
313
|
+
mainnet,
|
|
314
|
+
ropsten,
|
|
315
|
+
rinkeby,
|
|
316
|
+
goerli,
|
|
317
|
+
kovan,
|
|
318
|
+
optimism,
|
|
319
|
+
optimismKovan,
|
|
320
|
+
polygon,
|
|
321
|
+
polygonMumbai,
|
|
322
|
+
arbitrum,
|
|
323
|
+
arbitrumRinkeby,
|
|
324
|
+
localhost,
|
|
325
|
+
hardhat
|
|
326
|
+
};
|
|
327
|
+
const allChains = Object.values(chain);
|
|
328
|
+
const defaultChains = [chain.mainnet, chain.ropsten, chain.rinkeby, chain.goerli, chain.kovan];
|
|
329
|
+
const defaultL2Chains = [chain.arbitrum, chain.arbitrumRinkeby, chain.optimism, chain.optimismKovan];
|
|
330
|
+
|
|
331
|
+
exports.allChains = allChains;
|
|
332
|
+
exports.arbitrum = arbitrum;
|
|
333
|
+
exports.arbitrumRinkeby = arbitrumRinkeby;
|
|
334
|
+
exports.chain = chain;
|
|
335
|
+
exports.chainId = chainId;
|
|
336
|
+
exports.defaultChains = defaultChains;
|
|
337
|
+
exports.defaultL2Chains = defaultL2Chains;
|
|
338
|
+
exports.etherscanBlockExplorers = etherscanBlockExplorers;
|
|
339
|
+
exports.goerli = goerli;
|
|
340
|
+
exports.hardhat = hardhat;
|
|
341
|
+
exports.kovan = kovan;
|
|
342
|
+
exports.localhost = localhost;
|
|
343
|
+
exports.mainnet = mainnet;
|
|
344
|
+
exports.optimism = optimism;
|
|
345
|
+
exports.optimismKovan = optimismKovan;
|
|
346
|
+
exports.polygon = polygon;
|
|
347
|
+
exports.polygonMumbai = polygonMumbai;
|
|
348
|
+
exports.rinkeby = rinkeby;
|
|
349
|
+
exports.ropsten = ropsten;
|