@latticexyz/world-module-erc20 2.2.21-581228bd857077023efdb496a9a44fa62ff89936 → 2.2.21-5a67f40bed3b05afd388f96a7b1bfee8b52c29ef

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 (80) hide show
  1. package/dist/{ccip-VJWDNI4X.js → ccip-VIBPEQNI.js} +3 -3
  2. package/dist/{chunk-2VXHCW2O.js → chunk-M5FHJZR5.js} +37 -30
  3. package/dist/chunk-M5FHJZR5.js.map +1 -0
  4. package/dist/{chunk-LIWKL347.js → chunk-XE443CMG.js} +305 -249
  5. package/dist/chunk-XE443CMG.js.map +1 -0
  6. package/dist/internal.js +2 -2
  7. package/dist/{secp256k1-XVT662DN.js → secp256k1-QT34R5PW.js} +507 -428
  8. package/dist/secp256k1-QT34R5PW.js.map +1 -0
  9. package/out/AccessManagementSystem.sol/AccessManagementSystem.json +1 -1
  10. package/out/BalanceTransferSystem.sol/BalanceTransferSystem.json +1 -1
  11. package/out/BatchCallSystem.sol/BatchCallSystem.json +1 -1
  12. package/out/Constants.sol/ERC20TableNames.json +1 -1
  13. package/out/Constants.sol/ModuleConstants.json +1 -1
  14. package/out/Constants.sol/PausableTableNames.json +1 -1
  15. package/out/ERC20BaseTest.t.sol/ERC20BehaviorTest.abi.json +324 -0
  16. package/out/ERC20BaseTest.t.sol/ERC20BehaviorTest.abi.json.d.ts +324 -0
  17. package/out/ERC20BaseTest.t.sol/ERC20BehaviorTest.json +1 -1
  18. package/out/ERC20BaseTest.t.sol/ERC20Test.abi.json +324 -0
  19. package/out/ERC20BaseTest.t.sol/ERC20Test.abi.json.d.ts +324 -0
  20. package/out/ERC20BaseTest.t.sol/ERC20Test.json +1 -1
  21. package/out/ERC20BaseTest.t.sol/MockERC20Base.abi.json +21 -280
  22. package/out/ERC20BaseTest.t.sol/MockERC20Base.abi.json.d.ts +21 -280
  23. package/out/ERC20BaseTest.t.sol/MockERC20Base.json +1 -1
  24. package/out/ERC20Burnable.sol/ERC20Burnable.abi.json +8 -317
  25. package/out/ERC20Burnable.sol/ERC20Burnable.abi.json.d.ts +8 -317
  26. package/out/ERC20Burnable.sol/ERC20Burnable.json +1 -1
  27. package/out/ERC20Burnable.t.sol/ERC20BurnableTest.abi.json +324 -0
  28. package/out/ERC20Burnable.t.sol/ERC20BurnableTest.abi.json.d.ts +324 -0
  29. package/out/ERC20Burnable.t.sol/ERC20BurnableTest.json +1 -1
  30. package/out/ERC20Burnable.t.sol/MockERC20Burnable.abi.json +25 -279
  31. package/out/ERC20Burnable.t.sol/MockERC20Burnable.abi.json.d.ts +25 -279
  32. package/out/ERC20Burnable.t.sol/MockERC20Burnable.json +1 -1
  33. package/out/ERC20Module.sol/ERC20Module.json +1 -1
  34. package/out/ERC20Module.sol/ERC20ModuleLib.json +1 -0
  35. package/out/ERC20Module.t.sol/ERC20ModuleTest.json +1 -1
  36. package/out/ERC20Module.t.sol/TestConstants.json +1 -1
  37. package/out/ERC20Pausable.sol/ERC20Pausable.abi.json +8 -317
  38. package/out/ERC20Pausable.sol/ERC20Pausable.abi.json.d.ts +8 -317
  39. package/out/ERC20Pausable.sol/ERC20Pausable.json +1 -1
  40. package/out/ERC20Pausable.t.sol/{ERC20PausableBehaviorTest.abi.json → ERC20PausableTest.abi.json} +324 -0
  41. package/out/ERC20Pausable.t.sol/{ERC20PausableBehaviorTest.abi.json.d.ts → ERC20PausableTest.abi.json.d.ts} +324 -0
  42. package/out/ERC20Pausable.t.sol/ERC20PausableTest.json +1 -0
  43. package/out/ERC20Pausable.t.sol/MockERC20Pausable.abi.json +25 -279
  44. package/out/ERC20Pausable.t.sol/MockERC20Pausable.abi.json.d.ts +25 -279
  45. package/out/ERC20Pausable.t.sol/MockERC20Pausable.json +1 -1
  46. package/out/ERC20PausableBurnable.sol/ERC20PausableBurnable.abi.json +50 -284
  47. package/out/ERC20PausableBurnable.sol/ERC20PausableBurnable.abi.json.d.ts +50 -284
  48. package/out/ERC20PausableBurnable.sol/ERC20PausableBurnable.json +1 -1
  49. package/out/InitModule.sol/InitModule.json +1 -1
  50. package/out/MUDERC20.sol/MUDERC20.abi.json +8 -317
  51. package/out/MUDERC20.sol/MUDERC20.abi.json.d.ts +8 -317
  52. package/out/MUDERC20.sol/MUDERC20.json +1 -1
  53. package/out/Pausable.sol/Pausable.abi.json +8 -369
  54. package/out/Pausable.sol/Pausable.abi.json.d.ts +8 -369
  55. package/out/Pausable.sol/Pausable.json +1 -1
  56. package/out/RegistrationSystem.sol/RegistrationSystem.json +1 -1
  57. package/out/World.sol/World.json +1 -1
  58. package/out/WorldConsumer.sol/WorldConsumer.abi.json +8 -45
  59. package/out/WorldConsumer.sol/WorldConsumer.abi.json.d.ts +8 -45
  60. package/out/WorldConsumer.sol/WorldConsumer.json +1 -1
  61. package/out/build-info/{575e1001b22e51590748b4ce55e7c596.json → 5dec426f2d87057b9b49f18296a28057.json} +1 -1
  62. package/package.json +8 -8
  63. package/src/examples/ERC20PausableBurnable.sol +21 -8
  64. package/src/experimental/Constants.sol +0 -4
  65. package/src/experimental/ERC20Module.sol +46 -9
  66. package/src/experimental/ERC20Pausable.sol +3 -0
  67. package/src/experimental/MUDERC20.sol +24 -29
  68. package/src/experimental/Pausable.sol +15 -15
  69. package/dist/chunk-2VXHCW2O.js.map +0 -1
  70. package/dist/chunk-LIWKL347.js.map +0 -1
  71. package/dist/secp256k1-XVT662DN.js.map +0 -1
  72. package/out/Constants.sol/OwnableTableNames.abi.json +0 -1
  73. package/out/Constants.sol/OwnableTableNames.json +0 -1
  74. package/out/ERC20BaseTest.t.sol/TestConstants.abi.json +0 -1
  75. package/out/ERC20BaseTest.t.sol/TestConstants.json +0 -1
  76. package/out/ERC20Module.sol/ERC20RegistryLib.json +0 -1
  77. package/out/ERC20Pausable.t.sol/ERC20PausableBehaviorTest.json +0 -1
  78. /package/dist/{ccip-VJWDNI4X.js.map → ccip-VIBPEQNI.js.map} +0 -0
  79. /package/out/ERC20Module.sol/{ERC20RegistryLib.abi.json → ERC20ModuleLib.abi.json} +0 -0
  80. /package/out/ERC20Module.sol/{ERC20RegistryLib.abi.json.d.ts → ERC20ModuleLib.abi.json.d.ts} +0 -0
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  Hash,
3
+ abytes,
4
+ aexists,
5
+ anumber,
6
+ aoutput,
3
7
  byteSwap32,
4
- bytes,
5
- exists,
6
8
  isLE,
7
- number,
8
- output,
9
9
  toBytes,
10
10
  u32,
11
11
  wrapConstructor,
12
12
  wrapXOFConstructorWithOpts
13
- } from "./chunk-2VXHCW2O.js";
13
+ } from "./chunk-M5FHJZR5.js";
14
14
 
15
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/version.js
16
- var version = "1.0.6";
15
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/version.js
16
+ var version = "1.0.8";
17
17
 
