@wagmi/core 0.4.0-test.2 → 0.4.0
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.dev.js +1 -1
- package/chains/dist/wagmi-core-chains.cjs.prod.js +1 -1
- package/chains/dist/wagmi-core-chains.esm.js +1 -1
- package/connectors/coinbaseWallet/dist/wagmi-core-connectors-coinbaseWallet.cjs.dev.js +5 -5
- package/connectors/coinbaseWallet/dist/wagmi-core-connectors-coinbaseWallet.cjs.prod.js +5 -5
- package/connectors/coinbaseWallet/dist/wagmi-core-connectors-coinbaseWallet.esm.js +5 -5
- package/connectors/metaMask/dist/wagmi-core-connectors-metaMask.cjs.dev.js +6 -4
- package/connectors/metaMask/dist/wagmi-core-connectors-metaMask.cjs.prod.js +6 -4
- package/connectors/metaMask/dist/wagmi-core-connectors-metaMask.esm.js +6 -4
- package/connectors/mock/dist/wagmi-core-connectors-mock.cjs.dev.js +11 -7
- package/connectors/mock/dist/wagmi-core-connectors-mock.cjs.prod.js +11 -7
- package/connectors/mock/dist/wagmi-core-connectors-mock.esm.js +6 -6
- package/connectors/walletConnect/dist/wagmi-core-connectors-walletConnect.cjs.dev.js +19 -18
- package/connectors/walletConnect/dist/wagmi-core-connectors-walletConnect.cjs.prod.js +19 -18
- package/connectors/walletConnect/dist/wagmi-core-connectors-walletConnect.esm.js +19 -18
- package/dist/base-33eceda3.esm.js +302 -0
- package/dist/base-457b5f55.cjs.prod.js +328 -0
- package/dist/base-6f16410c.cjs.dev.js +328 -0
- package/dist/{chains-d045862c.cjs.prod.js → chains-1390c48d.cjs.prod.js} +56 -4
- package/dist/{chains-7e369752.cjs.dev.js → chains-2ca34f98.cjs.dev.js} +56 -4
- package/dist/{chains-fa406563.esm.js → chains-e98fda1e.esm.js} +56 -4
- package/dist/{client-60ee0298.esm.js → client-71653c40.esm.js} +21 -44
- package/dist/{client-42cf11b7.cjs.dev.js → client-7864fb0c.cjs.prod.js} +21 -44
- package/dist/{client-ed3aaa6a.cjs.prod.js → client-b3902dbf.cjs.dev.js} +21 -44
- package/dist/declarations/src/actions/accounts/getAccount.d.ts +31 -2
- package/dist/declarations/src/actions/accounts/getNetwork.d.ts +1 -2
- package/dist/declarations/src/actions/accounts/signTypedData.d.ts +11 -13
- package/dist/declarations/src/actions/accounts/watchAccount.d.ts +9 -1
- package/dist/declarations/src/actions/accounts/watchNetwork.d.ts +8 -1
- package/dist/declarations/src/actions/contracts/index.d.ts +5 -3
- package/dist/declarations/src/actions/contracts/multicall.d.ts +21 -0
- package/dist/declarations/src/actions/contracts/readContract.d.ts +7 -4
- package/dist/declarations/src/actions/contracts/readContracts.d.ts +19 -0
- package/dist/declarations/src/actions/contracts/watchContractEvent.d.ts +3 -3
- package/dist/declarations/src/actions/contracts/watchReadContract.d.ts +2 -3
- package/dist/declarations/src/actions/contracts/watchReadContracts.d.ts +6 -0
- package/dist/declarations/src/actions/contracts/writeContract.d.ts +10 -4
- package/dist/declarations/src/actions/index.d.ts +1 -1
- package/dist/declarations/src/actions/transactions/sendTransaction.d.ts +6 -1
- package/dist/declarations/src/client.d.ts +6 -11
- package/dist/declarations/src/connectors/base.d.ts +4 -3
- package/dist/declarations/src/connectors/mock/connector.d.ts +2 -9
- package/dist/declarations/src/connectors/mock/provider.d.ts +2 -1
- package/dist/declarations/src/connectors/walletConnect.d.ts +5 -4
- package/dist/declarations/src/constants/index.d.ts +1 -0
- package/dist/declarations/src/constants/multicall.d.ts +25 -0
- package/dist/declarations/src/errors.d.ts +27 -5
- package/dist/declarations/src/index.d.ts +4 -4
- package/dist/declarations/src/providers/alchemy.d.ts +2 -2
- package/dist/declarations/src/providers/infura.d.ts +2 -2
- package/dist/declarations/src/providers/jsonRpc.d.ts +2 -2
- package/dist/declarations/src/providers/public.d.ts +2 -2
- package/dist/declarations/src/types/index.d.ts +17 -5
- package/dist/declarations/src/utils/configureChains.d.ts +10 -4
- package/dist/wagmi-core.cjs.dev.js +578 -231
- package/dist/wagmi-core.cjs.prod.js +578 -231
- package/dist/wagmi-core.esm.js +576 -239
- package/package.json +15 -3
- package/providers/jsonRpc/dist/wagmi-core-providers-jsonRpc.cjs.dev.js +3 -1
- package/providers/jsonRpc/dist/wagmi-core-providers-jsonRpc.cjs.prod.js +3 -1
- package/providers/jsonRpc/dist/wagmi-core-providers-jsonRpc.esm.js +3 -1
- package/connectors/injected/dist/wagmi-core-connectors-injected.cjs.d.ts +0 -1
- package/connectors/injected/dist/wagmi-core-connectors-injected.cjs.dev.js +0 -200
- package/connectors/injected/dist/wagmi-core-connectors-injected.cjs.js +0 -7
- package/connectors/injected/dist/wagmi-core-connectors-injected.cjs.prod.js +0 -200
- package/connectors/injected/dist/wagmi-core-connectors-injected.esm.js +0 -196
- package/connectors/walletLink/dist/wagmi-core-connectors-walletLink.cjs.d.ts +0 -11
- package/connectors/walletLink/dist/wagmi-core-connectors-walletLink.cjs.js +0 -16
- package/dist/base-7f682723.cjs.prod.js +0 -623
- package/dist/base-ae774f26.cjs.dev.js +0 -623
- package/dist/base-c546f171.esm.js +0 -603
- package/dist/declarations/src/utils/eventemitter.d.ts +0 -135
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var EventEmitter = require('eventemitter3');
|
|
4
|
+
var chains = require('./chains-2ca34f98.cjs.dev.js');
|
|
5
|
+
|
|
6
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
7
|
+
|
|
8
|
+
var EventEmitter__default = /*#__PURE__*/_interopDefault(EventEmitter);
|
|
9
|
+
|
|
10
|
+
function _checkPrivateRedeclaration(obj, privateCollection) {
|
|
11
|
+
if (privateCollection.has(obj)) {
|
|
12
|
+
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function _classPrivateMethodInitSpec(obj, privateSet) {
|
|
17
|
+
_checkPrivateRedeclaration(obj, privateSet);
|
|
18
|
+
privateSet.add(obj);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
22
|
+
_checkPrivateRedeclaration(obj, privateMap);
|
|
23
|
+
privateMap.set(obj, value);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function _defineProperty(obj, key, value) {
|
|
27
|
+
if (key in obj) {
|
|
28
|
+
Object.defineProperty(obj, key, {
|
|
29
|
+
value: value,
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
obj[key] = value;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return obj;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function _classApplyDescriptorGet(receiver, descriptor) {
|
|
42
|
+
if (descriptor.get) {
|
|
43
|
+
return descriptor.get.call(receiver);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return descriptor.value;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) {
|
|
50
|
+
if (!privateMap.has(receiver)) {
|
|
51
|
+
throw new TypeError("attempted to " + action + " private field on non-instance");
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return privateMap.get(receiver);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function _classPrivateFieldGet(receiver, privateMap) {
|
|
58
|
+
var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get");
|
|
59
|
+
return _classApplyDescriptorGet(receiver, descriptor);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) {
|
|
63
|
+
if (!privateSet.has(receiver)) {
|
|
64
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return fn;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function _classApplyDescriptorSet(receiver, descriptor, value) {
|
|
71
|
+
if (descriptor.set) {
|
|
72
|
+
descriptor.set.call(receiver, value);
|
|
73
|
+
} else {
|
|
74
|
+
if (!descriptor.writable) {
|
|
75
|
+
throw new TypeError("attempted to set read only private field");
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
descriptor.value = value;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function _classPrivateFieldSet(receiver, privateMap, value) {
|
|
83
|
+
var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set");
|
|
84
|
+
_classApplyDescriptorSet(receiver, descriptor, value);
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function normalizeChainId(chainId) {
|
|
89
|
+
if (typeof chainId === 'string') return Number.parseInt(chainId, chainId.trim().substring(0, 2) === '0x' ? 16 : 10);
|
|
90
|
+
return chainId;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Error subclass implementing JSON RPC 2.0 errors and Ethereum RPC errors per EIP-1474.
|
|
95
|
+
* @see https://eips.ethereum.org/EIPS/eip-1474
|
|
96
|
+
*/
|
|
97
|
+
class RpcError extends Error {
|
|
98
|
+
constructor(
|
|
99
|
+
/** Number error code */
|
|
100
|
+
code,
|
|
101
|
+
/** Human-readable string */
|
|
102
|
+
message,
|
|
103
|
+
/** Low-level error */
|
|
104
|
+
internal,
|
|
105
|
+
/** Other useful information about error */
|
|
106
|
+
data) {
|
|
107
|
+
if (!Number.isInteger(code)) throw new Error('"code" must be an integer.');
|
|
108
|
+
if (!message || typeof message !== 'string') throw new Error('"message" must be a nonempty string.');
|
|
109
|
+
super(message);
|
|
110
|
+
|
|
111
|
+
_defineProperty(this, "code", void 0);
|
|
112
|
+
|
|
113
|
+
_defineProperty(this, "data", void 0);
|
|
114
|
+
|
|
115
|
+
_defineProperty(this, "internal", void 0);
|
|
116
|
+
|
|
117
|
+
this.code = code;
|
|
118
|
+
this.data = data;
|
|
119
|
+
this.internal = internal;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Error subclass implementing Ethereum Provider errors per EIP-1193.
|
|
125
|
+
* @see https://eips.ethereum.org/EIPS/eip-1193
|
|
126
|
+
*/
|
|
127
|
+
|
|
128
|
+
class ProviderRpcError extends RpcError {
|
|
129
|
+
/**
|
|
130
|
+
* Create an Ethereum Provider JSON-RPC error.
|
|
131
|
+
* `code` must be an integer in the 1000 <= 4999 range.
|
|
132
|
+
*/
|
|
133
|
+
constructor(
|
|
134
|
+
/**
|
|
135
|
+
* Number error code
|
|
136
|
+
* @see https://eips.ethereum.org/EIPS/eip-1193#error-standards
|
|
137
|
+
*/
|
|
138
|
+
code,
|
|
139
|
+
/** Human-readable string */
|
|
140
|
+
message,
|
|
141
|
+
/** Low-level error */
|
|
142
|
+
internal,
|
|
143
|
+
/** Other useful information about error */
|
|
144
|
+
data) {
|
|
145
|
+
if (!(Number.isInteger(code) && code >= 1000 && code <= 4999)) throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');
|
|
146
|
+
super(code, message, internal, data);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
}
|
|
150
|
+
class AddChainError extends Error {
|
|
151
|
+
constructor() {
|
|
152
|
+
super(...arguments);
|
|
153
|
+
|
|
154
|
+
_defineProperty(this, "name", 'AddChainError');
|
|
155
|
+
|
|
156
|
+
_defineProperty(this, "message", 'Error adding chain');
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
}
|
|
160
|
+
class ChainDoesNotSupportMulticallError extends Error {
|
|
161
|
+
constructor(_ref) {
|
|
162
|
+
let {
|
|
163
|
+
blockNumber,
|
|
164
|
+
chain
|
|
165
|
+
} = _ref;
|
|
166
|
+
super("Chain \"".concat(chain.name, "\" does not support multicall").concat(blockNumber ? " on block ".concat(blockNumber) : '', "."));
|
|
167
|
+
|
|
168
|
+
_defineProperty(this, "name", 'ChainDoesNotSupportMulticall');
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
}
|
|
172
|
+
class ChainMismatchError extends Error {
|
|
173
|
+
constructor(_ref2) {
|
|
174
|
+
let {
|
|
175
|
+
activeChain,
|
|
176
|
+
targetChain
|
|
177
|
+
} = _ref2;
|
|
178
|
+
super("Chain mismatch: Expected \"".concat(targetChain, "\", received \"").concat(activeChain, "."));
|
|
179
|
+
|
|
180
|
+
_defineProperty(this, "name", 'ChainMismatchError');
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
}
|
|
184
|
+
class ChainNotConfiguredError extends Error {
|
|
185
|
+
constructor() {
|
|
186
|
+
super(...arguments);
|
|
187
|
+
|
|
188
|
+
_defineProperty(this, "name", 'ChainNotConfigured');
|
|
189
|
+
|
|
190
|
+
_defineProperty(this, "message", 'Chain not configured');
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
}
|
|
194
|
+
class ConnectorAlreadyConnectedError extends Error {
|
|
195
|
+
constructor() {
|
|
196
|
+
super(...arguments);
|
|
197
|
+
|
|
198
|
+
_defineProperty(this, "name", 'ConnectorAlreadyConnectedError');
|
|
199
|
+
|
|
200
|
+
_defineProperty(this, "message", 'Connector already connected');
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
}
|
|
204
|
+
class ConnectorNotFoundError extends Error {
|
|
205
|
+
constructor() {
|
|
206
|
+
super(...arguments);
|
|
207
|
+
|
|
208
|
+
_defineProperty(this, "name", 'ConnectorNotFoundError');
|
|
209
|
+
|
|
210
|
+
_defineProperty(this, "message", 'Connector not found');
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
}
|
|
214
|
+
class ProviderChainsNotFound extends Error {
|
|
215
|
+
constructor() {
|
|
216
|
+
super(...arguments);
|
|
217
|
+
|
|
218
|
+
_defineProperty(this, "name", 'ProviderChainsNotFound');
|
|
219
|
+
|
|
220
|
+
_defineProperty(this, "message", ['No chains were found on the wagmi provider. Some functions that require a chain may not work.', '', 'It is recommended to add a list of chains to the provider in `createClient`.', '', 'Example:', '', '```', "import { getDefaultProvider } from 'ethers'", "import { chain, createClient } from 'wagmi'", '', 'createClient({', ' provider: Object.assign(getDefaultProvider(), { chains: [chain.mainnet] })', '})', '```'].join('\n'));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
}
|
|
224
|
+
class ResourceUnavailableError extends RpcError {
|
|
225
|
+
constructor(error) {
|
|
226
|
+
super(-32002, 'Resource unavailable', error);
|
|
227
|
+
|
|
228
|
+
_defineProperty(this, "name", 'ResourceUnavailable');
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
}
|
|
232
|
+
class SwitchChainError extends ProviderRpcError {
|
|
233
|
+
constructor(error) {
|
|
234
|
+
super(4902, 'Error switching chain', error);
|
|
235
|
+
|
|
236
|
+
_defineProperty(this, "name", 'SwitchChainError');
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
}
|
|
240
|
+
class SwitchChainNotSupportedError extends Error {
|
|
241
|
+
constructor(_ref3) {
|
|
242
|
+
let {
|
|
243
|
+
connector
|
|
244
|
+
} = _ref3;
|
|
245
|
+
super("\"".concat(connector.name, "\" does not support programmatic chain switching."));
|
|
246
|
+
|
|
247
|
+
_defineProperty(this, "name", 'SwitchChainNotSupportedError');
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
}
|
|
251
|
+
class UserRejectedRequestError extends ProviderRpcError {
|
|
252
|
+
constructor(error) {
|
|
253
|
+
super(4001, 'User rejected request', error);
|
|
254
|
+
|
|
255
|
+
_defineProperty(this, "name", 'UserRejectedRequestError');
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
class Connector extends EventEmitter__default["default"] {
|
|
261
|
+
/** Unique connector id */
|
|
262
|
+
|
|
263
|
+
/** Connector name */
|
|
264
|
+
|
|
265
|
+
/** Chains connector supports */
|
|
266
|
+
|
|
267
|
+
/** Options to use with connector */
|
|
268
|
+
|
|
269
|
+
/** Whether connector is usable */
|
|
270
|
+
constructor(_ref) {
|
|
271
|
+
let {
|
|
272
|
+
chains: chains$1 = chains.defaultChains,
|
|
273
|
+
options
|
|
274
|
+
} = _ref;
|
|
275
|
+
super();
|
|
276
|
+
|
|
277
|
+
_defineProperty(this, "id", void 0);
|
|
278
|
+
|
|
279
|
+
_defineProperty(this, "name", void 0);
|
|
280
|
+
|
|
281
|
+
_defineProperty(this, "chains", void 0);
|
|
282
|
+
|
|
283
|
+
_defineProperty(this, "options", void 0);
|
|
284
|
+
|
|
285
|
+
_defineProperty(this, "ready", void 0);
|
|
286
|
+
|
|
287
|
+
this.chains = chains$1;
|
|
288
|
+
this.options = options;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
getBlockExplorerUrls(chain) {
|
|
292
|
+
var _chain$blockExplorers;
|
|
293
|
+
|
|
294
|
+
const {
|
|
295
|
+
default: blockExplorer,
|
|
296
|
+
...blockExplorers
|
|
297
|
+
} = (_chain$blockExplorers = chain.blockExplorers) !== null && _chain$blockExplorers !== void 0 ? _chain$blockExplorers : {};
|
|
298
|
+
if (blockExplorer) return [blockExplorer.url, ...Object.values(blockExplorers).map(x => x.url)];
|
|
299
|
+
return [];
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
isChainUnsupported(chainId) {
|
|
303
|
+
return !this.chains.some(x => x.id === chainId);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
exports.AddChainError = AddChainError;
|
|
309
|
+
exports.ChainDoesNotSupportMulticallError = ChainDoesNotSupportMulticallError;
|
|
310
|
+
exports.ChainMismatchError = ChainMismatchError;
|
|
311
|
+
exports.ChainNotConfiguredError = ChainNotConfiguredError;
|
|
312
|
+
exports.Connector = Connector;
|
|
313
|
+
exports.ConnectorAlreadyConnectedError = ConnectorAlreadyConnectedError;
|
|
314
|
+
exports.ConnectorNotFoundError = ConnectorNotFoundError;
|
|
315
|
+
exports.ProviderChainsNotFound = ProviderChainsNotFound;
|
|
316
|
+
exports.ProviderRpcError = ProviderRpcError;
|
|
317
|
+
exports.ResourceUnavailableError = ResourceUnavailableError;
|
|
318
|
+
exports.RpcError = RpcError;
|
|
319
|
+
exports.SwitchChainError = SwitchChainError;
|
|
320
|
+
exports.SwitchChainNotSupportedError = SwitchChainNotSupportedError;
|
|
321
|
+
exports.UserRejectedRequestError = UserRejectedRequestError;
|
|
322
|
+
exports._classPrivateFieldGet = _classPrivateFieldGet;
|
|
323
|
+
exports._classPrivateFieldInitSpec = _classPrivateFieldInitSpec;
|
|
324
|
+
exports._classPrivateFieldSet = _classPrivateFieldSet;
|
|
325
|
+
exports._classPrivateMethodGet = _classPrivateMethodGet;
|
|
326
|
+
exports._classPrivateMethodInitSpec = _classPrivateMethodInitSpec;
|
|
327
|
+
exports._defineProperty = _defineProperty;
|
|
328
|
+
exports.normalizeChainId = normalizeChainId;
|
|
@@ -69,7 +69,6 @@ const mainnet = {
|
|
|
69
69
|
id: chainId.mainnet,
|
|
70
70
|
name: 'Ethereum',
|
|
71
71
|
network: 'homestead',
|
|
72
|
-
ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
|
73
72
|
nativeCurrency: {
|
|
74
73
|
name: 'Ether',
|
|
75
74
|
symbol: 'ETH',
|
|
@@ -83,13 +82,19 @@ const mainnet = {
|
|
|
83
82
|
blockExplorers: {
|
|
84
83
|
etherscan: etherscanBlockExplorers.mainnet,
|
|
85
84
|
default: etherscanBlockExplorers.mainnet
|
|
85
|
+
},
|
|
86
|
+
ens: {
|
|
87
|
+
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'
|
|
88
|
+
},
|
|
89
|
+
multicall: {
|
|
90
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
91
|
+
blockCreated: 14353601
|
|
86
92
|
}
|
|
87
93
|
};
|
|
88
94
|
const ropsten = {
|
|
89
95
|
id: chainId.ropsten,
|
|
90
96
|
name: 'Ropsten',
|
|
91
97
|
network: 'ropsten',
|
|
92
|
-
ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
|
93
98
|
nativeCurrency: {
|
|
94
99
|
name: 'Ropsten Ether',
|
|
95
100
|
symbol: 'ROP',
|
|
@@ -104,13 +109,19 @@ const ropsten = {
|
|
|
104
109
|
etherscan: etherscanBlockExplorers.ropsten,
|
|
105
110
|
default: etherscanBlockExplorers.ropsten
|
|
106
111
|
},
|
|
112
|
+
ens: {
|
|
113
|
+
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'
|
|
114
|
+
},
|
|
115
|
+
multicall: {
|
|
116
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
117
|
+
blockCreated: 12063863
|
|
118
|
+
},
|
|
107
119
|
testnet: true
|
|
108
120
|
};
|
|
109
121
|
const rinkeby = {
|
|
110
122
|
id: chainId.rinkeby,
|
|
111
123
|
name: 'Rinkeby',
|
|
112
124
|
network: 'rinkeby',
|
|
113
|
-
ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
|
114
125
|
nativeCurrency: {
|
|
115
126
|
name: 'Rinkeby Ether',
|
|
116
127
|
symbol: 'RIN',
|
|
@@ -125,13 +136,19 @@ const rinkeby = {
|
|
|
125
136
|
etherscan: etherscanBlockExplorers.rinkeby,
|
|
126
137
|
default: etherscanBlockExplorers.rinkeby
|
|
127
138
|
},
|
|
139
|
+
ens: {
|
|
140
|
+
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'
|
|
141
|
+
},
|
|
142
|
+
multicall: {
|
|
143
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
144
|
+
blockCreated: 10299530
|
|
145
|
+
},
|
|
128
146
|
testnet: true
|
|
129
147
|
};
|
|
130
148
|
const goerli = {
|
|
131
149
|
id: chainId.goerli,
|
|
132
150
|
name: 'Goerli',
|
|
133
151
|
network: 'goerli',
|
|
134
|
-
ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
|
135
152
|
nativeCurrency: {
|
|
136
153
|
name: 'Goerli Ether',
|
|
137
154
|
symbol: 'GOR',
|
|
@@ -146,6 +163,13 @@ const goerli = {
|
|
|
146
163
|
etherscan: etherscanBlockExplorers.goerli,
|
|
147
164
|
default: etherscanBlockExplorers.goerli
|
|
148
165
|
},
|
|
166
|
+
ens: {
|
|
167
|
+
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'
|
|
168
|
+
},
|
|
169
|
+
multicall: {
|
|
170
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
171
|
+
blockCreated: 6507670
|
|
172
|
+
},
|
|
149
173
|
testnet: true
|
|
150
174
|
};
|
|
151
175
|
const kovan = {
|
|
@@ -166,6 +190,10 @@ const kovan = {
|
|
|
166
190
|
etherscan: etherscanBlockExplorers.kovan,
|
|
167
191
|
default: etherscanBlockExplorers.kovan
|
|
168
192
|
},
|
|
193
|
+
multicall: {
|
|
194
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
195
|
+
blockCreated: 30285908
|
|
196
|
+
},
|
|
169
197
|
testnet: true
|
|
170
198
|
};
|
|
171
199
|
const optimism = {
|
|
@@ -185,6 +213,10 @@ const optimism = {
|
|
|
185
213
|
blockExplorers: {
|
|
186
214
|
etherscan: etherscanBlockExplorers.optimism,
|
|
187
215
|
default: etherscanBlockExplorers.optimism
|
|
216
|
+
},
|
|
217
|
+
multicall: {
|
|
218
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
219
|
+
blockCreated: 4286263
|
|
188
220
|
}
|
|
189
221
|
};
|
|
190
222
|
const optimismKovan = {
|
|
@@ -205,6 +237,10 @@ const optimismKovan = {
|
|
|
205
237
|
etherscan: etherscanBlockExplorers.optimismKovan,
|
|
206
238
|
default: etherscanBlockExplorers.optimismKovan
|
|
207
239
|
},
|
|
240
|
+
multicall: {
|
|
241
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
242
|
+
blockCreated: 1418387
|
|
243
|
+
},
|
|
208
244
|
testnet: true
|
|
209
245
|
};
|
|
210
246
|
const polygon = {
|
|
@@ -224,6 +260,10 @@ const polygon = {
|
|
|
224
260
|
blockExplorers: {
|
|
225
261
|
etherscan: etherscanBlockExplorers.polygon,
|
|
226
262
|
default: etherscanBlockExplorers.polygon
|
|
263
|
+
},
|
|
264
|
+
multicall: {
|
|
265
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
266
|
+
blockCreated: 25770160
|
|
227
267
|
}
|
|
228
268
|
};
|
|
229
269
|
const polygonMumbai = {
|
|
@@ -244,6 +284,10 @@ const polygonMumbai = {
|
|
|
244
284
|
etherscan: etherscanBlockExplorers.polygonMumbai,
|
|
245
285
|
default: etherscanBlockExplorers.polygonMumbai
|
|
246
286
|
},
|
|
287
|
+
multicall: {
|
|
288
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
289
|
+
blockCreated: 25444704
|
|
290
|
+
},
|
|
247
291
|
testnet: true
|
|
248
292
|
};
|
|
249
293
|
const arbitrum = {
|
|
@@ -267,6 +311,10 @@ const arbitrum = {
|
|
|
267
311
|
},
|
|
268
312
|
etherscan: etherscanBlockExplorers.arbitrum,
|
|
269
313
|
default: etherscanBlockExplorers.arbitrum
|
|
314
|
+
},
|
|
315
|
+
multicall: {
|
|
316
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
317
|
+
blockCreated: 7654707
|
|
270
318
|
}
|
|
271
319
|
};
|
|
272
320
|
const arbitrumRinkeby = {
|
|
@@ -291,6 +339,10 @@ const arbitrumRinkeby = {
|
|
|
291
339
|
etherscan: etherscanBlockExplorers.arbitrumRinkeby,
|
|
292
340
|
default: etherscanBlockExplorers.arbitrumRinkeby
|
|
293
341
|
},
|
|
342
|
+
multicall: {
|
|
343
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
344
|
+
blockCreated: 10228837
|
|
345
|
+
},
|
|
294
346
|
testnet: true
|
|
295
347
|
};
|
|
296
348
|
const localhost = {
|
|
@@ -69,7 +69,6 @@ const mainnet = {
|
|
|
69
69
|
id: chainId.mainnet,
|
|
70
70
|
name: 'Ethereum',
|
|
71
71
|
network: 'homestead',
|
|
72
|
-
ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
|
73
72
|
nativeCurrency: {
|
|
74
73
|
name: 'Ether',
|
|
75
74
|
symbol: 'ETH',
|
|
@@ -83,13 +82,19 @@ const mainnet = {
|
|
|
83
82
|
blockExplorers: {
|
|
84
83
|
etherscan: etherscanBlockExplorers.mainnet,
|
|
85
84
|
default: etherscanBlockExplorers.mainnet
|
|
85
|
+
},
|
|
86
|
+
ens: {
|
|
87
|
+
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'
|
|
88
|
+
},
|
|
89
|
+
multicall: {
|
|
90
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
91
|
+
blockCreated: 14353601
|
|
86
92
|
}
|
|
87
93
|
};
|
|
88
94
|
const ropsten = {
|
|
89
95
|
id: chainId.ropsten,
|
|
90
96
|
name: 'Ropsten',
|
|
91
97
|
network: 'ropsten',
|
|
92
|
-
ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
|
93
98
|
nativeCurrency: {
|
|
94
99
|
name: 'Ropsten Ether',
|
|
95
100
|
symbol: 'ROP',
|
|
@@ -104,13 +109,19 @@ const ropsten = {
|
|
|
104
109
|
etherscan: etherscanBlockExplorers.ropsten,
|
|
105
110
|
default: etherscanBlockExplorers.ropsten
|
|
106
111
|
},
|
|
112
|
+
ens: {
|
|
113
|
+
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'
|
|
114
|
+
},
|
|
115
|
+
multicall: {
|
|
116
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
117
|
+
blockCreated: 12063863
|
|
118
|
+
},
|
|
107
119
|
testnet: true
|
|
108
120
|
};
|
|
109
121
|
const rinkeby = {
|
|
110
122
|
id: chainId.rinkeby,
|
|
111
123
|
name: 'Rinkeby',
|
|
112
124
|
network: 'rinkeby',
|
|
113
|
-
ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
|
114
125
|
nativeCurrency: {
|
|
115
126
|
name: 'Rinkeby Ether',
|
|
116
127
|
symbol: 'RIN',
|
|
@@ -125,13 +136,19 @@ const rinkeby = {
|
|
|
125
136
|
etherscan: etherscanBlockExplorers.rinkeby,
|
|
126
137
|
default: etherscanBlockExplorers.rinkeby
|
|
127
138
|
},
|
|
139
|
+
ens: {
|
|
140
|
+
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'
|
|
141
|
+
},
|
|
142
|
+
multicall: {
|
|
143
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
144
|
+
blockCreated: 10299530
|
|
145
|
+
},
|
|
128
146
|
testnet: true
|
|
129
147
|
};
|
|
130
148
|
const goerli = {
|
|
131
149
|
id: chainId.goerli,
|
|
132
150
|
name: 'Goerli',
|
|
133
151
|
network: 'goerli',
|
|
134
|
-
ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
|
|
135
152
|
nativeCurrency: {
|
|
136
153
|
name: 'Goerli Ether',
|
|
137
154
|
symbol: 'GOR',
|
|
@@ -146,6 +163,13 @@ const goerli = {
|
|
|
146
163
|
etherscan: etherscanBlockExplorers.goerli,
|
|
147
164
|
default: etherscanBlockExplorers.goerli
|
|
148
165
|
},
|
|
166
|
+
ens: {
|
|
167
|
+
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'
|
|
168
|
+
},
|
|
169
|
+
multicall: {
|
|
170
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
171
|
+
blockCreated: 6507670
|
|
172
|
+
},
|
|
149
173
|
testnet: true
|
|
150
174
|
};
|
|
151
175
|
const kovan = {
|
|
@@ -166,6 +190,10 @@ const kovan = {
|
|
|
166
190
|
etherscan: etherscanBlockExplorers.kovan,
|
|
167
191
|
default: etherscanBlockExplorers.kovan
|
|
168
192
|
},
|
|
193
|
+
multicall: {
|
|
194
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
195
|
+
blockCreated: 30285908
|
|
196
|
+
},
|
|
169
197
|
testnet: true
|
|
170
198
|
};
|
|
171
199
|
const optimism = {
|
|
@@ -185,6 +213,10 @@ const optimism = {
|
|
|
185
213
|
blockExplorers: {
|
|
186
214
|
etherscan: etherscanBlockExplorers.optimism,
|
|
187
215
|
default: etherscanBlockExplorers.optimism
|
|
216
|
+
},
|
|
217
|
+
multicall: {
|
|
218
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
219
|
+
blockCreated: 4286263
|
|
188
220
|
}
|
|
189
221
|
};
|
|
190
222
|
const optimismKovan = {
|
|
@@ -205,6 +237,10 @@ const optimismKovan = {
|
|
|
205
237
|
etherscan: etherscanBlockExplorers.optimismKovan,
|
|
206
238
|
default: etherscanBlockExplorers.optimismKovan
|
|
207
239
|
},
|
|
240
|
+
multicall: {
|
|
241
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
242
|
+
blockCreated: 1418387
|
|
243
|
+
},
|
|
208
244
|
testnet: true
|
|
209
245
|
};
|
|
210
246
|
const polygon = {
|
|
@@ -224,6 +260,10 @@ const polygon = {
|
|
|
224
260
|
blockExplorers: {
|
|
225
261
|
etherscan: etherscanBlockExplorers.polygon,
|
|
226
262
|
default: etherscanBlockExplorers.polygon
|
|
263
|
+
},
|
|
264
|
+
multicall: {
|
|
265
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
266
|
+
blockCreated: 25770160
|
|
227
267
|
}
|
|
228
268
|
};
|
|
229
269
|
const polygonMumbai = {
|
|
@@ -244,6 +284,10 @@ const polygonMumbai = {
|
|
|
244
284
|
etherscan: etherscanBlockExplorers.polygonMumbai,
|
|
245
285
|
default: etherscanBlockExplorers.polygonMumbai
|
|
246
286
|
},
|
|
287
|
+
multicall: {
|
|
288
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
289
|
+
blockCreated: 25444704
|
|
290
|
+
},
|
|
247
291
|
testnet: true
|
|
248
292
|
};
|
|
249
293
|
const arbitrum = {
|
|
@@ -267,6 +311,10 @@ const arbitrum = {
|
|
|
267
311
|
},
|
|
268
312
|
etherscan: etherscanBlockExplorers.arbitrum,
|
|
269
313
|
default: etherscanBlockExplorers.arbitrum
|
|
314
|
+
},
|
|
315
|
+
multicall: {
|
|
316
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
317
|
+
blockCreated: 7654707
|
|
270
318
|
}
|
|
271
319
|
};
|
|
272
320
|
const arbitrumRinkeby = {
|
|
@@ -291,6 +339,10 @@ const arbitrumRinkeby = {
|
|
|
291
339
|
etherscan: etherscanBlockExplorers.arbitrumRinkeby,
|
|
292
340
|
default: etherscanBlockExplorers.arbitrumRinkeby
|
|
293
341
|
},
|
|
342
|
+
multicall: {
|
|
343
|
+
address: '0xca11bde05977b3631167028862be2a173976ca11',
|
|
344
|
+
blockCreated: 10228837
|
|
345
|
+
},
|
|
294
346
|
testnet: true
|
|
295
347
|
};
|
|
296
348
|
const localhost = {
|