damm-sdk 1.4.32 → 1.4.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -41,12 +41,77 @@ var __export = (target, all) => {
41
41
  };
42
42
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
43
43
 
44
+ // node_modules/abitype/dist/esm/version.js
45
+ var version = "1.0.8";
46
+
47
+ // node_modules/abitype/dist/esm/errors.js
48
+ var BaseError;
49
+ var init_errors = __esm(() => {
50
+ BaseError = class BaseError extends Error {
51
+ constructor(shortMessage, args = {}) {
52
+ const details = args.cause instanceof BaseError ? args.cause.details : args.cause?.message ? args.cause.message : args.details;
53
+ const docsPath = args.cause instanceof BaseError ? args.cause.docsPath || args.docsPath : args.docsPath;
54
+ const message = [
55
+ shortMessage || "An error occurred.",
56
+ "",
57
+ ...args.metaMessages ? [...args.metaMessages, ""] : [],
58
+ ...docsPath ? [`Docs: https://abitype.dev${docsPath}`] : [],
59
+ ...details ? [`Details: ${details}`] : [],
60
+ `Version: abitype@${version}`
61
+ ].join(`
62
+ `);
63
+ super(message);
64
+ Object.defineProperty(this, "details", {
65
+ enumerable: true,
66
+ configurable: true,
67
+ writable: true,
68
+ value: undefined
69
+ });
70
+ Object.defineProperty(this, "docsPath", {
71
+ enumerable: true,
72
+ configurable: true,
73
+ writable: true,
74
+ value: undefined
75
+ });
76
+ Object.defineProperty(this, "metaMessages", {
77
+ enumerable: true,
78
+ configurable: true,
79
+ writable: true,
80
+ value: undefined
81
+ });
82
+ Object.defineProperty(this, "shortMessage", {
83
+ enumerable: true,
84
+ configurable: true,
85
+ writable: true,
86
+ value: undefined
87
+ });
88
+ Object.defineProperty(this, "name", {
89
+ enumerable: true,
90
+ configurable: true,
91
+ writable: true,
92
+ value: "AbiTypeError"
93
+ });
94
+ if (args.cause)
95
+ this.cause = args.cause;
96
+ this.details = details;
97
+ this.docsPath = docsPath;
98
+ this.metaMessages = args.metaMessages;
99
+ this.shortMessage = shortMessage;
100
+ }
101
+ };
102
+ });
103
+
44
104
  // node_modules/abitype/dist/esm/regex.js
45
105
  function execTyped(regex, string) {
46
106
  const match = regex.exec(string);
47
107
  return match?.groups;
48
108
  }
49
- var init_regex = () => {};
109
+ var bytesRegex, integerRegex, isTupleRegex;
110
+ var init_regex = __esm(() => {
111
+ bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;
112
+ 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)?$/;
113
+ isTupleRegex = /^\(.+?\).*?$/;
114
+ });
50
115
 
51
116
  // node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js
