viem 0.2.10 → 0.2.12

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.
Files changed (42) hide show
  1. package/dist/abi.js +2 -2
  2. package/dist/abi.mjs +1 -1
  3. package/dist/accounts/index.js +17 -17
  4. package/dist/accounts/index.mjs +2 -2
  5. package/dist/chains.js +89 -89
  6. package/dist/chains.mjs +1 -1
  7. package/dist/{chunk-I2RHOQQS.js → chunk-4ZTX23MO.js} +6 -6
  8. package/dist/{chunk-34RQIVOR.mjs → chunk-6T6EZJGF.mjs} +126 -42
  9. package/dist/chunk-6T6EZJGF.mjs.map +1 -0
  10. package/dist/{chunk-6PP4CMLN.js → chunk-BKEDQ7BF.js} +212 -128
  11. package/dist/chunk-BKEDQ7BF.js.map +1 -0
  12. package/dist/{chunk-AQJCWZV6.mjs → chunk-L6YGD2ZT.mjs} +2 -2
  13. package/dist/contract.d.ts +2 -2
  14. package/dist/contract.js +2 -2
  15. package/dist/contract.mjs +1 -1
  16. package/dist/ens.d.ts +1 -1
  17. package/dist/ens.js +2 -2
  18. package/dist/ens.mjs +1 -1
  19. package/dist/ethers.js +4 -4
  20. package/dist/ethers.mjs +2 -2
  21. package/dist/{formatAbiItem-e5bbcadb.d.ts → formatAbiItem-aaf282fc.d.ts} +5 -1
  22. package/dist/{getEnsResolver-314de6e9.d.ts → getEnsResolver-68329c3e.d.ts} +1 -1
  23. package/dist/index.d.ts +12 -9
  24. package/dist/index.js +94 -94
  25. package/dist/index.mjs +1 -1
  26. package/dist/{parseGwei-4fb29d96.d.ts → parseGwei-e2b004f8.d.ts} +1 -1
  27. package/dist/public.d.ts +1 -1
  28. package/dist/public.js +2 -2
  29. package/dist/public.mjs +1 -1
  30. package/dist/test.js +2 -2
  31. package/dist/test.mjs +1 -1
  32. package/dist/utils/index.d.ts +5 -5
  33. package/dist/utils/index.js +4 -2
  34. package/dist/utils/index.mjs +3 -1
  35. package/dist/wallet.d.ts +1 -1
  36. package/dist/wallet.js +2 -2
  37. package/dist/wallet.mjs +1 -1
  38. package/package.json +1 -1
  39. package/dist/chunk-34RQIVOR.mjs.map +0 -1
  40. package/dist/chunk-6PP4CMLN.js.map +0 -1
  41. /package/dist/{chunk-I2RHOQQS.js.map → chunk-4ZTX23MO.js.map} +0 -0
  42. /package/dist/{chunk-AQJCWZV6.mjs.map → chunk-L6YGD2ZT.mjs.map} +0 -0