18
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/errors.js
18
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/errors.js
19
19
  var BaseError = class _BaseError extends Error {
20
20
  constructor(shortMessage, args = {}) {
21
21
  const details = args.cause instanceof _BaseError ? args.cause.details : args.cause?.message ? args.cause.message : args.details;
@@ -68,7 +68,7 @@ var BaseError = class _BaseError extends Error {
68
68
  }
69
69
  };
70
70
 
71
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/regex.js
71
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/regex.js
72
72
  function execTyped(regex, string) {
73
73
  const match = regex.exec(string);
74
74
  return match?.groups;
@@ -77,7 +77,7 @@ var bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;
77
77
  var integerRegex = /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
78
78
  var isTupleRegex = /^\(.+?\).*?$/;
79
79
 
80
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js
80
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js
81
81
  var tupleRegex = /^tuple(?<array>(\[(\d*)\])*)$/;
82
82
  function formatAbiParameter(abiParameter) {
83
83
  let type = abiParameter.type;
@@ -104,7 +104,7 @@ function formatAbiParameter(abiParameter) {
104
104
  return type;
105
105
  }
106
106
 
107
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js
107
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js
108
108
  function formatAbiParameters(abiParameters) {
109
109
  let params = "";
110
110
  const length = abiParameters.length;
@@ -117,10 +117,10 @@ function formatAbiParameters(abiParameters) {
117
117
  return params;
118
118
  }
119
119
 
120
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js
120
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js
121
121
  function formatAbiItem(abiItem) {
122
122
  if (abiItem.type === "function")
123
- return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== "nonpayable" ? ` ${abiItem.stateMutability}` : ""}${abiItem.outputs.length ? ` returns (${formatAbiParameters(abiItem.outputs)})` : ""}`;
123
+ return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== "nonpayable" ? ` ${abiItem.stateMutability}` : ""}${abiItem.outputs?.length ? ` returns (${formatAbiParameters(abiItem.outputs)})` : ""}`;
124
124
  if (abiItem.type === "event")
125
125
  return `event ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;
126
126
  if (abiItem.type === "error")
@@ -128,11 +128,11 @@ function formatAbiItem(abiItem) {
128
128
  if (abiItem.type === "constructor")
129
129
  return `constructor(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability === "payable" ? " payable" : ""}`;
130
130
  if (abiItem.type === "fallback")
131
- return "fallback()";
131
+ return `fallback() external${abiItem.stateMutability === "payable" ? " payable" : ""}`;
132
132
  return "receive() external payable";
133
133
  }
134
134
 
135
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js
135
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js
136
136
  var errorSignatureRegex = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
137
137
  function isErrorSignature(signature) {
138
138
  return errorSignatureRegex.test(signature);
@@ -172,6 +172,9 @@ var fallbackSignatureRegex = /^fallback\(\) external(?:\s(?<stateMutability>paya
172
172
  function isFallbackSignature(signature) {
173
173
  return fallbackSignatureRegex.test(signature);
174
174
  }
175
+ function execFallbackSignature(signature) {
176
+ return execTyped(fallbackSignatureRegex, signature);
177
+ }
175
178
  var receiveSignatureRegex = /^receive\(\) external payable$/;
176
179
  function isReceiveSignature(signature) {
177
180
  return receiveSignatureRegex.test(signature);
@@ -183,7 +186,7 @@ var functionModifiers = /* @__PURE__ */ new Set([
183
186
  "storage"
184
187
  ]);
185
188
 
186
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js
189
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js
187
190
  var UnknownTypeError = class extends BaseError {
188
191
  constructor({ type }) {
189
192
  super("Unknown type.", {
@@ -213,7 +216,7 @@ var UnknownSolidityTypeError = class extends BaseError {
213
216
  }
214
217
  };
215
218
 
216
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js
219
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js
217
220
  var InvalidParameterError = class extends BaseError {
218
221
  constructor({ param }) {
219
222
  super("Invalid ABI parameter.", {
@@ -291,7 +294,7 @@ var InvalidAbiTypeParameterError = class extends BaseError {
291
294
  }
292
295
  };
293
296
 
294
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/errors/signature.js
297
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/errors/signature.js
295
298
  var InvalidSignatureError = class extends BaseError {
296
299
  constructor({ signature, type }) {
297
300
  super(`Invalid ${type} signature.`, {
@@ -333,7 +336,7 @@ var InvalidStructSignatureError = class extends BaseError {
333
336
  }
334
337
  };
335
338
 
336
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/errors/struct.js
339
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/errors/struct.js
337
340
  var CircularReferenceError = class extends BaseError {
338
341
  constructor({ type }) {
339
342
  super("Circular reference detected.", {
@@ -348,7 +351,7 @@ var CircularReferenceError = class extends BaseError {
348
351
  }
349
352
  };
350
353
 
351
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js
354
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js
352
355
  var InvalidParenthesisError = class extends BaseError {
353
356
  constructor({ current, depth }) {
354
357
  super("Unbalanced parentheses.", {
@@ -366,10 +369,21 @@ var InvalidParenthesisError = class extends BaseError {
366
369
  }
367
370
  };
368
371
 
369
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/runtime/cache.js
370
- function getParameterCacheKey(param, type) {
372
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/runtime/cache.js
373
+ function getParameterCacheKey(param, type, structs) {
374
+ let structKey = "";
375
+ if (structs)
376
+ for (const struct of Object.entries(structs)) {
377
+ if (!struct)
378
+ continue;
379
+ let propertyKey = "";
380
+ for (const property of struct[1]) {
381
+ propertyKey += `[${property.type}${property.name ? `:${property.name}` : ""}]`;
382
+ }
383
+ structKey += `(${struct[0]}{${propertyKey}})`;
384
+ }
371
385
  if (type)
372
- return `${type}:${param}`;
386
+ return `${type}:${param}${structKey}`;
373
387
  return param;
374
388
  }
375
389
  var parameterCache = /* @__PURE__ */ new Map([
@@ -427,88 +441,18 @@ var parameterCache = /* @__PURE__ */ new Map([
427
441
  ]
428
442
  ]);
429
443
 
430
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/runtime/utils.js
444
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/runtime/utils.js
431
445
  function parseSignature(signature, structs = {}) {
432
- if (isFunctionSignature(signature)) {
433
- const match = execFunctionSignature(signature);
434
- if (!match)
435
- throw new InvalidSignatureError({ signature, type: "function" });
436
- const inputParams = splitParameters(match.parameters);
437
- const inputs = [];
438
- const inputLength = inputParams.length;
439
- for (let i = 0; i < inputLength; i++) {
440
- inputs.push(parseAbiParameter(inputParams[i], {
441
- modifiers: functionModifiers,
442
- structs,
443
- type: "function"
444
- }));
445
- }
446
- const outputs = [];
447
- if (match.returns) {
448
- const outputParams = splitParameters(match.returns);
449
- const outputLength = outputParams.length;
450
- for (let i = 0; i < outputLength; i++) {
451
- outputs.push(parseAbiParameter(outputParams[i], {
452
- modifiers: functionModifiers,
453
- structs,
454
- type: "function"
455
- }));
456
- }
457
- }
458
- return {
459
- name: match.name,
460
- type: "function",
461
- stateMutability: match.stateMutability ?? "nonpayable",
462
- inputs,
463
- outputs
464
- };
465
- }
466
- if (isEventSignature(signature)) {
467
- const match = execEventSignature(signature);
468
- if (!match)
469
- throw new InvalidSignatureError({ signature, type: "event" });
470
- const params = splitParameters(match.parameters);
471
- const abiParameters = [];
472
- const length = params.length;
473
- for (let i = 0; i < length; i++) {
474
- abiParameters.push(parseAbiParameter(params[i], {
475
- modifiers: eventModifiers,
476
- structs,
477
- type: "event"
478
- }));
479
- }
480
- return { name: match.name, type: "event", inputs: abiParameters };
481
- }
482
- if (isErrorSignature(signature)) {
483
- const match = execErrorSignature(signature);
484
- if (!match)
485
- throw new InvalidSignatureError({ signature, type: "error" });
486
- const params = splitParameters(match.parameters);
487
- const abiParameters = [];
488
- const length = params.length;
489
- for (let i = 0; i < length; i++) {
490
- abiParameters.push(parseAbiParameter(params[i], { structs, type: "error" }));
491
- }
492
- return { name: match.name, type: "error", inputs: abiParameters };
493
- }
494
- if (isConstructorSignature(signature)) {
495
- const match = execConstructorSignature(signature);
496
- if (!match)
497
- throw new InvalidSignatureError({ signature, type: "constructor" });
498
- const params = splitParameters(match.parameters);
499
- const abiParameters = [];
500
- const length = params.length;
501
- for (let i = 0; i < length; i++) {
502
- abiParameters.push(parseAbiParameter(params[i], { structs, type: "constructor" }));
503
- }
504
- return {
505
- type: "constructor",
506
- stateMutability: match.stateMutability ?? "nonpayable",
507
- inputs: abiParameters
508
- };
509
- }
446
+ if (isFunctionSignature(signature))
447
+ return parseFunctionSignature(signature, structs);
448
+ if (isEventSignature(signature))
449
+ return parseEventSignature(signature, structs);
450
+ if (isErrorSignature(signature))
451
+ return parseErrorSignature(signature, structs);
452
+ if (isConstructorSignature(signature))
453
+ return parseConstructorSignature(signature, structs);
510
454
  if (isFallbackSignature(signature))
511
- return { type: "fallback" };
455
+ return parseFallbackSignature(signature);
512
456
  if (isReceiveSignature(signature))
513
457
  return {
514
458
  type: "receive",
@@ -516,11 +460,95 @@ function parseSignature(signature, structs = {}) {
516
460
  };
517
461
  throw new UnknownSignatureError({ signature });
518
462
  }
463
+ function parseFunctionSignature(signature, structs = {}) {
464
+ const match = execFunctionSignature(signature);
465
+ if (!match)
466
+ throw new InvalidSignatureError({ signature, type: "function" });
467
+ const inputParams = splitParameters(match.parameters);
468
+ const inputs = [];
469
+ const inputLength = inputParams.length;
470
+ for (let i = 0; i < inputLength; i++) {
471
+ inputs.push(parseAbiParameter(inputParams[i], {
472
+ modifiers: functionModifiers,
473
+ structs,
474
+ type: "function"
475
+ }));
476
+ }
477
+ const outputs = [];
478
+ if (match.returns) {
479
+ const outputParams = splitParameters(match.returns);
480
+ const outputLength = outputParams.length;
481
+ for (let i = 0; i < outputLength; i++) {
482
+ outputs.push(parseAbiParameter(outputParams[i], {
483
+ modifiers: functionModifiers,
484
+ structs,
485
+ type: "function"
486
+ }));
487
+ }
488
+ }
489
+ return {
490
+ name: match.name,
491
+ type: "function",
492
+ stateMutability: match.stateMutability ?? "nonpayable",
493
+ inputs,
494
+ outputs
495
+ };
496
+ }
497
+ function parseEventSignature(signature, structs = {}) {
498
+ const match = execEventSignature(signature);
499
+ if (!match)
500
+ throw new InvalidSignatureError({ signature, type: "event" });
501
+ const params = splitParameters(match.parameters);
502
+ const abiParameters = [];
503
+ const length = params.length;
504
+ for (let i = 0; i < length; i++)
505
+ abiParameters.push(parseAbiParameter(params[i], {
506
+ modifiers: eventModifiers,
507
+ structs,
508
+ type: "event"
509
+ }));
510
+ return { name: match.name, type: "event", inputs: abiParameters };
511
+ }
512
+ function parseErrorSignature(signature, structs = {}) {
513
+ const match = execErrorSignature(signature);
514
+ if (!match)
515
+ throw new InvalidSignatureError({ signature, type: "error" });
516
+ const params = splitParameters(match.parameters);
517
+ const abiParameters = [];
518
+ const length = params.length;
519
+ for (let i = 0; i < length; i++)
520
+ abiParameters.push(parseAbiParameter(params[i], { structs, type: "error" }));
521
+ return { name: match.name, type: "error", inputs: abiParameters };
522
+ }
523
+ function parseConstructorSignature(signature, structs = {}) {
524
+ const match = execConstructorSignature(signature);
525
+ if (!match)
526
+ throw new InvalidSignatureError({ signature, type: "constructor" });
527
+ const params = splitParameters(match.parameters);
528
+ const abiParameters = [];
529
+ const length = params.length;
530
+ for (let i = 0; i < length; i++)
531
+ abiParameters.push(parseAbiParameter(params[i], { structs, type: "constructor" }));
532
+ return {
533
+ type: "constructor",
534
+ stateMutability: match.stateMutability ?? "nonpayable",
535
+ inputs: abiParameters
536
+ };
537
+ }
538
+ function parseFallbackSignature(signature) {
539
+ const match = execFallbackSignature(signature);
540
+ if (!match)
541
+ throw new InvalidSignatureError({ signature, type: "fallback" });
542
+ return {
543
+ type: "fallback",
544
+ stateMutability: match.stateMutability ?? "nonpayable"
545
+ };
546
+ }
519
547
  var abiParameterWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;
520
548
  var abiParameterWithTupleRegex = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;
521
549
  var dynamicIntegerRegex = /^u?int$/;
522
550
  function parseAbiParameter(param, options) {
523
- const parameterCacheKey = getParameterCacheKey(param, options?.type);
551
+ const parameterCacheKey = getParameterCacheKey(param, options?.type, options?.structs);
524
552
  if (parameterCache.has(parameterCacheKey))
525
553
  return parameterCache.get(parameterCacheKey);
526
554
  const isTuple = isTupleRegex.test(param);
@@ -610,7 +638,7 @@ function isValidDataLocation(type, isArray) {
610
638
  return isArray || type === "bytes" || type === "string" || type === "tuple";
611
639
  }
612
640
 
613
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/runtime/structs.js
641
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/runtime/structs.js
614
642
  function parseStructs(signatures) {
615
643
  const shallowStructs = {};
616
644
  const signaturesLength = signatures.length;
@@ -680,7 +708,7 @@ function resolveStructs(abiParameters, structs, ancestors = /* @__PURE__ */ new
680
708
  return components;
681
709
  }
682
710
 
683
- // ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/parseAbi.js
711
+ // ../../node_modules/.pnpm/abitype@1.0.8_typescript@5.4.2_zod@3.23.8/node_modules/abitype/dist/esm/human-readable/parseAbi.js
684
712
  function parseAbi(signatures) {
685
713
  const structs = parseStructs(signatures);
686
714
  const abi = [];
@@ -694,14 +722,14 @@ function parseAbi(signatures) {
694
722
  return abi;
695
723
  }
696
724
 
697
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/accounts/utils/parseAccount.js
725
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/accounts/utils/parseAccount.js
698
726
  function parseAccount(account) {
699
727
  if (typeof account === "string")
700
728
  return { address: account, type: "json-rpc" };
701
729
  return account;
702
730
  }
703
731
 
704
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/constants/abis.js
732
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/constants/abis.js
705
733
  var multicall3Abi = [
706
734
  {
707
735
  inputs: [
@@ -853,20 +881,20 @@ var universalResolverReverseAbi = [
853
881
  }
854
882
  ];
855
883
 
856
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/constants/contract.js
884
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/constants/contract.js
857
885
  var aggregate3Signature = "0x82ad56cb";
858
886
 
859
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/constants/contracts.js
887
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/constants/contracts.js
860
888
  var deploylessCallViaBytecodeBytecode = "0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe";
861
889
  var deploylessCallViaFactoryBytecode = "0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe";
862
890
 
863
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/version.js
864
- var version2 = "2.21.19";
891
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/version.js
892
+ var version2 = "2.23.2";
865
893
 
866
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/base.js
894
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/base.js
867
895
  var errorConfig = {
868
896
  getDocsUrl: ({ docsBaseUrl, docsPath: docsPath4 = "", docsSlug }) => docsPath4 ? `${docsBaseUrl ?? "https://viem.sh"}${docsPath4}${docsSlug ? `#${docsSlug}` : ""}` : void 0,
869
- version: version2
897
+ version: `viem@${version2}`
870
898
  };
871
899
  var BaseError2 = class _BaseError extends Error {
872
900
  constructor(shortMessage, args = {}) {
@@ -942,12 +970,12 @@ var BaseError2 = class _BaseError extends Error {
942
970
  function walk(err, fn) {
943
971
  if (fn?.(err))
944
972
  return err;
945
- if (err && typeof err === "object" && "cause" in err)
973
+ if (err && typeof err === "object" && "cause" in err && err.cause !== void 0)
946
974
  return walk(err.cause, fn);
947
975
  return fn ? null : err;
948
976
  }
949
977
 
950
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/chain.js
978
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/chain.js
951
979
  var ChainDoesNotSupportContract = class extends BaseError2 {
952
980
  constructor({ blockNumber, chain, contract }) {
953
981
  super(`Chain "${chain.name}" does not support contract "${contract.name}".`, {
@@ -971,7 +999,7 @@ var ClientChainNotConfiguredError = class extends BaseError2 {
971
999
  }
972
1000
  };
973
1001
 
974
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/constants/solidity.js
1002
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/constants/solidity.js
975
1003
  var solidityError = {
976
1004
  inputs: [
977
1005
  {
@@ -993,7 +1021,7 @@ var solidityPanic = {
993
1021
  type: "error"
994
1022
  };
995
1023
 
996
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/formatAbiItem.js
1024
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/formatAbiItem.js
997
1025
  function formatAbiItem2(abiItem, { includeName = false } = {}) {
998
1026
  if (abiItem.type !== "function" && abiItem.type !== "event" && abiItem.type !== "error")
999
1027
  throw new InvalidDefinitionTypeError(abiItem.type);
@@ -1011,7 +1039,7 @@ function formatAbiParam(param, { includeName }) {
1011
1039
  return param.type + (includeName && param.name ? ` ${param.name}` : "");
1012
1040
  }
1013
1041
 
1014
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/data/isHex.js
1042
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/data/isHex.js
1015
1043
  function isHex(value, { strict = true } = {}) {
1016
1044
  if (!value)
1017
1045
  return false;
@@ -1020,14 +1048,14 @@ function isHex(value, { strict = true } = {}) {
1020
1048
  return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith("0x");
1021
1049
  }
1022
1050
 
1023
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/data/size.js
1051
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/data/size.js
1024
1052
  function size(value) {
1025
1053
  if (isHex(value, { strict: false }))
1026
1054
  return Math.ceil((value.length - 2) / 2);
1027
1055
  return value.length;
1028
1056
  }
1029
1057
 
1030
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/abi.js
1058
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/abi.js
1031
1059
  var AbiConstructorNotFoundError = class extends BaseError2 {
1032
1060
  constructor({ docsPath: docsPath4 }) {
1033
1061
  super([
@@ -1200,7 +1228,7 @@ var InvalidDefinitionTypeError = class extends BaseError2 {
1200
1228
  }
1201
1229
  };
1202
1230
 
1203
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/data.js
1231
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/data.js
1204
1232
  var SliceOffsetOutOfBoundsError = class extends BaseError2 {
1205
1233
  constructor({ offset, position, size: size2 }) {
1206
1234
  super(`Slice ${position === "start" ? "starting" : "ending"} at offset "${offset}" is out-of-bounds (size: ${size2}).`, { name: "SliceOffsetOutOfBoundsError" });
@@ -1217,7 +1245,7 @@ var InvalidBytesLengthError = class extends BaseError2 {
1217
1245
  }
1218
1246
  };
1219
1247
 
1220
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/data/slice.js
1248
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/data/slice.js
1221
1249
  function slice(value, start, end, { strict } = {}) {
1222
1250
  if (isHex(value, { strict: false }))
1223
1251
  return sliceHex(value, start, end, {
@@ -1259,7 +1287,7 @@ function sliceHex(value_, start, end, { strict } = {}) {
1259
1287
  return value;
1260
1288
  }
1261
1289
 
1262
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/data/pad.js
1290
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/data/pad.js
1263
1291
  function pad(hexOrBytes, { dir, size: size2 = 32 } = {}) {
1264
1292
  if (typeof hexOrBytes === "string")
1265
1293
  return padHex(hexOrBytes, { dir, size: size2 });
@@ -1277,32 +1305,32 @@ function padHex(hex_, { dir, size: size2 = 32 } = {}) {
1277
1305
  });
1278
1306
  return `0x${hex[dir === "right" ? "padEnd" : "padStart"](size2 * 2, "0")}`;
1279
1307
  }
1280
- function padBytes(bytes2, { dir, size: size2 = 32 } = {}) {
1308
+ function padBytes(bytes, { dir, size: size2 = 32 } = {}) {
1281
1309
  if (size2 === null)
1282
- return bytes2;
1283
- if (bytes2.length > size2)
1310
+ return bytes;
1311
+ if (bytes.length > size2)
1284
1312
  throw new SizeExceedsPaddingSizeError({
1285
- size: bytes2.length,
1313
+ size: bytes.length,
1286
1314
  targetSize: size2,
1287
1315
  type: "bytes"
1288
1316
  });
1289
1317
  const paddedBytes = new Uint8Array(size2);
1290
1318
  for (let i = 0; i < size2; i++) {
1291
1319
  const padEnd = dir === "right";
1292
- paddedBytes[padEnd ? i : size2 - i - 1] = bytes2[padEnd ? i : bytes2.length - i - 1];
1320
+ paddedBytes[padEnd ? i : size2 - i - 1] = bytes[padEnd ? i : bytes.length - i - 1];
1293
1321
  }
1294
1322
  return paddedBytes;
1295
1323
  }
1296
1324
 
1297
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/encoding.js
1325
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/encoding.js
1298
1326
  var IntegerOutOfRangeError = class extends BaseError2 {
1299
1327
  constructor({ max, min, signed, size: size2, value }) {
1300
1328
  super(`Number "${value}" is not in safe ${size2 ? `${size2 * 8}-bit ${signed ? "signed" : "unsigned"} ` : ""}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: "IntegerOutOfRangeError" });
1301
1329
  }
1302
1330
  };