52
117
  function formatAbiParameter(abiParameter) {
@@ -113,9 +178,655 @@ var init_formatAbiItem = __esm(() => {
113
178
  init_formatAbiParameters();
114
179
  });
115
180
 
181
+ // node_modules/abitype/dist/esm/human-readable/runtime/signatures.js
182
+ function isErrorSignature(signature) {
183
+ return errorSignatureRegex.test(signature);
184
+ }
185
+ function execErrorSignature(signature) {
186
+ return execTyped(errorSignatureRegex, signature);
187
+ }
188
+ function isEventSignature(signature) {
189
+ return eventSignatureRegex.test(signature);
190
+ }
191
+ function execEventSignature(signature) {
192
+ return execTyped(eventSignatureRegex, signature);
193
+ }
194
+ function isFunctionSignature(signature) {
195
+ return functionSignatureRegex.test(signature);
196
+ }
197
+ function execFunctionSignature(signature) {
198
+ return execTyped(functionSignatureRegex, signature);
199
+ }
200
+ function isStructSignature(signature) {
201
+ return structSignatureRegex.test(signature);
202
+ }
203
+ function execStructSignature(signature) {
204
+ return execTyped(structSignatureRegex, signature);
205
+ }
206
+ function isConstructorSignature(signature) {
207
+ return constructorSignatureRegex.test(signature);
208
+ }
209
+ function execConstructorSignature(signature) {
210
+ return execTyped(constructorSignatureRegex, signature);
211
+ }
212
+ function isFallbackSignature(signature) {
213
+ return fallbackSignatureRegex.test(signature);
214
+ }
215
+ function execFallbackSignature(signature) {
216
+ return execTyped(fallbackSignatureRegex, signature);
217
+ }
218
+ function isReceiveSignature(signature) {
219
+ return receiveSignatureRegex.test(signature);
220
+ }
221
+ var errorSignatureRegex, eventSignatureRegex, functionSignatureRegex, structSignatureRegex, constructorSignatureRegex, fallbackSignatureRegex, receiveSignatureRegex, modifiers, eventModifiers, functionModifiers;
222
+ var init_signatures = __esm(() => {
223
+ init_regex();
224
+ errorSignatureRegex = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
225
+ eventSignatureRegex = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
226
+ functionSignatureRegex = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;
227
+ structSignatureRegex = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;
228
+ constructorSignatureRegex = /^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;
229
+ fallbackSignatureRegex = /^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;
230
+ receiveSignatureRegex = /^receive\(\) external payable$/;
231
+ modifiers = new Set([
232
+ "memory",
233
+ "indexed",
234
+ "storage",
235
+ "calldata"
236
+ ]);
237
+ eventModifiers = new Set(["indexed"]);
238
+ functionModifiers = new Set([
239
+ "calldata",
240
+ "memory",
241
+ "storage"
242
+ ]);
243
+ });
244
+
245
+ // node_modules/abitype/dist/esm/human-readable/errors/abiItem.js
246
+ var UnknownTypeError, UnknownSolidityTypeError;
247
+ var init_abiItem = __esm(() => {
248
+ init_errors();
249
+ UnknownTypeError = class UnknownTypeError extends BaseError {
250
+ constructor({ type }) {
251
+ super("Unknown type.", {
252
+ metaMessages: [
253
+ `Type "${type}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`
254
+ ]
255
+ });
256
+ Object.defineProperty(this, "name", {
257
+ enumerable: true,
258
+ configurable: true,
259
+ writable: true,
260
+ value: "UnknownTypeError"
261
+ });
262
+ }
263
+ };
264
+ UnknownSolidityTypeError = class UnknownSolidityTypeError extends BaseError {
265
+ constructor({ type }) {
266
+ super("Unknown type.", {
267
+ metaMessages: [`Type "${type}" is not a valid ABI type.`]
268
+ });
269
+ Object.defineProperty(this, "name", {
270
+ enumerable: true,
271
+ configurable: true,
272
+ writable: true,
273
+ value: "UnknownSolidityTypeError"
274
+ });
275
+ }
276
+ };
277
+ });
278
+
279
+ // node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js
280
+ var InvalidParameterError, SolidityProtectedKeywordError, InvalidModifierError, InvalidFunctionModifierError, InvalidAbiTypeParameterError;
281
+ var init_abiParameter = __esm(() => {
282
+ init_errors();
283
+ InvalidParameterError = class InvalidParameterError extends BaseError {
284
+ constructor({ param }) {
285
+ super("Invalid ABI parameter.", {
286
+ details: param
287
+ });
288
+ Object.defineProperty(this, "name", {
289
+ enumerable: true,
290
+ configurable: true,
291
+ writable: true,
292
+ value: "InvalidParameterError"
293
+ });
294
+ }
295
+ };
296
+ SolidityProtectedKeywordError = class SolidityProtectedKeywordError extends BaseError {
297
+ constructor({ param, name }) {
298
+ super("Invalid ABI parameter.", {
299
+ details: param,
300
+ metaMessages: [
301
+ `"${name}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`
302
+ ]
303
+ });
304
+ Object.defineProperty(this, "name", {
305
+ enumerable: true,
306
+ configurable: true,
307
+ writable: true,
308
+ value: "SolidityProtectedKeywordError"
309
+ });
310
+ }
311
+ };
312
+ InvalidModifierError = class InvalidModifierError extends BaseError {
313
+ constructor({ param, type, modifier }) {
314
+ super("Invalid ABI parameter.", {
315
+ details: param,
316
+ metaMessages: [
317
+ `Modifier "${modifier}" not allowed${type ? ` in "${type}" type` : ""}.`
318
+ ]
319
+ });
320
+ Object.defineProperty(this, "name", {
321
+ enumerable: true,
322
+ configurable: true,
323
+ writable: true,
324
+ value: "InvalidModifierError"
325
+ });
326
+ }
327
+ };
328
+ InvalidFunctionModifierError = class InvalidFunctionModifierError extends BaseError {
329
+ constructor({ param, type, modifier }) {
330
+ super("Invalid ABI parameter.", {
331
+ details: param,
332
+ metaMessages: [
333
+ `Modifier "${modifier}" not allowed${type ? ` in "${type}" type` : ""}.`,
334
+ `Data location can only be specified for array, struct, or mapping types, but "${modifier}" was given.`
335
+ ]
336
+ });
337
+ Object.defineProperty(this, "name", {
338
+ enumerable: true,
339
+ configurable: true,
340
+ writable: true,
341
+ value: "InvalidFunctionModifierError"
342
+ });
343
+ }
344
+ };
345
+ InvalidAbiTypeParameterError = class InvalidAbiTypeParameterError extends BaseError {
346
+ constructor({ abiParameter }) {
347
+ super("Invalid ABI parameter.", {
348
+ details: JSON.stringify(abiParameter, null, 2),
349
+ metaMessages: ["ABI parameter type is invalid."]
350
+ });
351
+ Object.defineProperty(this, "name", {
352
+ enumerable: true,
353
+ configurable: true,
354
+ writable: true,
355
+ value: "InvalidAbiTypeParameterError"
356
+ });
357
+ }
358
+ };
359
+ });
360
+
361
+ // node_modules/abitype/dist/esm/human-readable/errors/signature.js
362
+ var InvalidSignatureError, UnknownSignatureError, InvalidStructSignatureError;
363
+ var init_signature = __esm(() => {
364
+ init_errors();
365
+ InvalidSignatureError = class InvalidSignatureError extends BaseError {
366
+ constructor({ signature, type }) {
367
+ super(`Invalid ${type} signature.`, {
368
+ details: signature
369
+ });
370
+ Object.defineProperty(this, "name", {
371
+ enumerable: true,
372
+ configurable: true,
373
+ writable: true,
374
+ value: "InvalidSignatureError"
375
+ });
376
+ }
377
+ };
378
+ UnknownSignatureError = class UnknownSignatureError extends BaseError {
379
+ constructor({ signature }) {
380
+ super("Unknown signature.", {
381
+ details: signature
382
+ });
383
+ Object.defineProperty(this, "name", {
384
+ enumerable: true,
385
+ configurable: true,
386
+ writable: true,
387
+ value: "UnknownSignatureError"
388
+ });
389
+ }
390
+ };
391
+ InvalidStructSignatureError = class InvalidStructSignatureError extends BaseError {
392
+ constructor({ signature }) {
393
+ super("Invalid struct signature.", {
394
+ details: signature,
395
+ metaMessages: ["No properties exist."]
396
+ });
397
+ Object.defineProperty(this, "name", {
398
+ enumerable: true,
399
+ configurable: true,
400
+ writable: true,
401
+ value: "InvalidStructSignatureError"
402
+ });
403
+ }
404
+ };
405
+ });
406
+
407
+ // node_modules/abitype/dist/esm/human-readable/errors/struct.js
408
+ var CircularReferenceError;
409
+ var init_struct = __esm(() => {
410
+ init_errors();
411
+ CircularReferenceError = class CircularReferenceError extends BaseError {
412
+ constructor({ type }) {
413
+ super("Circular reference detected.", {
414
+ metaMessages: [`Struct "${type}" is a circular reference.`]
415
+ });
416
+ Object.defineProperty(this, "name", {
417
+ enumerable: true,
418
+ configurable: true,
419
+ writable: true,
420
+ value: "CircularReferenceError"
421
+ });
422
+ }
423
+ };
424
+ });
425
+
426
+ // node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js
427
+ var InvalidParenthesisError;
428
+ var init_splitParameters = __esm(() => {
429
+ init_errors();
430
+ InvalidParenthesisError = class InvalidParenthesisError extends BaseError {
431
+ constructor({ current, depth }) {
432
+ super("Unbalanced parentheses.", {
433
+ metaMessages: [
434
+ `"${current.trim()}" has too many ${depth > 0 ? "opening" : "closing"} parentheses.`
435
+ ],
436
+ details: `Depth "${depth}"`
437
+ });
438
+ Object.defineProperty(this, "name", {
439
+ enumerable: true,
440
+ configurable: true,
441
+ writable: true,
442
+ value: "InvalidParenthesisError"
443
+ });
444
+ }
445
+ };
446
+ });
447
+
448
+ // node_modules/abitype/dist/esm/human-readable/runtime/cache.js
449
+ function getParameterCacheKey(param, type, structs) {
450
+ let structKey = "";
451
+ if (structs)
452
+ for (const struct of Object.entries(structs)) {
453
+ if (!struct)
454
+ continue;
455
+ let propertyKey = "";
456
+ for (const property of struct[1]) {
457
+ propertyKey += `[${property.type}${property.name ? `:${property.name}` : ""}]`;
458
+ }
459
+ structKey += `(${struct[0]}{${propertyKey}})`;
460
+ }
461
+ if (type)
462
+ return `${type}:${param}${structKey}`;
463
+ return param;
464
+ }
465
+ var parameterCache;
466
+ var init_cache = __esm(() => {
467
+ parameterCache = new Map([
468
+ ["address", { type: "address" }],
469
+ ["bool", { type: "bool" }],
470
+ ["bytes", { type: "bytes" }],
471
+ ["bytes32", { type: "bytes32" }],
472
+ ["int", { type: "int256" }],
473
+ ["int256", { type: "int256" }],
474
+ ["string", { type: "string" }],
475
+ ["uint", { type: "uint256" }],
476
+ ["uint8", { type: "uint8" }],
477
+ ["uint16", { type: "uint16" }],
478
+ ["uint24", { type: "uint24" }],
479
+ ["uint32", { type: "uint32" }],
480
+ ["uint64", { type: "uint64" }],
481
+ ["uint96", { type: "uint96" }],
482
+ ["uint112", { type: "uint112" }],
483
+ ["uint160", { type: "uint160" }],
484
+ ["uint192", { type: "uint192" }],
485
+ ["uint256", { type: "uint256" }],
486
+ ["address owner", { type: "address", name: "owner" }],
487
+ ["address to", { type: "address", name: "to" }],
488
+ ["bool approved", { type: "bool", name: "approved" }],
489
+ ["bytes _data", { type: "bytes", name: "_data" }],
490
+ ["bytes data", { type: "bytes", name: "data" }],
491
+ ["bytes signature", { type: "bytes", name: "signature" }],
492
+ ["bytes32 hash", { type: "bytes32", name: "hash" }],
493
+ ["bytes32 r", { type: "bytes32", name: "r" }],
494
+ ["bytes32 root", { type: "bytes32", name: "root" }],
495
+ ["bytes32 s", { type: "bytes32", name: "s" }],
496
+ ["string name", { type: "string", name: "name" }],
497
+ ["string symbol", { type: "string", name: "symbol" }],
498
+ ["string tokenURI", { type: "string", name: "tokenURI" }],
499
+ ["uint tokenId", { type: "uint256", name: "tokenId" }],
500
+ ["uint8 v", { type: "uint8", name: "v" }],
501
+ ["uint256 balance", { type: "uint256", name: "balance" }],
502
+ ["uint256 tokenId", { type: "uint256", name: "tokenId" }],
503
+ ["uint256 value", { type: "uint256", name: "value" }],
504
+ [
505
+ "event:address indexed from",
506
+ { type: "address", name: "from", indexed: true }
507
+ ],
508
+ ["event:address indexed to", { type: "address", name: "to", indexed: true }],
509
+ [
510
+ "event:uint indexed tokenId",
511
+ { type: "uint256", name: "tokenId", indexed: true }
512
+ ],
513
+ [
514
+ "event:uint256 indexed tokenId",
515
+ { type: "uint256", name: "tokenId", indexed: true }
516
+ ]
517
+ ]);
518
+ });
519
+
520
+ // node_modules/abitype/dist/esm/human-readable/runtime/utils.js
521
+ function parseSignature(signature, structs = {}) {
522
+ if (isFunctionSignature(signature))
523
+ return parseFunctionSignature(signature, structs);
524
+ if (isEventSignature(signature))
525
+ return parseEventSignature(signature, structs);
526
+ if (isErrorSignature(signature))
527
+ return parseErrorSignature(signature, structs);
528
+ if (isConstructorSignature(signature))
529
+ return parseConstructorSignature(signature, structs);
530
+ if (isFallbackSignature(signature))
531
+ return parseFallbackSignature(signature);
532
+ if (isReceiveSignature(signature))
533
+ return {
534
+ type: "receive",
535
+ stateMutability: "payable"
536
+ };
537
+ throw new UnknownSignatureError({ signature });
538
+ }
539
+ function parseFunctionSignature(signature, structs = {}) {
540
+ const match = execFunctionSignature(signature);
541
+ if (!match)
542
+ throw new InvalidSignatureError({ signature, type: "function" });
543
+ const inputParams = splitParameters(match.parameters);
544
+ const inputs = [];
545
+ const inputLength = inputParams.length;
546
+ for (let i = 0;i < inputLength; i++) {
547
+ inputs.push(parseAbiParameter(inputParams[i], {
548
+ modifiers: functionModifiers,
549
+ structs,
550
+ type: "function"
551
+ }));
552
+ }
553
+ const outputs = [];
554
+ if (match.returns) {
555
+ const outputParams = splitParameters(match.returns);
556
+ const outputLength = outputParams.length;
557
+ for (let i = 0;i < outputLength; i++) {
558
+ outputs.push(parseAbiParameter(outputParams[i], {
559
+ modifiers: functionModifiers,
560
+ structs,
561
+ type: "function"
562
+ }));
563
+ }
564
+ }
565
+ return {
566
+ name: match.name,
567
+ type: "function",
568
+ stateMutability: match.stateMutability ?? "nonpayable",
569
+ inputs,
570
+ outputs
571
+ };
572
+ }
573
+ function parseEventSignature(signature, structs = {}) {
574
+ const match = execEventSignature(signature);
575
+ if (!match)
576
+ throw new InvalidSignatureError({ signature, type: "event" });
577
+ const params = splitParameters(match.parameters);
578
+ const abiParameters = [];
579
+ const length = params.length;
580
+ for (let i = 0;i < length; i++)
581
+ abiParameters.push(parseAbiParameter(params[i], {
582
+ modifiers: eventModifiers,
583
+ structs,
584
+ type: "event"
585
+ }));
586
+ return { name: match.name, type: "event", inputs: abiParameters };
587
+ }
588
+ function parseErrorSignature(signature, structs = {}) {
589
+ const match = execErrorSignature(signature);
590
+ if (!match)
591
+ throw new InvalidSignatureError({ signature, type: "error" });
592
+ const params = splitParameters(match.parameters);
593
+ const abiParameters = [];
594
+ const length = params.length;
595
+ for (let i = 0;i < length; i++)
596
+ abiParameters.push(parseAbiParameter(params[i], { structs, type: "error" }));
597
+ return { name: match.name, type: "error", inputs: abiParameters };
598
+ }
599
+ function parseConstructorSignature(signature, structs = {}) {
600
+ const match = execConstructorSignature(signature);
601
+ if (!match)
602
+ throw new InvalidSignatureError({ signature, type: "constructor" });
603
+ const params = splitParameters(match.parameters);
604
+ const abiParameters = [];
605
+ const length = params.length;
606
+ for (let i = 0;i < length; i++)
607
+ abiParameters.push(parseAbiParameter(params[i], { structs, type: "constructor" }));
608
+ return {
609
+ type: "constructor",
610
+ stateMutability: match.stateMutability ?? "nonpayable",
611
+ inputs: abiParameters
612
+ };
613
+ }
614
+ function parseFallbackSignature(signature) {
615
+ const match = execFallbackSignature(signature);
616
+ if (!match)
617
+ throw new InvalidSignatureError({ signature, type: "fallback" });
618
+ return {
619
+ type: "fallback",
620
+ stateMutability: match.stateMutability ?? "nonpayable"
621
+ };
622
+ }
623
+ function parseAbiParameter(param, options) {
624
+ const parameterCacheKey = getParameterCacheKey(param, options?.type, options?.structs);
625
+ if (parameterCache.has(parameterCacheKey))
626
+ return parameterCache.get(parameterCacheKey);
627
+ const isTuple = isTupleRegex.test(param);
628
+ const match = execTyped(isTuple ? abiParameterWithTupleRegex : abiParameterWithoutTupleRegex, param);
629
+ if (!match)
630
+ throw new InvalidParameterError({ param });
631
+ if (match.name && isSolidityKeyword(match.name))
632
+ throw new SolidityProtectedKeywordError({ param, name: match.name });
633
+ const name = match.name ? { name: match.name } : {};
634
+ const indexed = match.modifier === "indexed" ? { indexed: true } : {};
635
+ const structs = options?.structs ?? {};
636
+ let type;
637
+ let components = {};
638
+ if (isTuple) {
639
+ type = "tuple";
640
+ const params = splitParameters(match.type);
641
+ const components_ = [];
642
+ const length = params.length;
643
+ for (let i = 0;i < length; i++) {
644
+ components_.push(parseAbiParameter(params[i], { structs }));
645
+ }
646
+ components = { components: components_ };
647
+ } else if (match.type in structs) {
648
+ type = "tuple";
649
+ components = { components: structs[match.type] };
650
+ } else if (dynamicIntegerRegex.test(match.type)) {
651
+ type = `${match.type}256`;
652
+ } else {
653
+ type = match.type;
654
+ if (!(options?.type === "struct") && !isSolidityType(type))
655
+ throw new UnknownSolidityTypeError({ type });
656
+ }
657
+ if (match.modifier) {
658
+ if (!options?.modifiers?.has?.(match.modifier))
659
+ throw new InvalidModifierError({
660
+ param,
661
+ type: options?.type,
662
+ modifier: match.modifier
663
+ });
664
+ if (functionModifiers.has(match.modifier) && !isValidDataLocation(type, !!match.array))
665
+ throw new InvalidFunctionModifierError({
666
+ param,
667
+ type: options?.type,
668
+ modifier: match.modifier
669
+ });
670
+ }
671
+ const abiParameter = {
672
+ type: `${type}${match.array ?? ""}`,
673
+ ...name,
674
+ ...indexed,
675
+ ...components
676
+ };
677
+ parameterCache.set(parameterCacheKey, abiParameter);
678
+ return abiParameter;
679
+ }
680
+ function splitParameters(params, result = [], current = "", depth = 0) {
681
+ const length = params.trim().length;
682
+ for (let i = 0;i < length; i++) {
683
+ const char = params[i];
684
+ const tail = params.slice(i + 1);
685
+ switch (char) {
686
+ case ",":
687
+ return depth === 0 ? splitParameters(tail, [...result, current.trim()]) : splitParameters(tail, result, `${current}${char}`, depth);
688
+ case "(":
689
+ return splitParameters(tail, result, `${current}${char}`, depth + 1);
690
+ case ")":
691
+ return splitParameters(tail, result, `${current}${char}`, depth - 1);
692
+ default:
693
+ return splitParameters(tail, result, `${current}${char}`, depth);
694
+ }
695
+ }
696
+ if (current === "")
697
+ return result;
698
+ if (depth !== 0)
699
+ throw new InvalidParenthesisError({ current, depth });
700
+ result.push(current.trim());
701
+ return result;
702
+ }
703
+ function isSolidityType(type) {
704
+ return type === "address" || type === "bool" || type === "function" || type === "string" || bytesRegex.test(type) || integerRegex.test(type);
705
+ }
706
+ function isSolidityKeyword(name) {
707
+ return name === "address" || name === "bool" || name === "function" || name === "string" || name === "tuple" || bytesRegex.test(name) || integerRegex.test(name) || protectedKeywordsRegex.test(name);
708
+ }
709
+ function isValidDataLocation(type, isArray) {
710
+ return isArray || type === "bytes" || type === "string" || type === "tuple";
711
+ }
712
+ var abiParameterWithoutTupleRegex, abiParameterWithTupleRegex, dynamicIntegerRegex, protectedKeywordsRegex;
713
+ var init_utils = __esm(() => {
714
+ init_regex();
715
+ init_abiItem();
716
+ init_abiParameter();
717
+ init_signature();
718
+ init_splitParameters();
719
+ init_cache();
720
+ init_signatures();
721
+ 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$_]*))?$/;
722
+ abiParameterWithTupleRegex = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;
723
+ dynamicIntegerRegex = /^u?int$/;
724
+ protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;
725
+ });
726
+
727
+ // node_modules/abitype/dist/esm/human-readable/runtime/structs.js
728
+ function parseStructs(signatures) {
729
+ const shallowStructs = {};
730
+ const signaturesLength = signatures.length;
731
+ for (let i = 0;i < signaturesLength; i++) {
732
+ const signature = signatures[i];
733
+ if (!isStructSignature(signature))
734
+ continue;
735
+ const match = execStructSignature(signature);
736
+ if (!match)
737
+ throw new InvalidSignatureError({ signature, type: "struct" });
738
+ const properties = match.properties.split(";");
739
+ const components = [];
740
+ const propertiesLength = properties.length;
741
+ for (let k = 0;k < propertiesLength; k++) {
742
+ const property = properties[k];
743
+ const trimmed = property.trim();
744
+ if (!trimmed)
745
+ continue;
746
+ const abiParameter = parseAbiParameter(trimmed, {
747
+ type: "struct"
748
+ });
749
+ components.push(abiParameter);
750
+ }
751
+ if (!components.length)
752
+ throw new InvalidStructSignatureError({ signature });
753
+ shallowStructs[match.name] = components;
754
+ }
755
+ const resolvedStructs = {};
756
+ const entries = Object.entries(shallowStructs);
757
+ const entriesLength = entries.length;
758
+ for (let i = 0;i < entriesLength; i++) {
759
+ const [name, parameters] = entries[i];
760
+ resolvedStructs[name] = resolveStructs(parameters, shallowStructs);
761
+ }
762
+ return resolvedStructs;
763
+ }
764
+ function resolveStructs(abiParameters, structs, ancestors = new Set) {
765
+ const components = [];
766
+ const length = abiParameters.length;
767
+ for (let i = 0;i < length; i++) {
768
+ const abiParameter = abiParameters[i];
769
+ const isTuple = isTupleRegex.test(abiParameter.type);
770
+ if (isTuple)
771
+ components.push(abiParameter);
772
+ else {
773
+ const match = execTyped(typeWithoutTupleRegex, abiParameter.type);
774
+ if (!match?.type)
775
+ throw new InvalidAbiTypeParameterError({ abiParameter });
776
+ const { array, type } = match;
777
+ if (type in structs) {
778
+ if (ancestors.has(type))
779
+ throw new CircularReferenceError({ type });
780
+ components.push({
781
+ ...abiParameter,
782
+ type: `tuple${array ?? ""}`,
783
+ components: resolveStructs(structs[type] ?? [], structs, new Set([...ancestors, type]))
784
+ });
785
+ } else {
786
+ if (isSolidityType(type))
787
+ components.push(abiParameter);
788
+ else
789
+ throw new UnknownTypeError({ type });
790
+ }
791
+ }
792
+ }
793
+ return components;
794
+ }
795
+ var typeWithoutTupleRegex;
796
+ var init_structs = __esm(() => {
797
+ init_regex();
798
+ init_abiItem();
799
+ init_abiParameter();
800
+ init_signature();
801
+ init_struct();
802
+ init_signatures();
803
+ init_utils();
804
+ typeWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;
805
+ });
806
+
807
+ // node_modules/abitype/dist/esm/human-readable/parseAbi.js
808
+ function parseAbi(signatures) {
809
+ const structs = parseStructs(signatures);
810
+ const abi = [];
811
+ const length = signatures.length;
812
+ for (let i = 0;i < length; i++) {
813
+ const signature = signatures[i];
814
+ if (isStructSignature(signature))
815
+ continue;
816
+ abi.push(parseSignature(signature, structs));
817
+ }
818
+ return abi;
819
+ }
820
+ var init_parseAbi = __esm(() => {
821
+ init_signatures();
822
+ init_structs();
823
+ init_utils();
824
+ });
825
+
116
826
  // node_modules/abitype/dist/esm/exports/index.js
