@jaw.id/ui 0.4.2 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4438 @@
1
+ import { C as e, D as t, H as n, M as r, N as i, T as a, U as o, V as s, W as c, Z as l, b as u, j as d, w as f, x as p, y as ee } from "./utils-so0pTN_S.js";
2
+ //#region ../../node_modules/abitype/dist/esm/version.js
3
+ var te = "1.2.3", m = class e extends Error {
4
+ constructor(t, n = {}) {
5
+ let r = n.cause instanceof e ? n.cause.details : n.cause?.message ? n.cause.message : n.details, i = n.cause instanceof e && n.cause.docsPath || n.docsPath, a = [
6
+ t || "An error occurred.",
7
+ "",
8
+ ...n.metaMessages ? [...n.metaMessages, ""] : [],
9
+ ...i ? [`Docs: https://abitype.dev${i}`] : [],
10
+ ...r ? [`Details: ${r}`] : [],
11
+ `Version: abitype@${te}`
12
+ ].join("\n");
13
+ super(a), Object.defineProperty(this, "details", {
14
+ enumerable: !0,
15
+ configurable: !0,
16
+ writable: !0,
17
+ value: void 0
18
+ }), Object.defineProperty(this, "docsPath", {
19
+ enumerable: !0,
20
+ configurable: !0,
21
+ writable: !0,
22
+ value: void 0
23
+ }), Object.defineProperty(this, "metaMessages", {
24
+ enumerable: !0,
25
+ configurable: !0,
26
+ writable: !0,
27
+ value: void 0
28
+ }), Object.defineProperty(this, "shortMessage", {
29
+ enumerable: !0,
30
+ configurable: !0,
31
+ writable: !0,
32
+ value: void 0
33
+ }), Object.defineProperty(this, "name", {
34
+ enumerable: !0,
35
+ configurable: !0,
36
+ writable: !0,
37
+ value: "AbiTypeError"
38
+ }), n.cause && (this.cause = n.cause), this.details = r, this.docsPath = i, this.metaMessages = n.metaMessages, this.shortMessage = t;
39
+ }
40
+ };
41
+ //#endregion
42
+ //#region ../../node_modules/abitype/dist/esm/regex.js
43
+ function h(e, t) {
44
+ return e.exec(t)?.groups;
45
+ }
46
+ var ne = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, re = /^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)?$/, g = /^\(.+?\).*?$/, ie = /^tuple(?<array>(\[(\d*)\])*)$/;
47
+ function ae(e) {
48
+ let t = e.type;
49
+ if (ie.test(e.type) && "components" in e) {
50
+ t = "(";
51
+ let n = e.components.length;
52
+ for (let r = 0; r < n; r++) {
53
+ let i = e.components[r];
54
+ t += ae(i), r < n - 1 && (t += ", ");
55
+ }
56
+ let r = h(ie, e.type);
57
+ return t += `)${r?.array || ""}`, ae({
58
+ ...e,
59
+ type: t
60
+ });
61
+ }
62
+ return "indexed" in e && e.indexed && (t = `${t} indexed`), e.name ? `${t} ${e.name}` : t;
63
+ }
64
+ //#endregion
65
+ //#region ../../node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js
66
+ function _(e) {
67
+ let t = "", n = e.length;
68
+ for (let r = 0; r < n; r++) {
69
+ let i = e[r];
70
+ t += ae(i), r !== n - 1 && (t += ", ");
71
+ }
72
+ return t;
73
+ }
74
+ //#endregion
75
+ //#region ../../node_modules/abitype/dist/esm/human-readable/formatAbiItem.js
76
+ function oe(e) {
77
+ return e.type === "function" ? `function ${e.name}(${_(e.inputs)})${e.stateMutability && e.stateMutability !== "nonpayable" ? ` ${e.stateMutability}` : ""}${e.outputs?.length ? ` returns (${_(e.outputs)})` : ""}` : e.type === "event" ? `event ${e.name}(${_(e.inputs)})` : e.type === "error" ? `error ${e.name}(${_(e.inputs)})` : e.type === "constructor" ? `constructor(${_(e.inputs)})${e.stateMutability === "payable" ? " payable" : ""}` : e.type === "fallback" ? `fallback() external${e.stateMutability === "payable" ? " payable" : ""}` : "receive() external payable";
78
+ }
79
+ //#endregion
80
+ //#region ../../node_modules/abitype/dist/esm/human-readable/runtime/signatures.js
81
+ var se = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
82
+ function ce(e) {
83
+ return se.test(e);
84
+ }
85
+ function le(e) {
86
+ return h(se, e);
87
+ }
88
+ var ue = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
89
+ function de(e) {
90
+ return ue.test(e);
91
+ }
92
+ function fe(e) {
93
+ return h(ue, e);
94
+ }
95
+ var pe = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;
96
+ function me(e) {
97
+ return pe.test(e);
98
+ }
99
+ function he(e) {
100
+ return h(pe, e);
101
+ }
102
+ var ge = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;
103
+ function _e(e) {
104
+ return ge.test(e);
105
+ }
106
+ function ve(e) {
107
+ return h(ge, e);
108
+ }
109
+ var ye = /^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;
110
+ function be(e) {
111
+ return ye.test(e);
112
+ }
113
+ function xe(e) {
114
+ return h(ye, e);
115
+ }
116
+ var Se = /^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;
117
+ function Ce(e) {
118
+ return Se.test(e);
119
+ }
120
+ function we(e) {
121
+ return h(Se, e);
122
+ }
123
+ var Te = /^receive\(\) external payable$/;
124
+ function Ee(e) {
125
+ return Te.test(e);
126
+ }
127
+ var De = new Set([
128
+ "memory",
129
+ "indexed",
130
+ "storage",
131
+ "calldata"
132
+ ]), Oe = new Set(["indexed"]), ke = new Set([
133
+ "calldata",
134
+ "memory",
135
+ "storage"
136
+ ]), Ae = class extends m {
137
+ constructor({ signature: e }) {
138
+ super("Failed to parse ABI item.", {
139
+ details: `parseAbiItem(${JSON.stringify(e, null, 2)})`,
140
+ docsPath: "/api/human#parseabiitem-1"
141
+ }), Object.defineProperty(this, "name", {
142
+ enumerable: !0,
143
+ configurable: !0,
144
+ writable: !0,
145
+ value: "InvalidAbiItemError"
146
+ });
147
+ }
148
+ }, je = class extends m {
149
+ constructor({ type: e }) {
150
+ super("Unknown type.", { metaMessages: [`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`] }), Object.defineProperty(this, "name", {
151
+ enumerable: !0,
152
+ configurable: !0,
153
+ writable: !0,
154
+ value: "UnknownTypeError"
155
+ });
156
+ }
157
+ }, Me = class extends m {
158
+ constructor({ type: e }) {
159
+ super("Unknown type.", { metaMessages: [`Type "${e}" is not a valid ABI type.`] }), Object.defineProperty(this, "name", {
160
+ enumerable: !0,
161
+ configurable: !0,
162
+ writable: !0,
163
+ value: "UnknownSolidityTypeError"
164
+ });
165
+ }
166
+ }, Ne = class extends m {
167
+ constructor({ params: e }) {
168
+ super("Failed to parse ABI parameters.", {
169
+ details: `parseAbiParameters(${JSON.stringify(e, null, 2)})`,
170
+ docsPath: "/api/human#parseabiparameters-1"
171
+ }), Object.defineProperty(this, "name", {
172
+ enumerable: !0,
173
+ configurable: !0,
174
+ writable: !0,
175
+ value: "InvalidAbiParametersError"
176
+ });
177
+ }
178
+ }, Pe = class extends m {
179
+ constructor({ param: e }) {
180
+ super("Invalid ABI parameter.", { details: e }), Object.defineProperty(this, "name", {
181
+ enumerable: !0,
182
+ configurable: !0,
183
+ writable: !0,
184
+ value: "InvalidParameterError"
185
+ });
186
+ }
187
+ }, Fe = class extends m {
188
+ constructor({ param: e, name: t }) {
189
+ super("Invalid ABI parameter.", {
190
+ details: e,
191
+ metaMessages: [`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]
192
+ }), Object.defineProperty(this, "name", {
193
+ enumerable: !0,
194
+ configurable: !0,
195
+ writable: !0,
196
+ value: "SolidityProtectedKeywordError"
197
+ });
198
+ }
199
+ }, Ie = class extends m {
200
+ constructor({ param: e, type: t, modifier: n }) {
201
+ super("Invalid ABI parameter.", {
202
+ details: e,
203
+ metaMessages: [`Modifier "${n}" not allowed${t ? ` in "${t}" type` : ""}.`]
204
+ }), Object.defineProperty(this, "name", {
205
+ enumerable: !0,
206
+ configurable: !0,
207
+ writable: !0,
208
+ value: "InvalidModifierError"
209
+ });
210
+ }
211
+ }, Le = class extends m {
212
+ constructor({ param: e, type: t, modifier: n }) {
213
+ super("Invalid ABI parameter.", {
214
+ details: e,
215
+ metaMessages: [`Modifier "${n}" not allowed${t ? ` in "${t}" type` : ""}.`, `Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]
216
+ }), Object.defineProperty(this, "name", {
217
+ enumerable: !0,
218
+ configurable: !0,
219
+ writable: !0,
220
+ value: "InvalidFunctionModifierError"
221
+ });
222
+ }
223
+ }, Re = class extends m {
224
+ constructor({ abiParameter: e }) {
225
+ super("Invalid ABI parameter.", {
226
+ details: JSON.stringify(e, null, 2),
227
+ metaMessages: ["ABI parameter type is invalid."]
228
+ }), Object.defineProperty(this, "name", {
229
+ enumerable: !0,
230
+ configurable: !0,
231
+ writable: !0,
232
+ value: "InvalidAbiTypeParameterError"
233
+ });
234
+ }
235
+ }, v = class extends m {
236
+ constructor({ signature: e, type: t }) {
237
+ super(`Invalid ${t} signature.`, { details: e }), Object.defineProperty(this, "name", {
238
+ enumerable: !0,
239
+ configurable: !0,
240
+ writable: !0,
241
+ value: "InvalidSignatureError"
242
+ });
243
+ }
244
+ }, ze = class extends m {
245
+ constructor({ signature: e }) {
246
+ super("Unknown signature.", { details: e }), Object.defineProperty(this, "name", {
247
+ enumerable: !0,
248
+ configurable: !0,
249
+ writable: !0,
250
+ value: "UnknownSignatureError"
251
+ });
252
+ }
253
+ }, Be = class extends m {
254
+ constructor({ signature: e }) {
255
+ super("Invalid struct signature.", {
256
+ details: e,
257
+ metaMessages: ["No properties exist."]
258
+ }), Object.defineProperty(this, "name", {
259
+ enumerable: !0,
260
+ configurable: !0,
261
+ writable: !0,
262
+ value: "InvalidStructSignatureError"
263
+ });
264
+ }
265
+ }, Ve = class extends m {
266
+ constructor({ type: e }) {
267
+ super("Circular reference detected.", { metaMessages: [`Struct "${e}" is a circular reference.`] }), Object.defineProperty(this, "name", {
268
+ enumerable: !0,
269
+ configurable: !0,
270
+ writable: !0,
271
+ value: "CircularReferenceError"
272
+ });
273
+ }
274
+ }, He = class extends m {
275
+ constructor({ current: e, depth: t }) {
276
+ super("Unbalanced parentheses.", {
277
+ metaMessages: [`"${e.trim()}" has too many ${t > 0 ? "opening" : "closing"} parentheses.`],
278
+ details: `Depth "${t}"`
279
+ }), Object.defineProperty(this, "name", {
280
+ enumerable: !0,
281
+ configurable: !0,
282
+ writable: !0,
283
+ value: "InvalidParenthesisError"
284
+ });
285
+ }
286
+ };
287
+ //#endregion
288
+ //#region ../../node_modules/abitype/dist/esm/human-readable/runtime/cache.js
289
+ function Ue(e, t, n) {
290
+ let r = "";
291
+ if (n) for (let e of Object.entries(n)) {
292
+ if (!e) continue;
293
+ let t = "";
294
+ for (let n of e[1]) t += `[${n.type}${n.name ? `:${n.name}` : ""}]`;
295
+ r += `(${e[0]}{${t}})`;
296
+ }
297
+ return t ? `${t}:${e}${r}` : `${e}${r}`;
298
+ }
299
+ var We = new Map([
300
+ ["address", { type: "address" }],
301
+ ["bool", { type: "bool" }],
302
+ ["bytes", { type: "bytes" }],
303
+ ["bytes32", { type: "bytes32" }],
304
+ ["int", { type: "int256" }],
305
+ ["int256", { type: "int256" }],
306
+ ["string", { type: "string" }],
307
+ ["uint", { type: "uint256" }],
308
+ ["uint8", { type: "uint8" }],
309
+ ["uint16", { type: "uint16" }],
310
+ ["uint24", { type: "uint24" }],
311
+ ["uint32", { type: "uint32" }],
312
+ ["uint64", { type: "uint64" }],
313
+ ["uint96", { type: "uint96" }],
314
+ ["uint112", { type: "uint112" }],
315
+ ["uint160", { type: "uint160" }],
316
+ ["uint192", { type: "uint192" }],
317
+ ["uint256", { type: "uint256" }],
318
+ ["address owner", {
319
+ type: "address",
320
+ name: "owner"
321
+ }],
322
+ ["address to", {
323
+ type: "address",
324
+ name: "to"
325
+ }],
326
+ ["bool approved", {
327
+ type: "bool",
328
+ name: "approved"
329
+ }],
330
+ ["bytes _data", {
331
+ type: "bytes",
332
+ name: "_data"
333
+ }],
334
+ ["bytes data", {
335
+ type: "bytes",
336
+ name: "data"
337
+ }],
338
+ ["bytes signature", {
339
+ type: "bytes",
340
+ name: "signature"
341
+ }],
342
+ ["bytes32 hash", {
343
+ type: "bytes32",
344
+ name: "hash"
345
+ }],
346
+ ["bytes32 r", {
347
+ type: "bytes32",
348
+ name: "r"
349
+ }],
350
+ ["bytes32 root", {
351
+ type: "bytes32",
352
+ name: "root"
353
+ }],
354
+ ["bytes32 s", {
355
+ type: "bytes32",
356
+ name: "s"
357
+ }],
358
+ ["string name", {
359
+ type: "string",
360
+ name: "name"
361
+ }],
362
+ ["string symbol", {
363
+ type: "string",
364
+ name: "symbol"
365
+ }],
366
+ ["string tokenURI", {
367
+ type: "string",
368
+ name: "tokenURI"
369
+ }],
370
+ ["uint tokenId", {
371
+ type: "uint256",
372
+ name: "tokenId"
373
+ }],
374
+ ["uint8 v", {
375
+ type: "uint8",
376
+ name: "v"
377
+ }],
378
+ ["uint256 balance", {
379
+ type: "uint256",
380
+ name: "balance"
381
+ }],
382
+ ["uint256 tokenId", {
383
+ type: "uint256",
384
+ name: "tokenId"
385
+ }],
386
+ ["uint256 value", {
387
+ type: "uint256",
388
+ name: "value"
389
+ }],
390
+ ["event:address indexed from", {
391
+ type: "address",
392
+ name: "from",
393
+ indexed: !0
394
+ }],
395
+ ["event:address indexed to", {
396
+ type: "address",
397
+ name: "to",
398
+ indexed: !0
399
+ }],
400
+ ["event:uint indexed tokenId", {
401
+ type: "uint256",
402
+ name: "tokenId",
403
+ indexed: !0
404
+ }],
405
+ ["event:uint256 indexed tokenId", {
406
+ type: "uint256",
407
+ name: "tokenId",
408
+ indexed: !0
409
+ }]
410
+ ]);
411
+ //#endregion
412
+ //#region ../../node_modules/abitype/dist/esm/human-readable/runtime/utils.js
413
+ function Ge(e, t = {}) {
414
+ if (me(e)) return Ke(e, t);
415
+ if (de(e)) return qe(e, t);
416
+ if (ce(e)) return Je(e, t);
417
+ if (be(e)) return Ye(e, t);
418
+ if (Ce(e)) return Xe(e);
419
+ if (Ee(e)) return {
420
+ type: "receive",
421
+ stateMutability: "payable"
422
+ };
423
+ throw new ze({ signature: e });
424
+ }
425
+ function Ke(e, t = {}) {
426
+ let n = he(e);
427
+ if (!n) throw new v({
428
+ signature: e,
429
+ type: "function"
430
+ });
431
+ let r = b(n.parameters), i = [], a = r.length;
432
+ for (let e = 0; e < a; e++) i.push(y(r[e], {
433
+ modifiers: ke,
434
+ structs: t,
435
+ type: "function"
436
+ }));
437
+ let o = [];
438
+ if (n.returns) {
439
+ let e = b(n.returns), r = e.length;
440
+ for (let n = 0; n < r; n++) o.push(y(e[n], {
441
+ modifiers: ke,
442
+ structs: t,
443
+ type: "function"
444
+ }));
445
+ }
446
+ return {
447
+ name: n.name,
448
+ type: "function",
449
+ stateMutability: n.stateMutability ?? "nonpayable",
450
+ inputs: i,
451
+ outputs: o
452
+ };
453
+ }
454
+ function qe(e, t = {}) {
455
+ let n = fe(e);
456
+ if (!n) throw new v({
457
+ signature: e,
458
+ type: "event"
459
+ });
460
+ let r = b(n.parameters), i = [], a = r.length;
461
+ for (let e = 0; e < a; e++) i.push(y(r[e], {
462
+ modifiers: Oe,
463
+ structs: t,
464
+ type: "event"
465
+ }));
466
+ return {
467
+ name: n.name,
468
+ type: "event",
469
+ inputs: i
470
+ };
471
+ }
472
+ function Je(e, t = {}) {
473
+ let n = le(e);
474
+ if (!n) throw new v({
475
+ signature: e,
476
+ type: "error"
477
+ });
478
+ let r = b(n.parameters), i = [], a = r.length;
479
+ for (let e = 0; e < a; e++) i.push(y(r[e], {
480
+ structs: t,
481
+ type: "error"
482
+ }));
483
+ return {
484
+ name: n.name,
485
+ type: "error",
486
+ inputs: i
487
+ };
488
+ }
489
+ function Ye(e, t = {}) {
490
+ let n = xe(e);
491
+ if (!n) throw new v({
492
+ signature: e,
493
+ type: "constructor"
494
+ });
495
+ let r = b(n.parameters), i = [], a = r.length;
496
+ for (let e = 0; e < a; e++) i.push(y(r[e], {
497
+ structs: t,
498
+ type: "constructor"
499
+ }));
500
+ return {
501
+ type: "constructor",
502
+ stateMutability: n.stateMutability ?? "nonpayable",
503
+ inputs: i
504
+ };
505
+ }
506
+ function Xe(e) {
507
+ let t = we(e);
508
+ if (!t) throw new v({
509
+ signature: e,
510
+ type: "fallback"
511
+ });
512
+ return {
513
+ type: "fallback",
514
+ stateMutability: t.stateMutability ?? "nonpayable"
515
+ };
516
+ }
517
+ var Ze = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, Qe = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, $e = /^u?int$/;
518
+ function y(e, t) {
519
+ let n = Ue(e, t?.type, t?.structs);
520
+ if (We.has(n)) return We.get(n);
521
+ let r = g.test(e), i = h(r ? Qe : Ze, e);
522
+ if (!i) throw new Pe({ param: e });
523
+ if (i.name && nt(i.name)) throw new Fe({
524
+ param: e,
525
+ name: i.name
526
+ });
527
+ let a = i.name ? { name: i.name } : {}, o = i.modifier === "indexed" ? { indexed: !0 } : {}, s = t?.structs ?? {}, c, l = {};
528
+ if (r) {
529
+ c = "tuple";
530
+ let e = b(i.type), t = [], n = e.length;
531
+ for (let r = 0; r < n; r++) t.push(y(e[r], { structs: s }));
532
+ l = { components: t };
533
+ } else if (i.type in s) c = "tuple", l = { components: s[i.type] };
534
+ else if ($e.test(i.type)) c = `${i.type}256`;
535
+ else if (i.type === "address payable") c = "address";
536
+ else if (c = i.type, t?.type !== "struct" && !et(c)) throw new Me({ type: c });
537
+ if (i.modifier) {
538
+ if (!t?.modifiers?.has?.(i.modifier)) throw new Ie({
539
+ param: e,
540
+ type: t?.type,
541
+ modifier: i.modifier
542
+ });
543
+ if (ke.has(i.modifier) && !rt(c, !!i.array)) throw new Le({
544
+ param: e,
545
+ type: t?.type,
546
+ modifier: i.modifier
547
+ });
548
+ }
549
+ let u = {
550
+ type: `${c}${i.array ?? ""}`,
551
+ ...a,
552
+ ...o,
553
+ ...l
554
+ };
555
+ return We.set(n, u), u;
556
+ }
557
+ function b(e, t = [], n = "", r = 0) {
558
+ let i = e.trim().length;
559
+ for (let a = 0; a < i; a++) {
560
+ let i = e[a], o = e.slice(a + 1);
561
+ switch (i) {
562
+ case ",": return r === 0 ? b(o, [...t, n.trim()]) : b(o, t, `${n}${i}`, r);
563
+ case "(": return b(o, t, `${n}${i}`, r + 1);
564
+ case ")": return b(o, t, `${n}${i}`, r - 1);
565
+ default: return b(o, t, `${n}${i}`, r);
566
+ }
567
+ }
568
+ if (n === "") return t;
569
+ if (r !== 0) throw new He({
570
+ current: n,
571
+ depth: r
572
+ });
573
+ return t.push(n.trim()), t;
574
+ }
575
+ function et(e) {
576
+ return e === "address" || e === "bool" || e === "function" || e === "string" || ne.test(e) || re.test(e);
577
+ }
578
+ var tt = /^(?: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)$/;
579
+ function nt(e) {
580
+ return e === "address" || e === "bool" || e === "function" || e === "string" || e === "tuple" || ne.test(e) || re.test(e) || tt.test(e);
581
+ }
582
+ function rt(e, t) {
583
+ return t || e === "bytes" || e === "string" || e === "tuple";
584
+ }
585
+ //#endregion
586
+ //#region ../../node_modules/abitype/dist/esm/human-readable/runtime/structs.js
587
+ function it(e) {
588
+ let t = {}, n = e.length;
589
+ for (let r = 0; r < n; r++) {
590
+ let n = e[r];
591
+ if (!_e(n)) continue;
592
+ let i = ve(n);
593
+ if (!i) throw new v({
594
+ signature: n,
595
+ type: "struct"
596
+ });
597
+ let a = i.properties.split(";"), o = [], s = a.length;
598
+ for (let e = 0; e < s; e++) {
599
+ let t = a[e].trim();
600
+ if (!t) continue;
601
+ let n = y(t, { type: "struct" });
602
+ o.push(n);
603
+ }
604
+ if (!o.length) throw new Be({ signature: n });
605
+ t[i.name] = o;
606
+ }
607
+ let r = {}, i = Object.entries(t), a = i.length;
608
+ for (let e = 0; e < a; e++) {
609
+ let [n, a] = i[e];
610
+ r[n] = ot(a, t);
611
+ }
612
+ return r;
613
+ }
614
+ var at = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;
615
+ function ot(e = [], t = {}, n = /* @__PURE__ */ new Set()) {
616
+ let r = [], i = e.length;
617
+ for (let a = 0; a < i; a++) {
618
+ let i = e[a];
619
+ if (g.test(i.type)) r.push(i);
620
+ else {
621
+ let e = h(at, i.type);
622
+ if (!e?.type) throw new Re({ abiParameter: i });
623
+ let { array: a, type: o } = e;
624
+ if (o in t) {
625
+ if (n.has(o)) throw new Ve({ type: o });
626
+ r.push({
627
+ ...i,
628
+ type: `tuple${a ?? ""}`,
629
+ components: ot(t[o], t, new Set([...n, o]))
630
+ });
631
+ } else if (et(o)) r.push(i);
632
+ else throw new je({ type: o });
633
+ }
634
+ }
635
+ return r;
636
+ }
637
+ //#endregion
638
+ //#region ../../node_modules/abitype/dist/esm/human-readable/parseAbi.js
639
+ function st(e) {
640
+ let t = it(e), n = [], r = e.length;
641
+ for (let i = 0; i < r; i++) {
642
+ let r = e[i];
643
+ _e(r) || n.push(Ge(r, t));
644
+ }
645
+ return n;
646
+ }
647
+ //#endregion
648
+ //#region ../../node_modules/viem/_esm/utils/abi/formatAbiItem.js
649
+ function x(e, { includeName: t = !1 } = {}) {
650
+ if (e.type !== "function" && e.type !== "event" && e.type !== "error") throw new Ft(e.type);
651
+ return `${e.name}(${ct(e.inputs, { includeName: t })})`;
652
+ }
653
+ function ct(e, { includeName: t = !1 } = {}) {
654
+ return e ? e.map((e) => lt(e, { includeName: t })).join(t ? ", " : ",") : "";
655
+ }
656
+ function lt(e, { includeName: t }) {
657
+ return e.type.startsWith("tuple") ? `(${ct(e.components, { includeName: t })})${e.type.slice(5)}` : e.type + (t && e.name ? ` ${e.name}` : "");
658
+ }
659
+ //#endregion
660
+ //#region ../../node_modules/viem/_esm/utils/data/isHex.js
661
+ function S(e, { strict: t = !0 } = {}) {
662
+ return !e || typeof e != "string" ? !1 : t ? /^0x[0-9a-fA-F]*$/.test(e) : e.startsWith("0x");
663
+ }
664
+ //#endregion
665
+ //#region ../../node_modules/viem/_esm/utils/data/size.js
666
+ function C(e) {
667
+ return S(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
668
+ }
669
+ //#endregion
670
+ //#region ../../node_modules/viem/_esm/errors/version.js
671
+ var ut = "2.46.2", dt = {
672
+ getDocsUrl: ({ docsBaseUrl: e, docsPath: t = "", docsSlug: n }) => t ? `${e ?? "https://viem.sh"}${t}${n ? `#${n}` : ""}` : void 0,
673
+ version: `viem@${ut}`
674
+ }, w = class e extends Error {
675
+ constructor(t, n = {}) {
676
+ let r = n.cause instanceof e ? n.cause.details : n.cause?.message ? n.cause.message : n.details, i = n.cause instanceof e && n.cause.docsPath || n.docsPath, a = dt.getDocsUrl?.({
677
+ ...n,
678
+ docsPath: i
679
+ }), o = [
680
+ t || "An error occurred.",
681
+ "",
682
+ ...n.metaMessages ? [...n.metaMessages, ""] : [],
683
+ ...a ? [`Docs: ${a}`] : [],
684
+ ...r ? [`Details: ${r}`] : [],
685
+ ...dt.version ? [`Version: ${dt.version}`] : []
686
+ ].join("\n");
687
+ super(o, n.cause ? { cause: n.cause } : void 0), Object.defineProperty(this, "details", {
688
+ enumerable: !0,
689
+ configurable: !0,
690
+ writable: !0,
691
+ value: void 0
692
+ }), Object.defineProperty(this, "docsPath", {
693
+ enumerable: !0,
694
+ configurable: !0,
695
+ writable: !0,
696
+ value: void 0
697
+ }), Object.defineProperty(this, "metaMessages", {
698
+ enumerable: !0,
699
+ configurable: !0,
700
+ writable: !0,
701
+ value: void 0
702
+ }), Object.defineProperty(this, "shortMessage", {
703
+ enumerable: !0,
704
+ configurable: !0,
705
+ writable: !0,
706
+ value: void 0
707
+ }), Object.defineProperty(this, "version", {
708
+ enumerable: !0,
709
+ configurable: !0,
710
+ writable: !0,
711
+ value: void 0
712
+ }), Object.defineProperty(this, "name", {
713
+ enumerable: !0,
714
+ configurable: !0,
715
+ writable: !0,
716
+ value: "BaseError"
717
+ }), this.details = r, this.docsPath = i, this.metaMessages = n.metaMessages, this.name = n.name ?? this.name, this.shortMessage = t, this.version = ut;
718
+ }
719
+ walk(e) {
720
+ return ft(this, e);
721
+ }
722
+ };
723
+ function ft(e, t) {
724
+ return t?.(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ? ft(e.cause, t) : t ? null : e;
725
+ }
726
+ //#endregion
727
+ //#region ../../node_modules/viem/_esm/errors/abi.js
728
+ var pt = class extends w {
729
+ constructor({ docsPath: e }) {
730
+ super(["A constructor was not found on the ABI.", "Make sure you are using the correct ABI and that the constructor exists on it."].join("\n"), {
731
+ docsPath: e,
732
+ name: "AbiConstructorNotFoundError"
733
+ });
734
+ }
735
+ }, mt = class extends w {
736
+ constructor({ docsPath: e }) {
737
+ super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.", "Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join("\n"), {
738
+ docsPath: e,
739
+ name: "AbiConstructorParamsNotFoundError"
740
+ });
741
+ }
742
+ }, ht = class extends w {
743
+ constructor({ data: e, params: t, size: n }) {
744
+ super([`Data size of ${n} bytes is too small for given parameters.`].join("\n"), {
745
+ metaMessages: [`Params: (${ct(t, { includeName: !0 })})`, `Data: ${e} (${n} bytes)`],
746
+ name: "AbiDecodingDataSizeTooSmallError"
747
+ }), Object.defineProperty(this, "data", {
748
+ enumerable: !0,
749
+ configurable: !0,
750
+ writable: !0,
751
+ value: void 0
752
+ }), Object.defineProperty(this, "params", {
753
+ enumerable: !0,
754
+ configurable: !0,
755
+ writable: !0,
756
+ value: void 0
757
+ }), Object.defineProperty(this, "size", {
758
+ enumerable: !0,
759
+ configurable: !0,
760
+ writable: !0,
761
+ value: void 0
762
+ }), this.data = e, this.params = t, this.size = n;
763
+ }
764
+ }, gt = class extends w {
765
+ constructor() {
766
+ super("Cannot decode zero data (\"0x\") with ABI parameters.", { name: "AbiDecodingZeroDataError" });
767
+ }
768
+ }, _t = class extends w {
769
+ constructor({ expectedLength: e, givenLength: t, type: n }) {
770
+ super([
771
+ `ABI encoding array length mismatch for type ${n}.`,
772
+ `Expected length: ${e}`,
773
+ `Given length: ${t}`
774
+ ].join("\n"), { name: "AbiEncodingArrayLengthMismatchError" });
775
+ }
776
+ }, vt = class extends w {
777
+ constructor({ expectedSize: e, value: t }) {
778
+ super(`Size of bytes "${t}" (bytes${C(t)}) does not match expected size (bytes${e}).`, { name: "AbiEncodingBytesSizeMismatchError" });
779
+ }
780
+ }, yt = class extends w {
781
+ constructor({ expectedLength: e, givenLength: t }) {
782
+ super([
783
+ "ABI encoding params/values length mismatch.",
784
+ `Expected length (params): ${e}`,
785
+ `Given length (values): ${t}`
786
+ ].join("\n"), { name: "AbiEncodingLengthMismatchError" });
787
+ }
788
+ }, bt = class extends w {
789
+ constructor(e, { docsPath: t }) {
790
+ super([
791
+ `Arguments (\`args\`) were provided to "${e}", but "${e}" on the ABI does not contain any parameters (\`inputs\`).`,
792
+ "Cannot encode error result without knowing what the parameter types are.",
793
+ "Make sure you are using the correct ABI and that the inputs exist on it."
794
+ ].join("\n"), {
795
+ docsPath: t,
796
+ name: "AbiErrorInputsNotFoundError"
797
+ });
798
+ }
799
+ }, xt = class extends w {
800
+ constructor(e, { docsPath: t } = {}) {
801
+ super([`Error ${e ? `"${e}" ` : ""}not found on ABI.`, "Make sure you are using the correct ABI and that the error exists on it."].join("\n"), {
802
+ docsPath: t,
803
+ name: "AbiErrorNotFoundError"
804
+ });
805
+ }
806
+ }, St = class extends w {
807
+ constructor(e, { docsPath: t }) {
808
+ super([
809
+ `Encoded error signature "${e}" not found on ABI.`,
810
+ "Make sure you are using the correct ABI and that the error exists on it.",
811
+ `You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${e}.`
812
+ ].join("\n"), {
813
+ docsPath: t,
814
+ name: "AbiErrorSignatureNotFoundError"
815
+ }), Object.defineProperty(this, "signature", {
816
+ enumerable: !0,
817
+ configurable: !0,
818
+ writable: !0,
819
+ value: void 0
820
+ }), this.signature = e;
821
+ }
822
+ }, Ct = class extends w {
823
+ constructor({ docsPath: e }) {
824
+ super("Cannot extract event signature from empty topics.", {
825
+ docsPath: e,
826
+ name: "AbiEventSignatureEmptyTopicsError"
827
+ });
828
+ }
829
+ }, wt = class extends w {
830
+ constructor(e, { docsPath: t }) {
831
+ super([
832
+ `Encoded event signature "${e}" not found on ABI.`,
833
+ "Make sure you are using the correct ABI and that the event exists on it.",
834
+ `You can look up the signature here: https://4byte.sourcify.dev/?q=${e}.`
835
+ ].join("\n"), {
836
+ docsPath: t,
837
+ name: "AbiEventSignatureNotFoundError"
838
+ });
839
+ }
840
+ }, Tt = class extends w {
841
+ constructor(e, { docsPath: t } = {}) {
842
+ super([`Event ${e ? `"${e}" ` : ""}not found on ABI.`, "Make sure you are using the correct ABI and that the event exists on it."].join("\n"), {
843
+ docsPath: t,
844
+ name: "AbiEventNotFoundError"
845
+ });
846
+ }
847
+ }, T = class extends w {
848
+ constructor(e, { docsPath: t } = {}) {
849
+ super([`Function ${e ? `"${e}" ` : ""}not found on ABI.`, "Make sure you are using the correct ABI and that the function exists on it."].join("\n"), {
850
+ docsPath: t,
851
+ name: "AbiFunctionNotFoundError"
852
+ });
853
+ }
854
+ }, Et = class extends w {
855
+ constructor(e, { docsPath: t }) {
856
+ super([
857
+ `Function "${e}" does not contain any \`outputs\` on ABI.`,
858
+ "Cannot decode function result without knowing what the parameter types are.",
859
+ "Make sure you are using the correct ABI and that the function exists on it."
860
+ ].join("\n"), {
861
+ docsPath: t,
862
+ name: "AbiFunctionOutputsNotFoundError"
863
+ });
864
+ }
865
+ }, Dt = class extends w {
866
+ constructor(e, { docsPath: t }) {
867
+ super([
868
+ `Encoded function signature "${e}" not found on ABI.`,
869
+ "Make sure you are using the correct ABI and that the function exists on it.",
870
+ `You can look up the signature here: https://4byte.sourcify.dev/?q=${e}.`
871
+ ].join("\n"), {
872
+ docsPath: t,
873
+ name: "AbiFunctionSignatureNotFoundError"
874
+ });
875
+ }
876
+ }, Ot = class extends w {
877
+ constructor(e, t) {
878
+ super("Found ambiguous types in overloaded ABI items.", {
879
+ metaMessages: [
880
+ `\`${e.type}\` in \`${x(e.abiItem)}\`, and`,
881
+ `\`${t.type}\` in \`${x(t.abiItem)}\``,
882
+ "",
883
+ "These types encode differently and cannot be distinguished at runtime.",
884
+ "Remove one of the ambiguous items in the ABI."
885
+ ],
886
+ name: "AbiItemAmbiguityError"
887
+ });
888
+ }
889
+ }, kt = class extends w {
890
+ constructor({ expectedSize: e, givenSize: t }) {
891
+ super(`Expected bytes${e}, got bytes${t}.`, { name: "BytesSizeMismatchError" });
892
+ }
893
+ }, At = class extends w {
894
+ constructor({ abiItem: e, data: t, params: n, size: r }) {
895
+ super([`Data size of ${r} bytes is too small for non-indexed event parameters.`].join("\n"), {
896
+ metaMessages: [`Params: (${ct(n, { includeName: !0 })})`, `Data: ${t} (${r} bytes)`],
897
+ name: "DecodeLogDataMismatch"
898
+ }), Object.defineProperty(this, "abiItem", {
899
+ enumerable: !0,
900
+ configurable: !0,
901
+ writable: !0,
902
+ value: void 0
903
+ }), Object.defineProperty(this, "data", {
904
+ enumerable: !0,
905
+ configurable: !0,
906
+ writable: !0,
907
+ value: void 0
908
+ }), Object.defineProperty(this, "params", {
909
+ enumerable: !0,
910
+ configurable: !0,
911
+ writable: !0,
912
+ value: void 0
913
+ }), Object.defineProperty(this, "size", {
914
+ enumerable: !0,
915
+ configurable: !0,
916
+ writable: !0,
917
+ value: void 0
918
+ }), this.abiItem = e, this.data = t, this.params = n, this.size = r;
919
+ }
920
+ }, jt = class extends w {
921
+ constructor({ abiItem: e, param: t }) {
922
+ super([`Expected a topic for indexed event parameter${t.name ? ` "${t.name}"` : ""} on event "${x(e, { includeName: !0 })}".`].join("\n"), { name: "DecodeLogTopicsMismatch" }), Object.defineProperty(this, "abiItem", {
923
+ enumerable: !0,
924
+ configurable: !0,
925
+ writable: !0,
926
+ value: void 0
927
+ }), this.abiItem = e;
928
+ }
929
+ }, Mt = class extends w {
930
+ constructor(e, { docsPath: t }) {
931
+ super([`Type "${e}" is not a valid encoding type.`, "Please provide a valid ABI type."].join("\n"), {
932
+ docsPath: t,
933
+ name: "InvalidAbiEncodingType"
934
+ });
935
+ }
936
+ }, Nt = class extends w {
937
+ constructor(e, { docsPath: t }) {
938
+ super([`Type "${e}" is not a valid decoding type.`, "Please provide a valid ABI type."].join("\n"), {
939
+ docsPath: t,
940
+ name: "InvalidAbiDecodingType"
941
+ });
942
+ }
943
+ }, Pt = class extends w {
944
+ constructor(e) {
945
+ super([`Value "${e}" is not a valid array.`].join("\n"), { name: "InvalidArrayError" });
946
+ }
947
+ }, Ft = class extends w {
948
+ constructor(e) {
949
+ super([`"${e}" is not a valid definition type.`, "Valid types: \"function\", \"event\", \"error\""].join("\n"), { name: "InvalidDefinitionTypeError" });
950
+ }
951
+ }, It = class extends w {
952
+ constructor(e) {
953
+ super(`Type "${e}" is not supported for packed encoding.`, { name: "UnsupportedPackedAbiType" });
954
+ }
955
+ }, Lt = class extends w {
956
+ constructor({ offset: e, position: t, size: n }) {
957
+ super(`Slice ${t === "start" ? "starting" : "ending"} at offset "${e}" is out-of-bounds (size: ${n}).`, { name: "SliceOffsetOutOfBoundsError" });
958
+ }
959
+ }, Rt = class extends w {
960
+ constructor({ size: e, targetSize: t, type: n }) {
961
+ super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`, { name: "SizeExceedsPaddingSizeError" });
962
+ }
963
+ }, zt = class extends w {
964
+ constructor({ size: e, targetSize: t, type: n }) {
965
+ super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${t} ${n} long, but is ${e} ${n} long.`, { name: "InvalidBytesLengthError" });
966
+ }
967
+ };
968
+ //#endregion
969
+ //#region ../../node_modules/viem/_esm/utils/data/pad.js
970
+ function E(e, { dir: t, size: n = 32 } = {}) {
971
+ return typeof e == "string" ? D(e, {
972
+ dir: t,
973
+ size: n
974
+ }) : Bt(e, {
975
+ dir: t,
976
+ size: n
977
+ });
978
+ }
979
+ function D(e, { dir: t, size: n = 32 } = {}) {
980
+ if (n === null) return e;
981
+ let r = e.replace("0x", "");
982
+ if (r.length > n * 2) throw new Rt({
983
+ size: Math.ceil(r.length / 2),
984
+ targetSize: n,
985
+ type: "hex"
986
+ });
987
+ return `0x${r[t === "right" ? "padEnd" : "padStart"](n * 2, "0")}`;
988
+ }
989
+ function Bt(e, { dir: t, size: n = 32 } = {}) {
990
+ if (n === null) return e;
991
+ if (e.length > n) throw new Rt({
992
+ size: e.length,
993
+ targetSize: n,
994
+ type: "bytes"
995
+ });
996
+ let r = new Uint8Array(n);
997
+ for (let i = 0; i < n; i++) {
998
+ let a = t === "right";
999
+ r[a ? i : n - i - 1] = e[a ? i : e.length - i - 1];
1000
+ }
1001
+ return r;
1002
+ }
1003
+ //#endregion
1004
+ //#region ../../node_modules/viem/_esm/errors/encoding.js
1005
+ var Vt = class extends w {
1006
+ constructor({ max: e, min: t, signed: n, size: r, value: i }) {
1007
+ super(`Number "${i}" is not in safe ${r ? `${r * 8}-bit ${n ? "signed" : "unsigned"} ` : ""}integer range ${e ? `(${t} to ${e})` : `(above ${t})`}`, { name: "IntegerOutOfRangeError" });
1008
+ }
1009
+ }, Ht = class extends w {
1010
+ constructor(e) {
1011
+ super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, { name: "InvalidBytesBooleanError" });
1012
+ }
1013
+ }, Ut = class extends w {
1014
+ constructor(e) {
1015
+ super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`, { name: "InvalidHexBooleanError" });
1016
+ }
1017
+ }, Wt = class extends w {
1018
+ constructor({ givenSize: e, maxSize: t }) {
1019
+ super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`, { name: "SizeOverflowError" });
1020
+ }
1021
+ };
1022
+ //#endregion
1023
+ //#region ../../node_modules/viem/_esm/utils/data/trim.js
1024
+ function O(e, { dir: t = "left" } = {}) {
1025
+ let n = typeof e == "string" ? e.replace("0x", "") : e, r = 0;
1026
+ for (let e = 0; e < n.length - 1 && n[t === "left" ? e : n.length - e - 1].toString() === "0"; e++) r++;
1027
+ return n = t === "left" ? n.slice(r) : n.slice(0, n.length - r), typeof e == "string" ? (n.length === 1 && t === "right" && (n = `${n}0`), `0x${n.length % 2 == 1 ? `0${n}` : n}`) : n;
1028
+ }
1029
+ //#endregion
1030
+ //#region ../../node_modules/viem/_esm/utils/encoding/fromHex.js
1031
+ function k(e, { size: t }) {
1032
+ if (C(e) > t) throw new Wt({
1033
+ givenSize: C(e),
1034
+ maxSize: t
1035
+ });
1036
+ }
1037
+ function Gt(e, t = {}) {
1038
+ let { signed: n } = t;
1039
+ t.size && k(e, { size: t.size });
1040
+ let r = BigInt(e);
1041
+ if (!n) return r;
1042
+ let i = (e.length - 2) / 2;
1043
+ return r <= (1n << BigInt(i) * 8n - 1n) - 1n ? r : r - BigInt(`0x${"f".padStart(i * 2, "f")}`) - 1n;
1044
+ }
1045
+ function Kt(e, t = {}) {
1046
+ let n = e;
1047
+ if (t.size && (k(n, { size: t.size }), n = O(n)), O(n) === "0x00") return !1;
1048
+ if (O(n) === "0x01") return !0;
1049
+ throw new Ut(n);
1050
+ }
1051
+ function qt(e, t = {}) {
1052
+ let n = Gt(e, t), r = Number(n);
1053
+ if (!Number.isSafeInteger(r)) throw new Vt({
1054
+ max: `${2 ** 53 - 1}`,
1055
+ min: `${-(2 ** 53 - 1)}`,
1056
+ signed: t.signed,
1057
+ size: t.size,
1058
+ value: `${n}n`
1059
+ });
1060
+ return r;
1061
+ }
1062
+ //#endregion
1063
+ //#region ../../node_modules/viem/_esm/utils/encoding/toHex.js
1064
+ var Jt = /*#__PURE__*/ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
1065
+ function Yt(e, t = {}) {
1066
+ return typeof e == "number" || typeof e == "bigint" ? j(e, t) : typeof e == "string" ? Qt(e, t) : typeof e == "boolean" ? Xt(e, t) : A(e, t);
1067
+ }
1068
+ function Xt(e, t = {}) {
1069
+ let n = `0x${Number(e)}`;
1070
+ return typeof t.size == "number" ? (k(n, { size: t.size }), E(n, { size: t.size })) : n;
1071
+ }
1072
+ function A(e, t = {}) {
1073
+ let n = "";
1074
+ for (let t = 0; t < e.length; t++) n += Jt[e[t]];
1075
+ let r = `0x${n}`;
1076
+ return typeof t.size == "number" ? (k(r, { size: t.size }), E(r, {
1077
+ dir: "right",
1078
+ size: t.size
1079
+ })) : r;
1080
+ }
1081
+ function j(e, t = {}) {
1082
+ let { signed: n, size: r } = t, i = BigInt(e), a;
1083
+ r ? a = n ? (1n << BigInt(r) * 8n - 1n) - 1n : 2n ** (BigInt(r) * 8n) - 1n : typeof e == "number" && (a = BigInt(2 ** 53 - 1));
1084
+ let o = typeof a == "bigint" && n ? -a - 1n : 0;
1085
+ if (a && i > a || i < o) {
1086
+ let t = typeof e == "bigint" ? "n" : "";
1087
+ throw new Vt({
1088
+ max: a ? `${a}${t}` : void 0,
1089
+ min: `${o}${t}`,
1090
+ signed: n,
1091
+ size: r,
1092
+ value: `${e}${t}`
1093
+ });
1094
+ }
1095
+ let s = `0x${(n && i < 0 ? (1n << BigInt(r * 8)) + BigInt(i) : i).toString(16)}`;
1096
+ return r ? E(s, { size: r }) : s;
1097
+ }
1098
+ var Zt = /*#__PURE__*/ new TextEncoder();
1099
+ function Qt(e, t = {}) {
1100
+ return A(Zt.encode(e), t);
1101
+ }
1102
+ //#endregion
1103
+ //#region ../../node_modules/viem/_esm/utils/encoding/toBytes.js
1104
+ var $t = /*#__PURE__*/ new TextEncoder();
1105
+ function en(e, t = {}) {
1106
+ return typeof e == "number" || typeof e == "bigint" ? an(e, t) : typeof e == "boolean" ? tn(e, t) : S(e) ? rn(e, t) : on(e, t);
1107
+ }
1108
+ function tn(e, t = {}) {
1109
+ let n = new Uint8Array(1);
1110
+ return n[0] = Number(e), typeof t.size == "number" ? (k(n, { size: t.size }), E(n, { size: t.size })) : n;
1111
+ }
1112
+ var M = {
1113
+ zero: 48,
1114
+ nine: 57,
1115
+ A: 65,
1116
+ F: 70,
1117
+ a: 97,
1118
+ f: 102
1119
+ };
1120
+ function nn(e) {
1121
+ if (e >= M.zero && e <= M.nine) return e - M.zero;
1122
+ if (e >= M.A && e <= M.F) return e - (M.A - 10);
1123
+ if (e >= M.a && e <= M.f) return e - (M.a - 10);
1124
+ }
1125
+ function rn(e, t = {}) {
1126
+ let n = e;
1127
+ t.size && (k(n, { size: t.size }), n = E(n, {
1128
+ dir: "right",
1129
+ size: t.size
1130
+ }));
1131
+ let r = n.slice(2);
1132
+ r.length % 2 && (r = `0${r}`);
1133
+ let i = r.length / 2, a = new Uint8Array(i);
1134
+ for (let e = 0, t = 0; e < i; e++) {
1135
+ let n = nn(r.charCodeAt(t++)), i = nn(r.charCodeAt(t++));
1136
+ if (n === void 0 || i === void 0) throw new w(`Invalid byte sequence ("${r[t - 2]}${r[t - 1]}" in "${r}").`);
1137
+ a[e] = n * 16 + i;
1138
+ }
1139
+ return a;
1140
+ }
1141
+ function an(e, t) {
1142
+ return rn(j(e, t));
1143
+ }
1144
+ function on(e, t = {}) {
1145
+ let n = $t.encode(e);
1146
+ return typeof t.size == "number" ? (k(n, { size: t.size }), E(n, {
1147
+ dir: "right",
1148
+ size: t.size
1149
+ })) : n;
1150
+ }
1151
+ //#endregion
1152
+ //#region ../../node_modules/@noble/hashes/esm/sha3.js
1153
+ var sn = BigInt(0), cn = BigInt(1), ln = BigInt(2), un = BigInt(7), dn = BigInt(256), fn = BigInt(113), pn = [], mn = [], hn = [];
1154
+ for (let e = 0, t = cn, n = 1, r = 0; e < 24; e++) {
1155
+ [n, r] = [r, (2 * n + 3 * r) % 5], pn.push(2 * (5 * r + n)), mn.push((e + 1) * (e + 2) / 2 % 64);
1156
+ let i = sn;
1157
+ for (let e = 0; e < 7; e++) t = (t << cn ^ (t >> un) * fn) % dn, t & ln && (i ^= cn << (cn << /* @__PURE__ */ BigInt(e)) - cn);
1158
+ hn.push(i);
1159
+ }
1160
+ var gn = l(hn, !0), _n = gn[0], vn = gn[1], yn = (e, t, n) => n > 32 ? s(e, t, n) : o(e, t, n), bn = (e, t, r) => r > 32 ? n(e, t, r) : c(e, t, r);
1161
+ function xn(e, t = 24) {
1162
+ let n = new Uint32Array(10);
1163
+ for (let r = 24 - t; r < 24; r++) {
1164
+ for (let t = 0; t < 10; t++) n[t] = e[t] ^ e[t + 10] ^ e[t + 20] ^ e[t + 30] ^ e[t + 40];
1165
+ for (let t = 0; t < 10; t += 2) {
1166
+ let r = (t + 8) % 10, i = (t + 2) % 10, a = n[i], o = n[i + 1], s = yn(a, o, 1) ^ n[r], c = bn(a, o, 1) ^ n[r + 1];
1167
+ for (let n = 0; n < 50; n += 10) e[t + n] ^= s, e[t + n + 1] ^= c;
1168
+ }
1169
+ let t = e[2], i = e[3];
1170
+ for (let n = 0; n < 24; n++) {
1171
+ let r = mn[n], a = yn(t, i, r), o = bn(t, i, r), s = pn[n];
1172
+ t = e[s], i = e[s + 1], e[s] = a, e[s + 1] = o;
1173
+ }
1174
+ for (let t = 0; t < 50; t += 10) {
1175
+ for (let r = 0; r < 10; r++) n[r] = e[t + r];
1176
+ for (let r = 0; r < 10; r++) e[t + r] ^= ~n[(r + 2) % 10] & n[(r + 4) % 10];
1177
+ }
1178
+ e[0] ^= _n[r], e[1] ^= vn[r];
1179
+ }
1180
+ a(n);
1181
+ }
1182
+ var Sn = class t extends ee {
1183
+ constructor(t, n, r, a = !1, o = 24) {
1184
+ if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = t, this.suffix = n, this.outputLen = r, this.enableXOF = a, this.rounds = o, e(r), !(0 < t && t < 200)) throw Error("only keccak-f1600 function is supported");
1185
+ this.state = new Uint8Array(200), this.state32 = i(this.state);
1186
+ }
1187
+ clone() {
1188
+ return this._cloneInto();
1189
+ }
1190
+ keccak() {
1191
+ d(this.state32), xn(this.state32, this.rounds), d(this.state32), this.posOut = 0, this.pos = 0;
1192
+ }
1193
+ update(e) {
1194
+ p(this), e = r(e), u(e);
1195
+ let { blockLen: t, state: n } = this, i = e.length;
1196
+ for (let r = 0; r < i;) {
1197
+ let a = Math.min(t - this.pos, i - r);
1198
+ for (let t = 0; t < a; t++) n[this.pos++] ^= e[r++];
1199
+ this.pos === t && this.keccak();
1200
+ }
1201
+ return this;
1202
+ }
1203
+ finish() {
1204
+ if (this.finished) return;
1205
+ this.finished = !0;
1206
+ let { state: e, suffix: t, pos: n, blockLen: r } = this;
1207
+ e[n] ^= t, t & 128 && n === r - 1 && this.keccak(), e[r - 1] ^= 128, this.keccak();
1208
+ }
1209
+ writeInto(e) {
1210
+ p(this, !1), u(e), this.finish();
1211
+ let t = this.state, { blockLen: n } = this;
1212
+ for (let r = 0, i = e.length; r < i;) {
1213
+ this.posOut >= n && this.keccak();
1214
+ let a = Math.min(n - this.posOut, i - r);
1215
+ e.set(t.subarray(this.posOut, this.posOut + a), r), this.posOut += a, r += a;
1216
+ }
1217
+ return e;
1218
+ }
1219
+ xofInto(e) {
1220
+ if (!this.enableXOF) throw Error("XOF is not possible for this instance");
1221
+ return this.writeInto(e);
1222
+ }
1223
+ xof(t) {
1224
+ return e(t), this.xofInto(new Uint8Array(t));
1225
+ }
1226
+ digestInto(e) {
1227
+ if (f(e, this), this.finished) throw Error("digest() was already called");
1228
+ return this.writeInto(e), this.destroy(), e;
1229
+ }
1230
+ digest() {
1231
+ return this.digestInto(new Uint8Array(this.outputLen));
1232
+ }
1233
+ destroy() {
1234
+ this.destroyed = !0, a(this.state);
1235
+ }
1236
+ _cloneInto(e) {
1237
+ let { blockLen: n, suffix: r, outputLen: i, rounds: a, enableXOF: o } = this;
1238
+ return e ||= new t(n, r, i, o, a), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = a, e.suffix = r, e.outputLen = i, e.enableXOF = o, e.destroyed = this.destroyed, e;
1239
+ }
1240
+ }, Cn = /* @__PURE__ */ ((e, n, r) => t(() => new Sn(n, e, r)))(1, 136, 256 / 8);
1241
+ //#endregion
1242
+ //#region ../../node_modules/viem/_esm/utils/hash/keccak256.js
1243
+ function wn(e, t) {
1244
+ let n = t || "hex", r = Cn(S(e, { strict: !1 }) ? en(e) : e);
1245
+ return n === "bytes" ? r : Yt(r);
1246
+ }
1247
+ //#endregion
1248
+ //#region ../../node_modules/viem/_esm/utils/hash/hashSignature.js
1249
+ var Tn = (e) => wn(en(e));
1250
+ function En(e) {
1251
+ return Tn(e);
1252
+ }
1253
+ //#endregion
1254
+ //#region ../../node_modules/viem/_esm/utils/hash/normalizeSignature.js
1255
+ function Dn(e) {
1256
+ let t = !0, n = "", r = 0, i = "", a = !1;
1257
+ for (let o = 0; o < e.length; o++) {
1258
+ let s = e[o];
1259
+ if ([
1260
+ "(",
1261
+ ")",
1262
+ ","
1263
+ ].includes(s) && (t = !0), s === "(" && r++, s === ")" && r--, t) {
1264
+ if (r === 0) {
1265
+ if (s === " " && [
1266
+ "event",
1267
+ "function",
1268
+ ""
1269
+ ].includes(i)) i = "";
1270
+ else if (i += s, s === ")") {
1271
+ a = !0;
1272
+ break;
1273
+ }
1274
+ continue;
1275
+ }
1276
+ if (s === " ") {
1277
+ e[o - 1] !== "," && n !== "," && n !== ",(" && (n = "", t = !1);
1278
+ continue;
1279
+ }
1280
+ i += s, n += s;
1281
+ }
1282
+ }
1283
+ if (!a) throw new w("Unable to normalize signature.");
1284
+ return i;
1285
+ }
1286
+ //#endregion
1287
+ //#region ../../node_modules/viem/_esm/utils/hash/toSignature.js
1288
+ var On = (e) => Dn(typeof e == "string" ? e : oe(e));
1289
+ //#endregion
1290
+ //#region ../../node_modules/viem/_esm/utils/hash/toSignatureHash.js
1291
+ function kn(e) {
1292
+ return En(On(e));
1293
+ }
1294
+ //#endregion
1295
+ //#region ../../node_modules/viem/_esm/utils/hash/toEventSelector.js
1296
+ var An = kn, N = class extends w {
1297
+ constructor({ address: e }) {
1298
+ super(`Address "${e}" is invalid.`, {
1299
+ metaMessages: ["- Address must be a hex value of 20 bytes (40 hex characters).", "- Address must match its checksum counterpart."],
1300
+ name: "InvalidAddressError"
1301
+ });
1302
+ }
1303
+ }, jn = class extends Map {
1304
+ constructor(e) {
1305
+ super(), Object.defineProperty(this, "maxSize", {
1306
+ enumerable: !0,
1307
+ configurable: !0,
1308
+ writable: !0,
1309
+ value: void 0
1310
+ }), this.maxSize = e;
1311
+ }
1312
+ get(e) {
1313
+ let t = super.get(e);
1314
+ return super.has(e) && t !== void 0 && (this.delete(e), super.set(e, t)), t;
1315
+ }
1316
+ set(e, t) {
1317
+ if (super.set(e, t), this.maxSize && this.size > this.maxSize) {
1318
+ let e = this.keys().next().value;
1319
+ e && this.delete(e);
1320
+ }
1321
+ return this;
1322
+ }
1323
+ }, Mn = /*#__PURE__*/ new jn(8192);
1324
+ function Nn(e, t) {
1325
+ if (Mn.has(`${e}.${t}`)) return Mn.get(`${e}.${t}`);
1326
+ let n = t ? `${t}${e.toLowerCase()}` : e.substring(2).toLowerCase(), r = wn(on(n), "bytes"), i = (t ? n.substring(`${t}0x`.length) : n).split("");
1327
+ for (let e = 0; e < 40; e += 2) r[e >> 1] >> 4 >= 8 && i[e] && (i[e] = i[e].toUpperCase()), (r[e >> 1] & 15) >= 8 && i[e + 1] && (i[e + 1] = i[e + 1].toUpperCase());
1328
+ let a = `0x${i.join("")}`;
1329
+ return Mn.set(`${e}.${t}`, a), a;
1330
+ }
1331
+ function Pn(e, t) {
1332
+ if (!P(e, { strict: !1 })) throw new N({ address: e });
1333
+ return Nn(e, t);
1334
+ }
1335
+ //#endregion
1336
+ //#region ../../node_modules/viem/_esm/utils/address/isAddress.js
1337
+ var Fn = /^0x[a-fA-F0-9]{40}$/, In = /*#__PURE__*/ new jn(8192);
1338
+ function P(e, t) {
1339
+ let { strict: n = !0 } = t ?? {}, r = `${e}.${n}`;
1340
+ if (In.has(r)) return In.get(r);
1341
+ let i = Fn.test(e) ? e.toLowerCase() === e ? !0 : n ? Nn(e) === e : !0 : !1;
1342
+ return In.set(r, i), i;
1343
+ }
1344
+ //#endregion
1345
+ //#region ../../node_modules/viem/_esm/utils/data/concat.js
1346
+ function F(e) {
1347
+ return typeof e[0] == "string" ? Rn(e) : Ln(e);
1348
+ }
1349
+ function Ln(e) {
1350
+ let t = 0;
1351
+ for (let n of e) t += n.length;
1352
+ let n = new Uint8Array(t), r = 0;
1353
+ for (let t of e) n.set(t, r), r += t.length;
1354
+ return n;
1355
+ }
1356
+ function Rn(e) {
1357
+ return `0x${e.reduce((e, t) => e + t.replace("0x", ""), "")}`;
1358
+ }
1359
+ //#endregion
1360
+ //#region ../../node_modules/viem/_esm/utils/data/slice.js
1361
+ function I(e, t, n, { strict: r } = {}) {
1362
+ return S(e, { strict: !1 }) ? Hn(e, t, n, { strict: r }) : Vn(e, t, n, { strict: r });
1363
+ }
1364
+ function zn(e, t) {
1365
+ if (typeof t == "number" && t > 0 && t > C(e) - 1) throw new Lt({
1366
+ offset: t,
1367
+ position: "start",
1368
+ size: C(e)
1369
+ });
1370
+ }
1371
+ function Bn(e, t, n) {
1372
+ if (typeof t == "number" && typeof n == "number" && C(e) !== n - t) throw new Lt({
1373
+ offset: n,
1374
+ position: "end",
1375
+ size: C(e)
1376
+ });
1377
+ }
1378
+ function Vn(e, t, n, { strict: r } = {}) {
1379
+ zn(e, t);
1380
+ let i = e.slice(t, n);
1381
+ return r && Bn(i, t, n), i;
1382
+ }
1383
+ function Hn(e, t, n, { strict: r } = {}) {
1384
+ zn(e, t);
1385
+ let i = `0x${e.replace("0x", "").slice((t ?? 0) * 2, (n ?? e.length) * 2)}`;
1386
+ return r && Bn(i, t, n), i;
1387
+ }
1388
+ //#endregion
1389
+ //#region ../../node_modules/viem/_esm/utils/regex.js
1390
+ var Un = /^(.*)\[([0-9]*)\]$/, Wn = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, Gn = /^(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)?$/;
1391
+ //#endregion
1392
+ //#region ../../node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
1393
+ function Kn(e, t) {
1394
+ if (e.length !== t.length) throw new yt({
1395
+ expectedLength: e.length,
1396
+ givenLength: t.length
1397
+ });
1398
+ let n = Yn(qn({
1399
+ params: e,
1400
+ values: t
1401
+ }));
1402
+ return n.length === 0 ? "0x" : n;
1403
+ }
1404
+ function qn({ params: e, values: t }) {
1405
+ let n = [];
1406
+ for (let r = 0; r < e.length; r++) n.push(Jn({
1407
+ param: e[r],
1408
+ value: t[r]
1409
+ }));
1410
+ return n;
1411
+ }
1412
+ function Jn({ param: e, value: t }) {
1413
+ let n = rr(e.type);
1414
+ if (n) {
1415
+ let [r, i] = n;
1416
+ return Zn(t, {
1417
+ length: r,
1418
+ param: {
1419
+ ...e,
1420
+ type: i
1421
+ }
1422
+ });
1423
+ }
1424
+ if (e.type === "tuple") return nr(t, { param: e });
1425
+ if (e.type === "address") return Xn(t);
1426
+ if (e.type === "bool") return $n(t);
1427
+ if (e.type.startsWith("uint") || e.type.startsWith("int")) {
1428
+ let n = e.type.startsWith("int"), [, , r = "256"] = Gn.exec(e.type) ?? [];
1429
+ return er(t, {
1430
+ signed: n,
1431
+ size: Number(r)
1432
+ });
1433
+ }
1434
+ if (e.type.startsWith("bytes")) return Qn(t, { param: e });
1435
+ if (e.type === "string") return tr(t);
1436
+ throw new Mt(e.type, { docsPath: "/docs/contract/encodeAbiParameters" });
1437
+ }
1438
+ function Yn(e) {
1439
+ let t = 0;
1440
+ for (let n = 0; n < e.length; n++) {
1441
+ let { dynamic: r, encoded: i } = e[n];
1442
+ r ? t += 32 : t += C(i);
1443
+ }
1444
+ let n = [], r = [], i = 0;
1445
+ for (let a = 0; a < e.length; a++) {
1446
+ let { dynamic: o, encoded: s } = e[a];
1447
+ o ? (n.push(j(t + i, { size: 32 })), r.push(s), i += C(s)) : n.push(s);
1448
+ }
1449
+ return F([...n, ...r]);
1450
+ }
1451
+ function Xn(e) {
1452
+ if (!P(e)) throw new N({ address: e });
1453
+ return {
1454
+ dynamic: !1,
1455
+ encoded: D(e.toLowerCase())
1456
+ };
1457
+ }
1458
+ function Zn(e, { length: t, param: n }) {
1459
+ let r = t === null;
1460
+ if (!Array.isArray(e)) throw new Pt(e);
1461
+ if (!r && e.length !== t) throw new _t({
1462
+ expectedLength: t,
1463
+ givenLength: e.length,
1464
+ type: `${n.type}[${t}]`
1465
+ });
1466
+ let i = !1, a = [];
1467
+ for (let t = 0; t < e.length; t++) {
1468
+ let r = Jn({
1469
+ param: n,
1470
+ value: e[t]
1471
+ });
1472
+ r.dynamic && (i = !0), a.push(r);
1473
+ }
1474
+ if (r || i) {
1475
+ let e = Yn(a);
1476
+ if (r) {
1477
+ let t = j(a.length, { size: 32 });
1478
+ return {
1479
+ dynamic: !0,
1480
+ encoded: a.length > 0 ? F([t, e]) : t
1481
+ };
1482
+ }
1483
+ if (i) return {
1484
+ dynamic: !0,
1485
+ encoded: e
1486
+ };
1487
+ }
1488
+ return {
1489
+ dynamic: !1,
1490
+ encoded: F(a.map(({ encoded: e }) => e))
1491
+ };
1492
+ }
1493
+ function Qn(e, { param: t }) {
1494
+ let [, n] = t.type.split("bytes"), r = C(e);
1495
+ if (!n) {
1496
+ let t = e;
1497
+ return r % 32 != 0 && (t = D(t, {
1498
+ dir: "right",
1499
+ size: Math.ceil((e.length - 2) / 2 / 32) * 32
1500
+ })), {
1501
+ dynamic: !0,
1502
+ encoded: F([D(j(r, { size: 32 })), t])
1503
+ };
1504
+ }
1505
+ if (r !== Number.parseInt(n, 10)) throw new vt({
1506
+ expectedSize: Number.parseInt(n, 10),
1507
+ value: e
1508
+ });
1509
+ return {
1510
+ dynamic: !1,
1511
+ encoded: D(e, { dir: "right" })
1512
+ };
1513
+ }
1514
+ function $n(e) {
1515
+ if (typeof e != "boolean") throw new w(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);
1516
+ return {
1517
+ dynamic: !1,
1518
+ encoded: D(Xt(e))
1519
+ };
1520
+ }
1521
+ function er(e, { signed: t, size: n = 256 }) {
1522
+ if (typeof n == "number") {
1523
+ let r = 2n ** (BigInt(n) - (t ? 1n : 0n)) - 1n, i = t ? -r - 1n : 0n;
1524
+ if (e > r || e < i) throw new Vt({
1525
+ max: r.toString(),
1526
+ min: i.toString(),
1527
+ signed: t,
1528
+ size: n / 8,
1529
+ value: e.toString()
1530
+ });
1531
+ }
1532
+ return {
1533
+ dynamic: !1,
1534
+ encoded: j(e, {
1535
+ size: 32,
1536
+ signed: t
1537
+ })
1538
+ };
1539
+ }
1540
+ function tr(e) {
1541
+ let t = Qt(e), n = Math.ceil(C(t) / 32), r = [];
1542
+ for (let e = 0; e < n; e++) r.push(D(I(t, e * 32, (e + 1) * 32), { dir: "right" }));
1543
+ return {
1544
+ dynamic: !0,
1545
+ encoded: F([D(j(C(t), { size: 32 })), ...r])
1546
+ };
1547
+ }
1548
+ function nr(e, { param: t }) {
1549
+ let n = !1, r = [];
1550
+ for (let i = 0; i < t.components.length; i++) {
1551
+ let a = t.components[i], o = Jn({
1552
+ param: a,
1553
+ value: e[Array.isArray(e) ? i : a.name]
1554
+ });
1555
+ r.push(o), o.dynamic && (n = !0);
1556
+ }
1557
+ return {
1558
+ dynamic: n,
1559
+ encoded: n ? Yn(r) : F(r.map(({ encoded: e }) => e))
1560
+ };
1561
+ }
1562
+ function rr(e) {
1563
+ let t = e.match(/^(.*)\[(\d+)?\]$/);
1564
+ return t ? [t[2] ? Number(t[2]) : null, t[1]] : void 0;
1565
+ }
1566
+ //#endregion
1567
+ //#region ../../node_modules/viem/_esm/utils/hash/toFunctionSelector.js
1568
+ var L = (e) => I(kn(e), 0, 4);
1569
+ //#endregion
1570
+ //#region ../../node_modules/viem/_esm/utils/abi/getAbiItem.js
1571
+ function R(e) {
1572
+ let { abi: t, args: n = [], name: r } = e, i = S(r, { strict: !1 }), a = t.filter((e) => i ? e.type === "function" ? L(e) === r : e.type === "event" ? An(e) === r : !1 : "name" in e && e.name === r);
1573
+ if (a.length === 0) return;
1574
+ if (a.length === 1) return a[0];
1575
+ let o;
1576
+ for (let e of a) if ("inputs" in e) {
1577
+ if (!n || n.length === 0) {
1578
+ if (!e.inputs || e.inputs.length === 0) return e;
1579
+ continue;
1580
+ }
1581
+ if (e.inputs && e.inputs.length !== 0 && e.inputs.length === n.length && n.every((t, n) => {
1582
+ let r = "inputs" in e && e.inputs[n];
1583
+ return r ? ir(t, r) : !1;
1584
+ })) {
1585
+ if (o && "inputs" in o && o.inputs) {
1586
+ let t = ar(e.inputs, o.inputs, n);
1587
+ if (t) throw new Ot({
1588
+ abiItem: e,
1589
+ type: t[0]
1590
+ }, {
1591
+ abiItem: o,
1592
+ type: t[1]
1593
+ });
1594
+ }
1595
+ o = e;
1596
+ }
1597
+ }
1598
+ return o || a[0];
1599
+ }
1600
+ function ir(e, t) {
1601
+ let n = typeof e, r = t.type;
1602
+ switch (r) {
1603
+ case "address": return P(e, { strict: !1 });
1604
+ case "bool": return n === "boolean";
1605
+ case "function": return n === "string";
1606
+ case "string": return n === "string";
1607
+ default: return r === "tuple" && "components" in t ? Object.values(t.components).every((t, r) => n === "object" && ir(Object.values(e)[r], t)) : /^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)?$/.test(r) ? n === "number" || n === "bigint" : /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r) ? n === "string" || e instanceof Uint8Array : /[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r) ? Array.isArray(e) && e.every((e) => ir(e, {
1608
+ ...t,
1609
+ type: r.replace(/(\[[0-9]{0,}\])$/, "")
1610
+ })) : !1;
1611
+ }
1612
+ }
1613
+ function ar(e, t, n) {
1614
+ for (let r in e) {
1615
+ let i = e[r], a = t[r];
1616
+ if (i.type === "tuple" && a.type === "tuple" && "components" in i && "components" in a) return ar(i.components, a.components, n[r]);
1617
+ let o = [i.type, a.type];
1618
+ if (o.includes("address") && o.includes("bytes20") || (o.includes("address") && o.includes("string") || o.includes("address") && o.includes("bytes")) && P(n[r], { strict: !1 })) return o;
1619
+ }
1620
+ }
1621
+ //#endregion
1622
+ //#region ../../node_modules/viem/_esm/accounts/utils/parseAccount.js
1623
+ function or(e) {
1624
+ return typeof e == "string" ? {
1625
+ address: e,
1626
+ type: "json-rpc"
1627
+ } : e;
1628
+ }
1629
+ //#endregion
1630
+ //#region ../../node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js
1631
+ var sr = "/docs/contract/encodeFunctionData";
1632
+ function cr(e) {
1633
+ let { abi: t, args: n, functionName: r } = e, i = t[0];
1634
+ if (r) {
1635
+ let e = R({
1636
+ abi: t,
1637
+ args: n,
1638
+ name: r
1639
+ });
1640
+ if (!e) throw new T(r, { docsPath: sr });
1641
+ i = e;
1642
+ }
1643
+ if (i.type !== "function") throw new T(void 0, { docsPath: sr });
1644
+ return {
1645
+ abi: [i],
1646
+ functionName: L(x(i))
1647
+ };
1648
+ }
1649
+ //#endregion
1650
+ //#region ../../node_modules/viem/_esm/utils/abi/encodeFunctionData.js
1651
+ function lr(e) {
1652
+ let { args: t } = e, { abi: n, functionName: r } = e.abi.length === 1 && e.functionName?.startsWith("0x") ? e : cr(e), i = n[0];
1653
+ return Rn([r, ("inputs" in i && i.inputs ? Kn(i.inputs, t ?? []) : void 0) ?? "0x"]);
1654
+ }
1655
+ //#endregion
1656
+ //#region ../../node_modules/viem/_esm/constants/solidity.js
1657
+ var ur = {
1658
+ 1: "An `assert` condition failed.",
1659
+ 17: "Arithmetic operation resulted in underflow or overflow.",
1660
+ 18: "Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",
1661
+ 33: "Attempted to convert to an invalid type.",
1662
+ 34: "Attempted to access a storage byte array that is incorrectly encoded.",
1663
+ 49: "Performed `.pop()` on an empty array",
1664
+ 50: "Array index is out of bounds.",
1665
+ 65: "Allocated too much memory or created an array which is too large.",
1666
+ 81: "Attempted to call a zero-initialized variable of internal function type."
1667
+ }, dr = {
1668
+ inputs: [{
1669
+ name: "message",
1670
+ type: "string"
1671
+ }],
1672
+ name: "Error",
1673
+ type: "error"
1674
+ }, fr = {
1675
+ inputs: [{
1676
+ name: "reason",
1677
+ type: "uint256"
1678
+ }],
1679
+ name: "Panic",
1680
+ type: "error"
1681
+ }, pr = class extends w {
1682
+ constructor({ offset: e }) {
1683
+ super(`Offset \`${e}\` cannot be negative.`, { name: "NegativeOffsetError" });
1684
+ }
1685
+ }, mr = class extends w {
1686
+ constructor({ length: e, position: t }) {
1687
+ super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`, { name: "PositionOutOfBoundsError" });
1688
+ }
1689
+ }, hr = class extends w {
1690
+ constructor({ count: e, limit: t }) {
1691
+ super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`, { name: "RecursiveReadLimitExceededError" });
1692
+ }
1693
+ }, gr = {
1694
+ bytes: new Uint8Array(),
1695
+ dataView: /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(0)),
1696
+ position: 0,
1697
+ positionReadCount: /* @__PURE__ */ new Map(),
1698
+ recursiveReadCount: 0,
1699
+ recursiveReadLimit: Infinity,
1700
+ assertReadLimit() {
1701
+ if (this.recursiveReadCount >= this.recursiveReadLimit) throw new hr({
1702
+ count: this.recursiveReadCount + 1,
1703
+ limit: this.recursiveReadLimit
1704
+ });
1705
+ },
1706
+ assertPosition(e) {
1707
+ if (e < 0 || e > this.bytes.length - 1) throw new mr({
1708
+ length: this.bytes.length,
1709
+ position: e
1710
+ });
1711
+ },
1712
+ decrementPosition(e) {
1713
+ if (e < 0) throw new pr({ offset: e });
1714
+ let t = this.position - e;
1715
+ this.assertPosition(t), this.position = t;
1716
+ },
1717
+ getReadCount(e) {
1718
+ return this.positionReadCount.get(e || this.position) || 0;
1719
+ },
1720
+ incrementPosition(e) {
1721
+ if (e < 0) throw new pr({ offset: e });
1722
+ let t = this.position + e;
1723
+ this.assertPosition(t), this.position = t;
1724
+ },
1725
+ inspectByte(e) {
1726
+ let t = e ?? this.position;
1727
+ return this.assertPosition(t), this.bytes[t];
1728
+ },
1729
+ inspectBytes(e, t) {
1730
+ let n = t ?? this.position;
1731
+ return this.assertPosition(n + e - 1), this.bytes.subarray(n, n + e);
1732
+ },
1733
+ inspectUint8(e) {
1734
+ let t = e ?? this.position;
1735
+ return this.assertPosition(t), this.bytes[t];
1736
+ },
1737
+ inspectUint16(e) {
1738
+ let t = e ?? this.position;
1739
+ return this.assertPosition(t + 1), this.dataView.getUint16(t);
1740
+ },
1741
+ inspectUint24(e) {
1742
+ let t = e ?? this.position;
1743
+ return this.assertPosition(t + 2), (this.dataView.getUint16(t) << 8) + this.dataView.getUint8(t + 2);
1744
+ },
1745
+ inspectUint32(e) {
1746
+ let t = e ?? this.position;
1747
+ return this.assertPosition(t + 3), this.dataView.getUint32(t);
1748
+ },
1749
+ pushByte(e) {
1750
+ this.assertPosition(this.position), this.bytes[this.position] = e, this.position++;
1751
+ },
1752
+ pushBytes(e) {
1753
+ this.assertPosition(this.position + e.length - 1), this.bytes.set(e, this.position), this.position += e.length;
1754
+ },
1755
+ pushUint8(e) {
1756
+ this.assertPosition(this.position), this.bytes[this.position] = e, this.position++;
1757
+ },
1758
+ pushUint16(e) {
1759
+ this.assertPosition(this.position + 1), this.dataView.setUint16(this.position, e), this.position += 2;
1760
+ },
1761
+ pushUint24(e) {
1762
+ this.assertPosition(this.position + 2), this.dataView.setUint16(this.position, e >> 8), this.dataView.setUint8(this.position + 2, e & 255), this.position += 3;
1763
+ },
1764
+ pushUint32(e) {
1765
+ this.assertPosition(this.position + 3), this.dataView.setUint32(this.position, e), this.position += 4;
1766
+ },
1767
+ readByte() {
1768
+ this.assertReadLimit(), this._touch();
1769
+ let e = this.inspectByte();
1770
+ return this.position++, e;
1771
+ },
1772
+ readBytes(e, t) {
1773
+ this.assertReadLimit(), this._touch();
1774
+ let n = this.inspectBytes(e);
1775
+ return this.position += t ?? e, n;
1776
+ },
1777
+ readUint8() {
1778
+ this.assertReadLimit(), this._touch();
1779
+ let e = this.inspectUint8();
1780
+ return this.position += 1, e;
1781
+ },
1782
+ readUint16() {
1783
+ this.assertReadLimit(), this._touch();
1784
+ let e = this.inspectUint16();
1785
+ return this.position += 2, e;
1786
+ },
1787
+ readUint24() {
1788
+ this.assertReadLimit(), this._touch();
1789
+ let e = this.inspectUint24();
1790
+ return this.position += 3, e;
1791
+ },
1792
+ readUint32() {
1793
+ this.assertReadLimit(), this._touch();
1794
+ let e = this.inspectUint32();
1795
+ return this.position += 4, e;
1796
+ },
1797
+ get remaining() {
1798
+ return this.bytes.length - this.position;
1799
+ },
1800
+ setPosition(e) {
1801
+ let t = this.position;
1802
+ return this.assertPosition(e), this.position = e, () => this.position = t;
1803
+ },
1804
+ _touch() {
1805
+ if (this.recursiveReadLimit === Infinity) return;
1806
+ let e = this.getReadCount();
1807
+ this.positionReadCount.set(this.position, e + 1), e > 0 && this.recursiveReadCount++;
1808
+ }
1809
+ };
1810
+ function _r(e, { recursiveReadLimit: t = 8192 } = {}) {
1811
+ let n = Object.create(gr);
1812
+ return n.bytes = e, n.dataView = new DataView(e.buffer ?? e, e.byteOffset, e.byteLength), n.positionReadCount = /* @__PURE__ */ new Map(), n.recursiveReadLimit = t, n;
1813
+ }
1814
+ //#endregion
1815
+ //#region ../../node_modules/viem/_esm/utils/encoding/fromBytes.js
1816
+ function vr(e, t = {}) {
1817
+ return t.size !== void 0 && k(e, { size: t.size }), Gt(A(e, t), t);
1818
+ }
1819
+ function yr(e, t = {}) {
1820
+ let n = e;
1821
+ if (t.size !== void 0 && (k(n, { size: t.size }), n = O(n)), n.length > 1 || n[0] > 1) throw new Ht(n);
1822
+ return !!n[0];
1823
+ }
1824
+ function z(e, t = {}) {
1825
+ return t.size !== void 0 && k(e, { size: t.size }), qt(A(e, t), t);
1826
+ }
1827
+ function br(e, t = {}) {
1828
+ let n = e;
1829
+ return t.size !== void 0 && (k(n, { size: t.size }), n = O(n, { dir: "right" })), new TextDecoder().decode(n);
1830
+ }
1831
+ //#endregion
1832
+ //#region ../../node_modules/viem/_esm/utils/abi/decodeAbiParameters.js
1833
+ function xr(e, t) {
1834
+ let n = typeof t == "string" ? rn(t) : t, r = _r(n);
1835
+ if (C(n) === 0 && e.length > 0) throw new gt();
1836
+ if (C(t) && C(t) < 32) throw new ht({
1837
+ data: typeof t == "string" ? t : A(t),
1838
+ params: e,
1839
+ size: C(t)
1840
+ });
1841
+ let i = 0, a = [];
1842
+ for (let t = 0; t < e.length; ++t) {
1843
+ let n = e[t];
1844
+ r.setPosition(i);
1845
+ let [o, s] = B(r, n, { staticPosition: 0 });
1846
+ i += s, a.push(o);
1847
+ }
1848
+ return a;
1849
+ }
1850
+ function B(e, t, { staticPosition: n }) {
1851
+ let r = rr(t.type);
1852
+ if (r) {
1853
+ let [i, a] = r;
1854
+ return Tr(e, {
1855
+ ...t,
1856
+ type: a
1857
+ }, {
1858
+ length: i,
1859
+ staticPosition: n
1860
+ });
1861
+ }
1862
+ if (t.type === "tuple") return kr(e, t, { staticPosition: n });
1863
+ if (t.type === "address") return wr(e);
1864
+ if (t.type === "bool") return Er(e);
1865
+ if (t.type.startsWith("bytes")) return Dr(e, t, { staticPosition: n });
1866
+ if (t.type.startsWith("uint") || t.type.startsWith("int")) return Or(e, t);
1867
+ if (t.type === "string") return Ar(e, { staticPosition: n });
1868
+ throw new Nt(t.type, { docsPath: "/docs/contract/decodeAbiParameters" });
1869
+ }
1870
+ var Sr = 32, Cr = 32;
1871
+ function wr(e) {
1872
+ return [Nn(A(Vn(e.readBytes(32), -20))), 32];
1873
+ }
1874
+ function Tr(e, t, { length: n, staticPosition: r }) {
1875
+ if (!n) {
1876
+ let n = r + z(e.readBytes(Cr)), i = n + Sr;
1877
+ e.setPosition(n);
1878
+ let a = z(e.readBytes(Sr)), o = jr(t), s = 0, c = [];
1879
+ for (let n = 0; n < a; ++n) {
1880
+ e.setPosition(i + (o ? n * 32 : s));
1881
+ let [r, a] = B(e, t, { staticPosition: i });
1882
+ s += a, c.push(r);
1883
+ }
1884
+ return e.setPosition(r + 32), [c, 32];
1885
+ }
1886
+ if (jr(t)) {
1887
+ let i = r + z(e.readBytes(Cr)), a = [];
1888
+ for (let r = 0; r < n; ++r) {
1889
+ e.setPosition(i + r * 32);
1890
+ let [n] = B(e, t, { staticPosition: i });
1891
+ a.push(n);
1892
+ }
1893
+ return e.setPosition(r + 32), [a, 32];
1894
+ }
1895
+ let i = 0, a = [];
1896
+ for (let o = 0; o < n; ++o) {
1897
+ let [n, o] = B(e, t, { staticPosition: r + i });
1898
+ i += o, a.push(n);
1899
+ }
1900
+ return [a, i];
1901
+ }
1902
+ function Er(e) {
1903
+ return [yr(e.readBytes(32), { size: 32 }), 32];
1904
+ }
1905
+ function Dr(e, t, { staticPosition: n }) {
1906
+ let [r, i] = t.type.split("bytes");
1907
+ if (!i) {
1908
+ let t = z(e.readBytes(32));
1909
+ e.setPosition(n + t);
1910
+ let r = z(e.readBytes(32));
1911
+ if (r === 0) return e.setPosition(n + 32), ["0x", 32];
1912
+ let i = e.readBytes(r);
1913
+ return e.setPosition(n + 32), [A(i), 32];
1914
+ }
1915
+ return [A(e.readBytes(Number.parseInt(i, 10), 32)), 32];
1916
+ }
1917
+ function Or(e, t) {
1918
+ let n = t.type.startsWith("int"), r = Number.parseInt(t.type.split("int")[1] || "256", 10), i = e.readBytes(32);
1919
+ return [r > 48 ? vr(i, { signed: n }) : z(i, { signed: n }), 32];
1920
+ }
1921
+ function kr(e, t, { staticPosition: n }) {
1922
+ let r = t.components.length === 0 || t.components.some(({ name: e }) => !e), i = r ? [] : {}, a = 0;
1923
+ if (jr(t)) {
1924
+ let o = n + z(e.readBytes(Cr));
1925
+ for (let n = 0; n < t.components.length; ++n) {
1926
+ let s = t.components[n];
1927
+ e.setPosition(o + a);
1928
+ let [c, l] = B(e, s, { staticPosition: o });
1929
+ a += l, i[r ? n : s?.name] = c;
1930
+ }
1931
+ return e.setPosition(n + 32), [i, 32];
1932
+ }
1933
+ for (let o = 0; o < t.components.length; ++o) {
1934
+ let s = t.components[o], [c, l] = B(e, s, { staticPosition: n });
1935
+ i[r ? o : s?.name] = c, a += l;
1936
+ }
1937
+ return [i, a];
1938
+ }
1939
+ function Ar(e, { staticPosition: t }) {
1940
+ let n = t + z(e.readBytes(32));
1941
+ e.setPosition(n);
1942
+ let r = z(e.readBytes(32));
1943
+ if (r === 0) return e.setPosition(t + 32), ["", 32];
1944
+ let i = br(O(e.readBytes(r, 32)));
1945
+ return e.setPosition(t + 32), [i, 32];
1946
+ }
1947
+ function jr(e) {
1948
+ let { type: t } = e;
1949
+ if (t === "string" || t === "bytes" || t.endsWith("[]")) return !0;
1950
+ if (t === "tuple") return e.components?.some(jr);
1951
+ let n = rr(e.type);
1952
+ return !!(n && jr({
1953
+ ...e,
1954
+ type: n[1]
1955
+ }));
1956
+ }
1957
+ //#endregion
1958
+ //#region ../../node_modules/viem/_esm/utils/abi/decodeErrorResult.js
1959
+ function Mr(e) {
1960
+ let { abi: t, data: n } = e, r = I(n, 0, 4);
1961
+ if (r === "0x") throw new gt();
1962
+ let i = [
1963
+ ...t || [],
1964
+ dr,
1965
+ fr
1966
+ ].find((e) => e.type === "error" && r === L(x(e)));
1967
+ if (!i) throw new St(r, { docsPath: "/docs/contract/decodeErrorResult" });
1968
+ return {
1969
+ abiItem: i,
1970
+ args: "inputs" in i && i.inputs && i.inputs.length > 0 ? xr(i.inputs, I(n, 4)) : void 0,
1971
+ errorName: i.name
1972
+ };
1973
+ }
1974
+ //#endregion
1975
+ //#region ../../node_modules/viem/_esm/utils/stringify.js
1976
+ var V = (e, t, n) => JSON.stringify(e, (e, n) => {
1977
+ let r = typeof n == "bigint" ? n.toString() : n;
1978
+ return typeof t == "function" ? t(e, r) : r;
1979
+ }, n);
1980
+ //#endregion
1981
+ //#region ../../node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js
1982
+ function Nr({ abiItem: e, args: t, includeFunctionName: n = !0, includeName: r = !1 }) {
1983
+ if ("name" in e && "inputs" in e && e.inputs) return `${n ? e.name : ""}(${e.inputs.map((e, n) => `${r && e.name ? `${e.name}: ` : ""}${typeof t[n] == "object" ? V(t[n]) : t[n]}`).join(", ")})`;
1984
+ }
1985
+ //#endregion
1986
+ //#region ../../node_modules/viem/_esm/constants/unit.js
1987
+ var Pr = {
1988
+ gwei: 9,
1989
+ wei: 18
1990
+ }, Fr = {
1991
+ ether: -9,
1992
+ wei: 9
1993
+ };
1994
+ //#endregion
1995
+ //#region ../../node_modules/viem/_esm/utils/unit/formatUnits.js
1996
+ function Ir(e, t) {
1997
+ let n = e.toString(), r = n.startsWith("-");
1998
+ r && (n = n.slice(1)), n = n.padStart(t, "0");
1999
+ let [i, a] = [n.slice(0, n.length - t), n.slice(n.length - t)];
2000
+ return a = a.replace(/(0+)$/, ""), `${r ? "-" : ""}${i || "0"}${a ? `.${a}` : ""}`;
2001
+ }
2002
+ //#endregion
2003
+ //#region ../../node_modules/viem/_esm/utils/unit/formatEther.js
2004
+ function Lr(e, t = "wei") {
2005
+ return Ir(e, Pr[t]);
2006
+ }
2007
+ //#endregion
2008
+ //#region ../../node_modules/viem/_esm/utils/unit/formatGwei.js
2009
+ function H(e, t = "wei") {
2010
+ return Ir(e, Fr[t]);
2011
+ }
2012
+ //#endregion
2013
+ //#region ../../node_modules/viem/_esm/errors/stateOverride.js
2014
+ var Rr = class extends w {
2015
+ constructor({ address: e }) {
2016
+ super(`State for account "${e}" is set multiple times.`, { name: "AccountStateConflictError" });
2017
+ }
2018
+ }, zr = class extends w {
2019
+ constructor() {
2020
+ super("state and stateDiff are set on the same account.", { name: "StateAssignmentConflictError" });
2021
+ }
2022
+ };
2023
+ function Br(e) {
2024
+ return e.reduce((e, { slot: t, value: n }) => `${e} ${t}: ${n}\n`, "");
2025
+ }
2026
+ function Vr(e) {
2027
+ return e.reduce((e, { address: t, ...n }) => {
2028
+ let r = `${e} ${t}:\n`;
2029
+ return n.nonce && (r += ` nonce: ${n.nonce}\n`), n.balance && (r += ` balance: ${n.balance}\n`), n.code && (r += ` code: ${n.code}\n`), n.state && (r += " state:\n", r += Br(n.state)), n.stateDiff && (r += " stateDiff:\n", r += Br(n.stateDiff)), r;
2030
+ }, " State Override:\n").slice(0, -1);
2031
+ }
2032
+ //#endregion
2033
+ //#region ../../node_modules/viem/_esm/errors/transaction.js
2034
+ function Hr(e) {
2035
+ let t = Object.entries(e).map(([e, t]) => t === void 0 || t === !1 ? null : [e, t]).filter(Boolean), n = t.reduce((e, [t]) => Math.max(e, t.length), 0);
2036
+ return t.map(([e, t]) => ` ${`${e}:`.padEnd(n + 1)} ${t}`).join("\n");
2037
+ }
2038
+ var Ur = class extends w {
2039
+ constructor({ v: e }) {
2040
+ super(`Invalid \`v\` value "${e}". Expected 27 or 28.`, { name: "InvalidLegacyVError" });
2041
+ }
2042
+ }, Wr = class extends w {
2043
+ constructor({ transaction: e }) {
2044
+ super("Cannot infer a transaction type from provided transaction.", {
2045
+ metaMessages: [
2046
+ "Provided Transaction:",
2047
+ "{",
2048
+ Hr(e),
2049
+ "}",
2050
+ "",
2051
+ "To infer the type, either provide:",
2052
+ "- a `type` to the Transaction, or",
2053
+ "- an EIP-1559 Transaction with `maxFeePerGas`, or",
2054
+ "- an EIP-2930 Transaction with `gasPrice` & `accessList`, or",
2055
+ "- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or",
2056
+ "- an EIP-7702 Transaction with `authorizationList`, or",
2057
+ "- a Legacy Transaction with `gasPrice`"
2058
+ ],
2059
+ name: "InvalidSerializableTransactionError"
2060
+ });
2061
+ }
2062
+ }, Gr = class extends w {
2063
+ constructor({ storageKey: e }) {
2064
+ super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
2065
+ }
2066
+ }, Kr = class extends w {
2067
+ constructor(e, { account: t, docsPath: n, chain: r, data: i, gas: a, gasPrice: o, maxFeePerGas: s, maxPriorityFeePerGas: c, nonce: l, to: u, value: d }) {
2068
+ let f = Hr({
2069
+ chain: r && `${r?.name} (id: ${r?.id})`,
2070
+ from: t?.address,
2071
+ to: u,
2072
+ value: d !== void 0 && `${Lr(d)} ${r?.nativeCurrency?.symbol || "ETH"}`,
2073
+ data: i,
2074
+ gas: a,
2075
+ gasPrice: o !== void 0 && `${H(o)} gwei`,
2076
+ maxFeePerGas: s !== void 0 && `${H(s)} gwei`,
2077
+ maxPriorityFeePerGas: c !== void 0 && `${H(c)} gwei`,
2078
+ nonce: l
2079
+ });
2080
+ super(e.shortMessage, {
2081
+ cause: e,
2082
+ docsPath: n,
2083
+ metaMessages: [
2084
+ ...e.metaMessages ? [...e.metaMessages, " "] : [],
2085
+ "Request Arguments:",
2086
+ f
2087
+ ].filter(Boolean),
2088
+ name: "TransactionExecutionError"
2089
+ }), Object.defineProperty(this, "cause", {
2090
+ enumerable: !0,
2091
+ configurable: !0,
2092
+ writable: !0,
2093
+ value: void 0
2094
+ }), this.cause = e;
2095
+ }
2096
+ }, qr = class extends w {
2097
+ constructor({ blockHash: e, blockNumber: t, blockTag: n, hash: r, index: i }) {
2098
+ let a = "Transaction";
2099
+ n && i !== void 0 && (a = `Transaction at block time "${n}" at index "${i}"`), e && i !== void 0 && (a = `Transaction at block hash "${e}" at index "${i}"`), t && i !== void 0 && (a = `Transaction at block number "${t}" at index "${i}"`), r && (a = `Transaction with hash "${r}"`), super(`${a} could not be found.`, { name: "TransactionNotFoundError" });
2100
+ }
2101
+ }, Jr = class extends w {
2102
+ constructor({ hash: e }) {
2103
+ super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`, { name: "TransactionReceiptNotFoundError" });
2104
+ }
2105
+ }, Yr = class extends w {
2106
+ constructor({ receipt: e }) {
2107
+ super(`Transaction with hash "${e.transactionHash}" reverted.`, {
2108
+ metaMessages: [
2109
+ "The receipt marked the transaction as \"reverted\". This could mean that the function on the contract you are trying to call threw an error.",
2110
+ " ",
2111
+ "You can attempt to extract the revert reason by:",
2112
+ "- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract",
2113
+ "- using the `call` Action with raw `data`"
2114
+ ],
2115
+ name: "TransactionReceiptRevertedError"
2116
+ }), Object.defineProperty(this, "receipt", {
2117
+ enumerable: !0,
2118
+ configurable: !0,
2119
+ writable: !0,
2120
+ value: void 0
2121
+ }), this.receipt = e;
2122
+ }
2123
+ }, Xr = class extends w {
2124
+ constructor({ hash: e }) {
2125
+ super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`, { name: "WaitForTransactionReceiptTimeoutError" });
2126
+ }
2127
+ }, Zr = (e) => e, Qr = (e) => e, $r = class extends w {
2128
+ constructor(e, { account: t, docsPath: n, chain: r, data: i, gas: a, gasPrice: o, maxFeePerGas: s, maxPriorityFeePerGas: c, nonce: l, to: u, value: d, stateOverride: f }) {
2129
+ let p = Hr({
2130
+ from: (t ? or(t) : void 0)?.address,
2131
+ to: u,
2132
+ value: d !== void 0 && `${Lr(d)} ${r?.nativeCurrency?.symbol || "ETH"}`,
2133
+ data: i,
2134
+ gas: a,
2135
+ gasPrice: o !== void 0 && `${H(o)} gwei`,
2136
+ maxFeePerGas: s !== void 0 && `${H(s)} gwei`,
2137
+ maxPriorityFeePerGas: c !== void 0 && `${H(c)} gwei`,
2138
+ nonce: l
2139
+ });
2140
+ f && (p += `\n${Vr(f)}`), super(e.shortMessage, {
2141
+ cause: e,
2142
+ docsPath: n,
2143
+ metaMessages: [
2144
+ ...e.metaMessages ? [...e.metaMessages, " "] : [],
2145
+ "Raw Call Arguments:",
2146
+ p
2147
+ ].filter(Boolean),
2148
+ name: "CallExecutionError"
2149
+ }), Object.defineProperty(this, "cause", {
2150
+ enumerable: !0,
2151
+ configurable: !0,
2152
+ writable: !0,
2153
+ value: void 0
2154
+ }), this.cause = e;
2155
+ }
2156
+ }, ei = class extends w {
2157
+ constructor(e, { abi: t, args: n, contractAddress: r, docsPath: i, functionName: a, sender: o }) {
2158
+ let s = R({
2159
+ abi: t,
2160
+ args: n,
2161
+ name: a
2162
+ }), c = s ? Nr({
2163
+ abiItem: s,
2164
+ args: n,
2165
+ includeFunctionName: !1,
2166
+ includeName: !1
2167
+ }) : void 0, l = s ? x(s, { includeName: !0 }) : void 0, u = Hr({
2168
+ address: r && Zr(r),
2169
+ function: l,
2170
+ args: c && c !== "()" && `${[...Array(a?.length ?? 0).keys()].map(() => " ").join("")}${c}`,
2171
+ sender: o
2172
+ });
2173
+ super(e.shortMessage || `An unknown error occurred while executing the contract function "${a}".`, {
2174
+ cause: e,
2175
+ docsPath: i,
2176
+ metaMessages: [
2177
+ ...e.metaMessages ? [...e.metaMessages, " "] : [],
2178
+ u && "Contract Call:",
2179
+ u
2180
+ ].filter(Boolean),
2181
+ name: "ContractFunctionExecutionError"
2182
+ }), Object.defineProperty(this, "abi", {
2183
+ enumerable: !0,
2184
+ configurable: !0,
2185
+ writable: !0,
2186
+ value: void 0
2187
+ }), Object.defineProperty(this, "args", {
2188
+ enumerable: !0,
2189
+ configurable: !0,
2190
+ writable: !0,
2191
+ value: void 0
2192
+ }), Object.defineProperty(this, "cause", {
2193
+ enumerable: !0,
2194
+ configurable: !0,
2195
+ writable: !0,
2196
+ value: void 0
2197
+ }), Object.defineProperty(this, "contractAddress", {
2198
+ enumerable: !0,
2199
+ configurable: !0,
2200
+ writable: !0,
2201
+ value: void 0
2202
+ }), Object.defineProperty(this, "formattedArgs", {
2203
+ enumerable: !0,
2204
+ configurable: !0,
2205
+ writable: !0,
2206
+ value: void 0
2207
+ }), Object.defineProperty(this, "functionName", {
2208
+ enumerable: !0,
2209
+ configurable: !0,
2210
+ writable: !0,
2211
+ value: void 0
2212
+ }), Object.defineProperty(this, "sender", {
2213
+ enumerable: !0,
2214
+ configurable: !0,
2215
+ writable: !0,
2216
+ value: void 0
2217
+ }), this.abi = t, this.args = n, this.cause = e, this.contractAddress = r, this.functionName = a, this.sender = o;
2218
+ }
2219
+ }, ti = class extends w {
2220
+ constructor({ abi: e, data: t, functionName: n, message: r }) {
2221
+ let i, a, o, s;
2222
+ if (t && t !== "0x") try {
2223
+ a = Mr({
2224
+ abi: e,
2225
+ data: t
2226
+ });
2227
+ let { abiItem: n, errorName: r, args: i } = a;
2228
+ if (r === "Error") s = i[0];
2229
+ else if (r === "Panic") {
2230
+ let [e] = i;
2231
+ s = ur[e];
2232
+ } else {
2233
+ let e = n ? x(n, { includeName: !0 }) : void 0, t = n && i ? Nr({
2234
+ abiItem: n,
2235
+ args: i,
2236
+ includeFunctionName: !1,
2237
+ includeName: !1
2238
+ }) : void 0;
2239
+ o = [e ? `Error: ${e}` : "", t && t !== "()" ? ` ${[...Array(r?.length ?? 0).keys()].map(() => " ").join("")}${t}` : ""];
2240
+ }
2241
+ } catch (e) {
2242
+ i = e;
2243
+ }
2244
+ else r && (s = r);
2245
+ let c;
2246
+ i instanceof St && (c = i.signature, o = [
2247
+ `Unable to decode signature "${c}" as it was not found on the provided ABI.`,
2248
+ "Make sure you are using the correct ABI and that the error exists on it.",
2249
+ `You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${c}.`
2250
+ ]), super(s && s !== "execution reverted" || c ? [`The contract function "${n}" reverted with the following ${c ? "signature" : "reason"}:`, s || c].join("\n") : `The contract function "${n}" reverted.`, {
2251
+ cause: i,
2252
+ metaMessages: o,
2253
+ name: "ContractFunctionRevertedError"
2254
+ }), Object.defineProperty(this, "data", {
2255
+ enumerable: !0,
2256
+ configurable: !0,
2257
+ writable: !0,
2258
+ value: void 0
2259
+ }), Object.defineProperty(this, "raw", {
2260
+ enumerable: !0,
2261
+ configurable: !0,
2262
+ writable: !0,
2263
+ value: void 0
2264
+ }), Object.defineProperty(this, "reason", {
2265
+ enumerable: !0,
2266
+ configurable: !0,
2267
+ writable: !0,
2268
+ value: void 0
2269
+ }), Object.defineProperty(this, "signature", {
2270
+ enumerable: !0,
2271
+ configurable: !0,
2272
+ writable: !0,
2273
+ value: void 0
2274
+ }), this.data = a, this.raw = t, this.reason = s, this.signature = c;
2275
+ }
2276
+ }, ni = class extends w {
2277
+ constructor({ functionName: e }) {
2278
+ super(`The contract function "${e}" returned no data ("0x").`, {
2279
+ metaMessages: [
2280
+ "This could be due to any of the following:",
2281
+ ` - The contract does not have the function "${e}",`,
2282
+ " - The parameters passed to the contract function may be invalid, or",
2283
+ " - The address is not a contract."
2284
+ ],
2285
+ name: "ContractFunctionZeroDataError"
2286
+ });
2287
+ }
2288
+ }, ri = class extends w {
2289
+ constructor({ factory: e }) {
2290
+ super(`Deployment for counterfactual contract call failed${e ? ` for factory "${e}".` : ""}`, {
2291
+ metaMessages: [
2292
+ "Please ensure:",
2293
+ "- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).",
2294
+ "- The `factoryData` is a valid encoded function call for contract deployment function on the factory."
2295
+ ],
2296
+ name: "CounterfactualDeploymentFailedError"
2297
+ });
2298
+ }
2299
+ }, ii = class extends w {
2300
+ constructor({ data: e, message: t }) {
2301
+ super(t || "", { name: "RawContractError" }), Object.defineProperty(this, "code", {
2302
+ enumerable: !0,
2303
+ configurable: !0,
2304
+ writable: !0,
2305
+ value: 3
2306
+ }), Object.defineProperty(this, "data", {
2307
+ enumerable: !0,
2308
+ configurable: !0,
2309
+ writable: !0,
2310
+ value: void 0
2311
+ }), this.data = e;
2312
+ }
2313
+ }, ai = class extends w {
2314
+ constructor({ body: e, cause: t, details: n, headers: r, status: i, url: a }) {
2315
+ super("HTTP request failed.", {
2316
+ cause: t,
2317
+ details: n,
2318
+ metaMessages: [
2319
+ i && `Status: ${i}`,
2320
+ `URL: ${Qr(a)}`,
2321
+ e && `Request body: ${V(e)}`
2322
+ ].filter(Boolean),
2323
+ name: "HttpRequestError"
2324
+ }), Object.defineProperty(this, "body", {
2325
+ enumerable: !0,
2326
+ configurable: !0,
2327
+ writable: !0,
2328
+ value: void 0
2329
+ }), Object.defineProperty(this, "headers", {
2330
+ enumerable: !0,
2331
+ configurable: !0,
2332
+ writable: !0,
2333
+ value: void 0
2334
+ }), Object.defineProperty(this, "status", {
2335
+ enumerable: !0,
2336
+ configurable: !0,
2337
+ writable: !0,
2338
+ value: void 0
2339
+ }), Object.defineProperty(this, "url", {
2340
+ enumerable: !0,
2341
+ configurable: !0,
2342
+ writable: !0,
2343
+ value: void 0
2344
+ }), this.body = e, this.headers = r, this.status = i, this.url = a;
2345
+ }
2346
+ }, oi = class extends w {
2347
+ constructor({ body: e, error: t, url: n }) {
2348
+ super("RPC Request failed.", {
2349
+ cause: t,
2350
+ details: t.message,
2351
+ metaMessages: [`URL: ${Qr(n)}`, `Request body: ${V(e)}`],
2352
+ name: "RpcRequestError"
2353
+ }), Object.defineProperty(this, "code", {
2354
+ enumerable: !0,
2355
+ configurable: !0,
2356
+ writable: !0,
2357
+ value: void 0
2358
+ }), Object.defineProperty(this, "data", {
2359
+ enumerable: !0,
2360
+ configurable: !0,
2361
+ writable: !0,
2362
+ value: void 0
2363
+ }), Object.defineProperty(this, "url", {
2364
+ enumerable: !0,
2365
+ configurable: !0,
2366
+ writable: !0,
2367
+ value: void 0
2368
+ }), this.code = t.code, this.data = t.data, this.url = n;
2369
+ }
2370
+ }, si = class extends w {
2371
+ constructor({ body: e, url: t }) {
2372
+ super("The request took too long to respond.", {
2373
+ details: "The request timed out.",
2374
+ metaMessages: [`URL: ${Qr(t)}`, `Request body: ${V(e)}`],
2375
+ name: "TimeoutError"
2376
+ }), Object.defineProperty(this, "url", {
2377
+ enumerable: !0,
2378
+ configurable: !0,
2379
+ writable: !0,
2380
+ value: void 0
2381
+ }), this.url = t;
2382
+ }
2383
+ }, ci = -1, U = class extends w {
2384
+ constructor(e, { code: t, docsPath: n, metaMessages: r, name: i, shortMessage: a }) {
2385
+ super(a, {
2386
+ cause: e,
2387
+ docsPath: n,
2388
+ metaMessages: r || e?.metaMessages,
2389
+ name: i || "RpcError"
2390
+ }), Object.defineProperty(this, "code", {
2391
+ enumerable: !0,
2392
+ configurable: !0,
2393
+ writable: !0,
2394
+ value: void 0
2395
+ }), this.name = i || e.name, this.code = e instanceof oi ? e.code : t ?? ci;
2396
+ }
2397
+ }, W = class extends U {
2398
+ constructor(e, t) {
2399
+ super(e, t), Object.defineProperty(this, "data", {
2400
+ enumerable: !0,
2401
+ configurable: !0,
2402
+ writable: !0,
2403
+ value: void 0
2404
+ }), this.data = t.data;
2405
+ }
2406
+ }, li = class e extends U {
2407
+ constructor(t) {
2408
+ super(t, {
2409
+ code: e.code,
2410
+ name: "ParseRpcError",
2411
+ shortMessage: "Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."
2412
+ });
2413
+ }
2414
+ };
2415
+ Object.defineProperty(li, "code", {
2416
+ enumerable: !0,
2417
+ configurable: !0,
2418
+ writable: !0,
2419
+ value: -32700
2420
+ });
2421
+ var ui = class e extends U {
2422
+ constructor(t) {
2423
+ super(t, {
2424
+ code: e.code,
2425
+ name: "InvalidRequestRpcError",
2426
+ shortMessage: "JSON is not a valid request object."
2427
+ });
2428
+ }
2429
+ };
2430
+ Object.defineProperty(ui, "code", {
2431
+ enumerable: !0,
2432
+ configurable: !0,
2433
+ writable: !0,
2434
+ value: -32600
2435
+ });
2436
+ var di = class e extends U {
2437
+ constructor(t, { method: n } = {}) {
2438
+ super(t, {
2439
+ code: e.code,
2440
+ name: "MethodNotFoundRpcError",
2441
+ shortMessage: `The method${n ? ` "${n}"` : ""} does not exist / is not available.`
2442
+ });
2443
+ }
2444
+ };
2445
+ Object.defineProperty(di, "code", {
2446
+ enumerable: !0,
2447
+ configurable: !0,
2448
+ writable: !0,
2449
+ value: -32601
2450
+ });
2451
+ var fi = class e extends U {
2452
+ constructor(t) {
2453
+ super(t, {
2454
+ code: e.code,
2455
+ name: "InvalidParamsRpcError",
2456
+ shortMessage: ["Invalid parameters were provided to the RPC method.", "Double check you have provided the correct parameters."].join("\n")
2457
+ });
2458
+ }
2459
+ };
2460
+ Object.defineProperty(fi, "code", {
2461
+ enumerable: !0,
2462
+ configurable: !0,
2463
+ writable: !0,
2464
+ value: -32602
2465
+ });
2466
+ var pi = class e extends U {
2467
+ constructor(t) {
2468
+ super(t, {
2469
+ code: e.code,
2470
+ name: "InternalRpcError",
2471
+ shortMessage: "An internal error was received."
2472
+ });
2473
+ }
2474
+ };
2475
+ Object.defineProperty(pi, "code", {
2476
+ enumerable: !0,
2477
+ configurable: !0,
2478
+ writable: !0,
2479
+ value: -32603
2480
+ });
2481
+ var mi = class e extends U {
2482
+ constructor(t) {
2483
+ super(t, {
2484
+ code: e.code,
2485
+ name: "InvalidInputRpcError",
2486
+ shortMessage: ["Missing or invalid parameters.", "Double check you have provided the correct parameters."].join("\n")
2487
+ });
2488
+ }
2489
+ };
2490
+ Object.defineProperty(mi, "code", {
2491
+ enumerable: !0,
2492
+ configurable: !0,
2493
+ writable: !0,
2494
+ value: -32e3
2495
+ });
2496
+ var hi = class e extends U {
2497
+ constructor(t) {
2498
+ super(t, {
2499
+ code: e.code,
2500
+ name: "ResourceNotFoundRpcError",
2501
+ shortMessage: "Requested resource not found."
2502
+ }), Object.defineProperty(this, "name", {
2503
+ enumerable: !0,
2504
+ configurable: !0,
2505
+ writable: !0,
2506
+ value: "ResourceNotFoundRpcError"
2507
+ });
2508
+ }
2509
+ };
2510
+ Object.defineProperty(hi, "code", {
2511
+ enumerable: !0,
2512
+ configurable: !0,
2513
+ writable: !0,
2514
+ value: -32001
2515
+ });
2516
+ var gi = class e extends U {
2517
+ constructor(t) {
2518
+ super(t, {
2519
+ code: e.code,
2520
+ name: "ResourceUnavailableRpcError",
2521
+ shortMessage: "Requested resource not available."
2522
+ });
2523
+ }
2524
+ };
2525
+ Object.defineProperty(gi, "code", {
2526
+ enumerable: !0,
2527
+ configurable: !0,
2528
+ writable: !0,
2529
+ value: -32002
2530
+ });
2531
+ var _i = class e extends U {
2532
+ constructor(t) {
2533
+ super(t, {
2534
+ code: e.code,
2535
+ name: "TransactionRejectedRpcError",
2536
+ shortMessage: "Transaction creation failed."
2537
+ });
2538
+ }
2539
+ };
2540
+ Object.defineProperty(_i, "code", {
2541
+ enumerable: !0,
2542
+ configurable: !0,
2543
+ writable: !0,
2544
+ value: -32003
2545
+ });
2546
+ var vi = class e extends U {
2547
+ constructor(t, { method: n } = {}) {
2548
+ super(t, {
2549
+ code: e.code,
2550
+ name: "MethodNotSupportedRpcError",
2551
+ shortMessage: `Method${n ? ` "${n}"` : ""} is not supported.`
2552
+ });
2553
+ }
2554
+ };
2555
+ Object.defineProperty(vi, "code", {
2556
+ enumerable: !0,
2557
+ configurable: !0,
2558
+ writable: !0,
2559
+ value: -32004
2560
+ });
2561
+ var yi = class e extends U {
2562
+ constructor(t) {
2563
+ super(t, {
2564
+ code: e.code,
2565
+ name: "LimitExceededRpcError",
2566
+ shortMessage: "Request exceeds defined limit."
2567
+ });
2568
+ }
2569
+ };
2570
+ Object.defineProperty(yi, "code", {
2571
+ enumerable: !0,
2572
+ configurable: !0,
2573
+ writable: !0,
2574
+ value: -32005
2575
+ });
2576
+ var bi = class e extends U {
2577
+ constructor(t) {
2578
+ super(t, {
2579
+ code: e.code,
2580
+ name: "JsonRpcVersionUnsupportedError",
2581
+ shortMessage: "Version of JSON-RPC protocol is not supported."
2582
+ });
2583
+ }
2584
+ };
2585
+ Object.defineProperty(bi, "code", {
2586
+ enumerable: !0,
2587
+ configurable: !0,
2588
+ writable: !0,
2589
+ value: -32006
2590
+ });
2591
+ var xi = class e extends W {
2592
+ constructor(t) {
2593
+ super(t, {
2594
+ code: e.code,
2595
+ name: "UserRejectedRequestError",
2596
+ shortMessage: "User rejected the request."
2597
+ });
2598
+ }
2599
+ };
2600
+ Object.defineProperty(xi, "code", {
2601
+ enumerable: !0,
2602
+ configurable: !0,
2603
+ writable: !0,
2604
+ value: 4001
2605
+ });
2606
+ var Si = class e extends W {
2607
+ constructor(t) {
2608
+ super(t, {
2609
+ code: e.code,
2610
+ name: "UnauthorizedProviderError",
2611
+ shortMessage: "The requested method and/or account has not been authorized by the user."
2612
+ });
2613
+ }
2614
+ };
2615
+ Object.defineProperty(Si, "code", {
2616
+ enumerable: !0,
2617
+ configurable: !0,
2618
+ writable: !0,
2619
+ value: 4100
2620
+ });
2621
+ var Ci = class e extends W {
2622
+ constructor(t, { method: n } = {}) {
2623
+ super(t, {
2624
+ code: e.code,
2625
+ name: "UnsupportedProviderMethodError",
2626
+ shortMessage: `The Provider does not support the requested method${n ? ` " ${n}"` : ""}.`
2627
+ });
2628
+ }
2629
+ };
2630
+ Object.defineProperty(Ci, "code", {
2631
+ enumerable: !0,
2632
+ configurable: !0,
2633
+ writable: !0,
2634
+ value: 4200
2635
+ });
2636
+ var wi = class e extends W {
2637
+ constructor(t) {
2638
+ super(t, {
2639
+ code: e.code,
2640
+ name: "ProviderDisconnectedError",
2641
+ shortMessage: "The Provider is disconnected from all chains."
2642
+ });
2643
+ }
2644
+ };
2645
+ Object.defineProperty(wi, "code", {
2646
+ enumerable: !0,
2647
+ configurable: !0,
2648
+ writable: !0,
2649
+ value: 4900
2650
+ });
2651
+ var Ti = class e extends W {
2652
+ constructor(t) {
2653
+ super(t, {
2654
+ code: e.code,
2655
+ name: "ChainDisconnectedError",
2656
+ shortMessage: "The Provider is not connected to the requested chain."
2657
+ });
2658
+ }
2659
+ };
2660
+ Object.defineProperty(Ti, "code", {
2661
+ enumerable: !0,
2662
+ configurable: !0,
2663
+ writable: !0,
2664
+ value: 4901
2665
+ });
2666
+ var Ei = class e extends W {
2667
+ constructor(t) {
2668
+ super(t, {
2669
+ code: e.code,
2670
+ name: "SwitchChainError",
2671
+ shortMessage: "An error occurred when attempting to switch chain."
2672
+ });
2673
+ }
2674
+ };
2675
+ Object.defineProperty(Ei, "code", {
2676
+ enumerable: !0,
2677
+ configurable: !0,
2678
+ writable: !0,
2679
+ value: 4902
2680
+ });
2681
+ var Di = class e extends W {
2682
+ constructor(t) {
2683
+ super(t, {
2684
+ code: e.code,
2685
+ name: "UnsupportedNonOptionalCapabilityError",
2686
+ shortMessage: "This Wallet does not support a capability that was not marked as optional."
2687
+ });
2688
+ }
2689
+ };
2690
+ Object.defineProperty(Di, "code", {
2691
+ enumerable: !0,
2692
+ configurable: !0,
2693
+ writable: !0,
2694
+ value: 5700
2695
+ });
2696
+ var Oi = class e extends W {
2697
+ constructor(t) {
2698
+ super(t, {
2699
+ code: e.code,
2700
+ name: "UnsupportedChainIdError",
2701
+ shortMessage: "This Wallet does not support the requested chain ID."
2702
+ });
2703
+ }
2704
+ };
2705
+ Object.defineProperty(Oi, "code", {
2706
+ enumerable: !0,
2707
+ configurable: !0,
2708
+ writable: !0,
2709
+ value: 5710
2710
+ });
2711
+ var ki = class e extends W {
2712
+ constructor(t) {
2713
+ super(t, {
2714
+ code: e.code,
2715
+ name: "DuplicateIdError",
2716
+ shortMessage: "There is already a bundle submitted with this ID."
2717
+ });
2718
+ }
2719
+ };
2720
+ Object.defineProperty(ki, "code", {
2721
+ enumerable: !0,
2722
+ configurable: !0,
2723
+ writable: !0,
2724
+ value: 5720
2725
+ });
2726
+ var Ai = class e extends W {
2727
+ constructor(t) {
2728
+ super(t, {
2729
+ code: e.code,
2730
+ name: "UnknownBundleIdError",
2731
+ shortMessage: "This bundle id is unknown / has not been submitted"
2732
+ });
2733
+ }
2734
+ };
2735
+ Object.defineProperty(Ai, "code", {
2736
+ enumerable: !0,
2737
+ configurable: !0,
2738
+ writable: !0,
2739
+ value: 5730
2740
+ });
2741
+ var ji = class e extends W {
2742
+ constructor(t) {
2743
+ super(t, {
2744
+ code: e.code,
2745
+ name: "BundleTooLargeError",
2746
+ shortMessage: "The call bundle is too large for the Wallet to process."
2747
+ });
2748
+ }
2749
+ };
2750
+ Object.defineProperty(ji, "code", {
2751
+ enumerable: !0,
2752
+ configurable: !0,
2753
+ writable: !0,
2754
+ value: 5740
2755
+ });
2756
+ var Mi = class e extends W {
2757
+ constructor(t) {
2758
+ super(t, {
2759
+ code: e.code,
2760
+ name: "AtomicReadyWalletRejectedUpgradeError",
2761
+ shortMessage: "The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."
2762
+ });
2763
+ }
2764
+ };
2765
+ Object.defineProperty(Mi, "code", {
2766
+ enumerable: !0,
2767
+ configurable: !0,
2768
+ writable: !0,
2769
+ value: 5750
2770
+ });
2771
+ var Ni = class e extends W {
2772
+ constructor(t) {
2773
+ super(t, {
2774
+ code: e.code,
2775
+ name: "AtomicityNotSupportedError",
2776
+ shortMessage: "The wallet does not support atomic execution but the request requires it."
2777
+ });
2778
+ }
2779
+ };
2780
+ Object.defineProperty(Ni, "code", {
2781
+ enumerable: !0,
2782
+ configurable: !0,
2783
+ writable: !0,
2784
+ value: 5760
2785
+ });
2786
+ var Pi = class e extends W {
2787
+ constructor(t) {
2788
+ super(t, {
2789
+ code: e.code,
2790
+ name: "WalletConnectSessionSettlementError",
2791
+ shortMessage: "WalletConnect session settlement failed."
2792
+ });
2793
+ }
2794
+ };
2795
+ Object.defineProperty(Pi, "code", {
2796
+ enumerable: !0,
2797
+ configurable: !0,
2798
+ writable: !0,
2799
+ value: 7e3
2800
+ });
2801
+ var Fi = class extends U {
2802
+ constructor(e) {
2803
+ super(e, {
2804
+ name: "UnknownRpcError",
2805
+ shortMessage: "An unknown RPC error occurred."
2806
+ });
2807
+ }
2808
+ }, G = class extends w {
2809
+ constructor({ cause: e, message: t } = {}) {
2810
+ let n = t?.replace("execution reverted: ", "")?.replace("execution reverted", "");
2811
+ super(`Execution reverted ${n ? `with reason: ${n}` : "for an unknown reason"}.`, {
2812
+ cause: e,
2813
+ name: "ExecutionRevertedError"
2814
+ });
2815
+ }
2816
+ };
2817
+ Object.defineProperty(G, "code", {
2818
+ enumerable: !0,
2819
+ configurable: !0,
2820
+ writable: !0,
2821
+ value: 3
2822
+ }), Object.defineProperty(G, "nodeMessage", {
2823
+ enumerable: !0,
2824
+ configurable: !0,
2825
+ writable: !0,
2826
+ value: /execution reverted|gas required exceeds allowance/
2827
+ });
2828
+ var K = class extends w {
2829
+ constructor({ cause: e, maxFeePerGas: t } = {}) {
2830
+ super(`The fee cap (\`maxFeePerGas\`${t ? ` = ${H(t)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
2831
+ cause: e,
2832
+ name: "FeeCapTooHighError"
2833
+ });
2834
+ }
2835
+ };
2836
+ Object.defineProperty(K, "nodeMessage", {
2837
+ enumerable: !0,
2838
+ configurable: !0,
2839
+ writable: !0,
2840
+ value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
2841
+ });
2842
+ var Ii = class extends w {
2843
+ constructor({ cause: e, maxFeePerGas: t } = {}) {
2844
+ super(`The fee cap (\`maxFeePerGas\`${t ? ` = ${H(t)}` : ""} gwei) cannot be lower than the block base fee.`, {
2845
+ cause: e,
2846
+ name: "FeeCapTooLowError"
2847
+ });
2848
+ }
2849
+ };
2850
+ Object.defineProperty(Ii, "nodeMessage", {
2851
+ enumerable: !0,
2852
+ configurable: !0,
2853
+ writable: !0,
2854
+ value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
2855
+ });
2856
+ var Li = class extends w {
2857
+ constructor({ cause: e, nonce: t } = {}) {
2858
+ super(`Nonce provided for the transaction ${t ? `(${t}) ` : ""}is higher than the next one expected.`, {
2859
+ cause: e,
2860
+ name: "NonceTooHighError"
2861
+ });
2862
+ }
2863
+ };
2864
+ Object.defineProperty(Li, "nodeMessage", {
2865
+ enumerable: !0,
2866
+ configurable: !0,
2867
+ writable: !0,
2868
+ value: /nonce too high/
2869
+ });
2870
+ var Ri = class extends w {
2871
+ constructor({ cause: e, nonce: t } = {}) {
2872
+ super([`Nonce provided for the transaction ${t ? `(${t}) ` : ""}is lower than the current nonce of the account.`, "Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"), {
2873
+ cause: e,
2874
+ name: "NonceTooLowError"
2875
+ });
2876
+ }
2877
+ };
2878
+ Object.defineProperty(Ri, "nodeMessage", {
2879
+ enumerable: !0,
2880
+ configurable: !0,
2881
+ writable: !0,
2882
+ value: /nonce too low|transaction already imported|already known/
2883
+ });
2884
+ var zi = class extends w {
2885
+ constructor({ cause: e, nonce: t } = {}) {
2886
+ super(`Nonce provided for the transaction ${t ? `(${t}) ` : ""}exceeds the maximum allowed nonce.`, {
2887
+ cause: e,
2888
+ name: "NonceMaxValueError"
2889
+ });
2890
+ }
2891
+ };
2892
+ Object.defineProperty(zi, "nodeMessage", {
2893
+ enumerable: !0,
2894
+ configurable: !0,
2895
+ writable: !0,
2896
+ value: /nonce has max value/
2897
+ });
2898
+ var Bi = class extends w {
2899
+ constructor({ cause: e } = {}) {
2900
+ super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"), {
2901
+ cause: e,
2902
+ metaMessages: [
2903
+ "This error could arise when the account does not have enough funds to:",
2904
+ " - pay for the total gas fee,",
2905
+ " - pay for the value to send.",
2906
+ " ",
2907
+ "The cost of the transaction is calculated as `gas * gas fee + value`, where:",
2908
+ " - `gas` is the amount of gas needed for transaction to execute,",
2909
+ " - `gas fee` is the gas fee,",
2910
+ " - `value` is the amount of ether to send to the recipient."
2911
+ ],
2912
+ name: "InsufficientFundsError"
2913
+ });
2914
+ }
2915
+ };
2916
+ Object.defineProperty(Bi, "nodeMessage", {
2917
+ enumerable: !0,
2918
+ configurable: !0,
2919
+ writable: !0,
2920
+ value: /insufficient funds|exceeds transaction sender account balance/
2921
+ });
2922
+ var Vi = class extends w {
2923
+ constructor({ cause: e, gas: t } = {}) {
2924
+ super(`The amount of gas ${t ? `(${t}) ` : ""}provided for the transaction exceeds the limit allowed for the block.`, {
2925
+ cause: e,
2926
+ name: "IntrinsicGasTooHighError"
2927
+ });
2928
+ }
2929
+ };
2930
+ Object.defineProperty(Vi, "nodeMessage", {
2931
+ enumerable: !0,
2932
+ configurable: !0,
2933
+ writable: !0,
2934
+ value: /intrinsic gas too high|gas limit reached/
2935
+ });
2936
+ var Hi = class extends w {
2937
+ constructor({ cause: e, gas: t } = {}) {
2938
+ super(`The amount of gas ${t ? `(${t}) ` : ""}provided for the transaction is too low.`, {
2939
+ cause: e,
2940
+ name: "IntrinsicGasTooLowError"
2941
+ });
2942
+ }
2943
+ };
2944
+ Object.defineProperty(Hi, "nodeMessage", {
2945
+ enumerable: !0,
2946
+ configurable: !0,
2947
+ writable: !0,
2948
+ value: /intrinsic gas too low/
2949
+ });
2950
+ var Ui = class extends w {
2951
+ constructor({ cause: e }) {
2952
+ super("The transaction type is not supported for this chain.", {
2953
+ cause: e,
2954
+ name: "TransactionTypeNotSupportedError"
2955
+ });
2956
+ }
2957
+ };
2958
+ Object.defineProperty(Ui, "nodeMessage", {
2959
+ enumerable: !0,
2960
+ configurable: !0,
2961
+ writable: !0,
2962
+ value: /transaction type not valid/
2963
+ });
2964
+ var q = class extends w {
2965
+ constructor({ cause: e, maxPriorityFeePerGas: t, maxFeePerGas: n } = {}) {
2966
+ super([`The provided tip (\`maxPriorityFeePerGas\`${t ? ` = ${H(t)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n ? ` = ${H(n)} gwei` : ""}).`].join("\n"), {
2967
+ cause: e,
2968
+ name: "TipAboveFeeCapError"
2969
+ });
2970
+ }
2971
+ };
2972
+ Object.defineProperty(q, "nodeMessage", {
2973
+ enumerable: !0,
2974
+ configurable: !0,
2975
+ writable: !0,
2976
+ value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
2977
+ });
2978
+ var Wi = class extends w {
2979
+ constructor({ cause: e }) {
2980
+ super(`An error occurred while executing: ${e?.shortMessage}`, {
2981
+ cause: e,
2982
+ name: "UnknownNodeError"
2983
+ });
2984
+ }
2985
+ };
2986
+ //#endregion
2987
+ //#region ../../node_modules/viem/_esm/utils/errors/getNodeError.js
2988
+ function Gi(e, t) {
2989
+ let n = (e.details || "").toLowerCase(), r = e instanceof w ? e.walk((e) => e?.code === G.code) : e;
2990
+ return r instanceof w ? new G({
2991
+ cause: e,
2992
+ message: r.details
2993
+ }) : G.nodeMessage.test(n) ? new G({
2994
+ cause: e,
2995
+ message: e.details
2996
+ }) : K.nodeMessage.test(n) ? new K({
2997
+ cause: e,
2998
+ maxFeePerGas: t?.maxFeePerGas
2999
+ }) : Ii.nodeMessage.test(n) ? new Ii({
3000
+ cause: e,
3001
+ maxFeePerGas: t?.maxFeePerGas
3002
+ }) : Li.nodeMessage.test(n) ? new Li({
3003
+ cause: e,
3004
+ nonce: t?.nonce
3005
+ }) : Ri.nodeMessage.test(n) ? new Ri({
3006
+ cause: e,
3007
+ nonce: t?.nonce
3008
+ }) : zi.nodeMessage.test(n) ? new zi({
3009
+ cause: e,
3010
+ nonce: t?.nonce
3011
+ }) : Bi.nodeMessage.test(n) ? new Bi({ cause: e }) : Vi.nodeMessage.test(n) ? new Vi({
3012
+ cause: e,
3013
+ gas: t?.gas
3014
+ }) : Hi.nodeMessage.test(n) ? new Hi({
3015
+ cause: e,
3016
+ gas: t?.gas
3017
+ }) : Ui.nodeMessage.test(n) ? new Ui({ cause: e }) : q.nodeMessage.test(n) ? new q({
3018
+ cause: e,
3019
+ maxFeePerGas: t?.maxFeePerGas,
3020
+ maxPriorityFeePerGas: t?.maxPriorityFeePerGas
3021
+ }) : new Wi({ cause: e });
3022
+ }
3023
+ //#endregion
3024
+ //#region ../../node_modules/viem/_esm/utils/formatters/extract.js
3025
+ function Ki(e, { format: t }) {
3026
+ if (!t) return {};
3027
+ let n = {};
3028
+ function r(t) {
3029
+ let i = Object.keys(t);
3030
+ for (let a of i) a in e && (n[a] = e[a]), t[a] && typeof t[a] == "object" && !Array.isArray(t[a]) && r(t[a]);
3031
+ }
3032
+ return r(t(e || {})), n;
3033
+ }
3034
+ //#endregion
3035
+ //#region ../../node_modules/viem/_esm/utils/formatters/formatter.js
3036
+ function qi(e, t) {
3037
+ return ({ exclude: n, format: r }) => ({
3038
+ exclude: n,
3039
+ format: (e, i) => {
3040
+ let a = t(e, i);
3041
+ if (n) for (let e of n) delete a[e];
3042
+ return {
3043
+ ...a,
3044
+ ...r(e, i)
3045
+ };
3046
+ },
3047
+ type: e
3048
+ });
3049
+ }
3050
+ //#endregion
3051
+ //#region ../../node_modules/viem/_esm/utils/formatters/transactionRequest.js
3052
+ var Ji = {
3053
+ legacy: "0x0",
3054
+ eip2930: "0x1",
3055
+ eip1559: "0x2",
3056
+ eip4844: "0x3",
3057
+ eip7702: "0x4"
3058
+ };
3059
+ function Yi(e, t) {
3060
+ let n = {};
3061
+ return e.authorizationList !== void 0 && (n.authorizationList = Zi(e.authorizationList)), e.accessList !== void 0 && (n.accessList = e.accessList), e.blobVersionedHashes !== void 0 && (n.blobVersionedHashes = e.blobVersionedHashes), e.blobs !== void 0 && (typeof e.blobs[0] == "string" ? n.blobs = e.blobs : n.blobs = e.blobs.map((e) => A(e))), e.data !== void 0 && (n.data = e.data), e.account && (n.from = e.account.address), e.from !== void 0 && (n.from = e.from), e.gas !== void 0 && (n.gas = j(e.gas)), e.gasPrice !== void 0 && (n.gasPrice = j(e.gasPrice)), e.maxFeePerBlobGas !== void 0 && (n.maxFeePerBlobGas = j(e.maxFeePerBlobGas)), e.maxFeePerGas !== void 0 && (n.maxFeePerGas = j(e.maxFeePerGas)), e.maxPriorityFeePerGas !== void 0 && (n.maxPriorityFeePerGas = j(e.maxPriorityFeePerGas)), e.nonce !== void 0 && (n.nonce = j(e.nonce)), e.to !== void 0 && (n.to = e.to), e.type !== void 0 && (n.type = Ji[e.type]), e.value !== void 0 && (n.value = j(e.value)), n;
3062
+ }
3063
+ var Xi = /*#__PURE__*/ qi("transactionRequest", Yi);
3064
+ function Zi(e) {
3065
+ return e.map((e) => ({
3066
+ address: e.address,
3067
+ r: e.r ? j(BigInt(e.r)) : e.r,
3068
+ s: e.s ? j(BigInt(e.s)) : e.s,
3069
+ chainId: j(e.chainId),
3070
+ nonce: j(e.nonce),
3071
+ ...e.yParity === void 0 ? {} : { yParity: j(e.yParity) },
3072
+ ...e.v !== void 0 && e.yParity === void 0 ? { v: j(e.v) } : {}
3073
+ }));
3074
+ }
3075
+ //#endregion
3076
+ //#region ../../node_modules/viem/_esm/utils/stateOverride.js
3077
+ function Qi(e) {
3078
+ if (!(!e || e.length === 0)) return e.reduce((e, { slot: t, value: n }) => {
3079
+ if (t.length !== 66) throw new zt({
3080
+ size: t.length,
3081
+ targetSize: 66,
3082
+ type: "hex"
3083
+ });
3084
+ if (n.length !== 66) throw new zt({
3085
+ size: n.length,
3086
+ targetSize: 66,
3087
+ type: "hex"
3088
+ });
3089
+ return e[t] = n, e;
3090
+ }, {});
3091
+ }
3092
+ function $i(e) {
3093
+ let { balance: t, nonce: n, state: r, stateDiff: i, code: a } = e, o = {};
3094
+ if (a !== void 0 && (o.code = a), t !== void 0 && (o.balance = j(t)), n !== void 0 && (o.nonce = j(n)), r !== void 0 && (o.state = Qi(r)), i !== void 0) {
3095
+ if (o.state) throw new zr();
3096
+ o.stateDiff = Qi(i);
3097
+ }
3098
+ return o;
3099
+ }
3100
+ function ea(e) {
3101
+ if (!e) return;
3102
+ let t = {};
3103
+ for (let { address: n, ...r } of e) {
3104
+ if (!P(n, { strict: !1 })) throw new N({ address: n });
3105
+ if (t[n]) throw new Rr({ address: n });
3106
+ t[n] = $i(r);
3107
+ }
3108
+ return t;
3109
+ }
3110
+ 2n ** (8n - 1n) - 1n, 2n ** (16n - 1n) - 1n, 2n ** (24n - 1n) - 1n, 2n ** (32n - 1n) - 1n, 2n ** (40n - 1n) - 1n, 2n ** (48n - 1n) - 1n, 2n ** (56n - 1n) - 1n, 2n ** (64n - 1n) - 1n, 2n ** (72n - 1n) - 1n, 2n ** (80n - 1n) - 1n, 2n ** (88n - 1n) - 1n, 2n ** (96n - 1n) - 1n, 2n ** (104n - 1n) - 1n, 2n ** (112n - 1n) - 1n, 2n ** (120n - 1n) - 1n, 2n ** (128n - 1n) - 1n, 2n ** (136n - 1n) - 1n, 2n ** (144n - 1n) - 1n, 2n ** (152n - 1n) - 1n, 2n ** (160n - 1n) - 1n, 2n ** (168n - 1n) - 1n, 2n ** (176n - 1n) - 1n, 2n ** (184n - 1n) - 1n, 2n ** (192n - 1n) - 1n, 2n ** (200n - 1n) - 1n, 2n ** (208n - 1n) - 1n, 2n ** (216n - 1n) - 1n, 2n ** (224n - 1n) - 1n, 2n ** (232n - 1n) - 1n, 2n ** (240n - 1n) - 1n, 2n ** (248n - 1n) - 1n, 2n ** (256n - 1n) - 1n, -(2n ** (8n - 1n)), -(2n ** (16n - 1n)), -(2n ** (24n - 1n)), -(2n ** (32n - 1n)), -(2n ** (40n - 1n)), -(2n ** (48n - 1n)), -(2n ** (56n - 1n)), -(2n ** (64n - 1n)), -(2n ** (72n - 1n)), -(2n ** (80n - 1n)), -(2n ** (88n - 1n)), -(2n ** (96n - 1n)), -(2n ** (104n - 1n)), -(2n ** (112n - 1n)), -(2n ** (120n - 1n)), -(2n ** (128n - 1n)), -(2n ** (136n - 1n)), -(2n ** (144n - 1n)), -(2n ** (152n - 1n)), -(2n ** (160n - 1n)), -(2n ** (168n - 1n)), -(2n ** (176n - 1n)), -(2n ** (184n - 1n)), -(2n ** (192n - 1n)), -(2n ** (200n - 1n)), -(2n ** (208n - 1n)), -(2n ** (216n - 1n)), -(2n ** (224n - 1n)), -(2n ** (232n - 1n)), -(2n ** (240n - 1n)), -(2n ** (248n - 1n)), -(2n ** (256n - 1n));
3111
+ var ta = 2n ** 256n - 1n;
3112
+ //#endregion
3113
+ //#region ../../node_modules/viem/_esm/utils/transaction/assertRequest.js
3114
+ function na(e) {
3115
+ let { account: t, maxFeePerGas: n, maxPriorityFeePerGas: r, to: i } = e, a = t ? or(t) : void 0;
3116
+ if (a && !P(a.address)) throw new N({ address: a.address });
3117
+ if (i && !P(i)) throw new N({ address: i });
3118
+ if (n && n > ta) throw new K({ maxFeePerGas: n });
3119
+ if (r && n && r > n) throw new q({
3120
+ maxFeePerGas: n,
3121
+ maxPriorityFeePerGas: r
3122
+ });
3123
+ }
3124
+ //#endregion
3125
+ //#region ../../node_modules/viem/_esm/utils/address/isAddressEqual.js
3126
+ function ra(e, t) {
3127
+ if (!P(e, { strict: !1 })) throw new N({ address: e });
3128
+ if (!P(t, { strict: !1 })) throw new N({ address: t });
3129
+ return e.toLowerCase() === t.toLowerCase();
3130
+ }
3131
+ //#endregion
3132
+ //#region ../../node_modules/viem/_esm/utils/abi/decodeFunctionResult.js
3133
+ var ia = "/docs/contract/decodeFunctionResult";
3134
+ function aa(e) {
3135
+ let { abi: t, args: n, functionName: r, data: i } = e, a = t[0];
3136
+ if (r) {
3137
+ let e = R({
3138
+ abi: t,
3139
+ args: n,
3140
+ name: r
3141
+ });
3142
+ if (!e) throw new T(r, { docsPath: ia });
3143
+ a = e;
3144
+ }
3145
+ if (a.type !== "function") throw new T(void 0, { docsPath: ia });
3146
+ if (!a.outputs) throw new Et(a.name, { docsPath: ia });
3147
+ let o = xr(a.outputs, i);
3148
+ if (o && o.length > 1) return o;
3149
+ if (o && o.length === 1) return o[0];
3150
+ }
3151
+ //#endregion
3152
+ //#region ../../node_modules/viem/node_modules/ox/_esm/core/version.js
3153
+ var oa = "0.1.1";
3154
+ //#endregion
3155
+ //#region ../../node_modules/viem/node_modules/ox/_esm/core/internal/errors.js
3156
+ function sa() {
3157
+ return oa;
3158
+ }
3159
+ //#endregion
3160
+ //#region ../../node_modules/viem/node_modules/ox/_esm/core/Errors.js
3161
+ var J = class e extends Error {
3162
+ static setStaticOptions(t) {
3163
+ e.prototype.docsOrigin = t.docsOrigin, e.prototype.showVersion = t.showVersion, e.prototype.version = t.version;
3164
+ }
3165
+ constructor(t, n = {}) {
3166
+ let r = (() => {
3167
+ if (n.cause instanceof e) {
3168
+ if (n.cause.details) return n.cause.details;
3169
+ if (n.cause.shortMessage) return n.cause.shortMessage;
3170
+ }
3171
+ return n.cause && "details" in n.cause && typeof n.cause.details == "string" ? n.cause.details : n.cause?.message ? n.cause.message : n.details;
3172
+ })(), i = n.cause instanceof e && n.cause.docsPath || n.docsPath, a = n.docsOrigin ?? e.prototype.docsOrigin, o = `${a}${i ?? ""}`, s = !!(n.version ?? e.prototype.showVersion), c = n.version ?? e.prototype.version, l = [
3173
+ t || "An error occurred.",
3174
+ ...n.metaMessages ? ["", ...n.metaMessages] : [],
3175
+ ...r || i || s ? [
3176
+ "",
3177
+ r ? `Details: ${r}` : void 0,
3178
+ i ? `See: ${o}` : void 0,
3179
+ s ? `Version: ${c}` : void 0
3180
+ ] : []
3181
+ ].filter((e) => typeof e == "string").join("\n");
3182
+ super(l, n.cause ? { cause: n.cause } : void 0), Object.defineProperty(this, "details", {
3183
+ enumerable: !0,
3184
+ configurable: !0,
3185
+ writable: !0,
3186
+ value: void 0
3187
+ }), Object.defineProperty(this, "docs", {
3188
+ enumerable: !0,
3189
+ configurable: !0,
3190
+ writable: !0,
3191
+ value: void 0
3192
+ }), Object.defineProperty(this, "docsOrigin", {
3193
+ enumerable: !0,
3194
+ configurable: !0,
3195
+ writable: !0,
3196
+ value: void 0
3197
+ }), Object.defineProperty(this, "docsPath", {
3198
+ enumerable: !0,
3199
+ configurable: !0,
3200
+ writable: !0,
3201
+ value: void 0
3202
+ }), Object.defineProperty(this, "shortMessage", {
3203
+ enumerable: !0,
3204
+ configurable: !0,
3205
+ writable: !0,
3206
+ value: void 0
3207
+ }), Object.defineProperty(this, "showVersion", {
3208
+ enumerable: !0,
3209
+ configurable: !0,
3210
+ writable: !0,
3211
+ value: void 0
3212
+ }), Object.defineProperty(this, "version", {
3213
+ enumerable: !0,
3214
+ configurable: !0,
3215
+ writable: !0,
3216
+ value: void 0
3217
+ }), Object.defineProperty(this, "cause", {
3218
+ enumerable: !0,
3219
+ configurable: !0,
3220
+ writable: !0,
3221
+ value: void 0
3222
+ }), Object.defineProperty(this, "name", {
3223
+ enumerable: !0,
3224
+ configurable: !0,
3225
+ writable: !0,
3226
+ value: "BaseError"
3227
+ }), this.cause = n.cause, this.details = r, this.docs = o, this.docsOrigin = a, this.docsPath = i, this.shortMessage = t, this.showVersion = s, this.version = c;
3228
+ }
3229
+ walk(e) {
3230
+ return ca(this, e);
3231
+ }
3232
+ };
3233
+ Object.defineProperty(J, "defaultStaticOptions", {
3234
+ enumerable: !0,
3235
+ configurable: !0,
3236
+ writable: !0,
3237
+ value: {
3238
+ docsOrigin: "https://oxlib.sh",
3239
+ showVersion: !1,
3240
+ version: `ox@${sa()}`
3241
+ }
3242
+ }), J.setStaticOptions(J.defaultStaticOptions);
3243
+ function ca(e, t) {
3244
+ return t?.(e) ? e : e && typeof e == "object" && "cause" in e && e.cause ? ca(e.cause, t) : t ? null : e;
3245
+ }
3246
+ //#endregion
3247
+ //#region ../../node_modules/viem/node_modules/ox/_esm/core/internal/bytes.js
3248
+ function la(e, t) {
3249
+ if (X(e) > t) throw new za({
3250
+ givenSize: X(e),
3251
+ maxSize: t
3252
+ });
3253
+ }
3254
+ function ua(e, t) {
3255
+ if (typeof t == "number" && t > 0 && t > X(e) - 1) throw new Ba({
3256
+ offset: t,
3257
+ position: "start",
3258
+ size: X(e)
3259
+ });
3260
+ }
3261
+ function da(e, t, n) {
3262
+ if (typeof t == "number" && typeof n == "number" && X(e) !== n - t) throw new Ba({
3263
+ offset: n,
3264
+ position: "end",
3265
+ size: X(e)
3266
+ });
3267
+ }
3268
+ var Y = {
3269
+ zero: 48,
3270
+ nine: 57,
3271
+ A: 65,
3272
+ F: 70,
3273
+ a: 97,
3274
+ f: 102
3275
+ };
3276
+ function fa(e) {
3277
+ if (e >= Y.zero && e <= Y.nine) return e - Y.zero;
3278
+ if (e >= Y.A && e <= Y.F) return e - (Y.A - 10);
3279
+ if (e >= Y.a && e <= Y.f) return e - (Y.a - 10);
3280
+ }
3281
+ function pa(e, t = {}) {
3282
+ let { dir: n, size: r = 32 } = t;
3283
+ if (r === 0) return e;
3284
+ if (e.length > r) throw new Va({
3285
+ size: e.length,
3286
+ targetSize: r,
3287
+ type: "Bytes"
3288
+ });
3289
+ let i = new Uint8Array(r);
3290
+ for (let t = 0; t < r; t++) {
3291
+ let a = n === "right";
3292
+ i[a ? t : r - t - 1] = e[a ? t : e.length - t - 1];
3293
+ }
3294
+ return i;
3295
+ }
3296
+ function ma(e, t = {}) {
3297
+ let { dir: n = "left" } = t, r = e, i = 0;
3298
+ for (let e = 0; e < r.length - 1 && r[n === "left" ? e : r.length - e - 1].toString() === "0"; e++) i++;
3299
+ return r = n === "left" ? r.slice(i) : r.slice(0, r.length - i), r;
3300
+ }
3301
+ //#endregion
3302
+ //#region ../../node_modules/viem/node_modules/ox/_esm/core/internal/hex.js
3303
+ function ha(e, t) {
3304
+ if ($(e) > t) throw new io({
3305
+ givenSize: $(e),
3306
+ maxSize: t
3307
+ });
3308
+ }
3309
+ function ga(e, t) {
3310
+ if (typeof t == "number" && t > 0 && t > $(e) - 1) throw new ao({
3311
+ offset: t,
3312
+ position: "start",
3313
+ size: $(e)
3314
+ });
3315
+ }
3316
+ function _a(e, t, n) {
3317
+ if (typeof t == "number" && typeof n == "number" && $(e) !== n - t) throw new ao({
3318
+ offset: n,
3319
+ position: "end",
3320
+ size: $(e)
3321
+ });
3322
+ }
3323
+ function va(e, t = {}) {
3324
+ let { dir: n, size: r = 32 } = t;
3325
+ if (r === 0) return e;
3326
+ let i = e.replace("0x", "");
3327
+ if (i.length > r * 2) throw new oo({
3328
+ size: Math.ceil(i.length / 2),
3329
+ targetSize: r,
3330
+ type: "Hex"
3331
+ });
3332
+ return `0x${i[n === "right" ? "padEnd" : "padStart"](r * 2, "0")}`;
3333
+ }
3334
+ //#endregion
3335
+ //#region ../../node_modules/viem/node_modules/ox/_esm/core/Json.js
3336
+ var ya = "#__bigint";
3337
+ function ba(e, t, n) {
3338
+ return JSON.stringify(e, (e, n) => typeof t == "function" ? t(e, n) : typeof n == "bigint" ? n.toString() + ya : n, n);
3339
+ }
3340
+ //#endregion
3341
+ //#region ../../node_modules/viem/node_modules/ox/_esm/core/Bytes.js
3342
+ var xa = /*#__PURE__*/ new TextDecoder(), Sa = /*#__PURE__*/ new TextEncoder();
3343
+ function Ca(e) {
3344
+ if (!(e instanceof Uint8Array) && (!e || typeof e != "object" || !("BYTES_PER_ELEMENT" in e) || e.BYTES_PER_ELEMENT !== 1 || e.constructor.name !== "Uint8Array")) throw new Ra(e);
3345
+ }
3346
+ function wa(e) {
3347
+ return e instanceof Uint8Array ? e : typeof e == "string" ? Ea(e) : Ta(e);
3348
+ }
3349
+ function Ta(e) {
3350
+ return e instanceof Uint8Array ? e : new Uint8Array(e);
3351
+ }
3352
+ function Ea(e, t = {}) {
3353
+ let { size: n } = t, r = e;
3354
+ n && (ha(e, n), r = Xa(e, n));
3355
+ let i = r.slice(2);
3356
+ i.length % 2 && (i = `0${i}`);
3357
+ let a = i.length / 2, o = new Uint8Array(a);
3358
+ for (let e = 0, t = 0; e < a; e++) {
3359
+ let n = fa(i.charCodeAt(t++)), r = fa(i.charCodeAt(t++));
3360
+ if (n === void 0 || r === void 0) throw new J(`Invalid byte sequence ("${i[t - 2]}${i[t - 1]}" in "${i}").`);
3361
+ o[e] = n << 4 | r;
3362
+ }
3363
+ return o;
3364
+ }
3365
+ function Da(e, t = {}) {
3366
+ let { size: n } = t, r = Sa.encode(e);
3367
+ return typeof n == "number" ? (la(r, n), Oa(r, n)) : r;
3368
+ }
3369
+ function Oa(e, t) {
3370
+ return pa(e, {
3371
+ dir: "right",
3372
+ size: t
3373
+ });
3374
+ }
3375
+ function X(e) {
3376
+ return e.length;
3377
+ }
3378
+ function ka(e, t, n, r = {}) {
3379
+ let { strict: i } = r;
3380
+ ua(e, t);
3381
+ let a = e.slice(t, n);
3382
+ return i && da(a, t, n), a;
3383
+ }
3384
+ function Aa(e, t = {}) {
3385
+ let { size: n } = t;
3386
+ return n !== void 0 && la(e, n), Qa(Z(e, t), t);
3387
+ }
3388
+ function ja(e, t = {}) {
3389
+ let { size: n } = t, r = e;
3390
+ if (n !== void 0 && (la(r, n), r = Pa(r)), r.length > 1 || r[0] > 1) throw new La(r);
3391
+ return !!r[0];
3392
+ }
3393
+ function Ma(e, t = {}) {
3394
+ let { size: n } = t;
3395
+ return n !== void 0 && la(e, n), $a(Z(e, t), t);
3396
+ }
3397
+ function Na(e, t = {}) {
3398
+ let { size: n } = t, r = e;
3399
+ return n !== void 0 && (la(r, n), r = Fa(r)), xa.decode(r);
3400
+ }
3401
+ function Pa(e) {
3402
+ return ma(e, { dir: "left" });
3403
+ }
3404
+ function Fa(e) {
3405
+ return ma(e, { dir: "right" });
3406
+ }
3407
+ function Ia(e) {
3408
+ try {
3409
+ return Ca(e), !0;
3410
+ } catch {
3411
+ return !1;
3412
+ }
3413
+ }
3414
+ var La = class extends J {
3415
+ constructor(e) {
3416
+ super(`Bytes value \`${e}\` is not a valid boolean.`, { metaMessages: ["The bytes array must contain a single byte of either a `0` or `1` value."] }), Object.defineProperty(this, "name", {
3417
+ enumerable: !0,
3418
+ configurable: !0,
3419
+ writable: !0,
3420
+ value: "Bytes.InvalidBytesBooleanError"
3421
+ });
3422
+ }
3423
+ }, Ra = class extends J {
3424
+ constructor(e) {
3425
+ super(`Value \`${typeof e == "object" ? ba(e) : e}\` of type \`${typeof e}\` is an invalid Bytes value.`, { metaMessages: ["Bytes values must be of type `Bytes`."] }), Object.defineProperty(this, "name", {
3426
+ enumerable: !0,
3427
+ configurable: !0,
3428
+ writable: !0,
3429
+ value: "Bytes.InvalidBytesTypeError"
3430
+ });
3431
+ }
3432
+ }, za = class extends J {
3433
+ constructor({ givenSize: e, maxSize: t }) {
3434
+ super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`), Object.defineProperty(this, "name", {
3435
+ enumerable: !0,
3436
+ configurable: !0,
3437
+ writable: !0,
3438
+ value: "Bytes.SizeOverflowError"
3439
+ });
3440
+ }
3441
+ }, Ba = class extends J {
3442
+ constructor({ offset: e, position: t, size: n }) {
3443
+ super(`Slice ${t === "start" ? "starting" : "ending"} at offset \`${e}\` is out-of-bounds (size: \`${n}\`).`), Object.defineProperty(this, "name", {
3444
+ enumerable: !0,
3445
+ configurable: !0,
3446
+ writable: !0,
3447
+ value: "Bytes.SliceOffsetOutOfBoundsError"
3448
+ });
3449
+ }
3450
+ }, Va = class extends J {
3451
+ constructor({ size: e, targetSize: t, type: n }) {
3452
+ super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`), Object.defineProperty(this, "name", {
3453
+ enumerable: !0,
3454
+ configurable: !0,
3455
+ writable: !0,
3456
+ value: "Bytes.SizeExceedsPaddingSizeError"
3457
+ });
3458
+ }
3459
+ }, Ha = /*#__PURE__*/ new TextEncoder(), Ua = /*#__PURE__*/ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
3460
+ function Wa(e, t = {}) {
3461
+ let { strict: n = !1 } = t;
3462
+ if (!e || typeof e != "string") throw new no(e);
3463
+ if (n && !/^0x[0-9a-fA-F]*$/.test(e) || !e.startsWith("0x")) throw new ro(e);
3464
+ }
3465
+ function Ga(...e) {
3466
+ return `0x${e.reduce((e, t) => e + t.replace("0x", ""), "")}`;
3467
+ }
3468
+ function Ka(e) {
3469
+ return e instanceof Uint8Array ? Z(e) : Array.isArray(e) ? Z(new Uint8Array(e)) : e;
3470
+ }
3471
+ function qa(e, t = {}) {
3472
+ let n = `0x${Number(e)}`;
3473
+ return typeof t.size == "number" ? (ha(n, t.size), Ya(n, t.size)) : n;
3474
+ }
3475
+ function Z(e, t = {}) {
3476
+ let n = "";
3477
+ for (let t = 0; t < e.length; t++) n += Ua[e[t]];
3478
+ let r = `0x${n}`;
3479
+ return typeof t.size == "number" ? (ha(r, t.size), Xa(r, t.size)) : r;
3480
+ }
3481
+ function Q(e, t = {}) {
3482
+ let { signed: n, size: r } = t, i = BigInt(e), a;
3483
+ r ? a = n ? (1n << BigInt(r) * 8n - 1n) - 1n : 2n ** (BigInt(r) * 8n) - 1n : typeof e == "number" && (a = BigInt(2 ** 53 - 1));
3484
+ let o = typeof a == "bigint" && n ? -a - 1n : 0;
3485
+ if (a && i > a || i < o) {
3486
+ let t = typeof e == "bigint" ? "n" : "";
3487
+ throw new to({
3488
+ max: a ? `${a}${t}` : void 0,
3489
+ min: `${o}${t}`,
3490
+ signed: n,
3491
+ size: r,
3492
+ value: `${e}${t}`
3493
+ });
3494
+ }
3495
+ let s = `0x${(n && i < 0 ? BigInt.asUintN(r * 8, BigInt(i)) : i).toString(16)}`;
3496
+ return r ? Ya(s, r) : s;
3497
+ }
3498
+ function Ja(e, t = {}) {
3499
+ return Z(Ha.encode(e), t);
3500
+ }
3501
+ function Ya(e, t) {
3502
+ return va(e, {
3503
+ dir: "left",
3504
+ size: t
3505
+ });
3506
+ }
3507
+ function Xa(e, t) {
3508
+ return va(e, {
3509
+ dir: "right",
3510
+ size: t
3511
+ });
3512
+ }
3513
+ function Za(e, t, n, r = {}) {
3514
+ let { strict: i } = r;
3515
+ ga(e, t);
3516
+ let a = `0x${e.replace("0x", "").slice((t ?? 0) * 2, (n ?? e.length) * 2)}`;
3517
+ return i && _a(a, t, n), a;
3518
+ }
3519
+ function $(e) {
3520
+ return Math.ceil((e.length - 2) / 2);
3521
+ }
3522
+ function Qa(e, t = {}) {
3523
+ let { signed: n } = t;
3524
+ t.size && ha(e, t.size);
3525
+ let r = BigInt(e);
3526
+ if (!n) return r;
3527
+ let i = (e.length - 2) / 2, a = (1n << BigInt(i) * 8n) - 1n;
3528
+ return r <= a >> 1n ? r : r - a - 1n;
3529
+ }
3530
+ function $a(e, t = {}) {
3531
+ let { signed: n, size: r } = t;
3532
+ return Number(!n && !r ? e : Qa(e, t));
3533
+ }
3534
+ function eo(e, t = {}) {
3535
+ let { strict: n = !1 } = t;
3536
+ try {
3537
+ return Wa(e, { strict: n }), !0;
3538
+ } catch {
3539
+ return !1;
3540
+ }
3541
+ }
3542
+ var to = class extends J {
3543
+ constructor({ max: e, min: t, signed: n, size: r, value: i }) {
3544
+ super(`Number \`${i}\` is not in safe${r ? ` ${r * 8}-bit` : ""}${n ? " signed" : " unsigned"} integer range ${e ? `(\`${t}\` to \`${e}\`)` : `(above \`${t}\`)`}`), Object.defineProperty(this, "name", {
3545
+ enumerable: !0,
3546
+ configurable: !0,
3547
+ writable: !0,
3548
+ value: "Hex.IntegerOutOfRangeError"
3549
+ });
3550
+ }
3551
+ }, no = class extends J {
3552
+ constructor(e) {
3553
+ super(`Value \`${typeof e == "object" ? ba(e) : e}\` of type \`${typeof e}\` is an invalid hex type.`, { metaMessages: ["Hex types must be represented as `\"0x${string}\"`."] }), Object.defineProperty(this, "name", {
3554
+ enumerable: !0,
3555
+ configurable: !0,
3556
+ writable: !0,
3557
+ value: "Hex.InvalidHexTypeError"
3558
+ });
3559
+ }
3560
+ }, ro = class extends J {
3561
+ constructor(e) {
3562
+ super(`Value \`${e}\` is an invalid hex value.`, { metaMessages: ["Hex values must start with `\"0x\"` and contain only hexadecimal characters (0-9, a-f, A-F)."] }), Object.defineProperty(this, "name", {
3563
+ enumerable: !0,
3564
+ configurable: !0,
3565
+ writable: !0,
3566
+ value: "Hex.InvalidHexValueError"
3567
+ });
3568
+ }
3569
+ }, io = class extends J {
3570
+ constructor({ givenSize: e, maxSize: t }) {
3571
+ super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`), Object.defineProperty(this, "name", {
3572
+ enumerable: !0,
3573
+ configurable: !0,
3574
+ writable: !0,
3575
+ value: "Hex.SizeOverflowError"
3576
+ });
3577
+ }
3578
+ }, ao = class extends J {
3579
+ constructor({ offset: e, position: t, size: n }) {
3580
+ super(`Slice ${t === "start" ? "starting" : "ending"} at offset \`${e}\` is out-of-bounds (size: \`${n}\`).`), Object.defineProperty(this, "name", {
3581
+ enumerable: !0,
3582
+ configurable: !0,
3583
+ writable: !0,
3584
+ value: "Hex.SliceOffsetOutOfBoundsError"
3585
+ });
3586
+ }
3587
+ }, oo = class extends J {
3588
+ constructor({ size: e, targetSize: t, type: n }) {
3589
+ super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`), Object.defineProperty(this, "name", {
3590
+ enumerable: !0,
3591
+ configurable: !0,
3592
+ writable: !0,
3593
+ value: "Hex.SizeExceedsPaddingSizeError"
3594
+ });
3595
+ }
3596
+ };
3597
+ //#endregion
3598
+ //#region ../../node_modules/viem/node_modules/ox/_esm/core/Withdrawal.js
3599
+ function so(e) {
3600
+ return {
3601
+ address: e.address,
3602
+ amount: Q(e.amount),
3603
+ index: Q(e.index),
3604
+ validatorIndex: Q(e.validatorIndex)
3605
+ };
3606
+ }
3607
+ //#endregion
3608
+ //#region ../../node_modules/viem/node_modules/ox/_esm/core/BlockOverrides.js
3609
+ function co(e) {
3610
+ return {
3611
+ ...typeof e.baseFeePerGas == "bigint" && { baseFeePerGas: Q(e.baseFeePerGas) },
3612
+ ...typeof e.blobBaseFee == "bigint" && { blobBaseFee: Q(e.blobBaseFee) },
3613
+ ...typeof e.feeRecipient == "string" && { feeRecipient: e.feeRecipient },
3614
+ ...typeof e.gasLimit == "bigint" && { gasLimit: Q(e.gasLimit) },
3615
+ ...typeof e.number == "bigint" && { number: Q(e.number) },
3616
+ ...typeof e.prevRandao == "bigint" && { prevRandao: Q(e.prevRandao) },
3617
+ ...typeof e.time == "bigint" && { time: Q(e.time) },
3618
+ ...e.withdrawals && { withdrawals: e.withdrawals.map(so) }
3619
+ };
3620
+ }
3621
+ //#endregion
3622
+ //#region ../../node_modules/viem/_esm/constants/abis.js
3623
+ var lo = [
3624
+ {
3625
+ inputs: [{
3626
+ components: [
3627
+ {
3628
+ name: "target",
3629
+ type: "address"
3630
+ },
3631
+ {
3632
+ name: "allowFailure",
3633
+ type: "bool"
3634
+ },
3635
+ {
3636
+ name: "callData",
3637
+ type: "bytes"
3638
+ }
3639
+ ],
3640
+ name: "calls",
3641
+ type: "tuple[]"
3642
+ }],
3643
+ name: "aggregate3",
3644
+ outputs: [{
3645
+ components: [{
3646
+ name: "success",
3647
+ type: "bool"
3648
+ }, {
3649
+ name: "returnData",
3650
+ type: "bytes"
3651
+ }],
3652
+ name: "returnData",
3653
+ type: "tuple[]"
3654
+ }],
3655
+ stateMutability: "view",
3656
+ type: "function"
3657
+ },
3658
+ {
3659
+ inputs: [{
3660
+ name: "addr",
3661
+ type: "address"
3662
+ }],
3663
+ name: "getEthBalance",
3664
+ outputs: [{
3665
+ name: "balance",
3666
+ type: "uint256"
3667
+ }],
3668
+ stateMutability: "view",
3669
+ type: "function"
3670
+ },
3671
+ {
3672
+ inputs: [],
3673
+ name: "getCurrentBlockTimestamp",
3674
+ outputs: [{
3675
+ internalType: "uint256",
3676
+ name: "timestamp",
3677
+ type: "uint256"
3678
+ }],
3679
+ stateMutability: "view",
3680
+ type: "function"
3681
+ }
3682
+ ], uo = [{
3683
+ name: "query",
3684
+ type: "function",
3685
+ stateMutability: "view",
3686
+ inputs: [{
3687
+ type: "tuple[]",
3688
+ name: "queries",
3689
+ components: [
3690
+ {
3691
+ type: "address",
3692
+ name: "sender"
3693
+ },
3694
+ {
3695
+ type: "string[]",
3696
+ name: "urls"
3697
+ },
3698
+ {
3699
+ type: "bytes",
3700
+ name: "data"
3701
+ }
3702
+ ]
3703
+ }],
3704
+ outputs: [{
3705
+ type: "bool[]",
3706
+ name: "failures"
3707
+ }, {
3708
+ type: "bytes[]",
3709
+ name: "responses"
3710
+ }]
3711
+ }, {
3712
+ name: "HttpError",
3713
+ type: "error",
3714
+ inputs: [{
3715
+ type: "uint16",
3716
+ name: "status"
3717
+ }, {
3718
+ type: "string",
3719
+ name: "message"
3720
+ }]
3721
+ }], fo = [
3722
+ {
3723
+ inputs: [{
3724
+ name: "dns",
3725
+ type: "bytes"
3726
+ }],
3727
+ name: "DNSDecodingFailed",
3728
+ type: "error"
3729
+ },
3730
+ {
3731
+ inputs: [{
3732
+ name: "ens",
3733
+ type: "string"
3734
+ }],
3735
+ name: "DNSEncodingFailed",
3736
+ type: "error"
3737
+ },
3738
+ {
3739
+ inputs: [],
3740
+ name: "EmptyAddress",
3741
+ type: "error"
3742
+ },
3743
+ {
3744
+ inputs: [{
3745
+ name: "status",
3746
+ type: "uint16"
3747
+ }, {
3748
+ name: "message",
3749
+ type: "string"
3750
+ }],
3751
+ name: "HttpError",
3752
+ type: "error"
3753
+ },
3754
+ {
3755
+ inputs: [],
3756
+ name: "InvalidBatchGatewayResponse",
3757
+ type: "error"
3758
+ },
3759
+ {
3760
+ inputs: [{
3761
+ name: "errorData",
3762
+ type: "bytes"
3763
+ }],
3764
+ name: "ResolverError",
3765
+ type: "error"
3766
+ },
3767
+ {
3768
+ inputs: [{
3769
+ name: "name",
3770
+ type: "bytes"
3771
+ }, {
3772
+ name: "resolver",
3773
+ type: "address"
3774
+ }],
3775
+ name: "ResolverNotContract",
3776
+ type: "error"
3777
+ },
3778
+ {
3779
+ inputs: [{
3780
+ name: "name",
3781
+ type: "bytes"
3782
+ }],
3783
+ name: "ResolverNotFound",
3784
+ type: "error"
3785
+ },
3786
+ {
3787
+ inputs: [{
3788
+ name: "primary",
3789
+ type: "string"
3790
+ }, {
3791
+ name: "primaryAddress",
3792
+ type: "bytes"
3793
+ }],
3794
+ name: "ReverseAddressMismatch",
3795
+ type: "error"
3796
+ },
3797
+ {
3798
+ inputs: [{
3799
+ internalType: "bytes4",
3800
+ name: "selector",
3801
+ type: "bytes4"
3802
+ }],
3803
+ name: "UnsupportedResolverProfile",
3804
+ type: "error"
3805
+ }
3806
+ ], po = [...fo, {
3807
+ name: "resolveWithGateways",
3808
+ type: "function",
3809
+ stateMutability: "view",
3810
+ inputs: [
3811
+ {
3812
+ name: "name",
3813
+ type: "bytes"
3814
+ },
3815
+ {
3816
+ name: "data",
3817
+ type: "bytes"
3818
+ },
3819
+ {
3820
+ name: "gateways",
3821
+ type: "string[]"
3822
+ }
3823
+ ],
3824
+ outputs: [{
3825
+ name: "",
3826
+ type: "bytes"
3827
+ }, {
3828
+ name: "address",
3829
+ type: "address"
3830
+ }]
3831
+ }], mo = [...fo, {
3832
+ name: "reverseWithGateways",
3833
+ type: "function",
3834
+ stateMutability: "view",
3835
+ inputs: [
3836
+ {
3837
+ type: "bytes",
3838
+ name: "reverseName"
3839
+ },
3840
+ {
3841
+ type: "uint256",
3842
+ name: "coinType"
3843
+ },
3844
+ {
3845
+ type: "string[]",
3846
+ name: "gateways"
3847
+ }
3848
+ ],
3849
+ outputs: [
3850
+ {
3851
+ type: "string",
3852
+ name: "resolvedName"
3853
+ },
3854
+ {
3855
+ type: "address",
3856
+ name: "resolver"
3857
+ },
3858
+ {
3859
+ type: "address",
3860
+ name: "reverseResolver"
3861
+ }
3862
+ ]
3863
+ }], ho = [{
3864
+ name: "text",
3865
+ type: "function",
3866
+ stateMutability: "view",
3867
+ inputs: [{
3868
+ name: "name",
3869
+ type: "bytes32"
3870
+ }, {
3871
+ name: "key",
3872
+ type: "string"
3873
+ }],
3874
+ outputs: [{
3875
+ name: "",
3876
+ type: "string"
3877
+ }]
3878
+ }], go = [{
3879
+ name: "addr",
3880
+ type: "function",
3881
+ stateMutability: "view",
3882
+ inputs: [{
3883
+ name: "name",
3884
+ type: "bytes32"
3885
+ }],
3886
+ outputs: [{
3887
+ name: "",
3888
+ type: "address"
3889
+ }]
3890
+ }, {
3891
+ name: "addr",
3892
+ type: "function",
3893
+ stateMutability: "view",
3894
+ inputs: [{
3895
+ name: "name",
3896
+ type: "bytes32"
3897
+ }, {
3898
+ name: "coinType",
3899
+ type: "uint256"
3900
+ }],
3901
+ outputs: [{
3902
+ name: "",
3903
+ type: "bytes"
3904
+ }]
3905
+ }], _o = [{
3906
+ name: "isValidSignature",
3907
+ type: "function",
3908
+ stateMutability: "view",
3909
+ inputs: [{
3910
+ name: "hash",
3911
+ type: "bytes32"
3912
+ }, {
3913
+ name: "signature",
3914
+ type: "bytes"
3915
+ }],
3916
+ outputs: [{
3917
+ name: "",
3918
+ type: "bytes4"
3919
+ }]
3920
+ }], vo = [{
3921
+ inputs: [
3922
+ {
3923
+ name: "_signer",
3924
+ type: "address"
3925
+ },
3926
+ {
3927
+ name: "_hash",
3928
+ type: "bytes32"
3929
+ },
3930
+ {
3931
+ name: "_signature",
3932
+ type: "bytes"
3933
+ }
3934
+ ],
3935
+ stateMutability: "nonpayable",
3936
+ type: "constructor"
3937
+ }, {
3938
+ inputs: [
3939
+ {
3940
+ name: "_signer",
3941
+ type: "address"
3942
+ },
3943
+ {
3944
+ name: "_hash",
3945
+ type: "bytes32"
3946
+ },
3947
+ {
3948
+ name: "_signature",
3949
+ type: "bytes"
3950
+ }
3951
+ ],
3952
+ outputs: [{ type: "bool" }],
3953
+ stateMutability: "nonpayable",
3954
+ type: "function",
3955
+ name: "isValidSig"
3956
+ }], yo = [
3957
+ {
3958
+ type: "event",
3959
+ name: "Approval",
3960
+ inputs: [
3961
+ {
3962
+ indexed: !0,
3963
+ name: "owner",
3964
+ type: "address"
3965
+ },
3966
+ {
3967
+ indexed: !0,
3968
+ name: "spender",
3969
+ type: "address"
3970
+ },
3971
+ {
3972
+ indexed: !1,
3973
+ name: "value",
3974
+ type: "uint256"
3975
+ }
3976
+ ]
3977
+ },
3978
+ {
3979
+ type: "event",
3980
+ name: "Transfer",
3981
+ inputs: [
3982
+ {
3983
+ indexed: !0,
3984
+ name: "from",
3985
+ type: "address"
3986
+ },
3987
+ {
3988
+ indexed: !0,
3989
+ name: "to",
3990
+ type: "address"
3991
+ },
3992
+ {
3993
+ indexed: !1,
3994
+ name: "value",
3995
+ type: "uint256"
3996
+ }
3997
+ ]
3998
+ },
3999
+ {
4000
+ type: "function",
4001
+ name: "allowance",
4002
+ stateMutability: "view",
4003
+ inputs: [{
4004
+ name: "owner",
4005
+ type: "address"
4006
+ }, {
4007
+ name: "spender",
4008
+ type: "address"
4009
+ }],
4010
+ outputs: [{ type: "uint256" }]
4011
+ },
4012
+ {
4013
+ type: "function",
4014
+ name: "approve",
4015
+ stateMutability: "nonpayable",
4016
+ inputs: [{
4017
+ name: "spender",
4018
+ type: "address"
4019
+ }, {
4020
+ name: "amount",
4021
+ type: "uint256"
4022
+ }],
4023
+ outputs: [{ type: "bool" }]
4024
+ },
4025
+ {
4026
+ type: "function",
4027
+ name: "balanceOf",
4028
+ stateMutability: "view",
4029
+ inputs: [{
4030
+ name: "account",
4031
+ type: "address"
4032
+ }],
4033
+ outputs: [{ type: "uint256" }]
4034
+ },
4035
+ {
4036
+ type: "function",
4037
+ name: "decimals",
4038
+ stateMutability: "view",
4039
+ inputs: [],
4040
+ outputs: [{ type: "uint8" }]
4041
+ },
4042
+ {
4043
+ type: "function",
4044
+ name: "name",
4045
+ stateMutability: "view",
4046
+ inputs: [],
4047
+ outputs: [{ type: "string" }]
4048
+ },
4049
+ {
4050
+ type: "function",
4051
+ name: "symbol",
4052
+ stateMutability: "view",
4053
+ inputs: [],
4054
+ outputs: [{ type: "string" }]
4055
+ },
4056
+ {
4057
+ type: "function",
4058
+ name: "totalSupply",
4059
+ stateMutability: "view",
4060
+ inputs: [],
4061
+ outputs: [{ type: "uint256" }]
4062
+ },
4063
+ {
4064
+ type: "function",
4065
+ name: "transfer",
4066
+ stateMutability: "nonpayable",
4067
+ inputs: [{
4068
+ name: "recipient",
4069
+ type: "address"
4070
+ }, {
4071
+ name: "amount",
4072
+ type: "uint256"
4073
+ }],
4074
+ outputs: [{ type: "bool" }]
4075
+ },
4076
+ {
4077
+ type: "function",
4078
+ name: "transferFrom",
4079
+ stateMutability: "nonpayable",
4080
+ inputs: [
4081
+ {
4082
+ name: "sender",
4083
+ type: "address"
4084
+ },
4085
+ {
4086
+ name: "recipient",
4087
+ type: "address"
4088
+ },
4089
+ {
4090
+ name: "amount",
4091
+ type: "uint256"
4092
+ }
4093
+ ],
4094
+ outputs: [{ type: "bool" }]
4095
+ }
4096
+ ], bo = "0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe", xo = "0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe", So = "0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572", Co = "0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033", wo = class extends w {
4097
+ constructor({ blockNumber: e, chain: t, contract: n }) {
4098
+ super(`Chain "${t.name}" does not support contract "${n.name}".`, {
4099
+ metaMessages: ["This could be due to any of the following:", ...e && n.blockCreated && n.blockCreated > e ? [`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`] : [`- The chain does not have the contract "${n.name}" configured.`]],
4100
+ name: "ChainDoesNotSupportContract"
4101
+ });
4102
+ }
4103
+ }, To = class extends w {
4104
+ constructor() {
4105
+ super("No chain was provided to the Client.", { name: "ClientChainNotConfiguredError" });
4106
+ }
4107
+ }, Eo = class extends w {
4108
+ constructor({ chainId: e }) {
4109
+ super(typeof e == "number" ? `Chain ID "${e}" is invalid.` : "Chain ID is invalid.", { name: "InvalidChainIdError" });
4110
+ }
4111
+ }, Do = "/docs/contract/encodeDeployData";
4112
+ function Oo(e) {
4113
+ let { abi: t, args: n, bytecode: r } = e;
4114
+ if (!n || n.length === 0) return r;
4115
+ let i = t.find((e) => "type" in e && e.type === "constructor");
4116
+ if (!i) throw new pt({ docsPath: Do });
4117
+ if (!("inputs" in i) || !i.inputs || i.inputs.length === 0) throw new mt({ docsPath: Do });
4118
+ return Rn([r, Kn(i.inputs, n)]);
4119
+ }
4120
+ //#endregion
4121
+ //#region ../../node_modules/viem/_esm/utils/chain/getChainContractAddress.js
4122
+ function ko({ blockNumber: e, chain: t, contract: n }) {
4123
+ let r = t?.contracts?.[n];
4124
+ if (!r) throw new wo({
4125
+ chain: t,
4126
+ contract: { name: n }
4127
+ });
4128
+ if (e && r.blockCreated && r.blockCreated > e) throw new wo({
4129
+ blockNumber: e,
4130
+ chain: t,
4131
+ contract: {
4132
+ name: n,
4133
+ blockCreated: r.blockCreated
4134
+ }
4135
+ });
4136
+ return r.address;
4137
+ }
4138
+ //#endregion
4139
+ //#region ../../node_modules/viem/_esm/utils/errors/getCallError.js
4140
+ function Ao(e, { docsPath: t, ...n }) {
4141
+ return new $r((() => {
4142
+ let t = Gi(e, n);
4143
+ return t instanceof Wi ? e : t;
4144
+ })(), {
4145
+ docsPath: t,
4146
+ ...n
4147
+ });
4148
+ }
4149
+ //#endregion
4150
+ //#region ../../node_modules/viem/_esm/utils/promise/withResolvers.js
4151
+ function jo() {
4152
+ let e = () => void 0, t = () => void 0;
4153
+ return {
4154
+ promise: new Promise((n, r) => {
4155
+ e = n, t = r;
4156
+ }),
4157
+ resolve: e,
4158
+ reject: t
4159
+ };
4160
+ }
4161
+ //#endregion
4162
+ //#region ../../node_modules/viem/_esm/utils/promise/createBatchScheduler.js
4163
+ var Mo = /*#__PURE__*/ new Map();
4164
+ function No({ fn: e, id: t, shouldSplitBatch: n, wait: r = 0, sort: i }) {
4165
+ let a = async () => {
4166
+ let t = c();
4167
+ o();
4168
+ let n = t.map(({ args: e }) => e);
4169
+ n.length !== 0 && e(n).then((e) => {
4170
+ i && Array.isArray(e) && e.sort(i);
4171
+ for (let n = 0; n < t.length; n++) {
4172
+ let { resolve: r } = t[n];
4173
+ r?.([e[n], e]);
4174
+ }
4175
+ }).catch((e) => {
4176
+ for (let n = 0; n < t.length; n++) {
4177
+ let { reject: r } = t[n];
4178
+ r?.(e);
4179
+ }
4180
+ });
4181
+ }, o = () => Mo.delete(t), s = () => c().map(({ args: e }) => e), c = () => Mo.get(t) || [], l = (e) => Mo.set(t, [...c(), e]);
4182
+ return {
4183
+ flush: o,
4184
+ async schedule(e) {
4185
+ let { promise: t, resolve: i, reject: o } = jo();
4186
+ return n?.([...s(), e]) && a(), c().length > 0 ? (l({
4187
+ args: e,
4188
+ resolve: i,
4189
+ reject: o
4190
+ }), t) : (l({
4191
+ args: e,
4192
+ resolve: i,
4193
+ reject: o
4194
+ }), setTimeout(a, r), t);
4195
+ }
4196
+ };
4197
+ }
4198
+ //#endregion
4199
+ //#region ../../node_modules/viem/_esm/actions/public/call.js
4200
+ async function Po(e, t) {
4201
+ let { account: n = e.account, authorizationList: r, batch: i = !!e.batch?.multicall, blockNumber: a, blockTag: o = e.experimental_blockTag ?? "latest", accessList: s, blobs: c, blockOverrides: l, code: u, data: d, factory: f, factoryData: p, gas: ee, gasPrice: te, maxFeePerBlobGas: m, maxFeePerGas: h, maxPriorityFeePerGas: ne, nonce: re, to: g, value: ie, stateOverride: ae, ..._ } = t, oe = n ? or(n) : void 0;
4202
+ if (u && (f || p)) throw new w("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
4203
+ if (u && g) throw new w("Cannot provide both `code` & `to` as parameters.");
4204
+ let se = u && d, ce = f && p && g && d, le = se || ce, ue = se ? Lo({
4205
+ code: u,
4206
+ data: d
4207
+ }) : ce ? Ro({
4208
+ data: d,
4209
+ factory: f,
4210
+ factoryData: p,
4211
+ to: g
4212
+ }) : d;
4213
+ try {
4214
+ na(t);
4215
+ let n = (typeof a == "bigint" ? j(a) : void 0) || o, u = l ? co(l) : void 0, d = ea(ae), f = e.chain?.formatters?.transactionRequest?.format, p = (f || Yi)({
4216
+ ...Ki(_, { format: f }),
4217
+ accessList: s,
4218
+ account: oe,
4219
+ authorizationList: r,
4220
+ blobs: c,
4221
+ data: ue,
4222
+ gas: ee,
4223
+ gasPrice: te,
4224
+ maxFeePerBlobGas: m,
4225
+ maxFeePerGas: h,
4226
+ maxPriorityFeePerGas: ne,
4227
+ nonce: re,
4228
+ to: le ? void 0 : g,
4229
+ value: ie
4230
+ }, "call");
4231
+ if (i && Fo({ request: p }) && !d && !u) try {
4232
+ return await Io(e, {
4233
+ ...p,
4234
+ blockNumber: a,
4235
+ blockTag: o
4236
+ });
4237
+ } catch (e) {
4238
+ if (!(e instanceof To) && !(e instanceof wo)) throw e;
4239
+ }
4240
+ let se = (() => {
4241
+ let e = [p, n];
4242
+ return d && u ? [
4243
+ ...e,
4244
+ d,
4245
+ u
4246
+ ] : d ? [...e, d] : u ? [
4247
+ ...e,
4248
+ {},
4249
+ u
4250
+ ] : e;
4251
+ })(), ce = await e.request({
4252
+ method: "eth_call",
4253
+ params: se
4254
+ });
4255
+ return ce === "0x" ? { data: void 0 } : { data: ce };
4256
+ } catch (n) {
4257
+ let r = zo(n), { offchainLookup: i, offchainLookupSignature: a } = await import("./ccip-BzdqKpq_.js");
4258
+ if (e.ccipRead !== !1 && r?.slice(0, 10) === a && g) return { data: await i(e, {
4259
+ data: r,
4260
+ to: g
4261
+ }) };
4262
+ throw le && r?.slice(0, 10) === "0x101bb98d" ? new ri({ factory: f }) : Ao(n, {
4263
+ ...t,
4264
+ account: oe,
4265
+ chain: e.chain
4266
+ });
4267
+ }
4268
+ }
4269
+ function Fo({ request: e }) {
4270
+ let { data: t, to: n, ...r } = e;
4271
+ return !(!t || t.startsWith("0x82ad56cb") || !n || Object.values(r).filter((e) => e !== void 0).length > 0);
4272
+ }
4273
+ async function Io(e, t) {
4274
+ let { batchSize: n = 1024, deployless: r = !1, wait: i = 0 } = typeof e.batch?.multicall == "object" ? e.batch.multicall : {}, { blockNumber: a, blockTag: o = e.experimental_blockTag ?? "latest", data: s, to: c } = t, l = (() => {
4275
+ if (r) return null;
4276
+ if (t.multicallAddress) return t.multicallAddress;
4277
+ if (e.chain) return ko({
4278
+ blockNumber: a,
4279
+ chain: e.chain,
4280
+ contract: "multicall3"
4281
+ });
4282
+ throw new To();
4283
+ })(), u = (typeof a == "bigint" ? j(a) : void 0) || o, { schedule: d } = No({
4284
+ id: `${e.uid}.${u}`,
4285
+ wait: i,
4286
+ shouldSplitBatch(e) {
4287
+ return e.reduce((e, { data: t }) => e + (t.length - 2), 0) > n * 2;
4288
+ },
4289
+ fn: async (t) => {
4290
+ let n = t.map((e) => ({
4291
+ allowFailure: !0,
4292
+ callData: e.data,
4293
+ target: e.to
4294
+ })), r = lr({
4295
+ abi: lo,
4296
+ args: [n],
4297
+ functionName: "aggregate3"
4298
+ }), i = await e.request({
4299
+ method: "eth_call",
4300
+ params: [{ ...l === null ? { data: Lo({
4301
+ code: Co,
4302
+ data: r
4303
+ }) } : {
4304
+ to: l,
4305
+ data: r
4306
+ } }, u]
4307
+ });
4308
+ return aa({
4309
+ abi: lo,
4310
+ args: [n],
4311
+ functionName: "aggregate3",
4312
+ data: i || "0x"
4313
+ });
4314
+ }
4315
+ }), [{ returnData: f, success: p }] = await d({
4316
+ data: s,
4317
+ to: c
4318
+ });
4319
+ if (!p) throw new ii({ data: f });
4320
+ return f === "0x" ? { data: void 0 } : { data: f };
4321
+ }
4322
+ function Lo(e) {
4323
+ let { code: t, data: n } = e;
4324
+ return Oo({
4325
+ abi: st(["constructor(bytes, bytes)"]),
4326
+ bytecode: bo,
4327
+ args: [t, n]
4328
+ });
4329
+ }
4330
+ function Ro(e) {
4331
+ let { data: t, factory: n, factoryData: r, to: i } = e;
4332
+ return Oo({
4333
+ abi: st(["constructor(address, bytes, address, bytes)"]),
4334
+ bytecode: xo,
4335
+ args: [
4336
+ i,
4337
+ t,
4338
+ n,
4339
+ r
4340
+ ]
4341
+ });
4342
+ }
4343
+ function zo(e) {
4344
+ if (!(e instanceof w)) return;
4345
+ let t = e.walk();
4346
+ return typeof t?.data == "object" ? t.data?.data : t.data;
4347
+ }
4348
+ //#endregion
4349
+ //#region ../../node_modules/viem/_esm/utils/abi/decodeFunctionData.js
4350
+ function Bo(e) {
4351
+ let { abi: t, data: n } = e, r = I(n, 0, 4), i = t.find((e) => e.type === "function" && r === L(x(e)));
4352
+ if (!i) throw new Dt(r, { docsPath: "/docs/contract/decodeFunctionData" });
4353
+ return {
4354
+ functionName: i.name,
4355
+ args: "inputs" in i && i.inputs && i.inputs.length > 0 ? xr(i.inputs, I(n, 4)) : void 0
4356
+ };
4357
+ }
4358
+ //#endregion
4359
+ //#region ../../node_modules/viem/_esm/utils/abi/encodeErrorResult.js
4360
+ var Vo = "/docs/contract/encodeErrorResult";
4361
+ function Ho(e) {
4362
+ let { abi: t, errorName: n, args: r } = e, i = t[0];
4363
+ if (n) {
4364
+ let e = R({
4365
+ abi: t,
4366
+ args: r,
4367
+ name: n
4368
+ });
4369
+ if (!e) throw new xt(n, { docsPath: Vo });
4370
+ i = e;
4371
+ }
4372
+ if (i.type !== "error") throw new xt(void 0, { docsPath: Vo });
4373
+ let a = L(x(i)), o = "0x";
4374
+ if (r && r.length > 0) {
4375
+ if (!i.inputs) throw new bt(i.name, { docsPath: Vo });
4376
+ o = Kn(i.inputs, r);
4377
+ }
4378
+ return Rn([a, o]);
4379
+ }
4380
+ //#endregion
4381
+ //#region ../../node_modules/viem/_esm/utils/abi/encodeFunctionResult.js
4382
+ var Uo = "/docs/contract/encodeFunctionResult";
4383
+ function Wo(e) {
4384
+ let { abi: t, functionName: n, result: r } = e, i = t[0];
4385
+ if (n) {
4386
+ let e = R({
4387
+ abi: t,
4388
+ name: n
4389
+ });
4390
+ if (!e) throw new T(n, { docsPath: Uo });
4391
+ i = e;
4392
+ }
4393
+ if (i.type !== "function") throw new T(void 0, { docsPath: Uo });
4394
+ if (!i.outputs) throw new Et(i.name, { docsPath: Uo });
4395
+ let a = (() => {
4396
+ if (i.outputs.length === 0) return [];
4397
+ if (i.outputs.length === 1) return [r];
4398
+ if (Array.isArray(r)) return r;
4399
+ throw new Pt(r);
4400
+ })();
4401
+ return Kn(i.outputs, a);
4402
+ }
4403
+ //#endregion
4404
+ //#region ../../node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js
4405
+ var Go = "x-batch-gateway:true";
4406
+ async function Ko(e) {
4407
+ let { data: t, ccipRequest: n } = e, { args: [r] } = Bo({
4408
+ abi: uo,
4409
+ data: t
4410
+ }), i = [], a = [];
4411
+ return await Promise.all(r.map(async (e, t) => {
4412
+ try {
4413
+ a[t] = e.urls.includes("x-batch-gateway:true") ? await Ko({
4414
+ data: e.data,
4415
+ ccipRequest: n
4416
+ }) : await n(e), i[t] = !1;
4417
+ } catch (e) {
4418
+ i[t] = !0, a[t] = qo(e);
4419
+ }
4420
+ })), Wo({
4421
+ abi: uo,
4422
+ functionName: "query",
4423
+ result: [i, a]
4424
+ });
4425
+ }
4426
+ function qo(e) {
4427
+ return e.name === "HttpRequestError" && e.status ? Ho({
4428
+ abi: uo,
4429
+ errorName: "HttpError",
4430
+ args: [e.status, e.shortMessage]
4431
+ }) : Ho({
4432
+ abi: [dr],
4433
+ errorName: "Error",
4434
+ args: ["shortMessage" in e ? e.shortMessage : e.message]
4435
+ });
4436
+ }
4437
+ //#endregion
4438
+ export { ea as $, x as $n, H as $t, Ya as A, A as An, Oi as At, ka as B, ht as Bn, ti as Bt, to as C, An as Cn, hi as Ct, Z as D, on as Dn, Si as Dt, qa as E, rn as En, _i as Et, eo as F, Kt as Fn, ai as Ft, Pa as G, wt as Gn, Wr as Gt, ja as H, yt as Hn, ii as Ht, wa as I, qt as In, oi as It, J, jt as Jn, qr as Jt, Ia as K, kt as Kn, Gr as Kt, Ea as L, O as Ln, si as Lt, $ as M, Qt as Mn, Ci as Mt, Za as N, Yt as Nn, xi as Nt, Q as O, en as On, Ai as Ot, $a as P, Gt as Pn, Pi as Pt, ta as Q, S as Qn, Hr as Qt, Da as R, E as Rn, $r as Rt, co as S, N as Sn, wi as St, Ka as T, Cn as Tn, Ei as Tt, Ma as U, Tt as Un, Qr as Ut, Aa as V, gt as Vn, ni as Vt, Na as W, Ct as Wn, Ur as Wt, ra as X, w as Xn, Yr as Xt, aa as Y, It as Yn, Jr as Yt, na as Z, C as Zn, Xr as Zt, vo as _, Rn as _n, bi as _t, No as a, _r as an, Ne as ar, K as at, po as b, Pn as bn, vi as bt, ko as c, or as cn, De as cr, Mi as ct, bo as d, Kn as dn, Ti as dt, Lr as en, st as er, Xi as et, So as f, Un as fn, ki as ft, yo as g, F as gn, ui as gt, _o as h, I as hn, fi as ht, Po as i, xr as in, b as ir, Gi as it, Xa as j, j as jn, Di as jt, Ja as k, Xt as kn, Fi as kt, Oo as l, R as ln, oe as lr, Ni as lt, go as m, Gn as mn, mi as mt, Go as n, V as nn, y as nr, qi as nt, jo as o, mr as on, Ae as or, q as ot, Co as p, Wn as pn, pi as pt, ba as q, At as qn, Kr as qt, Bo as r, Mr as rn, Ge as rr, Ki as rt, Ao as s, lr as sn, _e as sr, Wi as st, Ko as t, Ir as tn, it as tr, Yi as tt, Eo as u, L as un, _ as ur, ji as ut, lo as v, P as vn, yi as vt, Ga as w, wn, gi as wt, mo as x, jn as xn, li as xt, ho as y, Nn as yn, di as yt, X as z, D as zn, ei as zt };