@@ -20,7 +20,7 @@ var _abitype = require('abitype');
20
20
  var package_default = {
21
21
  name: "viem",
22
22
  description: "TypeScript Interface for Ethereum",
23
- version: "0.2.10",
23
+ version: "0.2.12",
24
24
  scripts: {
25
25
  anvil: "dotenv -- sh -c 'anvil --fork-url $VITE_ANVIL_FORK_URL --fork-block-number $VITE_ANVIL_BLOCK_NUMBER --block-time $VITE_ANVIL_BLOCK_TIME'",
26
26
  bench: "vitest bench --no-threads",
@@ -287,16 +287,43 @@ var AbiConstructorParamsNotFoundError = class extends BaseError {
287
287
  }
288
288
  };
289
289
  var AbiDecodingDataSizeInvalidError = class extends BaseError {
290
- constructor(size2) {
290
+ constructor({ data, size: size2 }) {
291
291
  super(
292
292
  [
293
293
  `Data size of ${size2} bytes is invalid.`,
294
294
  "Size must be in increments of 32 bytes (size % 32 === 0)."
295
- ].join("\n")
295
+ ].join("\n"),
296
+ { metaMessages: [`Data: ${data} (${size2} bytes)`] }
296
297
  );
297
298
  __publicField(this, "name", "AbiDecodingDataSizeInvalidError");
298
299
  }
299
300
  };
301
+ var AbiDecodingDataSizeTooSmallError = class extends BaseError {
302
+ constructor({
303
+ data,
304
+ params,
305
+ size: size2
306
+ }) {
307
+ super(
308
+ [`Data size of ${size2} bytes is too small for given parameters.`].join(
309
+ "\n"
310
+ ),
311
+ {
312
+ metaMessages: [
313
+ `Params: (${formatAbiParams(params, { includeName: true })})`,
314
+ `Data: ${data} (${size2} bytes)`
315
+ ]
316
+ }
317
+ );
318
+ __publicField(this, "name", "AbiDecodingDataSizeTooSmallError");
319
+ __publicField(this, "data");
320
+ __publicField(this, "params");
321
+ __publicField(this, "size");
322
+ this.data = data;
323
+ this.params = params;
324
+ this.size = size2;
325
+ }
326
+ };
300
327
  var AbiDecodingZeroDataError = class extends BaseError {
301
328
  constructor() {
302
329
  super('Cannot decode zero data ("0x") with ABI parameters.');
@@ -478,6 +505,34 @@ var BytesSizeMismatchError = class extends BaseError {
478
505
  __publicField(this, "name", "BytesSizeMismatchError");
479
506
  }
480
507
  };
508
+ var DecodeLogDataMismatch = class extends BaseError {
509
+ constructor({
510
+ data,
511
+ params,
512
+ size: size2
513
+ }) {
514
+ super(
515
+ [
516
+ `Data size of ${size2} bytes is too small for non-indexed event parameters.`
517
+ ].join("\n"),
518
+ {
519
+ metaMessages: [
520
+ "This error is usually caused if the ABI event has too many non-indexed event parameters for the emitted log.",
521
+ "",
522
+ `Params: (${formatAbiParams(params, { includeName: true })})`,
523
+ `Data: ${data} (${size2} bytes)`
524
+ ]
525
+ }
526
+ );
527
+ __publicField(this, "name", "DecodeLogDataMismatch");
528
+ __publicField(this, "data");
529
+ __publicField(this, "params");
530
+ __publicField(this, "size");
531
+ this.data = data;
532
+ this.params = params;
533
+ this.size = size2;
534
+ }
535
+ };
481
536
  var DecodeLogTopicsMismatch = class extends BaseError {
482
537
  constructor({
483
538
  abiItem,
@@ -1433,14 +1488,14 @@ var RequestError = class extends BaseError {
1433
1488
  super(shortMessage, {
1434
1489
  cause: err,
1435
1490
  docsPath: docsPath6,
1436
- metaMessages
1491
+ metaMessages: metaMessages || _optionalChain([err, 'optionalAccess', _22 => _22.metaMessages])
1437
1492
  });
1438
1493
  this.name = err.name;
1439
1494
  }
1440
1495
  };
1441
1496
  var RpcRequestError = class extends RequestError {
1442
1497
  constructor(err, { docsPath: docsPath6, shortMessage }) {
1443
- super(err, { docsPath: docsPath6, metaMessages: err.metaMessages, shortMessage });
1498
+ super(err, { docsPath: docsPath6, shortMessage });
1444
1499
  __publicField(this, "code");
1445
1500
  this.code = err.code;
1446
1501
  this.name = err.name;
@@ -1546,7 +1601,7 @@ var JsonRpcVersionUnsupportedError = class extends RpcRequestError {
1546
1601
  __publicField(this, "code", -32006);
1547
1602
  }
1548
1603
  };
1549
- var UserRejectedRequestError = class extends RpcRequestError {
1604
+ var UserRejectedRequestError = class extends RequestError {
1550
1605
  constructor(err) {
1551
1606
  super(err, {
1552
1607
  shortMessage: "User rejected the request."
@@ -1555,7 +1610,7 @@ var UserRejectedRequestError = class extends RpcRequestError {
1555
1610
  __publicField(this, "code", 4001);
1556
1611
  }
1557
1612
  };
1558
- var SwitchChainError = class extends RpcRequestError {
1613
+ var SwitchChainError = class extends RequestError {
1559
1614
  constructor(err) {
1560
1615
  super(err, {
1561
1616
  shortMessage: "An error occurred when attempting to switch chain."
@@ -2067,9 +2122,9 @@ function rlpToBytes(bytes, offset = 0) {
2067
2122
  var paramsRegex = /((function|event)\s)?(.*)(\((.*)\))/;
2068
2123
  function extractFunctionParts(def) {
2069
2124
  const parts = def.match(paramsRegex);
2070
- const type = _optionalChain([parts, 'optionalAccess', _22 => _22[2]]) || void 0;
2071
- const name = _optionalChain([parts, 'optionalAccess', _23 => _23[3]]);
2072
- const params = _optionalChain([parts, 'optionalAccess', _24 => _24[5]]) || void 0;
2125
+ const type = _optionalChain([parts, 'optionalAccess', _23 => _23[2]]) || void 0;
2126
+ const name = _optionalChain([parts, 'optionalAccess', _24 => _24[3]]);
2127
+ const params = _optionalChain([parts, 'optionalAccess', _25 => _25[5]]) || void 0;
2073
2128
  return { type, name, params };
2074
2129
  }
2075
2130
  function extractFunctionName(def) {
@@ -2077,8 +2132,8 @@ function extractFunctionName(def) {
2077
2132
  }
2078
2133
  function extractFunctionParams(def) {
2079
2134
  const params = extractFunctionParts(def).params;
2080
- const splitParams = _optionalChain([params, 'optionalAccess', _25 => _25.split, 'call', _26 => _26(","), 'access', _27 => _27.map, 'call', _28 => _28((x) => x.trim().split(" "))]);
2081
- return _optionalChain([splitParams, 'optionalAccess', _29 => _29.map, 'call', _30 => _30((param) => ({
2135
+ const splitParams = _optionalChain([params, 'optionalAccess', _26 => _26.split, 'call', _27 => _27(","), 'access', _28 => _28.map, 'call', _29 => _29((x) => x.trim().split(" "))]);
2136
+ return _optionalChain([splitParams, 'optionalAccess', _30 => _30.map, 'call', _31 => _31((param) => ({
2082
2137
  type: param[0],
2083
2138
  name: param[1] === "indexed" ? param[2] : param[1],
2084
2139
  ...param[1] === "indexed" ? { indexed: true } : {}
@@ -2402,7 +2457,7 @@ function decodeAbiParameters(params, data) {
2402
2457
  if (data === "0x" && params.length > 0)
2403
2458
  throw new AbiDecodingZeroDataError();
2404
2459
  if (size(data) % 32 !== 0)
2405
- throw new AbiDecodingDataSizeInvalidError(size(data));
2460
+ throw new AbiDecodingDataSizeInvalidError({ data, size: size(data) });
2406
2461
  return decodeParams({
2407
2462
  data,
2408
2463
  params
@@ -2415,6 +2470,12 @@ function decodeParams({
2415
2470
  let decodedValues = [];
2416
2471
  let position = 0;
2417
2472
  for (let i = 0; i < params.length; i++) {
2473
+ if (position >= size(data))
2474
+ throw new AbiDecodingDataSizeTooSmallError({
2475
+ data,
2476
+ params,
2477
+ size: size(data)
2478
+ });
2418
2479
  const param = params[i];
2419
2480
  const { consumed, value } = decodeParam({ data, param, position });
2420
2481
  decodedValues.push(value);
@@ -2485,7 +2546,7 @@ function decodeArray(data, {
2485
2546
  }
2486
2547
  if (hasDynamicChild(param)) {
2487
2548
  const arrayComponents = getArrayComponents(param.type);
2488
- const dynamicChild = !_optionalChain([arrayComponents, 'optionalAccess', _31 => _31[0]]);
2549
+ const dynamicChild = !_optionalChain([arrayComponents, 'optionalAccess', _32 => _32[0]]);
2489
2550
  let consumed2 = 0;
2490
2551
  let value2 = [];
2491
2552
  for (let i = 0; i < length; ++i) {
@@ -2561,7 +2622,7 @@ function decodeTuple(data, { param, position }) {
2561
2622
  position: consumed
2562
2623
  });
2563
2624
  consumed += decodedChild.consumed;
2564
- value[hasUnnamedChild ? i : _optionalChain([component, 'optionalAccess', _32 => _32.name])] = decodedChild.value;
2625
+ value[hasUnnamedChild ? i : _optionalChain([component, 'optionalAccess', _33 => _33.name])] = decodedChild.value;
2565
2626
  }
2566
2627
  return { consumed: 32, value };
2567
2628
  }
@@ -2573,7 +2634,7 @@ function decodeTuple(data, { param, position }) {
2573
2634
  position: position + consumed
2574
2635
  });
2575
2636
  consumed += decodedChild.consumed;
2576
- value[hasUnnamedChild ? i : _optionalChain([component, 'optionalAccess', _33 => _33.name])] = decodedChild.value;
2637
+ value[hasUnnamedChild ? i : _optionalChain([component, 'optionalAccess', _34 => _34.name])] = decodedChild.value;
2577
2638
  }
2578
2639
  return { consumed, value };
2579
2640
  }
@@ -2586,7 +2647,7 @@ function hasDynamicChild(param) {
2586
2647
  if (type.endsWith("[]"))
2587
2648
  return true;
2588
2649
  if (type === "tuple")
2589
- return _optionalChain([param, 'access', _34 => _34.components, 'optionalAccess', _35 => _35.some, 'call', _36 => _36(hasDynamicChild)]);
2650
+ return _optionalChain([param, 'access', _35 => _35.components, 'optionalAccess', _36 => _36.some, 'call', _37 => _37(hasDynamicChild)]);
2590
2651
  const arrayComponents = getArrayComponents(param.type);
2591
2652
  if (arrayComponents && hasDynamicChild({ ...param, type: arrayComponents[1] }))
2592
2653
  return true;
@@ -2597,16 +2658,16 @@ function hasDynamicChild(param) {
2597
2658
  function formatAbiItem(abiItem, { includeName = false } = {}) {
2598
2659
  if (abiItem.type !== "function" && abiItem.type !== "event" && abiItem.type !== "error")
2599
2660
  throw new InvalidDefinitionTypeError(abiItem.type);
2600
- return `${abiItem.name}(${getParams(abiItem.inputs, { includeName })})`;
2661
+ return `${abiItem.name}(${formatAbiParams(abiItem.inputs, { includeName })})`;
2601
2662
  }
2602
- function getParams(params, { includeName }) {
2663
+ function formatAbiParams(params, { includeName = false } = {}) {
2603
2664
  if (!params)
2604
2665
  return "";
2605
- return params.map((param) => getParam(param, { includeName })).join(includeName ? ", " : ",");
2666
+ return params.map((param) => formatAbiParam(param, { includeName })).join(includeName ? ", " : ",");
2606
2667
  }
2607
- function getParam(param, { includeName }) {
2668
+ function formatAbiParam(param, { includeName }) {
2608
2669
  if (param.type.startsWith("tuple")) {
2609
- return `(${getParams(
2670
+ return `(${formatAbiParams(
2610
2671
  param.components,
2611
2672
  { includeName }
2612
2673
  )})${param.type.slice("tuple".length)}`;
@@ -2657,7 +2718,7 @@ function decodeEventLog({
2657
2718
  docsPath
2658
2719
  });
2659
2720
  const { name, inputs } = abiItem;
2660
- const isUnnamed = _optionalChain([inputs, 'optionalAccess', _37 => _37.some, 'call', _38 => _38((x) => !("name" in x && x.name))]);
2721
+ const isUnnamed = _optionalChain([inputs, 'optionalAccess', _38 => _38.some, 'call', _39 => _39((x) => !("name" in x && x.name))]);
2661
2722
  let args = isUnnamed ? [] : {};
2662
2723
  if (argTopics.length > 0) {
2663
2724
  const indexedInputs = inputs.filter((x) => "indexed" in x && x.indexed);
@@ -2674,15 +2735,25 @@ function decodeEventLog({
2674
2735
  }
2675
2736
  if (data && data !== "0x") {
2676
2737
  const params = inputs.filter((x) => !("indexed" in x && x.indexed));
2677
- const decodedData = decodeAbiParameters(params, data);
2678
- if (decodedData) {
2679
- if (isUnnamed)
2680
- args = [...args, ...decodedData];
2681
- else {
2682
- for (let i = 0; i < params.length; i++) {
2683
- args[params[i].name] = decodedData[i];
2738
+ try {
2739
+ const decodedData = decodeAbiParameters(params, data);
2740
+ if (decodedData) {
2741
+ if (isUnnamed)
2742
+ args = [...args, ...decodedData];
2743
+ else {
2744
+ for (let i = 0; i < params.length; i++) {
2745
+ args[params[i].name] = decodedData[i];
2746
+ }
2684
2747
  }
2685
2748
  }
2749
+ } catch (err) {
2750
+ if (err instanceof AbiDecodingDataSizeTooSmallError)
2751
+ throw new DecodeLogDataMismatch({
2752
+ data: err.data,
2753
+ params: err.params,
2754
+ size: err.size
2755
+ });
2756
+ throw err;
2686
2757
  }
2687
2758
  }
2688
2759
  return {
@@ -2878,8 +2949,8 @@ function encodeEventTopics({ abi, eventName, args }) {
2878
2949
  const signature = getEventSelector(definition);
2879
2950
  let topics = [];
2880
2951
  if (args && "inputs" in abiItem) {
2881
- const args_ = Array.isArray(args) ? args : _nullishCoalesce(_optionalChain([abiItem, 'access', _39 => _39.inputs, 'optionalAccess', _40 => _40.map, 'call', _41 => _41((x) => args[x.name])]), () => ( []));
2882
- topics = _nullishCoalesce(_optionalChain([abiItem, 'access', _42 => _42.inputs, 'optionalAccess', _43 => _43.filter, 'call', _44 => _44((param) => "indexed" in param && param.indexed), 'access', _45 => _45.map, 'call', _46 => _46(
2952
+ const args_ = Array.isArray(args) ? args : _nullishCoalesce(_optionalChain([abiItem, 'access', _40 => _40.inputs, 'optionalAccess', _41 => _41.map, 'call', _42 => _42((x) => args[x.name])]), () => ( []));
2953
+ topics = _nullishCoalesce(_optionalChain([abiItem, 'access', _43 => _43.inputs, 'optionalAccess', _44 => _44.filter, 'call', _45 => _45((param) => "indexed" in param && param.indexed), 'access', _46 => _46.map, 'call', _47 => _47(
2883
2954
  (param, i) => Array.isArray(args_[i]) ? args_[i].map(
2884
2955
  (_, j) => encodeArg({ param, value: args_[i][j] })
2885
2956
  ) : args_[i] ? encodeArg({ param, value: args_[i] }) : null
@@ -3134,7 +3205,7 @@ function withTimeout(fn, {
3134
3205
  }
3135
3206
  }, timeout);
3136
3207
  }
3137
- resolve(await fn({ signal: _optionalChain([controller, 'optionalAccess', _47 => _47.signal]) }));
3208
+ resolve(await fn({ signal: _optionalChain([controller, 'optionalAccess', _48 => _48.signal]) }));
3138
3209
  } catch (err) {
3139
3210
  if (err.name === "AbortError")
3140
3211
  reject(errorInstance);
@@ -3200,8 +3271,8 @@ function buildRequest(request, {
3200
3271
  {
3201
3272
  delay: ({ count, error }) => {
3202
3273
  if (error && error instanceof HttpRequestError) {
3203
- const retryAfter = _optionalChain([error, 'optionalAccess', _48 => _48.headers, 'optionalAccess', _49 => _49.get, 'call', _50 => _50("Retry-After")]);
3204
- if (_optionalChain([retryAfter, 'optionalAccess', _51 => _51.match, 'call', _52 => _52(/\d/)]))
3274
+ const retryAfter = _optionalChain([error, 'optionalAccess', _49 => _49.headers, 'optionalAccess', _50 => _50.get, 'call', _51 => _51("Retry-After")]);
3275
+ if (_optionalChain([retryAfter, 'optionalAccess', _52 => _52.match, 'call', _53 => _53(/\d/)]))
3205
3276
  return parseInt(retryAfter) * 1e3;
3206
3277
  }
3207
3278
  return ~~(1 << count) * retryDelay;
@@ -3221,7 +3292,7 @@ function getChainContractAddress({
3221
3292
  chain,
3222
3293
  contract: name
3223
3294
  }) {
3224
- const contract = _optionalChain([chain, 'optionalAccess', _53 => _53.contracts, 'optionalAccess', _54 => _54[name]]);
3295
+ const contract = _optionalChain([chain, 'optionalAccess', _54 => _54.contracts, 'optionalAccess', _55 => _55[name]]);
3225
3296
  if (!contract)
3226
3297
  throw new ChainDoesNotSupportContract({
3227
3298
  chain,
@@ -3258,7 +3329,7 @@ function defineFormatter({
3258
3329
  }
3259
3330
  return {
3260
3331
  ...formatted,
3261
- ..._optionalChain([formatOverride, 'optionalCall', _55 => _55(data)])
3332
+ ..._optionalChain([formatOverride, 'optionalCall', _56 => _56(data)])
3262
3333
  };
3263
3334
  };
3264
3335
  }
@@ -3301,7 +3372,7 @@ var defineTransaction = defineFormatter({ format: formatTransaction });
3301
3372
 
3302
3373
  // src/utils/formatters/block.ts
3303
3374
  function formatBlock(block) {
3304
- const transactions = _optionalChain([block, 'access', _56 => _56.transactions, 'optionalAccess', _57 => _57.map, 'call', _58 => _58((transaction) => {
3375
+ const transactions = _optionalChain([block, 'access', _57 => _57.transactions, 'optionalAccess', _58 => _58.map, 'call', _59 => _59((transaction) => {
3305
3376
  if (typeof transaction === "string")
3306
3377
  return transaction;
3307
3378
  return formatTransaction(transaction);
@@ -3330,7 +3401,7 @@ function extract(value, { formatter }) {
3330
3401
  return {};
3331
3402
  const keys = Object.keys(formatter({}));
3332
3403
  return keys.reduce((data, key) => {
3333
- if (_optionalChain([value, 'optionalAccess', _59 => _59.hasOwnProperty, 'call', _60 => _60(key)])) {
3404
+ if (_optionalChain([value, 'optionalAccess', _60 => _60.hasOwnProperty, 'call', _61 => _61(key)])) {
3334
3405
  ;
3335
3406
  data[key] = value[key];
3336
3407
  }
@@ -3344,7 +3415,7 @@ function formatFeeHistory(feeHistory) {
3344
3415
  baseFeePerGas: feeHistory.baseFeePerGas.map((value) => BigInt(value)),
3345
3416
  gasUsedRatio: feeHistory.gasUsedRatio,
3346
3417
  oldestBlock: BigInt(feeHistory.oldestBlock),
3347
- reward: _optionalChain([feeHistory, 'access', _61 => _61.reward, 'optionalAccess', _62 => _62.map, 'call', _63 => _63(
3418
+ reward: _optionalChain([feeHistory, 'access', _62 => _62.reward, 'optionalAccess', _63 => _63.map, 'call', _64 => _64(
3348
3419
  (reward) => reward.map((value) => BigInt(value))
3349
3420
  )])
3350
3421
  };
@@ -3412,34 +3483,34 @@ function getNodeError(err, args) {
3412
3483
  if (FeeCapTooHighError.nodeMessage.test(message))
3413
3484
  return new FeeCapTooHighError({
3414
3485
  cause: err,
3415
- maxFeePerGas: _optionalChain([args, 'optionalAccess', _64 => _64.maxFeePerGas])
3486
+ maxFeePerGas: _optionalChain([args, 'optionalAccess', _65 => _65.maxFeePerGas])
3416
3487
  });
3417
3488
  else if (FeeCapTooLowError.nodeMessage.test(message))
3418
3489
  return new FeeCapTooLowError({
3419
3490
  cause: err,
3420
- maxFeePerGas: _optionalChain([args, 'optionalAccess', _65 => _65.maxFeePerGas])
3491
+ maxFeePerGas: _optionalChain([args, 'optionalAccess', _66 => _66.maxFeePerGas])
3421
3492
  });
3422
3493
  else if (NonceTooHighError.nodeMessage.test(message))
3423
- return new NonceTooHighError({ cause: err, nonce: _optionalChain([args, 'optionalAccess', _66 => _66.nonce]) });
3494
+ return new NonceTooHighError({ cause: err, nonce: _optionalChain([args, 'optionalAccess', _67 => _67.nonce]) });
3424
3495
  else if (NonceTooLowError.nodeMessage.test(message))
3425
- return new NonceTooLowError({ cause: err, nonce: _optionalChain([args, 'optionalAccess', _67 => _67.nonce]) });
3496
+ return new NonceTooLowError({ cause: err, nonce: _optionalChain([args, 'optionalAccess', _68 => _68.nonce]) });
3426
3497
  else if (NonceMaxValueError.nodeMessage.test(message))
3427
- return new NonceMaxValueError({ cause: err, nonce: _optionalChain([args, 'optionalAccess', _68 => _68.nonce]) });
3498
+ return new NonceMaxValueError({ cause: err, nonce: _optionalChain([args, 'optionalAccess', _69 => _69.nonce]) });
3428
3499
  else if (InsufficientFundsError.nodeMessage.test(message))
3429
3500
  return new InsufficientFundsError({ cause: err });
3430
3501
  else if (IntrinsicGasTooHighError.nodeMessage.test(message))
3431
- return new IntrinsicGasTooHighError({ cause: err, gas: _optionalChain([args, 'optionalAccess', _69 => _69.gas]) });
3502
+ return new IntrinsicGasTooHighError({ cause: err, gas: _optionalChain([args, 'optionalAccess', _70 => _70.gas]) });
3432
3503
  else if (IntrinsicGasTooLowError.nodeMessage.test(message))
3433
- return new IntrinsicGasTooLowError({ cause: err, gas: _optionalChain([args, 'optionalAccess', _70 => _70.gas]) });
3504
+ return new IntrinsicGasTooLowError({ cause: err, gas: _optionalChain([args, 'optionalAccess', _71 => _71.gas]) });
3434
3505
  else if (TransactionTypeNotSupportedError.nodeMessage.test(message))
3435
3506
  return new TransactionTypeNotSupportedError({ cause: err });
3436
3507
  else if (TipAboveFeeCapError.nodeMessage.test(message))
3437
3508
  return new TipAboveFeeCapError({
3438
3509
  cause: err,
3439
- maxFeePerGas: _optionalChain([args, 'optionalAccess', _71 => _71.maxFeePerGas]),
3440
- maxPriorityFeePerGas: _optionalChain([args, 'optionalAccess', _72 => _72.maxPriorityFeePerGas])
3510
+ maxFeePerGas: _optionalChain([args, 'optionalAccess', _72 => _72.maxFeePerGas]),
3511
+ maxPriorityFeePerGas: _optionalChain([args, 'optionalAccess', _73 => _73.maxPriorityFeePerGas])
3441
3512
  });
3442
- else if (message.match(ExecutionRevertedError.nodeMessage) || "code" in err.cause && _optionalChain([err, 'access', _73 => _73.cause, 'optionalAccess', _74 => _74.code]) === ExecutionRevertedError.code)
3513
+ else if (message.match(ExecutionRevertedError.nodeMessage) || "code" in err.cause && _optionalChain([err, 'access', _74 => _74.cause, 'optionalAccess', _75 => _75.code]) === ExecutionRevertedError.code)
3443
3514
  return new ExecutionRevertedError({
3444
3515
  cause: err,
3445
3516
  message: err.cause.details
@@ -3473,7 +3544,7 @@ function getContractError(err, {
3473
3544
  functionName,
3474
3545
  sender
3475
3546
  }) {
3476
- const { code, data, message } = err instanceof RawContractError ? err : err instanceof CallExecutionError || err instanceof EstimateGasExecutionError ? _optionalChain([err, 'access', _75 => _75.cause, 'optionalAccess', _76 => _76.cause, 'optionalAccess', _77 => _77.cause]) || {} : err.cause || {};
3547
+ const { code, data, message } = err instanceof RawContractError ? err : err instanceof CallExecutionError || err instanceof EstimateGasExecutionError ? _optionalChain([err, 'access', _76 => _76.cause, 'optionalAccess', _77 => _77.cause, 'optionalAccess', _78 => _78.cause]) || {} : err.cause || {};
3477
3548
  let cause = err;
3478
3549
  if (err instanceof AbiDecodingZeroDataError) {
3479
3550
  cause = new ContractFunctionZeroDataError({ functionName });
@@ -3562,7 +3633,7 @@ async function http(url, { body, fetchOptions = {}, timeout = 1e4 }) {
3562
3633
  }
3563
3634
  );
3564
3635
  let data;
3565
- if (_optionalChain([response, 'access', _78 => _78.headers, 'access', _79 => _79.get, 'call', _80 => _80("Content-Type"), 'optionalAccess', _81 => _81.startsWith, 'call', _82 => _82("application/json")])) {
3636
+ if (_optionalChain([response, 'access', _79 => _79.headers, 'access', _80 => _80.get, 'call', _81 => _81("Content-Type"), 'optionalAccess', _82 => _82.startsWith, 'call', _83 => _83("application/json")])) {
3566
3637
  data = await response.json();
3567
3638
  } else {
3568
3639
  data = await response.text();
@@ -3654,15 +3725,15 @@ function webSocket(socket, {
3654
3725
  if (typeof message.id === "number" && id_ !== message.id)
3655
3726
  return;
3656
3727
  if (message.error) {
3657
- _optionalChain([onError, 'optionalCall', _83 => _83(new RpcError({ body, error: message.error, url: socket.url }))]);
3728
+ _optionalChain([onError, 'optionalCall', _84 => _84(new RpcError({ body, error: message.error, url: socket.url }))]);
3658
3729
  } else {
3659
- _optionalChain([onData, 'optionalCall', _84 => _84(message)]);
3730
+ _optionalChain([onData, 'optionalCall', _85 => _85(message)]);
3660
3731
  }
3661
3732
  if (body.method === "eth_subscribe" && typeof message.result === "string") {
3662
3733
  socket.subscriptions.set(message.result, callback);
3663
3734
  }
3664
3735
  if (body.method === "eth_unsubscribe") {
3665
- socket.subscriptions.delete(_optionalChain([body, 'access', _85 => _85.params, 'optionalAccess', _86 => _86[0]]));
3736
+ socket.subscriptions.delete(_optionalChain([body, 'access', _86 => _86.params, 'optionalAccess', _87 => _87[0]]));
3666
3737
  }
3667
3738
  };
3668
3739
  socket.requests.set(id_, callback);
@@ -3758,14 +3829,14 @@ function hashTypedData({
3758
3829
  const domain = typeof domain_ === "undefined" ? {} : domain_;
3759
3830
  const types = {
3760
3831
  EIP712Domain: [
3761
- _optionalChain([domain, 'optionalAccess', _87 => _87.name]) && { name: "name", type: "string" },
3762
- _optionalChain([domain, 'optionalAccess', _88 => _88.version]) && { name: "version", type: "string" },
3763
- _optionalChain([domain, 'optionalAccess', _89 => _89.chainId]) && { name: "chainId", type: "uint256" },
3764
- _optionalChain([domain, 'optionalAccess', _90 => _90.verifyingContract]) && {
3832
+ _optionalChain([domain, 'optionalAccess', _88 => _88.name]) && { name: "name", type: "string" },
3833
+ _optionalChain([domain, 'optionalAccess', _89 => _89.version]) && { name: "version", type: "string" },
3834
+ _optionalChain([domain, 'optionalAccess', _90 => _90.chainId]) && { name: "chainId", type: "uint256" },
3835
+ _optionalChain([domain, 'optionalAccess', _91 => _91.verifyingContract]) && {
3765
3836
  name: "verifyingContract",
3766
3837
  type: "address"
3767
3838
  },
3768
- _optionalChain([domain, 'optionalAccess', _91 => _91.salt]) && { name: "salt", type: "bytes32" }
3839
+ _optionalChain([domain, 'optionalAccess', _92 => _92.salt]) && { name: "salt", type: "bytes32" }
3769
3840
  ].filter(Boolean),
3770
3841
  ...types_
3771
3842
  };
@@ -3860,7 +3931,7 @@ function findTypeDependencies({
3860
3931
  types
3861
3932
  }, results = /* @__PURE__ */ new Set()) {
3862
3933
  const match = primaryType_.match(/^\w*/u);
3863
- const primaryType = _optionalChain([match, 'optionalAccess', _92 => _92[0]]);
3934
+ const primaryType = _optionalChain([match, 'optionalAccess', _93 => _93[0]]);
3864
3935
  if (results.has(primaryType) || types[primaryType] === void 0) {
3865
3936
  return results;
3866
3937
  }
@@ -4045,7 +4116,7 @@ async function isImageUri(uri) {
4045
4116
  const res = await fetch(uri, { method: "HEAD" });
4046
4117
  if (res.status === 200) {
4047
4118
  const contentType = res.headers.get("content-type");
4048
- return _optionalChain([contentType, 'optionalAccess', _93 => _93.startsWith, 'call', _94 => _94("image/")]);
4119
+ return _optionalChain([contentType, 'optionalAccess', _94 => _94.startsWith, 'call', _95 => _95("image/")]);
4049
4120
  }
4050
4121
  return false;
4051
4122
  } catch (error) {
@@ -4080,21 +4151,21 @@ function resolveAvatarUri({
4080
4151
  const isEncoded = base64Regex.test(uri);
4081
4152
  if (isEncoded)
4082
4153
  return { uri, isOnChain: true, isEncoded };
4083
- const ipfsGateway = getGateway(_optionalChain([gatewayUrls, 'optionalAccess', _95 => _95.ipfs]), "https://ipfs.io");
4084
- const arweaveGateway = getGateway(_optionalChain([gatewayUrls, 'optionalAccess', _96 => _96.arweave]), "https://arweave.net");
4154
+ const ipfsGateway = getGateway(_optionalChain([gatewayUrls, 'optionalAccess', _96 => _96.ipfs]), "https://ipfs.io");
4155
+ const arweaveGateway = getGateway(_optionalChain([gatewayUrls, 'optionalAccess', _97 => _97.arweave]), "https://arweave.net");
4085
4156
  const networkRegexMatch = uri.match(networkRegex);
4086
4157
  const {
4087
4158
  protocol,
4088
4159
  subpath,
4089
4160
  target,
4090
4161
  subtarget = ""
4091
- } = _optionalChain([networkRegexMatch, 'optionalAccess', _97 => _97.groups]) || {};
4162
+ } = _optionalChain([networkRegexMatch, 'optionalAccess', _98 => _98.groups]) || {};
4092
4163
  const isIPNS = protocol === "ipns:/" || subpath === "ipns/";
4093
4164
  const isIPFS = protocol === "ipfs:/" || subpath === "ipfs/" || ipfsHashRegex.test(uri);
4094
4165
  if (uri.startsWith("http") && !isIPNS && !isIPFS) {
4095
4166
  let replacedUri = uri;
4096
- if (_optionalChain([gatewayUrls, 'optionalAccess', _98 => _98.arweave]))
4097
- replacedUri = uri.replace(/https:\/\/arweave.net/g, _optionalChain([gatewayUrls, 'optionalAccess', _99 => _99.arweave]));
4167
+ if (_optionalChain([gatewayUrls, 'optionalAccess', _99 => _99.arweave]))
4168
+ replacedUri = uri.replace(/https:\/\/arweave.net/g, _optionalChain([gatewayUrls, 'optionalAccess', _100 => _100.arweave]));
4098
4169
  return { uri: replacedUri, isOnChain: false, isEncoded: false };
4099
4170
  }
4100
4171
  if ((isIPNS || isIPFS) && target) {
@@ -4322,10 +4393,10 @@ async function call(client, args) {
4322
4393
  try {
4323
4394
  assertRequest(args);
4324
4395
  const blockNumberHex = blockNumber ? numberToHex(blockNumber) : void 0;
4325
- const formatter = _optionalChain([client, 'access', _100 => _100.chain, 'optionalAccess', _101 => _101.formatters, 'optionalAccess', _102 => _102.transactionRequest]);
4396
+ const formatter = _optionalChain([client, 'access', _101 => _101.chain, 'optionalAccess', _102 => _102.formatters, 'optionalAccess', _103 => _103.transactionRequest]);
4326
4397
  const request_ = format3(
4327
4398
  {
4328
- from: _optionalChain([account, 'optionalAccess', _103 => _103.address]),
4399
+ from: _optionalChain([account, 'optionalAccess', _104 => _104.address]),
4329
4400
  accessList,
4330
4401
  data,
4331
4402
  gas,
@@ -4401,7 +4472,7 @@ async function simulateContract(client, {
4401
4472
  args,
4402
4473
  docsPath: "/docs/contract/simulateContract",
4403
4474
  functionName,
4404
- sender: _optionalChain([account, 'optionalAccess', _104 => _104.address])
4475
+ sender: _optionalChain([account, 'optionalAccess', _105 => _105.address])
4405
4476
  });
4406
4477
  }
4407
4478
  }
@@ -4515,7 +4586,7 @@ async function estimateGas(client, args) {
4515
4586
  } = account.type === "local" ? await prepareRequest(client, args) : args;
4516
4587
  const blockNumberHex = blockNumber ? numberToHex(blockNumber) : void 0;
4517
4588
  assertRequest(args);
4518
- const formatter = _optionalChain([client, 'access', _105 => _105.chain, 'optionalAccess', _106 => _106.formatters, 'optionalAccess', _107 => _107.transactionRequest]);
4589
+ const formatter = _optionalChain([client, 'access', _106 => _106.chain, 'optionalAccess', _107 => _107.formatters, 'optionalAccess', _108 => _108.transactionRequest]);
4519
4590
  const request = format3(
4520
4591
  {
4521
4592
  from: account.address,
@@ -4577,7 +4648,7 @@ async function estimateContractGas(client, {
4577
4648
  args,
4578
4649
  docsPath: "/docs/contract/simulateContract",
4579
4650
  functionName,
4580
- sender: _optionalChain([account, 'optionalAccess', _108 => _108.address])
4651
+ sender: _optionalChain([account, 'optionalAccess', _109 => _109.address])
4581
4652
  });
4582
4653
  }
4583
4654
  }
@@ -4615,7 +4686,7 @@ async function getBlock(client, {
4615
4686
  if (!block)
4616
4687
  throw new BlockNotFoundError({ blockHash, blockNumber });
4617
4688
  return format3(block, {
4618
- formatter: _optionalChain([client, 'access', _109 => _109.chain, 'optionalAccess', _110 => _110.formatters, 'optionalAccess', _111 => _111.block]) || formatBlock
4689
+ formatter: _optionalChain([client, 'access', _110 => _110.chain, 'optionalAccess', _111 => _111.formatters, 'optionalAccess', _112 => _112.block]) || formatBlock
4619
4690
  });
4620
4691
  }
4621
4692
 
@@ -4704,13 +4775,17 @@ async function getFilterChanges(client, {
4704
4775
  return logs.map((log) => {
4705
4776
  if (typeof log === "string")
4706
4777
  return log;
4707
- const { eventName, args } = "abi" in filter && filter.abi ? decodeEventLog({
4708
- abi: filter.abi,
4709
- data: log.data,
4710
- topics: log.topics
4711
- }) : { eventName: void 0, args: void 0 };
4712
- return formatLog(log, { args, eventName });
4713
- });
4778
+ try {
4779
+ const { eventName, args } = "abi" in filter && filter.abi ? decodeEventLog({
4780
+ abi: filter.abi,
4781
+ data: log.data,
4782
+ topics: log.topics
4783
+ }) : { eventName: void 0, args: void 0 };
4784
+ return formatLog(log, { args, eventName });
4785
+ } catch (e2) {
4786
+ return;
4787
+ }
4788
+ }).filter(Boolean);
4714
4789
  }
4715
4790
 
4716
4791
  // src/actions/public/getFilterLogs.ts
@@ -4720,13 +4795,17 @@ async function getFilterLogs(client, { filter }) {
4720
4795
  params: [filter.id]
4721
4796
  });
4722
4797
  return logs.map((log) => {
4723
- const { eventName, args } = "abi" in filter && filter.abi ? decodeEventLog({
4724
- abi: filter.abi,
4725
- data: log.data,
4726
- topics: log.topics
4727
- }) : { eventName: void 0, args: void 0 };
4728
- return formatLog(log, { args, eventName });
4729
- });
4798
+ try {
4799
+ const { eventName, args } = "abi" in filter && filter.abi ? decodeEventLog({
4800
+ abi: filter.abi,
4801
+ data: log.data,
4802
+ topics: log.topics
4803
+ }) : { eventName: void 0, args: void 0 };
4804
+ return formatLog(log, { args, eventName });
4805
+ } catch (e3) {
4806
+ return;
4807
+ }
4808
+ }).filter(Boolean);
4730
4809
  }
4731
4810
 
4732
4811
  // src/actions/public/getGasPrice.ts
@@ -4773,13 +4852,17 @@ async function getLogs(client, {
4773
4852
  });
4774
4853
  }
4775
4854
  return logs.map((log) => {
4776
- const { eventName, args: args2 } = event ? decodeEventLog({
4777
- abi: [event],
4778
- data: log.data,
4779
- topics: log.topics
4780
- }) : { eventName: void 0, args: void 0 };
4781
- return formatLog(log, { args: args2, eventName });
4782
- });
4855
+ try {
4856
+ const { eventName, args: args2 } = event ? decodeEventLog({
4857
+ abi: [event],
4858
+ data: log.data,
4859
+ topics: log.topics
4860
+ }) : { eventName: void 0, args: void 0 };
4861
+ return formatLog(log, { args: args2, eventName });
4862
+ } catch (e4) {
4863
+ return;
4864
+ }
4865
+ }).filter(Boolean);
4783
4866
  }
4784
4867
 
4785
4868
  // src/actions/public/getStorageAt.ts
@@ -4827,7 +4910,7 @@ async function getTransaction(client, {
4827
4910
  index
4828
4911
  });
4829
4912
  return format3(transaction, {
4830
- formatter: _optionalChain([client, 'access', _112 => _112.chain, 'optionalAccess', _113 => _113.formatters, 'optionalAccess', _114 => _114.transaction]) || formatTransaction
4913
+ formatter: _optionalChain([client, 'access', _113 => _113.chain, 'optionalAccess', _114 => _114.formatters, 'optionalAccess', _115 => _115.transaction]) || formatTransaction
4831
4914
  });
4832
4915
  }
4833
4916
 
@@ -4837,7 +4920,7 @@ async function getTransactionConfirmations(client, { hash: hash2, transactionRec
4837
4920
  getBlockNumber(client),
4838
4921
  hash2 ? getTransaction(client, { hash: hash2 }) : void 0
4839
4922
  ]);
4840
- const transactionBlockNumber = _optionalChain([transactionReceipt, 'optionalAccess', _115 => _115.blockNumber]) || _optionalChain([transaction, 'optionalAccess', _116 => _116.blockNumber]);
4923
+ const transactionBlockNumber = _optionalChain([transactionReceipt, 'optionalAccess', _116 => _116.blockNumber]) || _optionalChain([transaction, 'optionalAccess', _117 => _117.blockNumber]);
4841
4924
  if (!transactionBlockNumber)
4842
4925
  return 0n;
4843
4926
  return blockNumber - transactionBlockNumber + 1n;
@@ -4861,7 +4944,7 @@ async function getTransactionReceipt(client, { hash: hash2 }) {
4861
4944
  if (!receipt)
4862
4945
  throw new TransactionReceiptNotFoundError({ hash: hash2 });
4863
4946
  return format3(receipt, {
4864
- formatter: _optionalChain([client, 'access', _117 => _117.chain, 'optionalAccess', _118 => _118.formatters, 'optionalAccess', _119 => _119.transactionReceipt]) || formatTransactionReceipt
4947
+ formatter: _optionalChain([client, 'access', _118 => _118.chain, 'optionalAccess', _119 => _119.formatters, 'optionalAccess', _120 => _120.transactionReceipt]) || formatTransactionReceipt
4865
4948
  });
4866
4949
  }
4867
4950
 
@@ -5030,7 +5113,7 @@ function observe(observerId, callbacks, fn) {
5030
5113
  const listeners2 = getListeners();
5031
5114
  if (listeners2.length === 0)
5032
5115
  return;
5033
- listeners2.forEach((listener) => _optionalChain([listener, 'access', _120 => _120.fns, 'access', _121 => _121[key], 'optionalCall', _122 => _122(...args)]));
5116
+ listeners2.forEach((listener) => _optionalChain([listener, 'access', _121 => _121.fns, 'access', _122 => _122[key], 'optionalCall', _123 => _123(...args)]));
5034
5117
  };
5035
5118
  }
5036
5119
  const cleanup = fn(emit);
@@ -5112,7 +5195,7 @@ async function waitForTransactionReceipt(client, {
5112
5195
  reason = "cancelled";
5113
5196
  }
5114
5197
  done(() => {
5115
- _optionalChain([emit, 'access', _123 => _123.onReplaced, 'optionalCall', _124 => _124({
5198
+ _optionalChain([emit, 'access', _124 => _124.onReplaced, 'optionalCall', _125 => _125({
5116
5199
  reason,
5117
5200
  replacedTransaction,
5118
5201
  transaction: replacementTransaction,
@@ -5140,7 +5223,7 @@ function poll(fn, { emitOnBegin, initialWaitTime, interval }) {
5140
5223
  let data;
5141
5224
  if (emitOnBegin)
5142
5225
  data = await fn({ unpoll: unwatch });
5143
- const initialWait = await _asyncNullishCoalesce(await _optionalChain([initialWaitTime, 'optionalCall', _125 => _125(data)]), async () => ( interval));
5226
+ const initialWait = await _asyncNullishCoalesce(await _optionalChain([initialWaitTime, 'optionalCall', _126 => _126(data)]), async () => ( interval));
5144
5227
  await wait(initialWait);
5145
5228
  const poll2 = async () => {
5146
5229
  if (!active)
@@ -5196,7 +5279,7 @@ function watchBlockNumber(client, {
5196
5279
  prevBlockNumber = blockNumber;
5197
5280
  }
5198
5281
  } catch (err) {
5199
- _optionalChain([emit, 'access', _126 => _126.onError, 'optionalCall', _127 => _127(err)]);
5282
+ _optionalChain([emit, 'access', _127 => _127.onError, 'optionalCall', _128 => _128(err)]);
5200
5283
  }
5201
5284
  },
5202
5285
  {
@@ -5216,19 +5299,19 @@ function watchBlockNumber(client, {
5216
5299
  onData(data) {
5217
5300
  if (!active)
5218
5301
  return;
5219
- const blockNumber = hexToBigInt(_optionalChain([data, 'access', _128 => _128.result, 'optionalAccess', _129 => _129.number]));
5302
+ const blockNumber = hexToBigInt(_optionalChain([data, 'access', _129 => _129.result, 'optionalAccess', _130 => _130.number]));
5220
5303
  onBlockNumber(blockNumber, prevBlockNumber);
5221
5304
  prevBlockNumber = blockNumber;
5222
5305
  },
5223
5306
  onError(error) {
5224
- _optionalChain([onError, 'optionalCall', _130 => _130(error)]);
5307
+ _optionalChain([onError, 'optionalCall', _131 => _131(error)]);
5225
5308
  }
5226
5309
  });
5227
5310
  unsubscribe = unsubscribe_;
5228
5311
  if (!active)
5229
5312
  unsubscribe();
5230
5313
  } catch (err) {
5231
- _optionalChain([onError, 'optionalCall', _131 => _131(err)]);
5314
+ _optionalChain([onError, 'optionalCall', _132 => _132(err)]);
5232
5315
  }
5233
5316
  })();
5234
5317
  return unsubscribe;
@@ -5268,11 +5351,11 @@ function watchBlocks(client, {
5268
5351
  blockTag,
5269
5352
  includeTransactions
5270
5353
  });
5271
- if (block.number && _optionalChain([prevBlock, 'optionalAccess', _132 => _132.number])) {
5354
+ if (block.number && _optionalChain([prevBlock, 'optionalAccess', _133 => _133.number])) {
5272
5355
  if (block.number === prevBlock.number)
5273
5356
  return;
5274
5357
  if (block.number - prevBlock.number > 1 && emitMissed) {
5275
- for (let i = _optionalChain([prevBlock, 'optionalAccess', _133 => _133.number]) + 1n; i < block.number; i++) {
5358
+ for (let i = _optionalChain([prevBlock, 'optionalAccess', _134 => _134.number]) + 1n; i < block.number; i++) {
5276
5359
  const block2 = await getBlock(client, {
5277
5360
  blockNumber: i,
5278
5361
  includeTransactions
@@ -5284,8 +5367,8 @@ function watchBlocks(client, {
5284
5367
  }
5285
5368
  if (
5286
5369
  // If no previous block exists, emit.
5287
- !_optionalChain([prevBlock, 'optionalAccess', _134 => _134.number]) || // If the block tag is "pending" with no block number, emit.
5288
- blockTag === "pending" && !_optionalChain([block, 'optionalAccess', _135 => _135.number]) || // If the next block number is greater than the previous block number, emit.
5370
+ !_optionalChain([prevBlock, 'optionalAccess', _135 => _135.number]) || // If the block tag is "pending" with no block number, emit.
5371
+ blockTag === "pending" && !_optionalChain([block, 'optionalAccess', _136 => _136.number]) || // If the next block number is greater than the previous block number, emit.
5289
5372
  // We don't want to emit blocks in the past.
5290
5373
  block.number && block.number > prevBlock.number
5291
5374
  ) {
@@ -5293,7 +5376,7 @@ function watchBlocks(client, {
5293
5376
  prevBlock = block;
5294
5377
  }
5295
5378
  } catch (err) {
5296
- _optionalChain([emit, 'access', _136 => _136.onError, 'optionalCall', _137 => _137(err)]);
5379
+ _optionalChain([emit, 'access', _137 => _137.onError, 'optionalCall', _138 => _138(err)]);
5297
5380
  }
5298
5381
  },
5299
5382
  {
@@ -5318,14 +5401,14 @@ function watchBlocks(client, {
5318
5401
  prevBlock = block;
5319
5402
  },
5320
5403
  onError(error) {
5321
- _optionalChain([onError, 'optionalCall', _138 => _138(error)]);
5404
+ _optionalChain([onError, 'optionalCall', _139 => _139(error)]);
5322
5405
  }
5323
5406
  });
5324
5407
  unsubscribe = unsubscribe_;
5325
5408
  if (!active)
5326
5409
  unsubscribe();
5327
5410
  } catch (err) {
5328
- _optionalChain([onError, 'optionalCall', _139 => _139(err)]);
5411
+ _optionalChain([onError, 'optionalCall', _140 => _140(err)]);
5329
5412
  }
5330
5413
  })();
5331
5414
  return unsubscribe;
@@ -5367,7 +5450,7 @@ function watchContractEvent(client, {
5367
5450
  args,
5368
5451
  eventName
5369
5452
  });
5370
- } catch (e2) {
5453
+ } catch (e5) {
5371
5454
  }
5372
5455
  initialized = true;
5373
5456
  return;
@@ -5401,7 +5484,7 @@ function watchContractEvent(client, {
5401
5484
  else
5402
5485
  logs.forEach((log) => emit.onLogs([log]));
5403
5486
  } catch (err) {
5404
- _optionalChain([emit, 'access', _140 => _140.onError, 'optionalCall', _141 => _141(err)]);
5487
+ _optionalChain([emit, 'access', _141 => _141.onError, 'optionalCall', _142 => _142(err)]);
5405
5488
  }
5406
5489
  },
5407
5490
  {
@@ -5449,7 +5532,7 @@ function watchEvent(client, {
5449
5532
  args,
5450
5533
  event
5451
5534
  });
5452
- } catch (e3) {
5535
+ } catch (e6) {
5453
5536
  }
5454
5537
  initialized = true;
5455
5538
  return;
@@ -5480,7 +5563,7 @@ function watchEvent(client, {
5480
5563
  else
5481
5564
  logs.forEach((log) => emit.onLogs([log]));
5482
5565
  } catch (err) {
5483
- _optionalChain([emit, 'access', _142 => _142.onError, 'optionalCall', _143 => _143(err)]);
5566
+ _optionalChain([emit, 'access', _143 => _143.onError, 'optionalCall', _144 => _144(err)]);
5484
5567
  }
5485
5568
  },
5486
5569
  {
@@ -5534,7 +5617,7 @@ function watchPendingTransactions(client, {
5534
5617
  else
5535
5618
  hashes.forEach((hash2) => emit.onTransactions([hash2]));
5536
5619
  } catch (err) {
5537
- _optionalChain([emit, 'access', _144 => _144.onError, 'optionalCall', _145 => _145(err)]);
5620
+ _optionalChain([emit, 'access', _145 => _145.onError, 'optionalCall', _146 => _146(err)]);
5538
5621
  }
5539
5622
  },
5540
5623
  {
@@ -5563,14 +5646,14 @@ function watchPendingTransactions(client, {
5563
5646
  onTransactions([transaction]);
5564
5647
  },
5565
5648
  onError(error) {
5566
- _optionalChain([onError, 'optionalCall', _146 => _146(error)]);
5649
+ _optionalChain([onError, 'optionalCall', _147 => _147(error)]);
5567
5650
  }
5568
5651
  });
5569
5652
  unsubscribe = unsubscribe_;
5570
5653
  if (!active)
5571
5654
  unsubscribe();
5572
5655
  } catch (err) {
5573
- _optionalChain([onError, 'optionalCall', _147 => _147(err)]);
5656
+ _optionalChain([onError, 'optionalCall', _148 => _148(err)]);
5574
5657
  }
5575
5658
  })();
5576
5659
  return unsubscribe;
@@ -5686,7 +5769,7 @@ async function getEnsAvatar(client, {
5686
5769
  return null;
5687
5770
  try {
5688
5771
  return await parseAvatarRecord(client, { record, gatewayUrls });
5689
- } catch (e4) {
5772
+ } catch (e7) {
5690
5773
  return null;
5691
5774
  }
5692
5775
  }
@@ -6092,7 +6175,7 @@ async function sendTransaction(client, args) {
6092
6175
  try {
6093
6176
  assertRequest(args);
6094
6177
  const chainId = await getChainId(client);
6095
- if (chain !== null && chainId !== _optionalChain([chain, 'optionalAccess', _148 => _148.id])) {
6178
+ if (chain !== null && chainId !== _optionalChain([chain, 'optionalAccess', _149 => _149.id])) {
6096
6179
  if (!chain)
6097
6180
  throw new ChainNotFoundError();
6098
6181
  throw new ChainMismatchError({ chain, currentChainId: chainId });
@@ -6121,7 +6204,7 @@ async function sendTransaction(client, args) {
6121
6204
  params: [signedRequest]
6122
6205
  });
6123
6206
  }
6124
- const formatter = _optionalChain([chain, 'optionalAccess', _149 => _149.formatters, 'optionalAccess', _150 => _150.transactionRequest]);
6207
+ const formatter = _optionalChain([chain, 'optionalAccess', _150 => _150.formatters, 'optionalAccess', _151 => _151.transactionRequest]);
6125
6208
  const request = format3(
6126
6209
  {
6127
6210
  accessList,
@@ -6187,14 +6270,14 @@ async function signTypedData(client, {
6187
6270
  const account = parseAccount(account_);
6188
6271
  const types = {
6189
6272
  EIP712Domain: [
6190
- _optionalChain([domain, 'optionalAccess', _151 => _151.name]) && { name: "name", type: "string" },
6191
- _optionalChain([domain, 'optionalAccess', _152 => _152.version]) && { name: "version", type: "string" },
6192
- _optionalChain([domain, 'optionalAccess', _153 => _153.chainId]) && { name: "chainId", type: "uint256" },
6193
- _optionalChain([domain, 'optionalAccess', _154 => _154.verifyingContract]) && {
6273
+ _optionalChain([domain, 'optionalAccess', _152 => _152.name]) && { name: "name", type: "string" },
6274
+ _optionalChain([domain, 'optionalAccess', _153 => _153.version]) && { name: "version", type: "string" },
6275
+ _optionalChain([domain, 'optionalAccess', _154 => _154.chainId]) && { name: "chainId", type: "uint256" },
6276
+ _optionalChain([domain, 'optionalAccess', _155 => _155.verifyingContract]) && {
6194
6277
  name: "verifyingContract",
6195
6278
  type: "address"
6196
6279
  },
6197
- _optionalChain([domain, 'optionalAccess', _155 => _155.salt]) && { name: "salt", type: "bytes32" }
6280
+ _optionalChain([domain, 'optionalAccess', _156 => _156.salt]) && { name: "salt", type: "bytes32" }
6198
6281
  ].filter(Boolean),
6199
6282
  ...types_
6200
6283
  };
@@ -7221,5 +7304,6 @@ function parseEther(ether, unit = "wei") {
7221
7304
 
7222
7305
 
7223
7306
 
7224
- exports.multicall3Abi = multicall3Abi; exports.BaseError = BaseError; exports.AbiConstructorNotFoundError = AbiConstructorNotFoundError; exports.AbiConstructorParamsNotFoundError = AbiConstructorParamsNotFoundError; exports.AbiDecodingDataSizeInvalidError = AbiDecodingDataSizeInvalidError; exports.AbiDecodingZeroDataError = AbiDecodingZeroDataError; exports.AbiEncodingArrayLengthMismatchError = AbiEncodingArrayLengthMismatchError; exports.AbiEncodingLengthMismatchError = AbiEncodingLengthMismatchError; exports.AbiErrorInputsNotFoundError = AbiErrorInputsNotFoundError; exports.AbiErrorNotFoundError = AbiErrorNotFoundError; exports.AbiErrorSignatureNotFoundError = AbiErrorSignatureNotFoundError; exports.AbiEventSignatureEmptyTopicsError = AbiEventSignatureEmptyTopicsError; exports.AbiEventSignatureNotFoundError = AbiEventSignatureNotFoundError; exports.AbiEventNotFoundError = AbiEventNotFoundError; exports.AbiFunctionNotFoundError = AbiFunctionNotFoundError; exports.AbiFunctionOutputsNotFoundError = AbiFunctionOutputsNotFoundError; exports.AbiFunctionSignatureNotFoundError = AbiFunctionSignatureNotFoundError; exports.DecodeLogTopicsMismatch = DecodeLogTopicsMismatch; exports.InvalidAbiEncodingTypeError = InvalidAbiEncodingTypeError; exports.InvalidAbiDecodingTypeError = InvalidAbiDecodingTypeError; exports.InvalidArrayError = InvalidArrayError; exports.InvalidDefinitionTypeError = InvalidDefinitionTypeError; exports.InvalidAddressError = InvalidAddressError; exports.BlockNotFoundError = BlockNotFoundError; exports.ChainDoesNotSupportContract = ChainDoesNotSupportContract; exports.InvalidChainIdError = InvalidChainIdError; exports.etherUnits = etherUnits; exports.gweiUnits = gweiUnits; exports.weiUnits = weiUnits; exports.InvalidLegacyVError = InvalidLegacyVError; exports.TransactionExecutionError = TransactionExecutionError; exports.TransactionNotFoundError = TransactionNotFoundError; exports.TransactionReceiptNotFoundError = TransactionReceiptNotFoundError; exports.WaitForTransactionReceiptTimeoutError = WaitForTransactionReceiptTimeoutError; exports.CallExecutionError = CallExecutionError; exports.ContractFunctionExecutionError = ContractFunctionExecutionError; exports.ContractFunctionRevertedError = ContractFunctionRevertedError; exports.ContractFunctionZeroDataError = ContractFunctionZeroDataError; exports.RawContractError = RawContractError; exports.SizeExceedsPaddingSizeError = SizeExceedsPaddingSizeError; exports.DataLengthTooLongError = DataLengthTooLongError; exports.DataLengthTooShortError = DataLengthTooShortError; exports.InvalidBytesBooleanError = InvalidBytesBooleanError; exports.InvalidHexBooleanError = InvalidHexBooleanError; exports.InvalidHexValueError = InvalidHexValueError; exports.OffsetOutOfBoundsError = OffsetOutOfBoundsError; exports.EnsAvatarUriResolutionError = EnsAvatarUriResolutionError; exports.EstimateGasExecutionError = EstimateGasExecutionError; exports.FilterTypeNotSupportedError = FilterTypeNotSupportedError; exports.ExecutionRevertedError = ExecutionRevertedError; exports.FeeCapTooHighError = FeeCapTooHighError; exports.FeeCapTooLowError = FeeCapTooLowError; exports.NonceTooHighError = NonceTooHighError; exports.NonceTooLowError = NonceTooLowError; exports.NonceMaxValueError = NonceMaxValueError; exports.InsufficientFundsError = InsufficientFundsError; exports.IntrinsicGasTooHighError = IntrinsicGasTooHighError; exports.IntrinsicGasTooLowError = IntrinsicGasTooLowError; exports.TransactionTypeNotSupportedError = TransactionTypeNotSupportedError; exports.TipAboveFeeCapError = TipAboveFeeCapError; exports.UnknownNodeError = UnknownNodeError; exports.RequestError = RequestError; exports.RpcRequestError = RpcRequestError; exports.ParseRpcError = ParseRpcError; exports.InvalidRequestRpcError = InvalidRequestRpcError; exports.MethodNotFoundRpcError = MethodNotFoundRpcError; exports.InvalidParamsRpcError = InvalidParamsRpcError; exports.InternalRpcError = InternalRpcError; exports.InvalidInputRpcError = InvalidInputRpcError; exports.ResourceNotFoundRpcError = ResourceNotFoundRpcError; exports.ResourceUnavailableRpcError = ResourceUnavailableRpcError; exports.TransactionRejectedRpcError = TransactionRejectedRpcError; exports.MethodNotSupportedRpcError = MethodNotSupportedRpcError; exports.LimitExceededRpcError = LimitExceededRpcError; exports.JsonRpcVersionUnsupportedError = JsonRpcVersionUnsupportedError; exports.UserRejectedRequestError = UserRejectedRequestError; exports.SwitchChainError = SwitchChainError; exports.UnknownRpcError = UnknownRpcError; exports.HttpRequestError = HttpRequestError; exports.WebSocketRequestError = WebSocketRequestError; exports.RpcError = RpcError; exports.TimeoutError = TimeoutError; exports.UrlRequiredError = UrlRequiredError; exports.isHex = isHex; exports.concat = concat; exports.concatBytes = concatBytes; exports.concatHex = concatHex; exports.isBytes = isBytes; exports.pad = pad; exports.padHex = padHex; exports.padBytes = padBytes; exports.trim = trim; exports.size = size; exports.slice = slice; exports.sliceBytes = sliceBytes; exports.sliceHex = sliceHex; exports.boolToHex = boolToHex; exports.bytesToHex = bytesToHex; exports.toHex = toHex; exports.numberToHex = numberToHex; exports.stringToHex = stringToHex; exports.toBytes = toBytes; exports.boolToBytes = boolToBytes; exports.hexToBytes = hexToBytes; exports.numberToBytes = numberToBytes; exports.stringToBytes = stringToBytes; exports.toRlp = toRlp; exports.fromHex = fromHex; exports.hexToBigInt = hexToBigInt; exports.hexToBool = hexToBool; exports.hexToNumber = hexToNumber; exports.hexToString = hexToString; exports.fromBytes = fromBytes; exports.bytesToBigint = bytesToBigint; exports.bytesToBool = bytesToBool; exports.bytesToNumber = bytesToNumber; exports.bytesToString = bytesToString; exports.fromRlp = fromRlp; exports.extractFunctionParts = extractFunctionParts; exports.extractFunctionName = extractFunctionName; exports.extractFunctionParams = extractFunctionParams; exports.extractFunctionType = extractFunctionType; exports.keccak256 = keccak256; exports.getEventSelector = getEventSelector; exports.getFunctionSelector = getFunctionSelector; exports.isHash = isHash; exports.isAddress = isAddress; exports.getAddress = getAddress; exports.getContractAddress = getContractAddress2; exports.getCreateAddress = getCreateAddress; exports.getCreate2Address = getCreate2Address; exports.isAddressEqual = isAddressEqual; exports.encodeAbiParameters = encodeAbiParameters; exports.decodeAbiParameters = decodeAbiParameters; exports.formatAbiItem = formatAbiItem; exports.decodeErrorResult = decodeErrorResult; exports.decodeEventLog = decodeEventLog; exports.decodeFunctionData = decodeFunctionData; exports.getAbiItem = getAbiItem; exports.decodeFunctionResult = decodeFunctionResult; exports.encodeDeployData = encodeDeployData; exports.encodeErrorResult = encodeErrorResult; exports.encodeEventTopics = encodeEventTopics; exports.encodeFunctionData = encodeFunctionData; exports.encodeFunctionResult = encodeFunctionResult; exports.arrayRegex = arrayRegex; exports.bytesRegex = bytesRegex; exports.integerRegex = integerRegex; exports.encodePacked = encodePacked; exports.formatAbiItemWithArgs = formatAbiItemWithArgs; exports.parseAbi = _abitype.parseAbi; exports.parseAbiItem = _abitype.parseAbiItem; exports.parseAbiParameter = _abitype.parseAbiParameter; exports.parseAbiParameters = _abitype.parseAbiParameters; exports.parseAccount = parseAccount; exports.publicKeyToAddress = publicKeyToAddress; exports.wait = wait; exports.isDeterministicError = isDeterministicError; exports.buildRequest = buildRequest; exports.defineChain = defineChain; exports.getChainContractAddress = getChainContractAddress; exports.format = format3; exports.defineFormatter = defineFormatter; exports.transactionType = transactionType; exports.formatTransaction = formatTransaction; exports.defineTransaction = defineTransaction; exports.formatBlock = formatBlock; exports.defineBlock = defineBlock; exports.extract = extract; exports.defineTransactionReceipt = defineTransactionReceipt; exports.formatTransactionRequest = formatTransactionRequest; exports.defineTransactionRequest = defineTransactionRequest; exports.containsNodeError = containsNodeError; exports.getNodeError = getNodeError; exports.getCallError = getCallError; exports.getContractError = getContractError; exports.getEstimateGasError = getEstimateGasError; exports.getTransactionError = getTransactionError; exports.stringify = stringify; exports.getSocket = getSocket; exports.rpc = rpc; exports.hashMessage = hashMessage; exports.validateTypedData = validateTypedData; exports.hashTypedData = hashTypedData; exports.recoverAddress = recoverAddress; exports.recoverMessageAddress = recoverMessageAddress; exports.recoverTypedDataAddress = recoverTypedDataAddress; exports.verifyMessage = verifyMessage; exports.verifyTypedData = verifyTypedData; exports.assertRequest = assertRequest; exports.getSerializedTransactionType = getSerializedTransactionType; exports.getTransactionType = getTransactionType; exports.parseUnits = parseUnits; exports.parseGwei = parseGwei; exports.prepareRequest = prepareRequest; exports.assertTransactionEIP1559 = assertTransactionEIP1559; exports.assertTransactionEIP2930 = assertTransactionEIP2930; exports.assertTransactionLegacy = assertTransactionLegacy; exports.parseTransaction = parseTransaction; exports.serializeTransaction = serializeTransaction; exports.formatUnits = formatUnits; exports.formatEther = formatEther; exports.formatGwei = formatGwei; exports.parseEther = parseEther; exports.labelhash = labelhash; exports.namehash = namehash; exports.call = call; exports.simulateContract = simulateContract; exports.createPendingTransactionFilter = createPendingTransactionFilter; exports.createBlockFilter = createBlockFilter; exports.createEventFilter = createEventFilter; exports.createContractEventFilter = createContractEventFilter; exports.estimateGas = estimateGas; exports.estimateContractGas = estimateContractGas; exports.getBalance = getBalance; exports.getBlock = getBlock; exports.getBlockNumberCache = getBlockNumberCache; exports.getBlockNumber = getBlockNumber; exports.getBlockTransactionCount = getBlockTransactionCount; exports.getBytecode = getBytecode; exports.getChainId = getChainId; exports.getFeeHistory = getFeeHistory; exports.getFilterChanges = getFilterChanges; exports.getFilterLogs = getFilterLogs; exports.getGasPrice = getGasPrice; exports.getLogs = getLogs; exports.getStorageAt = getStorageAt; exports.getTransaction = getTransaction; exports.getTransactionConfirmations = getTransactionConfirmations; exports.getTransactionCount = getTransactionCount; exports.getTransactionReceipt = getTransactionReceipt; exports.readContract = readContract; exports.multicall = multicall; exports.uninstallFilter = uninstallFilter; exports.waitForTransactionReceipt = waitForTransactionReceipt; exports.watchBlockNumber = watchBlockNumber; exports.watchBlocks = watchBlocks; exports.watchContractEvent = watchContractEvent; exports.watchEvent = watchEvent; exports.watchPendingTransactions = watchPendingTransactions; exports.getEnsAddress = getEnsAddress; exports.getEnsText = getEnsText; exports.getEnsAvatar = getEnsAvatar; exports.getEnsName = getEnsName; exports.getEnsResolver = getEnsResolver; exports.dropTransaction = dropTransaction; exports.getAutomine = getAutomine; exports.getTxpoolContent = getTxpoolContent; exports.getTxpoolStatus = getTxpoolStatus; exports.impersonateAccount = impersonateAccount; exports.increaseTime = increaseTime; exports.inspectTxpool = inspectTxpool; exports.mine = mine; exports.removeBlockTimestampInterval = removeBlockTimestampInterval; exports.reset = reset; exports.revert = revert; exports.sendUnsignedTransaction = sendUnsignedTransaction; exports.setAutomine = setAutomine; exports.setBalance = setBalance; exports.setBlockGasLimit = setBlockGasLimit; exports.setBlockTimestampInterval = setBlockTimestampInterval; exports.setCode = setCode; exports.setCoinbase = setCoinbase; exports.setIntervalMining = setIntervalMining; exports.setLoggingEnabled = setLoggingEnabled; exports.setMinGasPrice = setMinGasPrice; exports.setNextBlockBaseFeePerGas = setNextBlockBaseFeePerGas; exports.setNextBlockTimestamp = setNextBlockTimestamp; exports.setNonce = setNonce; exports.setRpcUrl = setRpcUrl; exports.setStorageAt = setStorageAt; exports.snapshot = snapshot; exports.stopImpersonatingAccount = stopImpersonatingAccount; exports.addChain = addChain; exports.deployContract = deployContract; exports.getAddresses = getAddresses; exports.getPermissions = getPermissions; exports.requestAddresses = requestAddresses; exports.requestPermissions = requestPermissions; exports.sendTransaction = sendTransaction; exports.signMessage = signMessage; exports.signTypedData = signTypedData; exports.switchChain = switchChain; exports.watchAsset = watchAsset; exports.writeContract = writeContract; exports.getContract = getContract;
7225
- //# sourceMappingURL=chunk-6PP4CMLN.js.map
7307
+
7308
+ exports.multicall3Abi = multicall3Abi; exports.BaseError = BaseError; exports.AbiConstructorNotFoundError = AbiConstructorNotFoundError; exports.AbiConstructorParamsNotFoundError = AbiConstructorParamsNotFoundError; exports.AbiDecodingDataSizeInvalidError = AbiDecodingDataSizeInvalidError; exports.AbiDecodingZeroDataError = AbiDecodingZeroDataError; exports.AbiEncodingArrayLengthMismatchError = AbiEncodingArrayLengthMismatchError; exports.AbiEncodingLengthMismatchError = AbiEncodingLengthMismatchError; exports.AbiErrorInputsNotFoundError = AbiErrorInputsNotFoundError; exports.AbiErrorNotFoundError = AbiErrorNotFoundError; exports.AbiErrorSignatureNotFoundError = AbiErrorSignatureNotFoundError; exports.AbiEventSignatureEmptyTopicsError = AbiEventSignatureEmptyTopicsError; exports.AbiEventSignatureNotFoundError = AbiEventSignatureNotFoundError; exports.AbiEventNotFoundError = AbiEventNotFoundError; exports.AbiFunctionNotFoundError = AbiFunctionNotFoundError; exports.AbiFunctionOutputsNotFoundError = AbiFunctionOutputsNotFoundError; exports.AbiFunctionSignatureNotFoundError = AbiFunctionSignatureNotFoundError; exports.DecodeLogTopicsMismatch = DecodeLogTopicsMismatch; exports.InvalidAbiEncodingTypeError = InvalidAbiEncodingTypeError; exports.InvalidAbiDecodingTypeError = InvalidAbiDecodingTypeError; exports.InvalidArrayError = InvalidArrayError; exports.InvalidDefinitionTypeError = InvalidDefinitionTypeError; exports.InvalidAddressError = InvalidAddressError; exports.BlockNotFoundError = BlockNotFoundError; exports.ChainDoesNotSupportContract = ChainDoesNotSupportContract; exports.InvalidChainIdError = InvalidChainIdError; exports.etherUnits = etherUnits; exports.gweiUnits = gweiUnits; exports.weiUnits = weiUnits; exports.InvalidLegacyVError = InvalidLegacyVError; exports.TransactionExecutionError = TransactionExecutionError; exports.TransactionNotFoundError = TransactionNotFoundError; exports.TransactionReceiptNotFoundError = TransactionReceiptNotFoundError; exports.WaitForTransactionReceiptTimeoutError = WaitForTransactionReceiptTimeoutError; exports.CallExecutionError = CallExecutionError; exports.ContractFunctionExecutionError = ContractFunctionExecutionError; exports.ContractFunctionRevertedError = ContractFunctionRevertedError; exports.ContractFunctionZeroDataError = ContractFunctionZeroDataError; exports.RawContractError = RawContractError; exports.SizeExceedsPaddingSizeError = SizeExceedsPaddingSizeError; exports.DataLengthTooLongError = DataLengthTooLongError; exports.DataLengthTooShortError = DataLengthTooShortError; exports.InvalidBytesBooleanError = InvalidBytesBooleanError; exports.InvalidHexBooleanError = InvalidHexBooleanError; exports.InvalidHexValueError = InvalidHexValueError; exports.OffsetOutOfBoundsError = OffsetOutOfBoundsError; exports.EnsAvatarUriResolutionError = EnsAvatarUriResolutionError; exports.EstimateGasExecutionError = EstimateGasExecutionError; exports.FilterTypeNotSupportedError = FilterTypeNotSupportedError; exports.ExecutionRevertedError = ExecutionRevertedError; exports.FeeCapTooHighError = FeeCapTooHighError; exports.FeeCapTooLowError = FeeCapTooLowError; exports.NonceTooHighError = NonceTooHighError; exports.NonceTooLowError = NonceTooLowError; exports.NonceMaxValueError = NonceMaxValueError; exports.InsufficientFundsError = InsufficientFundsError; exports.IntrinsicGasTooHighError = IntrinsicGasTooHighError; exports.IntrinsicGasTooLowError = IntrinsicGasTooLowError; exports.TransactionTypeNotSupportedError = TransactionTypeNotSupportedError; exports.TipAboveFeeCapError = TipAboveFeeCapError; exports.UnknownNodeError = UnknownNodeError; exports.RequestError = RequestError; exports.RpcRequestError = RpcRequestError; exports.ParseRpcError = ParseRpcError; exports.InvalidRequestRpcError = InvalidRequestRpcError; exports.MethodNotFoundRpcError = MethodNotFoundRpcError; exports.InvalidParamsRpcError = InvalidParamsRpcError; exports.InternalRpcError = InternalRpcError; exports.InvalidInputRpcError = InvalidInputRpcError; exports.ResourceNotFoundRpcError = ResourceNotFoundRpcError; exports.ResourceUnavailableRpcError = ResourceUnavailableRpcError; exports.TransactionRejectedRpcError = TransactionRejectedRpcError; exports.MethodNotSupportedRpcError = MethodNotSupportedRpcError; exports.LimitExceededRpcError = LimitExceededRpcError; exports.JsonRpcVersionUnsupportedError = JsonRpcVersionUnsupportedError; exports.UserRejectedRequestError = UserRejectedRequestError; exports.SwitchChainError = SwitchChainError; exports.UnknownRpcError = UnknownRpcError; exports.HttpRequestError = HttpRequestError; exports.WebSocketRequestError = WebSocketRequestError; exports.RpcError = RpcError; exports.TimeoutError = TimeoutError; exports.UrlRequiredError = UrlRequiredError; exports.isHex = isHex; exports.concat = concat; exports.concatBytes = concatBytes; exports.concatHex = concatHex; exports.isBytes = isBytes; exports.pad = pad; exports.padHex = padHex; exports.padBytes = padBytes; exports.trim = trim; exports.size = size; exports.slice = slice; exports.sliceBytes = sliceBytes; exports.sliceHex = sliceHex; exports.boolToHex = boolToHex; exports.bytesToHex = bytesToHex; exports.toHex = toHex; exports.numberToHex = numberToHex; exports.stringToHex = stringToHex; exports.toBytes = toBytes; exports.boolToBytes = boolToBytes; exports.hexToBytes = hexToBytes; exports.numberToBytes = numberToBytes; exports.stringToBytes = stringToBytes; exports.toRlp = toRlp; exports.fromHex = fromHex; exports.hexToBigInt = hexToBigInt; exports.hexToBool = hexToBool; exports.hexToNumber = hexToNumber; exports.hexToString = hexToString; exports.fromBytes = fromBytes; exports.bytesToBigint = bytesToBigint; exports.bytesToBool = bytesToBool; exports.bytesToNumber = bytesToNumber; exports.bytesToString = bytesToString; exports.fromRlp = fromRlp; exports.extractFunctionParts = extractFunctionParts; exports.extractFunctionName = extractFunctionName; exports.extractFunctionParams = extractFunctionParams; exports.extractFunctionType = extractFunctionType; exports.keccak256 = keccak256; exports.getEventSelector = getEventSelector; exports.getFunctionSelector = getFunctionSelector; exports.isHash = isHash; exports.isAddress = isAddress; exports.getAddress = getAddress; exports.getContractAddress = getContractAddress2; exports.getCreateAddress = getCreateAddress; exports.getCreate2Address = getCreate2Address; exports.isAddressEqual = isAddressEqual; exports.encodeAbiParameters = encodeAbiParameters; exports.decodeAbiParameters = decodeAbiParameters; exports.formatAbiItem = formatAbiItem; exports.formatAbiParams = formatAbiParams; exports.decodeErrorResult = decodeErrorResult; exports.decodeEventLog = decodeEventLog; exports.decodeFunctionData = decodeFunctionData; exports.getAbiItem = getAbiItem; exports.decodeFunctionResult = decodeFunctionResult; exports.encodeDeployData = encodeDeployData; exports.encodeErrorResult = encodeErrorResult; exports.encodeEventTopics = encodeEventTopics; exports.encodeFunctionData = encodeFunctionData; exports.encodeFunctionResult = encodeFunctionResult; exports.arrayRegex = arrayRegex; exports.bytesRegex = bytesRegex; exports.integerRegex = integerRegex; exports.encodePacked = encodePacked; exports.formatAbiItemWithArgs = formatAbiItemWithArgs; exports.parseAbi = _abitype.parseAbi; exports.parseAbiItem = _abitype.parseAbiItem; exports.parseAbiParameter = _abitype.parseAbiParameter; exports.parseAbiParameters = _abitype.parseAbiParameters; exports.parseAccount = parseAccount; exports.publicKeyToAddress = publicKeyToAddress; exports.wait = wait; exports.isDeterministicError = isDeterministicError; exports.buildRequest = buildRequest; exports.defineChain = defineChain; exports.getChainContractAddress = getChainContractAddress; exports.format = format3; exports.defineFormatter = defineFormatter; exports.transactionType = transactionType; exports.formatTransaction = formatTransaction; exports.defineTransaction = defineTransaction; exports.formatBlock = formatBlock; exports.defineBlock = defineBlock; exports.extract = extract; exports.defineTransactionReceipt = defineTransactionReceipt; exports.formatTransactionRequest = formatTransactionRequest; exports.defineTransactionRequest = defineTransactionRequest; exports.containsNodeError = containsNodeError; exports.getNodeError = getNodeError; exports.getCallError = getCallError; exports.getContractError = getContractError; exports.getEstimateGasError = getEstimateGasError; exports.getTransactionError = getTransactionError; exports.stringify = stringify; exports.getSocket = getSocket; exports.rpc = rpc; exports.hashMessage = hashMessage; exports.validateTypedData = validateTypedData; exports.hashTypedData = hashTypedData; exports.recoverAddress = recoverAddress; exports.recoverMessageAddress = recoverMessageAddress; exports.recoverTypedDataAddress = recoverTypedDataAddress; exports.verifyMessage = verifyMessage; exports.verifyTypedData = verifyTypedData; exports.assertRequest = assertRequest; exports.getSerializedTransactionType = getSerializedTransactionType; exports.getTransactionType = getTransactionType; exports.parseUnits = parseUnits; exports.parseGwei = parseGwei; exports.prepareRequest = prepareRequest; exports.assertTransactionEIP1559 = assertTransactionEIP1559; exports.assertTransactionEIP2930 = assertTransactionEIP2930; exports.assertTransactionLegacy = assertTransactionLegacy; exports.parseTransaction = parseTransaction; exports.serializeTransaction = serializeTransaction; exports.formatUnits = formatUnits; exports.formatEther = formatEther; exports.formatGwei = formatGwei; exports.parseEther = parseEther; exports.labelhash = labelhash; exports.namehash = namehash; exports.call = call; exports.simulateContract = simulateContract; exports.createPendingTransactionFilter = createPendingTransactionFilter; exports.createBlockFilter = createBlockFilter; exports.createEventFilter = createEventFilter; exports.createContractEventFilter = createContractEventFilter; exports.estimateGas = estimateGas; exports.estimateContractGas = estimateContractGas; exports.getBalance = getBalance; exports.getBlock = getBlock; exports.getBlockNumberCache = getBlockNumberCache; exports.getBlockNumber = getBlockNumber; exports.getBlockTransactionCount = getBlockTransactionCount; exports.getBytecode = getBytecode; exports.getChainId = getChainId; exports.getFeeHistory = getFeeHistory; exports.getFilterChanges = getFilterChanges; exports.getFilterLogs = getFilterLogs; exports.getGasPrice = getGasPrice; exports.getLogs = getLogs; exports.getStorageAt = getStorageAt; exports.getTransaction = getTransaction; exports.getTransactionConfirmations = getTransactionConfirmations; exports.getTransactionCount = getTransactionCount; exports.getTransactionReceipt = getTransactionReceipt; exports.readContract = readContract; exports.multicall = multicall; exports.uninstallFilter = uninstallFilter; exports.waitForTransactionReceipt = waitForTransactionReceipt; exports.watchBlockNumber = watchBlockNumber; exports.watchBlocks = watchBlocks; exports.watchContractEvent = watchContractEvent; exports.watchEvent = watchEvent; exports.watchPendingTransactions = watchPendingTransactions; exports.getEnsAddress = getEnsAddress; exports.getEnsText = getEnsText; exports.getEnsAvatar = getEnsAvatar; exports.getEnsName = getEnsName; exports.getEnsResolver = getEnsResolver; exports.dropTransaction = dropTransaction; exports.getAutomine = getAutomine; exports.getTxpoolContent = getTxpoolContent; exports.getTxpoolStatus = getTxpoolStatus; exports.impersonateAccount = impersonateAccount; exports.increaseTime = increaseTime; exports.inspectTxpool = inspectTxpool; exports.mine = mine; exports.removeBlockTimestampInterval = removeBlockTimestampInterval; exports.reset = reset; exports.revert = revert; exports.sendUnsignedTransaction = sendUnsignedTransaction; exports.setAutomine = setAutomine; exports.setBalance = setBalance; exports.setBlockGasLimit = setBlockGasLimit; exports.setBlockTimestampInterval = setBlockTimestampInterval; exports.setCode = setCode; exports.setCoinbase = setCoinbase; exports.setIntervalMining = setIntervalMining; exports.setLoggingEnabled = setLoggingEnabled; exports.setMinGasPrice = setMinGasPrice; exports.setNextBlockBaseFeePerGas = setNextBlockBaseFeePerGas; exports.setNextBlockTimestamp = setNextBlockTimestamp; exports.setNonce = setNonce; exports.setRpcUrl = setRpcUrl; exports.setStorageAt = setStorageAt; exports.snapshot = snapshot; exports.stopImpersonatingAccount = stopImpersonatingAccount; exports.addChain = addChain; exports.deployContract = deployContract; exports.getAddresses = getAddresses; exports.getPermissions = getPermissions; exports.requestAddresses = requestAddresses; exports.requestPermissions = requestPermissions; exports.sendTransaction = sendTransaction; exports.signMessage = signMessage; exports.signTypedData = signTypedData; exports.switchChain = switchChain; exports.watchAsset = watchAsset; exports.writeContract = writeContract; exports.getContract = getContract;
7309
+ //# sourceMappingURL=chunk-BKEDQ7BF.js.map