1303
1331
  var InvalidBytesBooleanError = class extends BaseError2 {
1304
- constructor(bytes2) {
1305
- super(`Bytes value "${bytes2}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
1332
+ constructor(bytes) {
1333
+ super(`Bytes value "${bytes}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
1306
1334
  name: "InvalidBytesBooleanError"
1307
1335
  });
1308
1336
  }
@@ -1313,7 +1341,7 @@ var SizeOverflowError = class extends BaseError2 {
1313
1341
  }
1314
1342
  };
1315
1343
 
1316
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/data/trim.js
1344
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/data/trim.js
1317
1345
  function trim(hexOrBytes, { dir = "left" } = {}) {
1318
1346
  let data = typeof hexOrBytes === "string" ? hexOrBytes.replace("0x", "") : hexOrBytes;
1319
1347
  let sliceLength = 0;
@@ -1332,7 +1360,7 @@ function trim(hexOrBytes, { dir = "left" } = {}) {
1332
1360
  return data;
1333
1361
  }
1334
1362
 
1335
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/encoding/fromHex.js
1363
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/encoding/fromHex.js
1336
1364
  function assertSize(hexOrBytes, { size: size2 }) {
1337
1365
  if (size(hexOrBytes) > size2)
1338
1366
  throw new SizeOverflowError({
@@ -1357,7 +1385,7 @@ function hexToNumber(hex, opts = {}) {
1357
1385
  return Number(hexToBigInt(hex, opts));
1358
1386
  }
1359
1387
 
1360
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/encoding/toHex.js
1388
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/encoding/toHex.js
1361
1389
  var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, "0"));
1362
1390
  function toHex(value, opts = {}) {
1363
1391
  if (typeof value === "number" || typeof value === "bigint")
@@ -1423,7 +1451,7 @@ function stringToHex(value_, opts = {}) {
1423
1451
  return bytesToHex(value, opts);
1424
1452
  }
1425
1453
 
1426
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/encoding/toBytes.js
1454
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/encoding/toBytes.js
1427
1455
  var encoder2 = /* @__PURE__ */ new TextEncoder();
1428
1456
  function toBytes2(value, opts = {}) {
1429
1457
  if (typeof value === "number" || typeof value === "bigint")
@@ -1435,13 +1463,13 @@ function toBytes2(value, opts = {}) {
1435
1463
  return stringToBytes(value, opts);
1436
1464
  }
1437
1465
  function boolToBytes(value, opts = {}) {
1438
- const bytes2 = new Uint8Array(1);
1439
- bytes2[0] = Number(value);
1466
+ const bytes = new Uint8Array(1);
1467
+ bytes[0] = Number(value);
1440
1468
  if (typeof opts.size === "number") {
1441
- assertSize(bytes2, { size: opts.size });
1442
- return pad(bytes2, { size: opts.size });
1469
+ assertSize(bytes, { size: opts.size });
1470
+ return pad(bytes, { size: opts.size });
1443
1471
  }
1444
- return bytes2;
1472
+ return bytes;
1445
1473
  }
1446
1474
  var charCodeMap = {
1447
1475
  zero: 48,
@@ -1470,31 +1498,31 @@ function hexToBytes(hex_, opts = {}) {
1470
1498
  if (hexString.length % 2)
1471
1499
  hexString = `0${hexString}`;
1472
1500
  const length = hexString.length / 2;
1473
- const bytes2 = new Uint8Array(length);
1501
+ const bytes = new Uint8Array(length);
1474
1502
  for (let index = 0, j = 0; index < length; index++) {
1475
1503
  const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j++));
1476
1504
  const nibbleRight = charCodeToBase16(hexString.charCodeAt(j++));
1477
1505
  if (nibbleLeft === void 0 || nibbleRight === void 0) {
1478
1506
  throw new BaseError2(`Invalid byte sequence ("${hexString[j - 2]}${hexString[j - 1]}" in "${hexString}").`);
1479
1507
  }
1480
- bytes2[index] = nibbleLeft * 16 + nibbleRight;
1508
+ bytes[index] = nibbleLeft * 16 + nibbleRight;
1481
1509
  }
1482
- return bytes2;
1510
+ return bytes;
1483
1511
  }
1484
1512
  function numberToBytes(value, opts) {
1485
1513
  const hex = numberToHex(value, opts);
1486
1514
  return hexToBytes(hex);
1487
1515
  }
1488
1516
  function stringToBytes(value, opts = {}) {
1489
- const bytes2 = encoder2.encode(value);
1517
+ const bytes = encoder2.encode(value);
1490
1518
  if (typeof opts.size === "number") {
1491
- assertSize(bytes2, { size: opts.size });
1492
- return pad(bytes2, { dir: "right", size: opts.size });
1519
+ assertSize(bytes, { size: opts.size });
1520
+ return pad(bytes, { dir: "right", size: opts.size });
1493
1521
  }
1494
- return bytes2;
1522
+ return bytes;
1495
1523
  }
1496
1524
 
1497
- // ../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/_u64.js
1525
+ // ../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/_u64.js
1498
1526
  var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
1499
1527
  var _32n = /* @__PURE__ */ BigInt(32);
1500
1528
  function fromBig(n, le = false) {
@@ -1516,7 +1544,7 @@ var rotlSL = (h, l, s) => l << s | h >>> 32 - s;
1516
1544
  var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
1517
1545
  var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
1518
1546
 
1519
- // ../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/esm/sha3.js
1547
+ // ../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/sha3.js
1520
1548
  var SHA3_PI = [];
1521
1549
  var SHA3_ROTL = [];
1522
1550
  var _SHA3_IOTA = [];
@@ -1594,7 +1622,7 @@ var Keccak = class _Keccak extends Hash {
1594
1622
  this.posOut = 0;
1595
1623
  this.finished = false;
1596
1624
  this.destroyed = false;
1597
- number(outputLen);
1625
+ anumber(outputLen);
1598
1626
  if (0 >= this.blockLen || this.blockLen >= 200)
1599
1627
  throw new Error("Sha3 supports only keccak-f1600 function");
1600
1628
  this.state = new Uint8Array(200);
@@ -1610,7 +1638,7 @@ var Keccak = class _Keccak extends Hash {
1610
1638
  this.pos = 0;
1611
1639
  }
1612
1640
  update(data) {
1613
- exists(this);
1641
+ aexists(this);
1614
1642
  const { blockLen, state } = this;
1615
1643
  data = toBytes(data);
1616
1644
  const len = data.length;
@@ -1635,8 +1663,8 @@ var Keccak = class _Keccak extends Hash {
1635
1663
  this.keccak();
1636
1664
  }
1637
1665
  writeInto(out) {
1638
- exists(this, false);
1639
- bytes(out);
1666
+ aexists(this, false);
1667
+ abytes(out);
1640
1668
  this.finish();
1641
1669
  const bufferOut = this.state;
1642
1670
  const { blockLen } = this;
@@ -1655,12 +1683,12 @@ var Keccak = class _Keccak extends Hash {
1655
1683
  throw new Error("XOF is not possible for this instance");
1656
1684
  return this.writeInto(out);
1657
1685
  }
1658
- xof(bytes2) {
1659
- number(bytes2);
1660
- return this.xofInto(new Uint8Array(bytes2));
1686
+ xof(bytes) {
1687
+ anumber(bytes);
1688
+ return this.xofInto(new Uint8Array(bytes));
1661
1689
  }
1662
1690
  digestInto(out) {
1663
- output(out, this);
1691
+ aoutput(out, this);
1664
1692
  if (this.finished)
1665
1693
  throw new Error("digest() was already called");
1666
1694
  this.writeInto(out);
@@ -1702,22 +1730,22 @@ var genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts
1702
1730
  var shake128 = /* @__PURE__ */ genShake(31, 168, 128 / 8);
1703
1731
  var shake256 = /* @__PURE__ */ genShake(31, 136, 256 / 8);
1704
1732
 
1705
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/hash/keccak256.js
1733
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/hash/keccak256.js
1706
1734
  function keccak256(value, to_) {
1707
1735
  const to = to_ || "hex";
1708
- const bytes2 = keccak_256(isHex(value, { strict: false }) ? toBytes2(value) : value);
1736
+ const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes2(value) : value);
1709
1737
  if (to === "bytes")
1710
- return bytes2;
1711
- return toHex(bytes2);
1738
+ return bytes;
1739
+ return toHex(bytes);
1712
1740
  }
1713
1741
 
1714
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/hash/hashSignature.js
1742
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/hash/hashSignature.js
1715
1743
  var hash = (value) => keccak256(toBytes2(value));
1716
1744
  function hashSignature(sig) {
1717
1745
  return hash(sig);
1718
1746
  }
1719
1747
 
1720
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/hash/normalizeSignature.js
1748
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/hash/normalizeSignature.js
1721
1749
  function normalizeSignature(signature) {
1722
1750
  let active = true;
1723
1751
  let current = "";
@@ -1761,7 +1789,7 @@ function normalizeSignature(signature) {
1761
1789
  return result;
1762
1790
  }
1763
1791
 
1764
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/hash/toSignature.js
1792
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/hash/toSignature.js
1765
1793
  var toSignature = (def) => {
1766
1794
  const def_ = (() => {
1767
1795
  if (typeof def === "string")
@@ -1771,15 +1799,15 @@ var toSignature = (def) => {
1771
1799
  return normalizeSignature(def_);
1772
1800
  };
1773
1801
 
1774
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/hash/toSignatureHash.js
1802
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/hash/toSignatureHash.js
1775
1803
  function toSignatureHash(fn) {
1776
1804
  return hashSignature(toSignature(fn));
1777
1805
  }
1778
1806
 
1779
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/hash/toFunctionSelector.js
1807
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/hash/toFunctionSelector.js
1780
1808
  var toFunctionSelector = (fn) => slice(toSignatureHash(fn), 0, 4);
1781
1809
 
1782
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/address.js
1810
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/address.js
1783
1811
  var InvalidAddressError = class extends BaseError2 {
1784
1812
  constructor({ address }) {
1785
1813
  super(`Address "${address}" is invalid.`, {
@@ -1792,7 +1820,7 @@ var InvalidAddressError = class extends BaseError2 {
1792
1820
  }
1793
1821
  };
1794
1822
 
1795
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/lru.js
1823
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/lru.js
1796
1824
  var LruMap = class extends Map {
1797
1825
  constructor(size2) {
1798
1826
  super();
@@ -1823,7 +1851,7 @@ var LruMap = class extends Map {
1823
1851
  }
1824
1852
  };
1825
1853
 
1826
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/address/isAddress.js
1854
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/address/isAddress.js
1827
1855
  var addressRegex = /^0x[a-fA-F0-9]{40}$/;
1828
1856
  var isAddressCache = /* @__PURE__ */ new LruMap(8192);
1829
1857
  function isAddress(address, options) {
@@ -1844,7 +1872,7 @@ function isAddress(address, options) {
1844
1872
  return result;
1845
1873
  }
1846
1874
 
1847
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/address/getAddress.js
1875
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/address/getAddress.js
1848
1876
  var checksumAddressCache = /* @__PURE__ */ new LruMap(8192);
1849
1877
  function checksumAddress(address_, chainId) {
1850
1878
  if (checksumAddressCache.has(`${address_}.${chainId}`))
@@ -1865,7 +1893,7 @@ function checksumAddress(address_, chainId) {
1865
1893
  return result;
1866
1894
  }
1867
1895
 
1868
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/cursor.js
1896
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/cursor.js
1869
1897
  var NegativeOffsetError = class extends BaseError2 {
1870
1898
  constructor({ offset }) {
1871
1899
  super(`Offset \`${offset}\` cannot be negative.`, {
@@ -1884,7 +1912,7 @@ var RecursiveReadLimitExceededError = class extends BaseError2 {
1884
1912
  }
1885
1913
  };
1886
1914
 
1887
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/cursor.js
1915
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/cursor.js
1888
1916
  var staticCursor = {
1889
1917
  bytes: new Uint8Array(),
1890
1918
  dataView: new DataView(new ArrayBuffer(0)),
@@ -1958,10 +1986,10 @@ var staticCursor = {
1958
1986
  this.bytes[this.position] = byte;
1959
1987
  this.position++;
1960
1988
  },
1961
- pushBytes(bytes2) {
1962
- this.assertPosition(this.position + bytes2.length - 1);
1963
- this.bytes.set(bytes2, this.position);
1964
- this.position += bytes2.length;
1989
+ pushBytes(bytes) {
1990
+ this.assertPosition(this.position + bytes.length - 1);
1991
+ this.bytes.set(bytes, this.position);
1992
+ this.position += bytes.length;
1965
1993
  },
1966
1994
  pushUint8(value) {
1967
1995
  this.assertPosition(this.position);
@@ -2044,48 +2072,48 @@ var staticCursor = {
2044
2072
  this.recursiveReadCount++;
2045
2073
  }
2046
2074
  };
2047
- function createCursor(bytes2, { recursiveReadLimit = 8192 } = {}) {
2075
+ function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {
2048
2076
  const cursor = Object.create(staticCursor);
2049
- cursor.bytes = bytes2;
2050
- cursor.dataView = new DataView(bytes2.buffer, bytes2.byteOffset, bytes2.byteLength);
2077
+ cursor.bytes = bytes;
2078
+ cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
2051
2079
  cursor.positionReadCount = /* @__PURE__ */ new Map();
2052
2080
  cursor.recursiveReadLimit = recursiveReadLimit;
2053
2081
  return cursor;
2054
2082
  }
2055
2083
 
2056
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/encoding/fromBytes.js
2057
- function bytesToBigInt(bytes2, opts = {}) {
2084
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/encoding/fromBytes.js
2085
+ function bytesToBigInt(bytes, opts = {}) {
2058
2086
  if (typeof opts.size !== "undefined")
2059
- assertSize(bytes2, { size: opts.size });
2060
- const hex = bytesToHex(bytes2, opts);
2087
+ assertSize(bytes, { size: opts.size });
2088
+ const hex = bytesToHex(bytes, opts);
2061
2089
  return hexToBigInt(hex, opts);
2062
2090
  }
2063
2091
  function bytesToBool(bytes_, opts = {}) {
2064
- let bytes2 = bytes_;
2092
+ let bytes = bytes_;
2065
2093
  if (typeof opts.size !== "undefined") {
2066
- assertSize(bytes2, { size: opts.size });
2067
- bytes2 = trim(bytes2);
2094
+ assertSize(bytes, { size: opts.size });
2095
+ bytes = trim(bytes);
2068
2096
  }
2069
- if (bytes2.length > 1 || bytes2[0] > 1)
2070
- throw new InvalidBytesBooleanError(bytes2);
2071
- return Boolean(bytes2[0]);
2097
+ if (bytes.length > 1 || bytes[0] > 1)
2098
+ throw new InvalidBytesBooleanError(bytes);
2099
+ return Boolean(bytes[0]);
2072
2100
  }
2073
- function bytesToNumber(bytes2, opts = {}) {
2101
+ function bytesToNumber(bytes, opts = {}) {
2074
2102
  if (typeof opts.size !== "undefined")
2075
- assertSize(bytes2, { size: opts.size });
2076
- const hex = bytesToHex(bytes2, opts);
2103
+ assertSize(bytes, { size: opts.size });
2104
+ const hex = bytesToHex(bytes, opts);
2077
2105
  return hexToNumber(hex, opts);
2078
2106
  }
2079
2107
  function bytesToString(bytes_, opts = {}) {
2080
- let bytes2 = bytes_;
2108
+ let bytes = bytes_;
2081
2109
  if (typeof opts.size !== "undefined") {
2082
- assertSize(bytes2, { size: opts.size });
2083
- bytes2 = trim(bytes2, { dir: "right" });
2110
+ assertSize(bytes, { size: opts.size });
2111
+ bytes = trim(bytes, { dir: "right" });
2084
2112
  }
2085
- return new TextDecoder().decode(bytes2);
2113
+ return new TextDecoder().decode(bytes);
2086
2114
  }
2087
2115
 
2088
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/data/concat.js
2116
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/data/concat.js
2089
2117
  function concat(values) {
2090
2118
  if (typeof values[0] === "string")
2091
2119
  return concatHex(values);
@@ -2108,7 +2136,10 @@ function concatHex(values) {
2108
2136
  return `0x${values.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
2109
2137
  }
2110
2138
 
2111
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
2139
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/regex.js
2140
+ var integerRegex2 = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
2141
+
2142
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
2112
2143
  function encodeAbiParameters(params, values) {
2113
2144
  if (params.length !== values.length)
2114
2145
  throw new AbiEncodingLengthMismatchError({
@@ -2150,7 +2181,11 @@ function prepareParam({ param, value }) {
2150
2181
  }
2151
2182
  if (param.type.startsWith("uint") || param.type.startsWith("int")) {
2152
2183
  const signed = param.type.startsWith("int");
2153
- return encodeNumber(value, { signed });
2184
+ const [, , size2 = "256"] = integerRegex2.exec(param.type) ?? [];
2185
+ return encodeNumber(value, {
2186
+ signed,
2187
+ size: Number(size2)
2188
+ });
2154
2189
  }
2155
2190
  if (param.type.startsWith("bytes")) {
2156
2191
  return encodeBytes(value, { param });
@@ -2253,7 +2288,19 @@ function encodeBool(value) {
2253
2288
  throw new BaseError2(`Invalid boolean value: "${value}" (type: ${typeof value}). Expected: \`true\` or \`false\`.`);
2254
2289
  return { dynamic: false, encoded: padHex(boolToHex(value)) };
2255
2290
  }
2256
- function encodeNumber(value, { signed }) {
2291
+ function encodeNumber(value, { signed, size: size2 = 256 }) {
2292
+ if (typeof size2 === "number") {
2293
+ const max = 2n ** (BigInt(size2) - (signed ? 1n : 0n)) - 1n;
2294
+ const min = signed ? -max - 1n : 0n;
2295
+ if (value > max || value < min)
2296
+ throw new IntegerOutOfRangeError({
2297
+ max: max.toString(),
2298
+ min: min.toString(),
2299
+ signed,
2300
+ size: size2 / 8,
2301
+ value: value.toString()
2302
+ });
2303
+ }
2257
2304
  return {
2258
2305
  dynamic: false,
2259
2306
  encoded: numberToHex(value, {
@@ -2306,11 +2353,11 @@ function getArrayComponents(type) {
2306
2353
  ) : void 0;
2307
2354
  }
2308
2355
 
2309
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js
2356
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js
2310
2357
  function decodeAbiParameters(params, data) {
2311
- const bytes2 = typeof data === "string" ? hexToBytes(data) : data;
2312
- const cursor = createCursor(bytes2);
2313
- if (size(bytes2) === 0 && params.length > 0)
2358
+ const bytes = typeof data === "string" ? hexToBytes(data) : data;
2359
+ const cursor = createCursor(bytes);
2360
+ if (size(bytes) === 0 && params.length > 0)
2314
2361
  throw new AbiDecodingZeroDataError();
2315
2362
  if (size(data) && size(data) < 32)
2316
2363
  throw new AbiDecodingDataSizeTooSmallError({
@@ -2493,7 +2540,7 @@ function hasDynamicChild(param) {
2493
2540
  return false;
2494
2541
  }
2495
2542
 
2496
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/decodeErrorResult.js
2543
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/decodeErrorResult.js
2497
2544
  function decodeErrorResult(parameters) {
2498
2545
  const { abi, data } = parameters;
2499
2546
  const signature = slice(data, 0, 4);
@@ -2512,16 +2559,16 @@ function decodeErrorResult(parameters) {
2512
2559
  };
2513
2560
  }
2514
2561
 
2515
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/stringify.js
2562
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/stringify.js
2516
2563
  var stringify = (value, replacer, space) => JSON.stringify(value, (key, value_) => {
2517
2564
  const value2 = typeof value_ === "bigint" ? value_.toString() : value_;
2518
2565
  return typeof replacer === "function" ? replacer(key, value2) : value2;
2519
2566
  }, space);
2520
2567
 
2521
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/hash/toEventSelector.js
2568
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/hash/toEventSelector.js
2522
2569
  var toEventSelector = toSignatureHash;
2523
2570
 
2524
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/getAbiItem.js
2571
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/getAbiItem.js
2525
2572
  function getAbiItem(parameters) {
2526
2573
  const { abi, args = [], name } = parameters;
2527
2574
  const isSelector = isHex(name, { strict: false });
@@ -2633,7 +2680,7 @@ function getAmbiguousTypes(sourceParameters, targetParameters, args) {
2633
2680
  return;
2634
2681
  }
2635
2682
 
2636
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/constants/unit.js
2683
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/constants/unit.js
2637
2684
  var etherUnits = {
2638
2685
  gwei: 9,
2639
2686
  wei: 18
@@ -2643,7 +2690,7 @@ var gweiUnits = {
2643
2690
  wei: 9
2644
2691
  };
2645
2692
 
2646
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/unit/formatUnits.js
2693
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/unit/formatUnits.js
2647
2694
  function formatUnits(value, decimals) {
2648
2695
  let display = value.toString();
2649
2696
  const negative = display.startsWith("-");
@@ -2658,17 +2705,17 @@ function formatUnits(value, decimals) {
2658
2705
  return `${negative ? "-" : ""}${integer || "0"}${fraction ? `.${fraction}` : ""}`;
2659
2706
  }
2660
2707
 
2661
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/unit/formatEther.js
2708
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/unit/formatEther.js
2662
2709
  function formatEther(wei, unit = "wei") {
2663
2710
  return formatUnits(wei, etherUnits[unit]);
2664
2711
  }
2665
2712
 
2666
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/unit/formatGwei.js
2713
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/unit/formatGwei.js
2667
2714
  function formatGwei(wei, unit = "wei") {
2668
2715
  return formatUnits(wei, gweiUnits[unit]);
2669
2716
  }
2670
2717
 
2671
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/stateOverride.js
2718
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/stateOverride.js
2672
2719
  var AccountStateConflictError = class extends BaseError2 {
2673
2720
  constructor({ address }) {
2674
2721
  super(`State for account "${address}" is set multiple times.`, {
@@ -2714,7 +2761,7 @@ function prettyStateOverride(stateOverride) {
2714
2761
  }, " State Override:\n").slice(0, -1);
2715
2762
  }
2716
2763
 
2717
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/transaction.js
2764
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/transaction.js
2718
2765
  function prettyPrint(args) {
2719
2766
  const entries = Object.entries(args).map(([key, value]) => {
2720
2767
  if (value === void 0 || value === false)
@@ -2733,10 +2780,10 @@ var FeeConflictError = class extends BaseError2 {
2733
2780
  }
2734
2781
  };
2735
2782
 
2736
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/utils.js
2783
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/utils.js
2737
2784
  var getUrl = (url) => url;
2738
2785
 
2739
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/contract.js
2786
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/contract.js
2740
2787
  var CallExecutionError = class extends BaseError2 {
2741
2788
  constructor(cause, { account: account_, docsPath: docsPath4, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride }) {
2742
2789
  const account = account_ ? parseAccount(account_) : void 0;
@@ -2805,7 +2852,7 @@ var RawContractError = class extends BaseError2 {
2805
2852
  }
2806
2853
  };
2807
2854
 
2808
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js
2855
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js
2809
2856
  var docsPath = "/docs/contract/decodeFunctionResult";
2810
2857
  function decodeFunctionResult(parameters) {
2811
2858
  const { abi, args, functionName, data } = parameters;
@@ -2828,7 +2875,7 @@ function decodeFunctionResult(parameters) {
2828
2875
  return void 0;
2829
2876
  }
2830
2877
 
2831
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/encodeDeployData.js
2878
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/encodeDeployData.js
2832
2879
  var docsPath2 = "/docs/contract/encodeDeployData";
2833
2880
  function encodeDeployData(parameters) {
2834
2881
  const { abi, args, bytecode } = parameters;
@@ -2845,7 +2892,7 @@ function encodeDeployData(parameters) {
2845
2892
  return concatHex([bytecode, data]);
2846
2893
  }
2847
2894
 
2848
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js
2895
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js
2849
2896
  var docsPath3 = "/docs/contract/encodeFunctionData";
2850
2897
  function prepareEncodeFunctionData(parameters) {
2851
2898
  const { abi, args, functionName } = parameters;
@@ -2868,7 +2915,7 @@ function prepareEncodeFunctionData(parameters) {
2868
2915
  };
2869
2916
  }
2870
2917
 
2871
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/encodeFunctionData.js
2918
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/abi/encodeFunctionData.js
2872
2919
  function encodeFunctionData(parameters) {
2873
2920
  const { args } = parameters;
2874
2921
  const { abi, functionName } = (() => {
@@ -2882,7 +2929,7 @@ function encodeFunctionData(parameters) {
2882
2929
  return concatHex([signature, data ?? "0x"]);
2883
2930
  }
2884
2931
 
2885
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/chain/getChainContractAddress.js
2932
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/chain/getChainContractAddress.js
2886
2933
  function getChainContractAddress({ blockNumber, chain, contract: name }) {
2887
2934
  const contract = chain?.contracts?.[name];
2888
2935
  if (!contract)
@@ -2902,7 +2949,7 @@ function getChainContractAddress({ blockNumber, chain, contract: name }) {
2902
2949
  return contract.address;
2903
2950
  }
2904
2951
 
2905
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/node.js
2952
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/node.js
2906
2953
  var ExecutionRevertedError = class extends BaseError2 {
2907
2954
  constructor({ cause, message } = {}) {
2908
2955
  const reason = message?.replace("execution reverted: ", "")?.replace("execution reverted", "");
@@ -3081,7 +3128,7 @@ var UnknownNodeError = class extends BaseError2 {
3081
3128
  }
3082
3129
  };
3083
3130
 
3084
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/request.js
3131
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/request.js
3085
3132
  var HttpRequestError = class extends BaseError2 {
3086
3133
  constructor({ body, cause, details, headers, status, url }) {
3087
3134
  super("HTTP request failed.", {
@@ -3125,7 +3172,7 @@ var HttpRequestError = class extends BaseError2 {
3125
3172
  }
3126
3173
  };
3127
3174
 
3128
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/errors/getNodeError.js
3175
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/errors/getNodeError.js
3129
3176
  function getNodeError(err, args) {
3130
3177
  const message = (err.details || "").toLowerCase();
3131
3178
  const executionRevertedError = err instanceof BaseError2 ? err.walk((e) => e?.code === ExecutionRevertedError.code) : err;
@@ -3174,7 +3221,7 @@ function getNodeError(err, args) {
3174
3221
  });
3175
3222
  }
3176
3223
 
3177
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/errors/getCallError.js
3224
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/errors/getCallError.js
3178
3225
  function getCallError(err, { docsPath: docsPath4, ...args }) {
3179
3226
  const cause = (() => {
3180
3227
  const cause2 = getNodeError(err, args);
@@ -3188,7 +3235,7 @@ function getCallError(err, { docsPath: docsPath4, ...args }) {
3188
3235
  });
3189
3236
  }
3190
3237
 
3191
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/formatters/extract.js
3238
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/formatters/extract.js
3192
3239
  function extract(value_, { format }) {
3193
3240
  if (!format)
3194
3241
  return {};
@@ -3207,7 +3254,7 @@ function extract(value_, { format }) {
3207
3254
  return value;
3208
3255
  }
3209
3256
 
3210
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/formatters/transactionRequest.js
3257
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/formatters/transactionRequest.js
3211
3258
  var rpcTransactionType = {
3212
3259
  legacy: "0x0",
3213
3260
  eip2930: "0x1",
@@ -3265,7 +3312,18 @@ function formatAuthorizationList(authorizationList) {
3265
3312
  }));
3266
3313
  }
3267
3314
 
3268
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/promise/createBatchScheduler.js
3315
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/promise/withResolvers.js
3316
+ function withResolvers() {
3317
+ let resolve = () => void 0;
3318
+ let reject = () => void 0;
3319
+ const promise = new Promise((resolve_, reject_) => {
3320
+ resolve = resolve_;
3321
+ reject = reject_;
3322
+ });
3323
+ return { promise, resolve, reject };
3324
+ }
3325
+
3326
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/promise/createBatchScheduler.js
3269
3327
  var schedulerCache = /* @__PURE__ */ new Map();
3270
3328
  function createBatchScheduler({ fn, id, shouldSplitBatch, wait = 0, sort }) {
3271
3329
  const exec = async () => {
@@ -3278,13 +3336,13 @@ function createBatchScheduler({ fn, id, shouldSplitBatch, wait = 0, sort }) {
3278
3336
  if (sort && Array.isArray(data))
3279
3337
  data.sort(sort);
3280
3338
  for (let i = 0; i < scheduler.length; i++) {
3281
- const { pendingPromise } = scheduler[i];
3282
- pendingPromise.resolve?.([data[i], data]);
3339
+ const { resolve } = scheduler[i];
3340
+ resolve?.([data[i], data]);
3283
3341
  }
3284
3342
  }).catch((err) => {
3285
3343
  for (let i = 0; i < scheduler.length; i++) {
3286
- const { pendingPromise } = scheduler[i];
3287
- pendingPromise.reject?.(err);
3344
+ const { reject } = scheduler[i];
3345
+ reject?.(err);
3288
3346
  }
3289
3347
  });
3290
3348
  };
@@ -3295,27 +3353,23 @@ function createBatchScheduler({ fn, id, shouldSplitBatch, wait = 0, sort }) {
3295
3353
  return {
3296
3354
  flush,
3297
3355
  async schedule(args) {
3298
- const pendingPromise = {};
3299
- const promise = new Promise((resolve, reject) => {
3300
- pendingPromise.resolve = resolve;
3301
- pendingPromise.reject = reject;
3302
- });
3356
+ const { promise, resolve, reject } = withResolvers();
3303
3357
  const split2 = shouldSplitBatch?.([...getBatchedArgs(), args]);
3304
3358
  if (split2)
3305
3359
  exec();
3306
3360
  const hasActiveScheduler = getScheduler().length > 0;
3307
3361
  if (hasActiveScheduler) {
3308
- setScheduler({ args, pendingPromise });
3362
+ setScheduler({ args, resolve, reject });
3309
3363
  return promise;
3310
3364
  }
3311
- setScheduler({ args, pendingPromise });
3365
+ setScheduler({ args, resolve, reject });
3312
3366
  setTimeout(exec, wait);
3313
3367
  return promise;
3314
3368
  }
3315
3369
  };
3316
3370
  }
3317
3371
 
3318
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/stateOverride.js
3372
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/stateOverride.js
3319
3373
  function serializeStateMapping(stateMapping) {
3320
3374
  if (!stateMapping || stateMapping.length === 0)
3321
3375
  return void 0;
@@ -3368,7 +3422,7 @@ function serializeStateOverride(parameters) {
3368
3422
  return rpcStateOverride;
3369
3423
  }
3370
3424
 
3371
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/constants/number.js
3425
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/constants/number.js
3372
3426
  var maxInt8 = 2n ** (8n - 1n) - 1n;
3373
3427
  var maxInt16 = 2n ** (16n - 1n) - 1n;
3374
3428
  var maxInt24 = 2n ** (24n - 1n) - 1n;
@@ -3466,7 +3520,7 @@ var maxUint240 = 2n ** 240n - 1n;
3466
3520
  var maxUint248 = 2n ** 248n - 1n;
3467
3521
  var maxUint256 = 2n ** 256n - 1n;
3468
3522
 
3469
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/transaction/assertRequest.js
3523
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/transaction/assertRequest.js
3470
3524
  function assertRequest(args) {
3471
3525
  const { account: account_, gasPrice, maxFeePerGas, maxPriorityFeePerGas, to } = args;
3472
3526
  const account = account_ ? parseAccount(account_) : void 0;
@@ -3482,7 +3536,7 @@ function assertRequest(args) {
3482
3536
  throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });
3483
3537
  }
3484
3538
 
3485
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/actions/public/call.js
3539
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/actions/public/call.js
3486
3540
  async function call(client, args) {
3487
3541
  const { account: account_ = client.account, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = "latest", accessList, blobs, code, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, ...rest } = args;
3488
3542
  const account = account_ ? parseAccount(account_) : void 0;
@@ -3556,7 +3610,7 @@ async function call(client, args) {
3556
3610
  return { data: response };
3557
3611
  } catch (err) {
3558
3612
  const data2 = getRevertErrorData(err);
3559
- const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-VJWDNI4X.js");
3613
+ const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-VIBPEQNI.js");
3560
3614
  if (client.ccipRead !== false && data2?.slice(0, 10) === offchainLookupSignature2 && to)
3561
3615
  return { data: await offchainLookup2(client, { data: data2, to }) };
3562
3616
  if (deploylessCall && data2?.slice(0, 10) === "0x101bb98d")
@@ -3661,7 +3715,7 @@ function getRevertErrorData(err) {
3661
3715
  return typeof error?.data === "object" ? error.data?.data : error.data;
3662
3716
  }
3663
3717
 
3664
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/ccip.js
3718
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/errors/ccip.js
3665
3719
  var OffchainLookupError = class extends BaseError2 {
3666
3720
  constructor({ callbackSelector, cause, data, extraData, sender, urls }) {
3667
3721
  super(cause.shortMessage || "An error occurred while fetching for an offchain result.", {
@@ -3706,7 +3760,7 @@ var OffchainLookupSenderMismatchError = class extends BaseError2 {
3706
3760
  }
3707
3761
  };
3708
3762
 
3709
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/address/isAddressEqual.js
3763
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/address/isAddressEqual.js
3710
3764
  function isAddressEqual(a, b) {
3711
3765
  if (!isAddress(a, { strict: false }))
3712
3766
  throw new InvalidAddressError({ address: a });
@@ -3715,7 +3769,7 @@ function isAddressEqual(a, b) {
3715
3769
  return a.toLowerCase() === b.toLowerCase();
3716
3770
  }
3717
3771
 
3718
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/ccip.js
3772
+ // ../../node_modules/.pnpm/viem@2.23.2_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/ccip.js
3719
3773
  var offchainLookupSignature = "0x556f1830";
3720
3774
  var offchainLookupAbiItem = {
3721
3775
  name: "OffchainLookup",
@@ -3782,9 +3836,11 @@ async function ccipRequest({ data, sender, urls }) {
3782
3836
  const url = urls[i];
3783
3837
  const method = url.includes("{data}") ? "GET" : "POST";
3784
3838
  const body = method === "POST" ? { data, sender } : void 0;
3839
+ const headers = method === "POST" ? { "Content-Type": "application/json" } : {};
3785
3840
  try {
3786
3841
  const response = await fetch(url.replace("{sender}", sender).replace("{data}", data), {
3787
3842
  body: JSON.stringify(body),
3843
+ headers,
3788
3844
  method
3789
3845
  });
3790
3846
  let result;
@@ -3830,4 +3886,4 @@ export {
3830
3886
  offchainLookup,
3831
3887
  ccipRequest
3832
3888
  };
3833
- //# sourceMappingURL=chunk-LIWKL347.js.map
3889
+ //# sourceMappingURL=chunk-XE443CMG.js.map