117
827
  var init_exports = __esm(() => {
118
828
  init_formatAbiItem();
829
+ init_parseAbi();
119
830
  });
120
831
 
121
832
  // node_modules/viem/_esm/utils/abi/formatAbiItem.js
@@ -157,7 +868,7 @@ function size(value) {
157
868
  var init_size = () => {};
158
869
 
159
870
  // node_modules/viem/_esm/errors/version.js
160
- var version = "2.33.2";
871
+ var version2 = "2.33.2";
161
872
 
162
873
  // node_modules/viem/_esm/errors/base.js
163
874
  function walk(err, fn) {
@@ -167,23 +878,23 @@ function walk(err, fn) {
167
878
  return walk(err.cause, fn);
168
879
  return fn ? null : err;
169
880
  }
170
- var errorConfig, BaseError;
881
+ var errorConfig, BaseError2;
171
882
  var init_base = __esm(() => {
172
883
  errorConfig = {
173
884
  getDocsUrl: ({ docsBaseUrl, docsPath = "", docsSlug }) => docsPath ? `${docsBaseUrl ?? "https://viem.sh"}${docsPath}${docsSlug ? `#${docsSlug}` : ""}` : undefined,
174
- version: `viem@${version}`
885
+ version: `viem@${version2}`
175
886
  };
176
- BaseError = class BaseError extends Error {
887
+ BaseError2 = class BaseError2 extends Error {
177
888
  constructor(shortMessage, args = {}) {
178
889
  const details = (() => {
179
- if (args.cause instanceof BaseError)
890
+ if (args.cause instanceof BaseError2)
180
891
  return args.cause.details;
181
892
  if (args.cause?.message)
182
893
  return args.cause.message;
183
894
  return args.details;
184
895
  })();
185
896
  const docsPath = (() => {
186
- if (args.cause instanceof BaseError)
897
+ if (args.cause instanceof BaseError2)
187
898
  return args.cause.docsPath || args.docsPath;
188
899
  return args.docsPath;
189
900
  })();
@@ -239,7 +950,7 @@ var init_base = __esm(() => {
239
950
  this.metaMessages = args.metaMessages;
240
951
  this.name = args.name ?? this.name;
241
952
  this.shortMessage = shortMessage;
242
- this.version = version;
953
+ this.version = version2;
243
954
  }
244
955
  walk(fn) {
245
956
  return walk(this, fn);
@@ -253,7 +964,7 @@ var init_abi = __esm(() => {
253
964
  init_formatAbiItem2();
254
965
  init_size();
255
966
  init_base();
256
- AbiDecodingDataSizeTooSmallError = class AbiDecodingDataSizeTooSmallError extends BaseError {
967
+ AbiDecodingDataSizeTooSmallError = class AbiDecodingDataSizeTooSmallError extends BaseError2 {
257
968
  constructor({ data, params, size: size2 }) {
258
969
  super([`Data size of ${size2} bytes is too small for given parameters.`].join(`
259
970
  `), {
@@ -286,14 +997,14 @@ var init_abi = __esm(() => {
286
997
  this.size = size2;
287
998
  }
288
999
  };
289
- AbiDecodingZeroDataError = class AbiDecodingZeroDataError extends BaseError {
1000
+ AbiDecodingZeroDataError = class AbiDecodingZeroDataError extends BaseError2 {
290
1001
  constructor() {
291
1002
  super('Cannot decode zero data ("0x") with ABI parameters.', {
292
1003
  name: "AbiDecodingZeroDataError"
293
1004
  });
294
1005
  }
295
1006
  };
296
- AbiEncodingArrayLengthMismatchError = class AbiEncodingArrayLengthMismatchError extends BaseError {
1007
+ AbiEncodingArrayLengthMismatchError = class AbiEncodingArrayLengthMismatchError extends BaseError2 {
297
1008
  constructor({ expectedLength, givenLength, type }) {
298
1009
  super([
299
1010
  `ABI encoding array length mismatch for type ${type}.`,
@@ -303,12 +1014,12 @@ var init_abi = __esm(() => {
303
1014
  `), { name: "AbiEncodingArrayLengthMismatchError" });
304
1015
  }
305
1016
  };
306
- AbiEncodingBytesSizeMismatchError = class AbiEncodingBytesSizeMismatchError extends BaseError {
1017
+ AbiEncodingBytesSizeMismatchError = class AbiEncodingBytesSizeMismatchError extends BaseError2 {
307
1018
  constructor({ expectedSize, value }) {
308
1019
  super(`Size of bytes "${value}" (bytes${size(value)}) does not match expected size (bytes${expectedSize}).`, { name: "AbiEncodingBytesSizeMismatchError" });
309
1020
  }
310
1021
  };
311
- AbiEncodingLengthMismatchError = class AbiEncodingLengthMismatchError extends BaseError {
1022
+ AbiEncodingLengthMismatchError = class AbiEncodingLengthMismatchError extends BaseError2 {
312
1023
  constructor({ expectedLength, givenLength }) {
313
1024
  super([
314
1025
  "ABI encoding params/values length mismatch.",
@@ -318,7 +1029,7 @@ var init_abi = __esm(() => {
318
1029
  `), { name: "AbiEncodingLengthMismatchError" });
319
1030
  }
320
1031
  };
321
- AbiFunctionNotFoundError = class AbiFunctionNotFoundError extends BaseError {
1032
+ AbiFunctionNotFoundError = class AbiFunctionNotFoundError extends BaseError2 {
322
1033
  constructor(functionName, { docsPath } = {}) {
323
1034
  super([
324
1035
  `Function ${functionName ? `"${functionName}" ` : ""}not found on ABI.`,
@@ -330,7 +1041,7 @@ var init_abi = __esm(() => {
330
1041
  });
331
1042
  }
332
1043
  };
333
- AbiFunctionSignatureNotFoundError = class AbiFunctionSignatureNotFoundError extends BaseError {
1044
+ AbiFunctionSignatureNotFoundError = class AbiFunctionSignatureNotFoundError extends BaseError2 {
334
1045
  constructor(signature, { docsPath }) {
335
1046
  super([
336
1047
  `Encoded function signature "${signature}" not found on ABI.`,
@@ -343,7 +1054,7 @@ var init_abi = __esm(() => {
343
1054
  });
344
1055
  }
345
1056
  };
346
- AbiItemAmbiguityError = class AbiItemAmbiguityError extends BaseError {
1057
+ AbiItemAmbiguityError = class AbiItemAmbiguityError extends BaseError2 {
347
1058
  constructor(x, y) {
348
1059
  super("Found ambiguous types in overloaded ABI items.", {
349
1060
  metaMessages: [
@@ -357,7 +1068,7 @@ var init_abi = __esm(() => {
357
1068
  });
358
1069
  }
359
1070
  };
360
- InvalidAbiEncodingTypeError = class InvalidAbiEncodingTypeError extends BaseError {
1071
+ InvalidAbiEncodingTypeError = class InvalidAbiEncodingTypeError extends BaseError2 {
361
1072
  constructor(type, { docsPath }) {
362
1073
  super([
363
1074
  `Type "${type}" is not a valid encoding type.`,
@@ -366,7 +1077,7 @@ var init_abi = __esm(() => {
366
1077
  `), { docsPath, name: "InvalidAbiEncodingType" });
367
1078
  }
368
1079
  };
369
- InvalidAbiDecodingTypeError = class InvalidAbiDecodingTypeError extends BaseError {
1080
+ InvalidAbiDecodingTypeError = class InvalidAbiDecodingTypeError extends BaseError2 {
370
1081
  constructor(type, { docsPath }) {
371
1082
  super([
372
1083
  `Type "${type}" is not a valid decoding type.`,
@@ -375,7 +1086,7 @@ var init_abi = __esm(() => {
375
1086
  `), { docsPath, name: "InvalidAbiDecodingType" });
376
1087
  }
377
1088
  };
378
- InvalidArrayError = class InvalidArrayError extends BaseError {
1089
+ InvalidArrayError = class InvalidArrayError extends BaseError2 {
379
1090
  constructor(value) {
380
1091
  super([`Value "${value}" is not a valid array.`].join(`
381
1092
  `), {
@@ -383,7 +1094,7 @@ var init_abi = __esm(() => {
383
1094
  });
384
1095
  }
385
1096
  };
386
- InvalidDefinitionTypeError = class InvalidDefinitionTypeError extends BaseError {
1097
+ InvalidDefinitionTypeError = class InvalidDefinitionTypeError extends BaseError2 {
387
1098
  constructor(type) {
388
1099
  super([
389
1100
  `"${type}" is not a valid definition type.`,
@@ -398,12 +1109,12 @@ var init_abi = __esm(() => {
398
1109
  var SliceOffsetOutOfBoundsError, SizeExceedsPaddingSizeError;
399
1110
  var init_data = __esm(() => {
400
1111
  init_base();
401
- SliceOffsetOutOfBoundsError = class SliceOffsetOutOfBoundsError extends BaseError {
1112
+ SliceOffsetOutOfBoundsError = class SliceOffsetOutOfBoundsError extends BaseError2 {
402
1113
  constructor({ offset, position, size: size2 }) {
403
1114
  super(`Slice ${position === "start" ? "starting" : "ending"} at offset "${offset}" is out-of-bounds (size: ${size2}).`, { name: "SliceOffsetOutOfBoundsError" });
404
1115
  }
405
1116
  };
406
- SizeExceedsPaddingSizeError = class SizeExceedsPaddingSizeError extends BaseError {
1117
+ SizeExceedsPaddingSizeError = class SizeExceedsPaddingSizeError extends BaseError2 {
407
1118
  constructor({ size: size2, targetSize, type }) {
408
1119
  super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (${size2}) exceeds padding size (${targetSize}).`, { name: "SizeExceedsPaddingSizeError" });
409
1120
  }
@@ -452,19 +1163,19 @@ var init_pad = __esm(() => {
452
1163
  var IntegerOutOfRangeError, InvalidBytesBooleanError, SizeOverflowError;
453
1164
  var init_encoding = __esm(() => {
454
1165
  init_base();
455
- IntegerOutOfRangeError = class IntegerOutOfRangeError extends BaseError {
1166
+ IntegerOutOfRangeError = class IntegerOutOfRangeError extends BaseError2 {
456
1167
  constructor({ max, min, signed, size: size2, value }) {
457
1168
  super(`Number "${value}" is not in safe ${size2 ? `${size2 * 8}-bit ${signed ? "signed" : "unsigned"} ` : ""}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: "IntegerOutOfRangeError" });
458
1169
  }
459
1170
  };
460
- InvalidBytesBooleanError = class InvalidBytesBooleanError extends BaseError {
1171
+ InvalidBytesBooleanError = class InvalidBytesBooleanError extends BaseError2 {
461
1172
  constructor(bytes) {
462
1173
  super(`Bytes value "${bytes}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
463
1174
  name: "InvalidBytesBooleanError"
464
1175
  });
465
1176
  }
466
1177
  };
467
- SizeOverflowError = class SizeOverflowError extends BaseError {
1178
+ SizeOverflowError = class SizeOverflowError extends BaseError2 {
468
1179
  constructor({ givenSize, maxSize }) {
469
1180
  super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`, { name: "SizeOverflowError" });
470
1181
  }
@@ -634,7 +1345,7 @@ function hexToBytes(hex_, opts = {}) {
634
1345
  const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j++));
635
1346
  const nibbleRight = charCodeToBase16(hexString.charCodeAt(j++));
636
1347
  if (nibbleLeft === undefined || nibbleRight === undefined) {
637
- throw new BaseError(`Invalid byte sequence ("${hexString[j - 2]}${hexString[j - 1]}" in "${hexString}").`);
1348
+ throw new BaseError2(`Invalid byte sequence ("${hexString[j - 2]}${hexString[j - 1]}" in "${hexString}").`);
638
1349
  }
639
1350
  bytes[index] = nibbleLeft * 16 + nibbleRight;
640
1351
  }
@@ -758,7 +1469,7 @@ function createHasher(hashCons) {
758
1469
  return hashC;
759
1470
  }
760
1471
  var isLE, swap32IfBE;
761
- var init_utils = __esm(() => {
1472
+ var init_utils2 = __esm(() => {
762
1473
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
763
1474
  isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
764
1475
  swap32IfBE = isLE ? (u) => u : byteSwap32;
@@ -808,7 +1519,7 @@ function keccakP(s, rounds = 24) {
808
1519
  var _0n, _1n, _2n, _7n, _256n, _0x71n, SHA3_PI, SHA3_ROTL, _SHA3_IOTA, IOTAS, SHA3_IOTA_H, SHA3_IOTA_L, rotlH = (h, l, s) => s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s), rotlL = (h, l, s) => s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s), Keccak, gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen)), keccak_256;
809
1520
  var init_sha3 = __esm(() => {
810
1521
  init__u64();
811
- init_utils();
1522
+ init_utils2();
812
1523
  _0n = BigInt(0);
813
1524
  _1n = BigInt(1);
814
1525
  _2n = BigInt(2);
@@ -1010,7 +1721,7 @@ function normalizeSignature(signature) {
1010
1721
  current += char;
1011
1722
  }
1012
1723
  if (!valid)
1013
- throw new BaseError("Unable to normalize signature.");
1724
+ throw new BaseError2("Unable to normalize signature.");
1014
1725
  return result;
1015
1726
  }
1016
1727
  var init_normalizeSignature = __esm(() => {
@@ -1051,7 +1762,7 @@ var init_toEventSelector = __esm(() => {
1051
1762
  var InvalidAddressError;
1052
1763
  var init_address = __esm(() => {
1053
1764
  init_base();
1054
- InvalidAddressError = class InvalidAddressError extends BaseError {
1765
+ InvalidAddressError = class InvalidAddressError extends BaseError2 {
1055
1766
  constructor({ address }) {
1056
1767
  super(`Address "${address}" is invalid.`, {
1057
1768
  metaMessages: [
@@ -1228,9 +1939,9 @@ var init_slice = __esm(() => {
1228
1939
  });
1229
1940
 
1230
1941
  // node_modules/viem/_esm/utils/regex.js
1231
- var integerRegex;
1942
+ var integerRegex2;
1232
1943
  var init_regex2 = __esm(() => {
1233
- 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)?$/;
1944
+ 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)?$/;
1234
1945
  });
1235
1946
 
1236
1947
  // node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
@@ -1275,7 +1986,7 @@ function prepareParam({ param, value }) {
1275
1986
  }
1276
1987
  if (param.type.startsWith("uint") || param.type.startsWith("int")) {
1277
1988
  const signed = param.type.startsWith("int");
1278
- const [, , size2 = "256"] = integerRegex.exec(param.type) ?? [];
1989
+ const [, , size2 = "256"] = integerRegex2.exec(param.type) ?? [];
1279
1990
  return encodeNumber(value, {
1280
1991
  signed,
1281
1992
  size: Number(size2)
@@ -1379,7 +2090,7 @@ function encodeBytes(value, { param }) {
1379
2090
  }
1380
2091
  function encodeBool(value) {
1381
2092
  if (typeof value !== "boolean")
1382
- throw new BaseError(`Invalid boolean value: "${value}" (type: ${typeof value}). Expected: \`true\` or \`false\`.`);
2093
+ throw new BaseError2(`Invalid boolean value: "${value}" (type: ${typeof value}). Expected: \`true\` or \`false\`.`);
1383
2094
  return { dynamic: false, encoded: padHex(boolToHex(value)) };
1384
2095
  }
1385
2096
  function encodeNumber(value, { signed, size: size2 = 256 }) {
@@ -1631,19 +2342,19 @@ var init_encodeFunctionData = __esm(() => {
1631
2342
  var NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError;
1632
2343
  var init_cursor = __esm(() => {
1633
2344
  init_base();
1634
- NegativeOffsetError = class NegativeOffsetError extends BaseError {
2345
+ NegativeOffsetError = class NegativeOffsetError extends BaseError2 {
1635
2346
  constructor({ offset }) {
1636
2347
  super(`Offset \`${offset}\` cannot be negative.`, {
1637
2348
  name: "NegativeOffsetError"
1638
2349
  });
1639
2350
  }
1640
2351
  };
1641
- PositionOutOfBoundsError = class PositionOutOfBoundsError extends BaseError {
2352
+ PositionOutOfBoundsError = class PositionOutOfBoundsError extends BaseError2 {
1642
2353
  constructor({ length, position }) {
1643
2354
  super(`Position \`${position}\` is out of bounds (\`0 < position < ${length}\`).`, { name: "PositionOutOfBoundsError" });
1644
2355
  }
1645
2356
  };
1646
- RecursiveReadLimitExceededError = class RecursiveReadLimitExceededError extends BaseError {
2357
+ RecursiveReadLimitExceededError = class RecursiveReadLimitExceededError extends BaseError2 {
1647
2358
  constructor({ count, limit }) {
1648
2359
  super(`Recursive read limit of \`${limit}\` exceeded (recursive read count: \`${count}\`).`, { name: "RecursiveReadLimitExceededError" });
1649
2360
  }
@@ -8653,7 +9364,7 @@ var require_hash = __commonJS((exports2) => {
8653
9364
  hash2.ripemd160 = hash2.ripemd.ripemd160;
8654
9365
  });
8655
9366
 
8656
- // node_modules/aes-js/index.js
9367
+ // node_modules/@ethersproject/json-wallets/node_modules/aes-js/index.js
8657
9368
  var require_aes_js = __commonJS((exports2, module2) => {
8658
9369
  (function(root) {
8659
9370
  function checkInt2(value) {
@@ -12775,10 +13486,10 @@ var require_lib = __commonJS((exports2) => {
12775
13486
  })(ErrorCode2 = exports2.ErrorCode || (exports2.ErrorCode = {}));
12776
13487
  var HEX2 = "0123456789abcdef";
12777
13488
  var Logger2 = function() {
12778
- function Logger3(version28) {
13489
+ function Logger3(version29) {
12779
13490
  Object.defineProperty(this, "version", {
12780
13491
  enumerable: true,
12781
- value: version28,
13492
+ value: version29,
12782
13493
  writable: false
12783
13494
  });
12784
13495
  }
@@ -13005,8 +13716,8 @@ var require_lib = __commonJS((exports2) => {
13005
13716
  }
13006
13717
  _logLevel2 = level;
13007
13718
  };
13008
- Logger3.from = function(version28) {
13009
- return new Logger3(version28);
13719
+ Logger3.from = function(version29) {
13720
+ return new Logger3(version29);
13010
13721
  };
13011
13722
  Logger3.errors = ErrorCode2;
13012
13723
  Logger3.levels = LogLevel2;
@@ -22120,7 +22831,7 @@ var require_utils3 = __commonJS((exports2) => {
22120
22831
  var exports_process = {};
22121
22832
  __export(exports_process, {
22122
22833
  versions: () => versions,
22123
- version: () => version28,
22834
+ version: () => version29,
22124
22835
  umask: () => umask,
22125
22836
  title: () => title,
22126
22837
  removeListener: () => removeListener,
@@ -22177,7 +22888,7 @@ function nextTick(fun) {
22177
22888
  setTimeout(drainQueue, 0);
22178
22889
  }
22179
22890
  function noop() {}
22180
- var queue, draining = false, currentQueue, queueIndex = -1, title = "browser", browser = true, env, argv, version28 = "", versions, on, addListener, once, off, removeListener, removeAllListeners, emit, prependListener, prependOnceListener, listeners = function(name) {
22891
+ var queue, draining = false, currentQueue, queueIndex = -1, title = "browser", browser = true, env, argv, version29 = "", versions, on, addListener, once, off, removeListener, removeAllListeners, emit, prependListener, prependOnceListener, listeners = function(name) {
22181
22892
  return [];
22182
22893
  }, binding = function(name) {
22183
22894
  throw new Error("process.binding is not supported in browser polyfill");
@@ -46195,6 +46906,7 @@ __export(exports_src, {
46195
46906
  gnosisTrx: () => gnosisTrx,
46196
46907
  getWormholeScanApiUrl: () => getWormholeScanApiUrl,
46197
46908
  getWormholeChainId: () => getWormholeChainId,
46909
+ getMorphoPublicAllocatorAddress: () => getMorphoPublicAllocatorAddress,
46198
46910
  getGnosisTrxSimulationResult: () => getGnosisTrxSimulationResult,
46199
46911
  getExecutorApiUrl: () => getExecutorApiUrl,
46200
46912
  getCctpV2Domain: () => getCctpV2Domain,
@@ -46219,6 +46931,7 @@ __export(exports_src, {
46219
46931
  ensoSafeRouteSingleTrx: () => ensoSafeRouteSingleTrx,
46220
46932
  ensoRouterAbi: () => enso_router_abi_default,
46221
46933
  encodeTransceiverInstructions: () => encodeTransceiverInstructions,
46934
+ encodeReallocateTo: () => encodeReallocateTo,
46222
46935
  encodeEnsoToken: () => encodeEnsoToken,
46223
46936
  depositToLendleTrx: () => depositToLendleTrx,
46224
46937
  depositSyrupVaultTrx: () => depositSyrupVaultTrx,
@@ -46246,6 +46959,7 @@ __export(exports_src, {
46246
46959
  calculateDeterministicVaultAddress: () => calculateDeterministicVaultAddress,
46247
46960
  buildWormholeTransferArgsFromAvatar: () => buildWormholeTransferArgsFromAvatar,
46248
46961
  buildRelayInstructions: () => buildRelayInstructions,
46962
+ buildReallocateToCall: () => buildReallocateToCall,
46249
46963
  buildMonadDefaultTransceiverInstructions: () => buildMonadDefaultTransceiverInstructions,
46250
46964
  buildCCIPMessage: () => buildCCIPMessage,
46251
46965
  borrowMorphoBlueTrx: () => borrowMorphoBlueTrx,
@@ -46360,6 +47074,7 @@ __export(exports_src, {
46360
47074
  ReceiveMessageCalldata: () => ReceiveMessageCalldata,
46361
47075
  QuoteSendTrx: () => QuoteSendTrx,
46362
47076
  QuoteSendCalldata: () => QuoteSendCalldata,
47077
+ PublicAllocatorReallocateToAbi: () => PublicAllocatorReallocateToAbi,
46363
47078
  Permit2Abi: () => permit2_abi_default,
46364
47079
  PauseVaultCalldata: () => PauseVaultCalldata,
46365
47080
  PERMIT2_ADDRESS_CANONICAL: () => PERMIT2_ADDRESS_CANONICAL,
@@ -46824,6 +47539,9 @@ var erc721_abi_default = [
46824
47539
  type: "function"
46825
47540
  }
46826
47541
  ];
47542
+ // node_modules/viem/_esm/index.js
47543
+ init_exports();
47544
+
46827
47545
  // node_modules/viem/_esm/constants/address.js
46828
47546
  var zeroAddress = "0x0000000000000000000000000000000000000000";
46829
47547
  // node_modules/viem/_esm/index.js
@@ -46857,7 +47575,7 @@ var createCall = (call) => {
46857
47575
  var exports_ethers = {};
46858
47576
  __export(exports_ethers, {
46859
47577
  wordlists: () => wordlists,
46860
- version: () => version27,
47578
+ version: () => version28,
46861
47579
  utils: () => exports_utils,
46862
47580
  providers: () => exports_lib4,
46863
47581
  logger: () => logger46,
@@ -46879,7 +47597,7 @@ __export(exports_ethers, {
46879
47597
  var import_bn = __toESM(require_bn());
46880
47598
 
46881
47599
  // node_modules/@ethersproject/logger/lib.esm/_version.js
46882
- var version2 = "logger/5.7.0";
47600
+ var version3 = "logger/5.7.0";
46883
47601
 
46884
47602
  // node_modules/@ethersproject/logger/lib.esm/index.js
46885
47603
  var _permanentCensorErrors = false;
@@ -46944,10 +47662,10 @@ var ErrorCode;
46944
47662
  var HEX = "0123456789abcdef";
46945
47663
 
46946
47664
  class Logger {
46947
- constructor(version3) {
47665
+ constructor(version4) {
46948
47666
  Object.defineProperty(this, "version", {
46949
47667
  enumerable: true,
46950
- value: version3,
47668
+ value: version4,
46951
47669
  writable: false
46952
47670
  });
46953
47671
  }
@@ -47133,7 +47851,7 @@ class Logger {
47133
47851
  }
47134
47852
  static globalLogger() {
47135
47853
  if (!_globalLogger) {
47136
- _globalLogger = new Logger(version2);
47854
+ _globalLogger = new Logger(version3);
47137
47855
  }
47138
47856
  return _globalLogger;
47139
47857
  }
@@ -47162,18 +47880,18 @@ class Logger {
47162
47880
  }
47163
47881
  _logLevel = level;
47164
47882
  }
47165
- static from(version3) {
47166
- return new Logger(version3);
47883
+ static from(version4) {
47884
+ return new Logger(version4);
47167
47885
  }
47168
47886
  }
47169
47887
  Logger.errors = ErrorCode;
47170
47888
  Logger.levels = LogLevel;
47171
47889
 
47172
47890
  // node_modules/@ethersproject/bytes/lib.esm/_version.js
47173
- var version3 = "bytes/5.7.0";
47891
+ var version4 = "bytes/5.7.0";
47174
47892
 
47175
47893
  // node_modules/@ethersproject/bytes/lib.esm/index.js
47176
- var logger = new Logger(version3);
47894
+ var logger = new Logger(version4);
47177
47895
  function isHexable(value) {
47178
47896
  return !!value.toHexString;
47179
47897
  }
@@ -47538,11 +48256,11 @@ function joinSignature(signature) {
47538
48256
  }
47539
48257
 
47540
48258
  // node_modules/@ethersproject/bignumber/lib.esm/_version.js
47541
- var version4 = "bignumber/5.7.0";
48259
+ var version5 = "bignumber/5.7.0";
47542
48260
 
47543
48261
  // node_modules/@ethersproject/bignumber/lib.esm/bignumber.js
47544
48262
  var BN = import_bn.default.BN;
47545
- var logger2 = new Logger(version4);
48263
+ var logger2 = new Logger(version5);
47546
48264
  var _constructorGuard = {};
47547
48265
  var MAX_SAFE = 9007199254740991;
47548
48266
  function isBigNumberish(value) {
@@ -47806,7 +48524,7 @@ function _base16To36(value) {
47806
48524
  return new BN(value, 16).toString(36);
47807
48525
  }
47808
48526
  // node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js
47809
- var logger3 = new Logger(version4);
48527
+ var logger3 = new Logger(version5);
47810
48528
  var _constructorGuard2 = {};
47811
48529
  var Zero = BigNumber.from(0);
47812
48530
  var NegativeOne = BigNumber.from(-1);
@@ -48145,7 +48863,7 @@ class FixedNumber {
48145
48863
  var ONE = FixedNumber.from(1);
48146
48864
  var BUMP = FixedNumber.from("0.5");
48147
48865
  // node_modules/@ethersproject/properties/lib.esm/_version.js
48148
- var version5 = "properties/5.7.0";
48866
+ var version6 = "properties/5.7.0";
48149
48867
 
48150
48868
  // node_modules/@ethersproject/properties/lib.esm/index.js
48151
48869
  var __awaiter = function(thisArg, _arguments, P, generator) {
@@ -48175,7 +48893,7 @@ var __awaiter = function(thisArg, _arguments, P, generator) {
48175
48893
  step((generator = generator.apply(thisArg, _arguments || [])).next());
48176
48894
  });
48177
48895
  };
48178
- var logger4 = new Logger(version5);
48896
+ var logger4 = new Logger(version6);
48179
48897
  function defineReadOnly(object, name, value) {
48180
48898
  Object.defineProperty(object, name, {
48181
48899
  enumerable: true,
@@ -48283,10 +49001,10 @@ class Description {
48283
49001
  }
48284
49002
 
48285
49003
  // node_modules/@ethersproject/abi/lib.esm/_version.js
48286
- var version6 = "abi/5.7.0";
49004
+ var version7 = "abi/5.7.0";
48287
49005
 
48288
49006
  // node_modules/@ethersproject/abi/lib.esm/fragments.js
48289
- var logger5 = new Logger(version6);
49007
+ var logger5 = new Logger(version7);
48290
49008
  var _constructorGuard3 = {};
48291
49009
  var ModifiersBytes = { calldata: true, memory: true, storage: true };
48292
49010
  var ModifiersNest = { calldata: true, memory: true };
@@ -49092,7 +49810,7 @@ function splitNesting(value) {
49092
49810
  }
49093
49811
 
49094
49812
  // node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.js
49095
- var logger6 = new Logger(version6);
49813
+ var logger6 = new Logger(version7);
49096
49814
  function checkResultErrors(result) {
49097
49815
  const errors = [];
49098
49816
  const checkErrors = function(path, object) {
@@ -49248,10 +49966,10 @@ __export(exports_lib, {
49248
49966
  });
49249
49967
 
49250
49968
  // node_modules/@ethersproject/rlp/lib.esm/_version.js
49251
- var version7 = "rlp/5.7.0";
49969
+ var version8 = "rlp/5.7.0";
49252
49970
 
49253
49971
  // node_modules/@ethersproject/rlp/lib.esm/index.js
49254
- var logger7 = new Logger(version7);
49972
+ var logger7 = new Logger(version8);
49255
49973
  function arrayifyInteger(value) {
49256
49974
  const result = [];
49257
49975
  while (value) {
@@ -49361,10 +50079,10 @@ function decode(data) {
49361
50079
  }
49362
50080
 
49363
50081
  // node_modules/@ethersproject/address/lib.esm/_version.js
49364
- var version8 = "address/5.7.0";
50082
+ var version9 = "address/5.7.0";
49365
50083
 
49366
50084
  // node_modules/@ethersproject/address/lib.esm/index.js
49367
- var logger8 = new Logger(version8);
50085
+ var logger8 = new Logger(version9);
49368
50086
  function getChecksumAddress(address) {
49369
50087
  if (!isHexString(address, 20)) {
49370
50088
  logger8.throwArgumentError("invalid address", "address", address);
@@ -49517,7 +50235,7 @@ class AnonymousCoder extends Coder {
49517
50235
  }
49518
50236
 
49519
50237
  // node_modules/@ethersproject/abi/lib.esm/coders/array.js
49520
- var logger9 = new Logger(version6);
50238
+ var logger9 = new Logger(version7);
49521
50239
  function pack(writer, coders, values) {
49522
50240
  let arrayValues = null;
49523
50241
  if (Array.isArray(values)) {
@@ -49861,10 +50579,10 @@ class NumberCoder extends Coder {
49861
50579
  }
49862
50580
 
49863
50581
  // node_modules/@ethersproject/strings/lib.esm/_version.js
49864
- var version9 = "strings/5.7.0";
50582
+ var version10 = "strings/5.7.0";
49865
50583
 
49866
50584
  // node_modules/@ethersproject/strings/lib.esm/utf8.js
49867
- var logger10 = new Logger(version9);
50585
+ var logger10 = new Logger(version10);
49868
50586
  var UnicodeNormalizationForm;
49869
50587
  (function(UnicodeNormalizationForm2) {
49870
50588
  UnicodeNormalizationForm2["current"] = "";
@@ -50327,7 +51045,7 @@ class TupleCoder extends Coder {
50327
51045
  }
50328
51046
 
50329
51047
  // node_modules/@ethersproject/abi/lib.esm/abi-coder.js
50330
- var logger11 = new Logger(version6);
51048
+ var logger11 = new Logger(version7);
50331
51049
  var paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);
50332
51050
  var paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);
50333
51051
 
@@ -50413,7 +51131,7 @@ function id(text) {
50413
51131
  }
50414
51132
 
50415
51133
  // node_modules/@ethersproject/hash/lib.esm/_version.js
50416
- var version10 = "hash/5.7.0";
51134
+ var version11 = "hash/5.7.0";
50417
51135
 
50418
51136
  // node_modules/@ethersproject/base64/lib.esm/index.js
50419
51137
  var exports_lib3 = {};
@@ -50766,7 +51484,7 @@ function consume_emoji_reversed(cps, eaten) {
50766
51484
  }
50767
51485
 
50768
51486
  // node_modules/@ethersproject/hash/lib.esm/namehash.js
50769
- var logger12 = new Logger(version10);
51487
+ var logger12 = new Logger(version11);
50770
51488
  var Zeros = new Uint8Array(32);
50771
51489
  Zeros.fill(0);
50772
51490
  function checkComponent(comp) {
@@ -50866,7 +51584,7 @@ var __awaiter2 = function(thisArg, _arguments, P, generator) {
50866
51584
  step((generator = generator.apply(thisArg, _arguments || [])).next());
50867
51585
  });
50868
51586
  };
50869
- var logger13 = new Logger(version10);
51587
+ var logger13 = new Logger(version11);
50870
51588
  var padding = new Uint8Array(32);
50871
51589
  padding.fill(0);
50872
51590
  var NegativeOne3 = BigNumber.from(-1);
@@ -51261,7 +51979,7 @@ class TypedDataEncoder {
51261
51979
  }
51262
51980
 
51263
51981
  // node_modules/@ethersproject/abi/lib.esm/interface.js
51264
- var logger14 = new Logger(version6);
51982
+ var logger14 = new Logger(version7);
51265
51983
  class LogDescription extends Description {
51266
51984
  }
51267
51985
 
@@ -51781,7 +52499,7 @@ class Interface {
51781
52499
  }
51782
52500
 
51783
52501
  // node_modules/@ethersproject/abstract-provider/lib.esm/_version.js
51784
- var version11 = "abstract-provider/5.7.0";
52502
+ var version12 = "abstract-provider/5.7.0";
51785
52503
 
51786
52504
  // node_modules/@ethersproject/abstract-provider/lib.esm/index.js
51787
52505
  var __awaiter3 = function(thisArg, _arguments, P, generator) {
@@ -51811,7 +52529,7 @@ var __awaiter3 = function(thisArg, _arguments, P, generator) {
51811
52529
  step((generator = generator.apply(thisArg, _arguments || [])).next());
51812
52530
  });
51813
52531
  };
51814
- var logger15 = new Logger(version11);
52532
+ var logger15 = new Logger(version12);
51815
52533
 
51816
52534
  class ForkEvent extends Description {
51817
52535
  static isForkEvent(value) {
@@ -51852,7 +52570,7 @@ class Provider {
51852
52570
  }
51853
52571
 
51854
52572
  // node_modules/@ethersproject/abstract-signer/lib.esm/_version.js
51855
- var version12 = "abstract-signer/5.7.0";
52573
+ var version13 = "abstract-signer/5.7.0";
51856
52574
 
51857
52575
  // node_modules/@ethersproject/abstract-signer/lib.esm/index.js
51858
52576
  var __awaiter4 = function(thisArg, _arguments, P, generator) {
@@ -51882,7 +52600,7 @@ var __awaiter4 = function(thisArg, _arguments, P, generator) {
51882
52600
  step((generator = generator.apply(thisArg, _arguments || [])).next());
51883
52601
  });
51884
52602
  };
51885
- var logger16 = new Logger(version12);
52603
+ var logger16 = new Logger(version13);
51886
52604
  var allowedTransactionKeys = [
51887
52605
  "accessList",
51888
52606
  "ccipReadEnabled",
@@ -53967,10 +54685,10 @@ var elliptic_1 = createCommonjsModule(function(module2, exports2) {
53967
54685
  var EC$1 = elliptic_1.ec;
53968
54686
 
53969
54687
  // node_modules/@ethersproject/signing-key/lib.esm/_version.js
53970
- var version13 = "signing-key/5.7.0";
54688
+ var version14 = "signing-key/5.7.0";
53971
54689
 
53972
54690
  // node_modules/@ethersproject/signing-key/lib.esm/index.js
53973
- var logger17 = new Logger(version13);
54691
+ var logger17 = new Logger(version14);
53974
54692
  var _curve = null;
53975
54693
  function getCurve() {
53976
54694
  if (!_curve) {
@@ -54046,10 +54764,10 @@ function computePublicKey(key2, compressed) {
54046
54764
  }
54047
54765
 
54048
54766
  // node_modules/@ethersproject/transactions/lib.esm/_version.js
54049
- var version14 = "transactions/5.7.0";
54767
+ var version15 = "transactions/5.7.0";
54050
54768
 
54051
54769
  // node_modules/@ethersproject/transactions/lib.esm/index.js
54052
- var logger18 = new Logger(version14);
54770
+ var logger18 = new Logger(version15);
54053
54771
  var TransactionTypes;
54054
54772
  (function(TransactionTypes2) {
54055
54773
  TransactionTypes2[TransactionTypes2["legacy"] = 0] = "legacy";
@@ -54397,7 +55115,7 @@ function parse(rawTransaction) {
54397
55115
  }
54398
55116
 
54399
55117
  // node_modules/@ethersproject/contracts/lib.esm/_version.js
54400
- var version15 = "contracts/5.7.0";
55118
+ var version16 = "contracts/5.7.0";
54401
55119
 
54402
55120
  // node_modules/@ethersproject/contracts/lib.esm/index.js
54403
55121
  var __awaiter5 = function(thisArg, _arguments, P, generator) {
@@ -54427,7 +55145,7 @@ var __awaiter5 = function(thisArg, _arguments, P, generator) {
54427
55145
  step((generator = generator.apply(thisArg, _arguments || [])).next());
54428
55146
  });
54429
55147
  };
54430
- var logger19 = new Logger(version15);
55148
+ var logger19 = new Logger(version16);
54431
55149
  var allowedTransactionKeys3 = {
54432
55150
  chainId: true,
54433
55151
  data: true,
@@ -55406,10 +56124,10 @@ var SupportedAlgorithm;
55406
56124
  })(SupportedAlgorithm || (SupportedAlgorithm = {}));
55407
56125
 
55408
56126
  // node_modules/@ethersproject/sha2/lib.esm/_version.js
55409
- var version16 = "sha2/5.7.0";
56127
+ var version17 = "sha2/5.7.0";
55410
56128
 
55411
56129
  // node_modules/@ethersproject/sha2/lib.esm/sha2.js
55412
- var logger20 = new Logger(version16);
56130
+ var logger20 = new Logger(version17);
55413
56131
  function ripemd160(data) {
55414
56132
  return "0x" + import_hash3.default.ripemd160().update(arrayify(data)).digest("hex");
55415
56133
  }
@@ -55465,11 +56183,11 @@ function pbkdf2(password, salt, iterations, keylen, hashAlgorithm) {
55465
56183
  return hexlify(DK);
55466
56184
  }
55467
56185
  // node_modules/@ethersproject/wordlists/lib.esm/_version.js
55468
- var version17 = "wordlists/5.7.0";
56186
+ var version18 = "wordlists/5.7.0";
55469
56187
 
55470
56188
  // node_modules/@ethersproject/wordlists/lib.esm/wordlist.js
55471
56189
  var exportWordlist = false;
55472
- var logger21 = new Logger(version17);
56190
+ var logger21 = new Logger(version18);
55473
56191
 
55474
56192
  class Wordlist {
55475
56193
  constructor(locale) {
@@ -55548,10 +56266,10 @@ var wordlists = {
55548
56266
  };
55549
56267
 
55550
56268
  // node_modules/@ethersproject/hdnode/lib.esm/_version.js
55551
- var version18 = "hdnode/5.7.0";
56269
+ var version19 = "hdnode/5.7.0";
55552
56270
 
55553
56271
  // node_modules/@ethersproject/hdnode/lib.esm/index.js
55554
- var logger22 = new Logger(version18);
56272
+ var logger22 = new Logger(version19);
55555
56273
  var N = BigNumber.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");
55556
56274
  var MasterSecret = toUtf8Bytes("Bitcoin seed");
55557
56275
  var HardenedBit = 2147483648;
@@ -55825,10 +56543,10 @@ function getAccountPath(index) {
55825
56543
  }
55826
56544
 
55827
56545
  // node_modules/@ethersproject/random/lib.esm/_version.js
55828
- var version19 = "random/5.7.0";
56546
+ var version20 = "random/5.7.0";
55829
56547
 
55830
56548
  // node_modules/@ethersproject/random/lib.esm/random.js
55831
- var logger23 = new Logger(version19);
56549
+ var logger23 = new Logger(version20);
55832
56550
  function getGlobal() {
55833
56551
  if (typeof self !== "undefined") {
55834
56552
  return self;
@@ -55876,7 +56594,7 @@ function shuffled(array) {
55876
56594
  var import_aes_js = __toESM(require_aes_js());
55877
56595
 
55878
56596
  // node_modules/@ethersproject/json-wallets/lib.esm/_version.js
55879
- var version20 = "json-wallets/5.7.0";
56597
+ var version21 = "json-wallets/5.7.0";
55880
56598
 
55881
56599
  // node_modules/@ethersproject/json-wallets/lib.esm/utils.js
55882
56600
  function looseArrayify(hexString) {
@@ -55931,7 +56649,7 @@ function uuidV4(randomBytes2) {
55931
56649
  }
55932
56650
 
55933
56651
  // node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.js
55934
- var logger24 = new Logger(version20);
56652
+ var logger24 = new Logger(version21);
55935
56653
 
55936
56654
  class CrowdsaleAccount extends Description {
55937
56655
  isCrowdsaleAccount(value) {
@@ -56034,7 +56752,7 @@ var __awaiter6 = function(thisArg, _arguments, P, generator) {
56034
56752
  step((generator = generator.apply(thisArg, _arguments || [])).next());
56035
56753
  });
56036
56754
  };
56037
- var logger25 = new Logger(version20);
56755
+ var logger25 = new Logger(version21);
56038
56756
  function hasMnemonic(value) {
56039
56757
  return value != null && value.mnemonic && value.mnemonic.phrase;
56040
56758
  }
@@ -56319,7 +57037,7 @@ function decryptJsonWalletSync(json, password) {
56319
57037
  }
56320
57038
 
56321
57039
  // node_modules/@ethersproject/wallet/lib.esm/_version.js
56322
- var version21 = "wallet/5.7.0";
57040
+ var version22 = "wallet/5.7.0";
56323
57041
 
56324
57042
  // node_modules/@ethersproject/wallet/lib.esm/index.js
56325
57043
  var __awaiter7 = function(thisArg, _arguments, P, generator) {
@@ -56349,7 +57067,7 @@ var __awaiter7 = function(thisArg, _arguments, P, generator) {
56349
57067
  step((generator = generator.apply(thisArg, _arguments || [])).next());
56350
57068
  });
56351
57069
  };
56352
- var logger26 = new Logger(version21);
57070
+ var logger26 = new Logger(version22);
56353
57071
  function isAccount(value) {
56354
57072
  return value != null && isHexString(value.privateKey, 32) && value.address != null;
56355
57073
  }
@@ -56531,10 +57249,10 @@ __export(exports_lib4, {
56531
57249
  });
56532
57250
 
56533
57251
  // node_modules/@ethersproject/networks/lib.esm/_version.js
56534
- var version22 = "networks/5.7.1";
57252
+ var version23 = "networks/5.7.1";
56535
57253
 
56536
57254
  // node_modules/@ethersproject/networks/lib.esm/index.js
56537
- var logger27 = new Logger(version22);
57255
+ var logger27 = new Logger(version23);
56538
57256
  function isRenetworkable(value) {
56539
57257
  return value && typeof value.renetwork === "function";
56540
57258
  }
@@ -56753,7 +57471,7 @@ function getNetwork(network) {
56753
57471
  }
56754
57472
 
56755
57473
  // node_modules/@ethersproject/web/lib.esm/_version.js
56756
- var version23 = "web/5.7.1";
57474
+ var version24 = "web/5.7.1";
56757
57475
 
56758
57476
  // node_modules/@ethersproject/web/lib.esm/geturl.js
56759
57477
  var __awaiter8 = function(thisArg, _arguments, P, generator) {
@@ -56867,7 +57585,7 @@ var __awaiter9 = function(thisArg, _arguments, P, generator) {
56867
57585
  step((generator = generator.apply(thisArg, _arguments || [])).next());
56868
57586
  });
56869
57587
  };
56870
- var logger28 = new Logger(version23);
57588
+ var logger28 = new Logger(version24);
56871
57589
  function staller(duration) {
56872
57590
  return new Promise((resolve) => {
56873
57591
  setTimeout(resolve, duration);
@@ -57222,10 +57940,10 @@ function poll(func, options) {
57222
57940
  var import_bech32 = __toESM(require_bech32());
57223
57941
 
57224
57942
  // node_modules/@ethersproject/providers/lib.esm/_version.js
57225
- var version24 = "providers/5.7.2";
57943
+ var version25 = "providers/5.7.2";
57226
57944
 
57227
57945
  // node_modules/@ethersproject/providers/lib.esm/formatter.js
57228
- var logger29 = new Logger(version24);
57946
+ var logger29 = new Logger(version25);
57229
57947
 
57230
57948
  class Formatter {
57231
57949
  constructor() {
@@ -57660,7 +58378,7 @@ var __awaiter10 = function(thisArg, _arguments, P, generator) {
57660
58378
  step((generator = generator.apply(thisArg, _arguments || [])).next());
57661
58379
  });
57662
58380
  };
57663
- var logger30 = new Logger(version24);
58381
+ var logger30 = new Logger(version25);
57664
58382
  var MAX_CCIP_REDIRECTS = 10;
57665
58383
  function checkTopic(topic) {
57666
58384
  if (topic == null) {
@@ -57955,17 +58673,17 @@ class Resolver {
57955
58673
  }
57956
58674
  if (coinInfo.prefix != null) {
57957
58675
  const length = bytes[1];
57958
- let version25 = bytes[0];
57959
- if (version25 === 0) {
58676
+ let version26 = bytes[0];
58677
+ if (version26 === 0) {
57960
58678
  if (length !== 20 && length !== 32) {
57961
- version25 = -1;
58679
+ version26 = -1;
57962
58680
  }
57963
58681
  } else {
57964
- version25 = -1;
58682
+ version26 = -1;
57965
58683
  }
57966
- if (version25 >= 0 && bytes.length === 2 + length && length >= 1 && length <= 75) {
58684
+ if (version26 >= 0 && bytes.length === 2 + length && length >= 1 && length <= 75) {
57967
58685
  const words2 = import_bech32.default.toWords(bytes.slice(2));
57968
- words2.unshift(version25);
58686
+ words2.unshift(version26);
57969
58687
  return import_bech32.default.encode(coinInfo.prefix, words2);
57970
58688
  }
57971
58689
  }
@@ -59448,7 +60166,7 @@ var __awaiter11 = function(thisArg, _arguments, P, generator) {
59448
60166
  step((generator = generator.apply(thisArg, _arguments || [])).next());
59449
60167
  });
59450
60168
  };
59451
- var logger31 = new Logger(version24);
60169
+ var logger31 = new Logger(version25);
59452
60170
  var errorGas = ["call", "estimateGas"];
59453
60171
  function spelunk(value, requireData) {
59454
60172
  if (value == null) {
@@ -60078,7 +60796,7 @@ try {
60078
60796
  throw new Error("inject please");
60079
60797
  }
60080
60798
  } catch (error) {
60081
- const logger32 = new Logger(version24);
60799
+ const logger32 = new Logger(version25);
60082
60800
  WS = function() {
60083
60801
  logger32.throwError("WebSockets not supported in this environment", Logger.errors.UNSUPPORTED_OPERATION, {
60084
60802
  operation: "new WebSocket()"
@@ -60114,7 +60832,7 @@ var __awaiter12 = function(thisArg, _arguments, P, generator) {
60114
60832
  step((generator = generator.apply(thisArg, _arguments || [])).next());
60115
60833
  });
60116
60834
  };
60117
- var logger32 = new Logger(version24);
60835
+ var logger32 = new Logger(version25);
60118
60836
  var NextId = 1;
60119
60837
 
60120
60838
  class WebSocketProvider extends JsonRpcProvider {
@@ -60385,7 +61103,7 @@ var __awaiter13 = function(thisArg, _arguments, P, generator) {
60385
61103
  step((generator = generator.apply(thisArg, _arguments || [])).next());
60386
61104
  });
60387
61105
  };
60388
- var logger33 = new Logger(version24);
61106
+ var logger33 = new Logger(version25);
60389
61107
 
60390
61108
  class StaticJsonRpcProvider extends JsonRpcProvider {
60391
61109
  detectNetwork() {
@@ -60447,7 +61165,7 @@ class UrlJsonRpcProvider extends StaticJsonRpcProvider {
60447
61165
  }
60448
61166
 
60449
61167
  // node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js
60450
- var logger34 = new Logger(version24);
61168
+ var logger34 = new Logger(version25);
60451
61169
  var defaultApiKey = "_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";
60452
61170
 
60453
61171
  class AlchemyWebSocketProvider extends WebSocketProvider {
@@ -60522,7 +61240,7 @@ class AlchemyProvider extends UrlJsonRpcProvider {
60522
61240
  }
60523
61241
 
60524
61242
  // node_modules/@ethersproject/providers/lib.esm/ankr-provider.js
60525
- var logger35 = new Logger(version24);
61243
+ var logger35 = new Logger(version25);
60526
61244
  var defaultApiKey2 = "9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";
60527
61245
  function getHost(name) {
60528
61246
  switch (name) {
@@ -60602,7 +61320,7 @@ var __awaiter14 = function(thisArg, _arguments, P, generator) {
60602
61320
  step((generator = generator.apply(thisArg, _arguments || [])).next());
60603
61321
  });
60604
61322
  };
60605
- var logger36 = new Logger(version24);
61323
+ var logger36 = new Logger(version25);
60606
61324
 
60607
61325
  class CloudflareProvider extends UrlJsonRpcProvider {
60608
61326
  static getApiKey(apiKey) {
@@ -60664,7 +61382,7 @@ var __awaiter15 = function(thisArg, _arguments, P, generator) {
60664
61382
  step((generator = generator.apply(thisArg, _arguments || [])).next());
60665
61383
  });
60666
61384
  };
60667
- var logger37 = new Logger(version24);
61385
+ var logger37 = new Logger(version25);
60668
61386
  function getTransactionPostData(transaction) {
60669
61387
  const result = {};
60670
61388
  for (let key2 in transaction) {
@@ -61080,7 +61798,7 @@ var __awaiter16 = function(thisArg, _arguments, P, generator) {
61080
61798
  step((generator = generator.apply(thisArg, _arguments || [])).next());
61081
61799
  });
61082
61800
  };
61083
- var logger38 = new Logger(version24);
61801
+ var logger38 = new Logger(version25);
61084
61802
  function now() {
61085
61803
  return new Date().getTime();
61086
61804
  }
@@ -61584,7 +62302,7 @@ class FallbackProvider extends BaseProvider {
61584
62302
  var IpcProvider = null;
61585
62303
 
61586
62304
  // node_modules/@ethersproject/providers/lib.esm/infura-provider.js
61587
- var logger39 = new Logger(version24);
62305
+ var logger39 = new Logger(version25);
61588
62306
  var defaultProjectId = "84842078b09946638c03157f83405213";
61589
62307
 
61590
62308
  class InfuraWebSocketProvider extends WebSocketProvider {
@@ -61755,7 +62473,7 @@ class JsonRpcBatchProvider extends JsonRpcProvider {
61755
62473
  }
61756
62474
 
61757
62475
  // node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.js
61758
- var logger40 = new Logger(version24);
62476
+ var logger40 = new Logger(version25);
61759
62477
  var defaultApiKey3 = "ETHERS_JS_SHARED";
61760
62478
 
61761
62479
  class NodesmithProvider extends UrlJsonRpcProvider {
@@ -61792,7 +62510,7 @@ class NodesmithProvider extends UrlJsonRpcProvider {
61792
62510
  }
61793
62511
 
61794
62512
  // node_modules/@ethersproject/providers/lib.esm/pocket-provider.js
61795
- var logger41 = new Logger(version24);
62513
+ var logger41 = new Logger(version25);
61796
62514
  var defaultApplicationId = "62e1ad51b37b8e00394bda3b";
61797
62515
 
61798
62516
  class PocketProvider extends UrlJsonRpcProvider {
@@ -61860,7 +62578,7 @@ class PocketProvider extends UrlJsonRpcProvider {
61860
62578
  }
61861
62579
 
61862
62580
  // node_modules/@ethersproject/providers/lib.esm/web3-provider.js
61863
- var logger42 = new Logger(version24);
62581
+ var logger42 = new Logger(version25);
61864
62582
  var _nextId = 1;
61865
62583
  function buildWeb3LegacyFetcher(provider, sendFunc) {
61866
62584
  const fetcher = "Web3LegacyFetcher";
@@ -61984,7 +62702,7 @@ class Web3Provider extends JsonRpcProvider {
61984
62702
  }
61985
62703
 
61986
62704
  // node_modules/@ethersproject/providers/lib.esm/index.js
61987
- var logger43 = new Logger(version24);
62705
+ var logger43 = new Logger(version25);
61988
62706
  function getDefaultProvider(network, options) {
61989
62707
  if (network == null) {
61990
62708
  network = "homestead";
@@ -62131,14 +62849,14 @@ __export(exports_utils, {
62131
62849
  });
62132
62850
 
62133
62851
  // node_modules/@ethersproject/solidity/lib.esm/_version.js
62134
- var version25 = "solidity/5.7.0";
62852
+ var version26 = "solidity/5.7.0";
62135
62853
 
62136
62854
  // node_modules/@ethersproject/solidity/lib.esm/index.js
62137
62855
  var regexBytes = new RegExp("^bytes([0-9]+)$");
62138
62856
  var regexNumber = new RegExp("^(u?int)([0-9]*)$");
62139
62857
  var regexArray = new RegExp("^(.*)\\[([0-9]*)\\]$");
62140
62858
  var Zeros2 = "0000000000000000000000000000000000000000000000000000000000000000";
62141
- var logger44 = new Logger(version25);
62859
+ var logger44 = new Logger(version26);
62142
62860
  function _pack(type, value, isArray) {
62143
62861
  switch (type) {
62144
62862
  case "address":
@@ -62216,10 +62934,10 @@ function sha2562(types, values) {
62216
62934
  }
62217
62935
 
62218
62936
  // node_modules/@ethersproject/units/lib.esm/_version.js
62219
- var version26 = "units/5.7.0";
62937
+ var version27 = "units/5.7.0";
62220
62938
 
62221
62939
  // node_modules/@ethersproject/units/lib.esm/index.js
62222
- var logger45 = new Logger(version26);
62940
+ var logger45 = new Logger(version27);
62223
62941
  var names = [
62224
62942
  "wei",
62225
62943
  "kwei",
@@ -62295,10 +63013,10 @@ function parseEther(ether) {
62295
63013
  }
62296
63014
 
62297
63015
  // node_modules/ethers/lib.esm/_version.js
62298
- var version27 = "ethers/5.7.2";
63016
+ var version28 = "ethers/5.7.2";
62299
63017
 
62300
63018
  // node_modules/ethers/lib.esm/ethers.js
62301
- var logger46 = new Logger(version27);
63019
+ var logger46 = new Logger(version28);
62302
63020
 
62303
63021
  // node_modules/ethers/lib.esm/index.js
62304
63022
  try {
@@ -62968,7 +63686,8 @@ var contractsRegistry_default = {
62968
63686
  wrappedNativeToken: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
62969
63687
  morpho: {
62970
63688
  morphoBlue: "0x6c247b1F6182318877311737BaC0844bAa518F5e",
62971
- vaultV1_0: "0x7c574174DA4b2be3f705c6244B4BfA0815a8B3Ed"
63689
+ vaultV1_0: "0x7c574174DA4b2be3f705c6244B4BfA0815a8B3Ed",
63690
+ publicAllocator: "0x769583Af5e9D03589F159EbEC31Cc2c23E8C355E"
62972
63691
  },
62973
63692
  poster: "0x000000000000cd17345801aa8147b8D3950260FF",
62974
63693
  cctp: {
@@ -63040,7 +63759,8 @@ var contractsRegistry_default = {
63040
63759
  wrappedNativeToken: "0x4200000000000000000000000000000000000006",
63041
63760
  morpho: {
63042
63761
  morphoBlue: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb",
63043
- vaultV1_0: "0xBEEFE94c8aD530842bfE7d8B397938fFc1cb83b2"
63762
+ vaultV1_0: "0xBEEFE94c8aD530842bfE7d8B397938fFc1cb83b2",
63763
+ publicAllocator: "0xA090dD1a701408Df1d4d0B85b716c87565f90467"
63044
63764
  },
63045
63765
  cctp: {
63046
63766
  tokenMessengerV2: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
@@ -63134,7 +63854,8 @@ var contractsRegistry_default = {
63134
63854
  wrappedNativeToken: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
63135
63855
  morpho: {
63136
63856
  morphoBlue: "0x1bF0c2541F820E775182832f06c0B7Fc27A25f67",
63137
- vaultV1_0: "0x781FB7F6d845E3bE129289833b04d43Aa8558c42"
63857
+ vaultV1_0: "0x781FB7F6d845E3bE129289833b04d43Aa8558c42",
63858
+ publicAllocator: "0xfac15aff53ADd2ff80C2962127C434E8615Df0d3"
63138
63859
  },
63139
63860
  cctp: {
63140
63861
  tokenMessengerV2: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
@@ -63213,6 +63934,10 @@ var contractsRegistry_default = {
63213
63934
  },
63214
63935
  ccip: {
63215
63936
  router: "0x34B03Cb9086d7D758AC55af71584F81A598759FE"
63937
+ },
63938
+ morpho: {
63939
+ morphoBlue: "0x01b0Bd309AA75547f7a37Ad7B1219A898E67a83a",
63940
+ publicAllocator: "0x842bEccF8eBC11006c4bE96DEfE09b60326D0495"
63216
63941
  }
63217
63942
  },
63218
63943
  optimism: {
@@ -63268,7 +63993,8 @@ var contractsRegistry_default = {
63268
63993
  aggregatorV6: "0x111111125421cA6dc452d289314280a0f8842A65"
63269
63994
  },
63270
63995
  morpho: {
63271
- morphoBlue: "0xce95AfbB8EA029495c66020883F87aaE8864AF92"
63996
+ morphoBlue: "0xce95AfbB8EA029495c66020883F87aaE8864AF92",
63997
+ publicAllocator: "0x0d68a97324E602E02799CD83B42D337207B40658"
63272
63998
  },
63273
63999
  cctp: {
63274
64000
  tokenMessengerV2: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
@@ -63404,7 +64130,8 @@ var contractsRegistry_default = {
63404
64130
  },
63405
64131
  morpho: {
63406
64132
  morphoBlue: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb",
63407
- vaultV1_0: "0xBEEFFF7e4EedD83A4a4aB53A68D03eC77C9a57a8"
64133
+ vaultV1_0: "0xBEEFFF7e4EedD83A4a4aB53A68D03eC77C9a57a8",
64134
+ publicAllocator: "0xfd32fA2ca22c76dD6E550706Ad913FC6CE91c75D"
63408
64135
  },
63409
64136
  lido: {
63410
64137
  steth: "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",
@@ -63544,7 +64271,8 @@ var contractsRegistry_default = {
63544
64271
  },
63545
64272
  permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
63546
64273
  morpho: {
63547
- morphoBlue: "0x8f5ae9CddB9f68de460C77730b018Ae7E04a140A"
64274
+ morphoBlue: "0x8f5ae9CddB9f68de460C77730b018Ae7E04a140A",
64275
+ publicAllocator: "0xB0c9a107fA17c779B3378210A7a593e88938C7C9"
63548
64276
  },
63549
64277
  cctp: {
63550
64278
  tokenMessengerV2: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
@@ -63653,7 +64381,8 @@ var contractsRegistry_default = {
63653
64381
  multisendUnwrapper: "0xB4Cd4bb764C089f20DA18700CE8bc5e49F369efD"
63654
64382
  },
63655
64383
  morpho: {
63656
- morphoBlue: "0xE741BC7c34758b4caE05062794E8Ae24978AF432"
64384
+ morphoBlue: "0xE741BC7c34758b4caE05062794E8Ae24978AF432",
64385
+ publicAllocator: "0xef9889B4e443DEd35FA0Bd060f2104Cca94e6A43"
63657
64386
  },
63658
64387
  cctp: {
63659
64388
  tokenMessengerV2: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
@@ -63760,7 +64489,11 @@ var contractsRegistry_default = {
63760
64489
  },
63761
64490
  multicall3: "0xcA11bde05977b3631167028862bE2a173976CA11",
63762
64491
  permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
63763
- poster: "0x000000000000cd17345801aa8147b8D3950260FF"
64492
+ poster: "0x000000000000cd17345801aa8147b8D3950260FF",
64493
+ morpho: {
64494
+ morphoBlue: "0xd24ECdD8C1e0E57a4E26B1a7bbeAa3e95466A569",
64495
+ publicAllocator: "0x3Fe12193D178B76BaF4e23a083A64e49ACDE3188"
64496
+ }
63764
64497
  },
63765
64498
  monad: {
63766
64499
  merkl: {
@@ -64030,8 +64763,8 @@ class MultisendBuilder {
64030
64763
  data
64031
64764
  });
64032
64765
  }
64033
- static new(chainId, version28 = "v1_4_1") {
64034
- return new MultisendBuilder(getAddressOrThrow(chainId, `gnosisSafe.${version28}.multisend`));
64766
+ static new(chainId, version29 = "v1_4_1") {
64767
+ return new MultisendBuilder(getAddressOrThrow(chainId, `gnosisSafe.${version29}.multisend`));
64035
64768
  }
64036
64769
  }
64037
64770
  // src/integrations/gnosis/safe.L2.abi.ts
@@ -76956,7 +77689,7 @@ var SwapRouter2 = /* @__PURE__ */ function() {
76956
77689
  SwapRouter2.INTERFACE = /* @__PURE__ */ new Interface(SwapRouter_default.abi);
76957
77690
 
76958
77691
  // node_modules/@uniswap/v4-sdk/dist/v4-sdk.esm.js
76959
- var import_utils4 = __toESM(require_utils6());
77692
+ var import_utils6 = __toESM(require_utils6());
76960
77693
  var import_jsbi5 = __toESM(require_jsbi_umd());
76961
77694
  function _arrayLikeToArray3(r2, a) {
76962
77695
  (a == null || a > r2.length) && (a = r2.length);
@@ -77428,7 +78161,7 @@ var Hook = /* @__PURE__ */ function() {
77428
78161
  return !!(parseInt(address, 16) & 1 << hookFlagIndex[hookOption]);
77429
78162
  };
77430
78163
  Hook2._checkAddress = function _checkAddress(address) {
77431
- !import_utils4.isAddress(address) && invariant(false, "invalid address");
78164
+ !import_utils6.isAddress(address) && invariant(false, "invalid address");
77432
78165
  };
77433
78166
  return Hook2;
77434
78167
  }();
@@ -77467,7 +78200,7 @@ var Pool3 = /* @__PURE__ */ function() {
77467
78200
  if (ticks === undefined) {
77468
78201
  ticks = NO_TICK_DATA_PROVIDER_DEFAULT3;
77469
78202
  }
77470
- !import_utils4.isAddress(hooks) && invariant(false, "Invalid hook address");
78203
+ !import_utils6.isAddress(hooks) && invariant(false, "Invalid hook address");
77471
78204
  !(Number.isInteger(fee) && (fee === DYNAMIC_FEE_FLAG || fee < 1e6)) && invariant(false, "FEE");
77472
78205
  if (fee === DYNAMIC_FEE_FLAG) {
77473
78206
  !(Number(hooks) > 0) && invariant(false, "Dynamic fee pool requires a hook");
@@ -77489,7 +78222,7 @@ var Pool3 = /* @__PURE__ */ function() {
77489
78222
  this.poolId = Pool4.getPoolId(this.currency0, this.currency1, this.fee, this.tickSpacing, this.hooks);
77490
78223
  }
77491
78224
  Pool4.getPoolKey = function getPoolKey(currencyA, currencyB, fee, tickSpacing, hooks) {
77492
- !import_utils4.isAddress(hooks) && invariant(false, "Invalid hook address");
78225
+ !import_utils6.isAddress(hooks) && invariant(false, "Invalid hook address");
77493
78226
  var _ref2 = sortsBefore(currencyA, currencyB) ? [currencyA, currencyB] : [currencyB, currencyA], currency0 = _ref2[0], currency1 = _ref2[1];
77494
78227
  var currency0Addr = currency0.isNative ? ADDRESS_ZERO3 : currency0.wrapped.address;
77495
78228
  var currency1Addr = currency1.isNative ? ADDRESS_ZERO3 : currency1.wrapped.address;
@@ -77505,7 +78238,7 @@ var Pool3 = /* @__PURE__ */ function() {
77505
78238
  var _ref3 = sortsBefore(currencyA, currencyB) ? [currencyA, currencyB] : [currencyB, currencyA], currency0 = _ref3[0], currency1 = _ref3[1];
77506
78239
  var currency0Addr = currency0.isNative ? ADDRESS_ZERO3 : currency0.wrapped.address;
77507
78240
  var currency1Addr = currency1.isNative ? ADDRESS_ZERO3 : currency1.wrapped.address;
77508
- return keccak2563(["bytes"], [import_utils4.defaultAbiCoder.encode(["address", "address", "uint24", "int24", "address"], [currency0Addr, currency1Addr, fee, tickSpacing, hooks])]);
78241
+ return keccak2563(["bytes"], [import_utils6.defaultAbiCoder.encode(["address", "address", "uint24", "int24", "address"], [currency0Addr, currency1Addr, fee, tickSpacing, hooks])]);
77509
78242
  };
77510
78243
  var _proto = Pool4.prototype;
77511
78244
  _proto.involvesCurrency = function involvesCurrency(currency) {
@@ -78095,7 +78828,7 @@ var V4Planner = /* @__PURE__ */ function() {
78095
78828
  return this;
78096
78829
  };
78097
78830
  _proto.finalize = function finalize() {
78098
- return import_utils4.defaultAbiCoder.encode(["bytes", "bytes[]"], [this.actions, this.params]);
78831
+ return import_utils6.defaultAbiCoder.encode(["bytes", "bytes[]"], [this.actions, this.params]);
78099
78832
  };
78100
78833
  return V4Planner2;
78101
78834
  }();
@@ -78103,7 +78836,7 @@ function currencyAddress(currency) {
78103
78836
  return currency.isNative ? ADDRESS_ZERO3 : currency.wrapped.address;
78104
78837
  }
78105
78838
  function createAction(action, parameters) {
78106
- var encodedInput = import_utils4.defaultAbiCoder.encode(V4_BASE_ACTIONS_ABI_DEFINITION[action].map(function(v) {
78839
+ var encodedInput = import_utils6.defaultAbiCoder.encode(V4_BASE_ACTIONS_ABI_DEFINITION[action].map(function(v) {
78107
78840
  return v.type;
78108
78841
  }), parameters);
78109
78842
  return {
@@ -86745,7 +87478,7 @@ var silo_abi_default = [
86745
87478
  }
86746
87479
  ];
86747
87480
  // src/integrations/lagoonV1/lagoon.v1.ts
86748
- var import_utils5 = __toESM(require_utils6());
87481
+ var import_utils7 = __toESM(require_utils6());
86749
87482
  var factoryInterface = new exports_ethers.utils.Interface(factory_abi_default);
86750
87483
  var vaultInterface = new exports_ethers.utils.Interface(vault_abi_default);
86751
87484
  var CreateVaultProxyCalldata = ({
@@ -86897,7 +87630,7 @@ var calculateDeterministicVaultAddress = ({
86897
87630
  wrappedNativeToken,
86898
87631
  initStruct
86899
87632
  }) => {
86900
- const initEncoded = import_utils5.defaultAbiCoder.encode(["tuple(address,string,string,address,address,address,address,address,uint16,uint16,bool,uint256)"], [
87633
+ const initEncoded = import_utils7.defaultAbiCoder.encode(["tuple(address,string,string,address,address,address,address,address,uint16,uint16,bool,uint256)"], [
86901
87634
  [
86902
87635
  initStruct.underlying,
86903
87636
  initStruct.name,
@@ -86917,11 +87650,11 @@ var calculateDeterministicVaultAddress = ({
86917
87650
  "function initialize(bytes data, address feeRegistry, address wrappedNativeToken)"
86918
87651
  ]);
86919
87652
  const initCall = iface.encodeFunctionData("initialize", [initEncoded, registry, wrappedNativeToken]);
86920
- const constructorEncoded = import_utils5.defaultAbiCoder.encode(["address", "address", "address", "uint256", "bytes"], [initStruct.logic, registry, initStruct.initialOwner, initStruct.initialDelay, initCall]);
87653
+ const constructorEncoded = import_utils7.defaultAbiCoder.encode(["address", "address", "address", "uint256", "bytes"], [initStruct.logic, registry, initStruct.initialOwner, initStruct.initialDelay, initCall]);
86921
87654
  const initCode = OPTIN_PROXY_CREATION_BYTECODE + constructorEncoded.slice(2);
86922
- const create2Inputs = import_utils5.solidityPack(["bytes1", "address", "bytes32", "bytes32"], ["0xff", factoryAddress, initStruct.salt, import_utils5.keccak256(initCode)]);
86923
- const computedAddress = `0x${import_utils5.keccak256(create2Inputs).slice(-40)}`;
86924
- return import_utils5.getAddress(computedAddress);
87655
+ const create2Inputs = import_utils7.solidityPack(["bytes1", "address", "bytes32", "bytes32"], ["0xff", factoryAddress, initStruct.salt, import_utils7.keccak256(initCode)]);
87656
+ const computedAddress = `0x${import_utils7.keccak256(create2Inputs).slice(-40)}`;
87657
+ return import_utils7.getAddress(computedAddress);
86925
87658
  };
86926
87659
  // src/integrations/lendleV1/lendle.pool.abi.ts
86927
87660
  var lendle_pool_abi_default = [
@@ -93343,6 +94076,31 @@ var withdrawMorphoVaultAssetTrx = ({
93343
94076
  };
93344
94077
  var WithdrawMorphoVaultCalldata = RedeemMorphoVaultCalldata;
93345
94078
  var withdrawMorphoVaultTrx = redeemMorphoVaultTrx;
94079
+ // src/integrations/morphoPublicAllocator/morpho.public.allocator.abi.ts
94080
+ var PublicAllocatorReallocateToAbi = parseAbi([
94081
+ "function reallocateTo(address vault, ((address loanToken, address collateralToken, address oracle, address irm, uint256 lltv) marketParams, uint128 amount)[] withdrawals, (address loanToken, address collateralToken, address oracle, address irm, uint256 lltv) supplyMarketParams) payable"
94082
+ ]);
94083
+
94084
+ // src/integrations/morphoPublicAllocator/morpho.public.allocator.ts
94085
+ var getMorphoPublicAllocatorAddress = (chainId) => {
94086
+ return getAddressOrThrow(chainId, "morpho.publicAllocator");
94087
+ };
94088
+ var encodeReallocateTo = (params) => {
94089
+ const { vault, withdrawals, supplyMarketParams } = params;
94090
+ return encodeFunctionData({
94091
+ abi: PublicAllocatorReallocateToAbi,
94092
+ functionName: "reallocateTo",
94093
+ args: [vault, withdrawals, supplyMarketParams]
94094
+ });
94095
+ };
94096
+ var buildReallocateToCall = (params) => {
94097
+ const { chainId, vault, withdrawals, supplyMarketParams, feeWei } = params;
94098
+ return {
94099
+ to: getMorphoPublicAllocatorAddress(chainId),
94100
+ data: encodeReallocateTo({ vault, withdrawals, supplyMarketParams }),
94101
+ value: feeWei
94102
+ };
94103
+ };
93346
94104
  // src/integrations/merkl/merkl.distributor.abi.ts
93347
94105
  var merkl_distributor_abi_default = [
93348
94106
  { inputs: [], stateMutability: "nonpayable", type: "constructor" },
@@ -96246,16 +97004,16 @@ var decodeCctpV2Header = (message) => {
96246
97004
  if (length < HEADER_BYTE_LENGTH) {
96247
97005
  throw new Error(`CCTP decoder: header requires ${HEADER_BYTE_LENGTH} bytes, got ${length}`);
96248
97006
  }
96249
- const version29 = hexToNumber(sliceHex(bytes, OFF_VERSION, OFF_SOURCE_DOMAIN));
96250
- if (version29 !== CCTP_V2_HEADER_VERSION) {
96251
- throw new Error(`CCTP decoder: unknown header version ${version29} (expected ${CCTP_V2_HEADER_VERSION})`);
97007
+ const version30 = hexToNumber(sliceHex(bytes, OFF_VERSION, OFF_SOURCE_DOMAIN));
97008
+ if (version30 !== CCTP_V2_HEADER_VERSION) {
97009
+ throw new Error(`CCTP decoder: unknown header version ${version30} (expected ${CCTP_V2_HEADER_VERSION})`);
96252
97010
  }
96253
97011
  const senderPadded = sliceHex(bytes, OFF_SENDER, OFF_RECIPIENT);
96254
97012
  const recipientPadded = sliceHex(bytes, OFF_RECIPIENT, OFF_DESTINATION_CALLER);
96255
97013
  const sender = getAddress(`0x${senderPadded.slice(2 + 24)}`);
96256
97014
  const recipient = getAddress(`0x${recipientPadded.slice(2 + 24)}`);
96257
97015
  return Object.freeze({
96258
- version: version29,
97016
+ version: version30,
96259
97017
  sourceDomain: hexToNumber(sliceHex(bytes, OFF_SOURCE_DOMAIN, OFF_DEST_DOMAIN)),
96260
97018
  destinationDomain: hexToNumber(sliceHex(bytes, OFF_DEST_DOMAIN, OFF_NONCE)),
96261
97019
  nonce: sliceHex(bytes, OFF_NONCE, OFF_SENDER),
@@ -96273,15 +97031,15 @@ var decodeCctpV2BurnBody = (body) => {
96273
97031
  if (length < BURN_BODY_FIXED_BYTE_LENGTH) {
96274
97032
  throw new Error(`CCTP decoder: burn body requires ${BURN_BODY_FIXED_BYTE_LENGTH} bytes, got ${length}`);
96275
97033
  }
96276
- const version29 = hexToNumber(sliceHex(bytes, BODY_OFF_VERSION, BODY_OFF_BURN_TOKEN));
96277
- if (version29 !== CCTP_V2_BURN_BODY_VERSION) {
96278
- throw new Error(`CCTP decoder: unknown burn body version ${version29} (expected ${CCTP_V2_BURN_BODY_VERSION})`);
97034
+ const version30 = hexToNumber(sliceHex(bytes, BODY_OFF_VERSION, BODY_OFF_BURN_TOKEN));
97035
+ if (version30 !== CCTP_V2_BURN_BODY_VERSION) {
97036
+ throw new Error(`CCTP decoder: unknown burn body version ${version30} (expected ${CCTP_V2_BURN_BODY_VERSION})`);
96279
97037
  }
96280
97038
  const burnTokenPadded = sliceHex(bytes, BODY_OFF_BURN_TOKEN, BODY_OFF_MINT_RECIPIENT);
96281
97039
  const mintRecipientPadded = sliceHex(bytes, BODY_OFF_MINT_RECIPIENT, BODY_OFF_AMOUNT);
96282
97040
  const messageSenderPadded = sliceHex(bytes, BODY_OFF_MESSAGE_SENDER, BODY_OFF_MAX_FEE);
96283
97041
  return Object.freeze({
96284
- version: version29,
97042
+ version: version30,
96285
97043
  burnToken: getAddress(`0x${burnTokenPadded.slice(2 + 24)}`),
96286
97044
  mintRecipient: getAddress(`0x${mintRecipientPadded.slice(2 + 24)}`),
96287
97045
  amount: hexToBigInt(sliceHex(bytes, BODY_OFF_AMOUNT, BODY_OFF_MESSAGE_SENDER)),
@@ -96541,7 +97299,7 @@ __export(exports_external, {
96541
97299
  // node_modules/zod/v4/core/index.js
96542
97300
  var exports_core2 = {};
96543
97301
  __export(exports_core2, {
96544
- version: () => version29,
97302
+ version: () => version30,
96545
97303
  util: () => exports_util2,
96546
97304
  treeifyError: () => treeifyError,
96547
97305
  toJSONSchema: () => toJSONSchema,
@@ -97861,10 +98619,10 @@ var nanoid = /^[a-zA-Z0-9_-]{21}$/;
97861
98619
  var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
97862
98620
  var extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
97863
98621
  var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
97864
- var uuid = (version29) => {
97865
- if (!version29)
98622
+ var uuid = (version30) => {
98623
+ if (!version30)
97866
98624
  return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
97867
- return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version29}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
98625
+ return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version30}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
97868
98626
  };
97869
98627
  var uuid4 = /* @__PURE__ */ uuid(4);
97870
98628
  var uuid6 = /* @__PURE__ */ uuid(6);
@@ -98533,7 +99291,7 @@ class Doc {
98533
99291
  }
98534
99292
 
98535
99293
  // node_modules/zod/v4/core/versions.js
98536
- var version29 = {
99294
+ var version30 = {
98537
99295
  major: 4,
98538
99296
  minor: 3,
98539
99297
  patch: 6
@@ -98545,7 +99303,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
98545
99303
  inst ?? (inst = {});
98546
99304
  inst._zod.def = def;
98547
99305
  inst._zod.bag = inst._zod.bag || {};
98548
- inst._zod.version = version29;
99306
+ inst._zod.version = version30;
98549
99307
  const checks = [...inst._zod.def.checks ?? []];
98550
99308
  if (inst._zod.traits.has("$ZodCheck")) {
98551
99309
  checks.unshift(inst);
@@ -109790,10 +110548,10 @@ function fromJSONSchema(schema, params) {
109790
110548
  if (typeof schema === "boolean") {
109791
110549
  return schema ? z.any() : z.never();
109792
110550
  }
109793
- const version30 = detectVersion(schema, params?.defaultTarget);
110551
+ const version31 = detectVersion(schema, params?.defaultTarget);
109794
110552
  const defs = schema.$defs || schema.definitions || {};
109795
110553
  const ctx = {
109796
- version: version30,
110554
+ version: version31,
109797
110555
  defs,
109798
110556
  refs: new Map,
109799
110557
  processing: new Set,
@@ -111546,4 +112304,4 @@ var simulateOrThrow = async (env2) => {
111546
112304
  };
111547
112305
  };
111548
112306
 
111549
- //# debugId=2606A99C24F749A164756E2164756E21
112307
+ //# debugId=CE4226A0C7169A0764756E2164756E21