@boostxyz/cli 6.0.0-canary.0 → 6.0.0-canary.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ccip-BlKmSKBr.cjs → ccip-BgOzBLIc.cjs} +1 -1
- package/dist/{ccip-D7NdwxMj.js → ccip-DDb_n-DK.js} +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/seed.cjs +1 -1
- package/dist/commands/seed.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{seed-CEYJ5usT.cjs → seed-DU3dxNJK.cjs} +16 -16
- package/dist/{seed-DO57WBCN.js → seed-TiV1kcAC.js} +309 -309
- package/package.json +2 -2
|
@@ -169,7 +169,7 @@ const g = k.arrayToEnum([
|
|
|
169
169
|
"not_multiple_of",
|
|
170
170
|
"not_finite"
|
|
171
171
|
]), _a = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
172
|
-
class
|
|
172
|
+
class W extends Error {
|
|
173
173
|
get errors() {
|
|
174
174
|
return this.issues;
|
|
175
175
|
}
|
|
@@ -206,7 +206,7 @@ class q extends Error {
|
|
|
206
206
|
return s(this), r;
|
|
207
207
|
}
|
|
208
208
|
static assert(e) {
|
|
209
|
-
if (!(e instanceof
|
|
209
|
+
if (!(e instanceof W))
|
|
210
210
|
throw new Error(`Not a ZodError: ${e}`);
|
|
211
211
|
}
|
|
212
212
|
toString() {
|
|
@@ -228,7 +228,7 @@ class q extends Error {
|
|
|
228
228
|
return this.flatten();
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
|
|
231
|
+
W.create = (t) => new W(t);
|
|
232
232
|
const Ve = (t, e) => {
|
|
233
233
|
let n;
|
|
234
234
|
switch (t.code) {
|
|
@@ -289,7 +289,7 @@ let Zr = Ve;
|
|
|
289
289
|
function Pa(t) {
|
|
290
290
|
Zr = t;
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function Lt() {
|
|
293
293
|
return Zr;
|
|
294
294
|
}
|
|
295
295
|
const Vt = (t) => {
|
|
@@ -314,7 +314,7 @@ const Vt = (t) => {
|
|
|
314
314
|
};
|
|
315
315
|
}, Ea = [];
|
|
316
316
|
function b(t, e) {
|
|
317
|
-
const n =
|
|
317
|
+
const n = Lt(), r = Vt({
|
|
318
318
|
issueData: e,
|
|
319
319
|
data: t.data,
|
|
320
320
|
path: t.path,
|
|
@@ -374,12 +374,12 @@ class z {
|
|
|
374
374
|
}
|
|
375
375
|
const _ = Object.freeze({
|
|
376
376
|
status: "aborted"
|
|
377
|
-
}), Fe = (t) => ({ status: "dirty", value: t }),
|
|
377
|
+
}), Fe = (t) => ({ status: "dirty", value: t }), D = (t) => ({ status: "valid", value: t }), Tn = (t) => t.status === "aborted", $n = (t) => t.status === "dirty", Ie = (t) => t.status === "valid", at = (t) => typeof Promise < "u" && t instanceof Promise;
|
|
378
378
|
function Ut(t, e, n, r) {
|
|
379
379
|
if (typeof e == "function" ? t !== e || !r : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
380
380
|
return e.get(t);
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function Dr(t, e, n, r, s) {
|
|
383
383
|
if (typeof e == "function" ? t !== e || !s : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
384
384
|
return e.set(t, n), n;
|
|
385
385
|
}
|
|
@@ -406,7 +406,7 @@ const vr = (t, e) => {
|
|
|
406
406
|
get error() {
|
|
407
407
|
if (this._error)
|
|
408
408
|
return this._error;
|
|
409
|
-
const n = new
|
|
409
|
+
const n = new W(t.common.issues);
|
|
410
410
|
return this._error = n, this._error;
|
|
411
411
|
}
|
|
412
412
|
};
|
|
@@ -608,7 +608,7 @@ class T {
|
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
610
|
brand() {
|
|
611
|
-
return new
|
|
611
|
+
return new Wn({
|
|
612
612
|
typeName: x.ZodBranded,
|
|
613
613
|
type: this,
|
|
614
614
|
...E(this._def)
|
|
@@ -643,23 +643,23 @@ class T {
|
|
|
643
643
|
return this.safeParse(null).success;
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
|
-
const Aa = /^c[^\s-]{8,}$/i, Ca = /^[0-9a-z]+$/, Ta = /^[0-9A-HJKMNP-TV-Z]{26}$/i, $a = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, ka = /^[a-z0-9_-]{21}$/i, Ia = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Sa = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Ra = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,
|
|
646
|
+
const Aa = /^c[^\s-]{8,}$/i, Ca = /^[0-9a-z]+$/, Ta = /^[0-9A-HJKMNP-TV-Z]{26}$/i, $a = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, ka = /^[a-z0-9_-]{21}$/i, Ia = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Sa = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Ra = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ma = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
647
647
|
let pn;
|
|
648
|
-
const
|
|
648
|
+
const Oa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ja = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Ba = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Na = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Fa = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, za = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Lr = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Za = new RegExp(`^${Lr}$`);
|
|
649
649
|
function Vr(t) {
|
|
650
650
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
651
651
|
return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function Da(t) {
|
|
654
654
|
return new RegExp(`^${Vr(t)}$`);
|
|
655
655
|
}
|
|
656
656
|
function Ur(t) {
|
|
657
|
-
let e = `${
|
|
657
|
+
let e = `${Lr}T${Vr(t)}`;
|
|
658
658
|
const n = [];
|
|
659
659
|
return n.push(t.local ? "Z?" : "Z"), t.offset && n.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${n.join("|")})`, new RegExp(`^${e}$`);
|
|
660
660
|
}
|
|
661
|
-
function
|
|
662
|
-
return !!((e === "v4" || !e) &&
|
|
661
|
+
function La(t, e) {
|
|
662
|
+
return !!((e === "v4" || !e) && Oa.test(t) || (e === "v6" || !e) && Ba.test(t));
|
|
663
663
|
}
|
|
664
664
|
function Va(t, e) {
|
|
665
665
|
if (!Ia.test(t))
|
|
@@ -729,7 +729,7 @@ class ee extends T {
|
|
|
729
729
|
message: a.message
|
|
730
730
|
}), r.dirty());
|
|
731
731
|
else if (a.kind === "emoji")
|
|
732
|
-
pn || (pn = new RegExp(
|
|
732
|
+
pn || (pn = new RegExp(Ma, "u")), pn.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
|
|
733
733
|
validation: "emoji",
|
|
734
734
|
code: h.invalid_string,
|
|
735
735
|
message: a.message
|
|
@@ -798,7 +798,7 @@ class ee extends T {
|
|
|
798
798
|
code: h.invalid_string,
|
|
799
799
|
validation: "date",
|
|
800
800
|
message: a.message
|
|
801
|
-
}), r.dirty()) : a.kind === "time" ?
|
|
801
|
+
}), r.dirty()) : a.kind === "time" ? Da(a).test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
|
|
802
802
|
code: h.invalid_string,
|
|
803
803
|
validation: "time",
|
|
804
804
|
message: a.message
|
|
@@ -806,7 +806,7 @@ class ee extends T {
|
|
|
806
806
|
validation: "duration",
|
|
807
807
|
code: h.invalid_string,
|
|
808
808
|
message: a.message
|
|
809
|
-
}), r.dirty()) : a.kind === "ip" ?
|
|
809
|
+
}), r.dirty()) : a.kind === "ip" ? La(e.data, a.version) || (s = this._getOrReturnCtx(e, s), b(s, {
|
|
810
810
|
validation: "ip",
|
|
811
811
|
code: h.invalid_string,
|
|
812
812
|
message: a.message
|
|
@@ -1383,7 +1383,7 @@ class it extends T {
|
|
|
1383
1383
|
received: r.parsedType
|
|
1384
1384
|
}), _;
|
|
1385
1385
|
}
|
|
1386
|
-
return
|
|
1386
|
+
return D(e.data);
|
|
1387
1387
|
}
|
|
1388
1388
|
}
|
|
1389
1389
|
it.create = (t) => new it({
|
|
@@ -1479,7 +1479,7 @@ class Gt extends T {
|
|
|
1479
1479
|
received: r.parsedType
|
|
1480
1480
|
}), _;
|
|
1481
1481
|
}
|
|
1482
|
-
return
|
|
1482
|
+
return D(e.data);
|
|
1483
1483
|
}
|
|
1484
1484
|
}
|
|
1485
1485
|
Gt.create = (t) => new Gt({
|
|
@@ -1496,7 +1496,7 @@ class ot extends T {
|
|
|
1496
1496
|
received: r.parsedType
|
|
1497
1497
|
}), _;
|
|
1498
1498
|
}
|
|
1499
|
-
return
|
|
1499
|
+
return D(e.data);
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
1502
|
ot.create = (t) => new ot({
|
|
@@ -1513,7 +1513,7 @@ class ct extends T {
|
|
|
1513
1513
|
received: r.parsedType
|
|
1514
1514
|
}), _;
|
|
1515
1515
|
}
|
|
1516
|
-
return
|
|
1516
|
+
return D(e.data);
|
|
1517
1517
|
}
|
|
1518
1518
|
}
|
|
1519
1519
|
ct.create = (t) => new ct({
|
|
@@ -1525,7 +1525,7 @@ class Ue extends T {
|
|
|
1525
1525
|
super(...arguments), this._any = !0;
|
|
1526
1526
|
}
|
|
1527
1527
|
_parse(e) {
|
|
1528
|
-
return
|
|
1528
|
+
return D(e.data);
|
|
1529
1529
|
}
|
|
1530
1530
|
}
|
|
1531
1531
|
Ue.create = (t) => new Ue({
|
|
@@ -1537,7 +1537,7 @@ class ke extends T {
|
|
|
1537
1537
|
super(...arguments), this._unknown = !0;
|
|
1538
1538
|
}
|
|
1539
1539
|
_parse(e) {
|
|
1540
|
-
return
|
|
1540
|
+
return D(e.data);
|
|
1541
1541
|
}
|
|
1542
1542
|
}
|
|
1543
1543
|
ke.create = (t) => new ke({
|
|
@@ -1558,7 +1558,7 @@ me.create = (t) => new me({
|
|
|
1558
1558
|
typeName: x.ZodNever,
|
|
1559
1559
|
...E(t)
|
|
1560
1560
|
});
|
|
1561
|
-
class
|
|
1561
|
+
class qt extends T {
|
|
1562
1562
|
_parse(e) {
|
|
1563
1563
|
if (this._getType(e) !== g.undefined) {
|
|
1564
1564
|
const r = this._getOrReturnCtx(e);
|
|
@@ -1568,10 +1568,10 @@ class Ht extends T {
|
|
|
1568
1568
|
received: r.parsedType
|
|
1569
1569
|
}), _;
|
|
1570
1570
|
}
|
|
1571
|
-
return
|
|
1571
|
+
return D(e.data);
|
|
1572
1572
|
}
|
|
1573
1573
|
}
|
|
1574
|
-
|
|
1574
|
+
qt.create = (t) => new qt({
|
|
1575
1575
|
typeName: x.ZodVoid,
|
|
1576
1576
|
...E(t)
|
|
1577
1577
|
});
|
|
@@ -1961,7 +1961,7 @@ class ut extends T {
|
|
|
1961
1961
|
for (const o of a)
|
|
1962
1962
|
if (o.result.status === "dirty")
|
|
1963
1963
|
return n.common.issues.push(...o.ctx.common.issues), o.result;
|
|
1964
|
-
const i = a.map((o) => new
|
|
1964
|
+
const i = a.map((o) => new W(o.ctx.common.issues));
|
|
1965
1965
|
return b(n, {
|
|
1966
1966
|
code: h.invalid_union,
|
|
1967
1967
|
unionErrors: i
|
|
@@ -2008,7 +2008,7 @@ class ut extends T {
|
|
|
2008
2008
|
}
|
|
2009
2009
|
if (a)
|
|
2010
2010
|
return n.common.issues.push(...a.ctx.common.issues), a.result;
|
|
2011
|
-
const o = i.map((u) => new
|
|
2011
|
+
const o = i.map((u) => new W(u));
|
|
2012
2012
|
return b(n, {
|
|
2013
2013
|
code: h.invalid_union,
|
|
2014
2014
|
unionErrors: o
|
|
@@ -2024,7 +2024,7 @@ ut.create = (t, e) => new ut({
|
|
|
2024
2024
|
typeName: x.ZodUnion,
|
|
2025
2025
|
...E(e)
|
|
2026
2026
|
});
|
|
2027
|
-
const fe = (t) => t instanceof ft ? fe(t.schema) : t instanceof ne ? fe(t.innerType()) : t instanceof ht ? [t.value] : t instanceof xe ? t.options : t instanceof pt ? k.objectValues(t.enum) : t instanceof mt ? fe(t._def.innerType) : t instanceof ot ? [void 0] : t instanceof ct ? [null] : t instanceof ae ? [void 0, ...fe(t.unwrap())] : t instanceof _e ? [null, ...fe(t.unwrap())] : t instanceof
|
|
2027
|
+
const fe = (t) => t instanceof ft ? fe(t.schema) : t instanceof ne ? fe(t.innerType()) : t instanceof ht ? [t.value] : t instanceof xe ? t.options : t instanceof pt ? k.objectValues(t.enum) : t instanceof mt ? fe(t._def.innerType) : t instanceof ot ? [void 0] : t instanceof ct ? [null] : t instanceof ae ? [void 0, ...fe(t.unwrap())] : t instanceof _e ? [null, ...fe(t.unwrap())] : t instanceof Wn || t instanceof bt ? fe(t.unwrap()) : t instanceof yt ? fe(t._def.innerType) : [];
|
|
2028
2028
|
class nn extends T {
|
|
2029
2029
|
_parse(e) {
|
|
2030
2030
|
const { ctx: n } = this._processInputParams(e);
|
|
@@ -2242,7 +2242,7 @@ class lt extends T {
|
|
|
2242
2242
|
});
|
|
2243
2243
|
}
|
|
2244
2244
|
}
|
|
2245
|
-
class
|
|
2245
|
+
class Wt extends T {
|
|
2246
2246
|
get keySchema() {
|
|
2247
2247
|
return this._def.keyType;
|
|
2248
2248
|
}
|
|
@@ -2284,7 +2284,7 @@ class qt extends T {
|
|
|
2284
2284
|
}
|
|
2285
2285
|
}
|
|
2286
2286
|
}
|
|
2287
|
-
|
|
2287
|
+
Wt.create = (t, e, n) => new Wt({
|
|
2288
2288
|
valueType: e,
|
|
2289
2289
|
keyType: t,
|
|
2290
2290
|
typeName: x.ZodMap,
|
|
@@ -2373,7 +2373,7 @@ class Ze extends T {
|
|
|
2373
2373
|
errorMaps: [
|
|
2374
2374
|
n.common.contextualErrorMap,
|
|
2375
2375
|
n.schemaErrorMap,
|
|
2376
|
-
|
|
2376
|
+
Lt(),
|
|
2377
2377
|
Ve
|
|
2378
2378
|
].filter((c) => !!c),
|
|
2379
2379
|
issueData: {
|
|
@@ -2389,7 +2389,7 @@ class Ze extends T {
|
|
|
2389
2389
|
errorMaps: [
|
|
2390
2390
|
n.common.contextualErrorMap,
|
|
2391
2391
|
n.schemaErrorMap,
|
|
2392
|
-
|
|
2392
|
+
Lt(),
|
|
2393
2393
|
Ve
|
|
2394
2394
|
].filter((c) => !!c),
|
|
2395
2395
|
issueData: {
|
|
@@ -2401,8 +2401,8 @@ class Ze extends T {
|
|
|
2401
2401
|
const a = { errorMap: n.common.contextualErrorMap }, i = n.data;
|
|
2402
2402
|
if (this._def.returns instanceof Ge) {
|
|
2403
2403
|
const o = this;
|
|
2404
|
-
return
|
|
2405
|
-
const c = new
|
|
2404
|
+
return D(async function(...u) {
|
|
2405
|
+
const c = new W([]), d = await o._def.args.parseAsync(u, a).catch((m) => {
|
|
2406
2406
|
throw c.addIssue(r(u, m)), c;
|
|
2407
2407
|
}), l = await Reflect.apply(i, this, d);
|
|
2408
2408
|
return await o._def.returns._def.type.parseAsync(l, a).catch((m) => {
|
|
@@ -2411,13 +2411,13 @@ class Ze extends T {
|
|
|
2411
2411
|
});
|
|
2412
2412
|
} else {
|
|
2413
2413
|
const o = this;
|
|
2414
|
-
return
|
|
2414
|
+
return D(function(...u) {
|
|
2415
2415
|
const c = o._def.args.safeParse(u, a);
|
|
2416
2416
|
if (!c.success)
|
|
2417
|
-
throw new
|
|
2417
|
+
throw new W([r(u, c.error)]);
|
|
2418
2418
|
const d = Reflect.apply(i, this, c.data), l = o._def.returns.safeParse(d, a);
|
|
2419
2419
|
if (!l.success)
|
|
2420
|
-
throw new
|
|
2420
|
+
throw new W([s(d, l.error)]);
|
|
2421
2421
|
return l.data;
|
|
2422
2422
|
});
|
|
2423
2423
|
}
|
|
@@ -2510,7 +2510,7 @@ class xe extends T {
|
|
|
2510
2510
|
code: h.invalid_type
|
|
2511
2511
|
}), _;
|
|
2512
2512
|
}
|
|
2513
|
-
if (Ut(this, tt) ||
|
|
2513
|
+
if (Ut(this, tt) || Dr(this, tt, new Set(this._def.values)), !Ut(this, tt).has(e.data)) {
|
|
2514
2514
|
const n = this._getOrReturnCtx(e), r = this._def.values;
|
|
2515
2515
|
return b(n, {
|
|
2516
2516
|
received: n.data,
|
|
@@ -2518,7 +2518,7 @@ class xe extends T {
|
|
|
2518
2518
|
options: r
|
|
2519
2519
|
}), _;
|
|
2520
2520
|
}
|
|
2521
|
-
return
|
|
2521
|
+
return D(e.data);
|
|
2522
2522
|
}
|
|
2523
2523
|
get options() {
|
|
2524
2524
|
return this._def.values;
|
|
@@ -2570,7 +2570,7 @@ class pt extends T {
|
|
|
2570
2570
|
code: h.invalid_type
|
|
2571
2571
|
}), _;
|
|
2572
2572
|
}
|
|
2573
|
-
if (Ut(this, nt) ||
|
|
2573
|
+
if (Ut(this, nt) || Dr(this, nt, new Set(k.getValidEnumValues(this._def.values))), !Ut(this, nt).has(e.data)) {
|
|
2574
2574
|
const s = k.objectValues(n);
|
|
2575
2575
|
return b(r, {
|
|
2576
2576
|
received: r.data,
|
|
@@ -2578,7 +2578,7 @@ class pt extends T {
|
|
|
2578
2578
|
options: s
|
|
2579
2579
|
}), _;
|
|
2580
2580
|
}
|
|
2581
|
-
return
|
|
2581
|
+
return D(e.data);
|
|
2582
2582
|
}
|
|
2583
2583
|
get enum() {
|
|
2584
2584
|
return this._def.values;
|
|
@@ -2603,7 +2603,7 @@ class Ge extends T {
|
|
|
2603
2603
|
received: n.parsedType
|
|
2604
2604
|
}), _;
|
|
2605
2605
|
const r = n.parsedType === g.promise ? n.data : Promise.resolve(n.data);
|
|
2606
|
-
return
|
|
2606
|
+
return D(r.then((s) => this._def.type.parseAsync(s, {
|
|
2607
2607
|
path: n.path,
|
|
2608
2608
|
errorMap: n.common.contextualErrorMap
|
|
2609
2609
|
})));
|
|
@@ -2705,7 +2705,7 @@ ne.createWithPreprocess = (t, e, n) => new ne({
|
|
|
2705
2705
|
});
|
|
2706
2706
|
class ae extends T {
|
|
2707
2707
|
_parse(e) {
|
|
2708
|
-
return this._getType(e) === g.undefined ?
|
|
2708
|
+
return this._getType(e) === g.undefined ? D(void 0) : this._def.innerType._parse(e);
|
|
2709
2709
|
}
|
|
2710
2710
|
unwrap() {
|
|
2711
2711
|
return this._def.innerType;
|
|
@@ -2718,7 +2718,7 @@ ae.create = (t, e) => new ae({
|
|
|
2718
2718
|
});
|
|
2719
2719
|
class _e extends T {
|
|
2720
2720
|
_parse(e) {
|
|
2721
|
-
return this._getType(e) === g.null ?
|
|
2721
|
+
return this._getType(e) === g.null ? D(null) : this._def.innerType._parse(e);
|
|
2722
2722
|
}
|
|
2723
2723
|
unwrap() {
|
|
2724
2724
|
return this._def.innerType;
|
|
@@ -2768,7 +2768,7 @@ class yt extends T {
|
|
|
2768
2768
|
status: "valid",
|
|
2769
2769
|
value: a.status === "valid" ? a.value : this._def.catchValue({
|
|
2770
2770
|
get error() {
|
|
2771
|
-
return new
|
|
2771
|
+
return new W(r.common.issues);
|
|
2772
2772
|
},
|
|
2773
2773
|
input: r.data
|
|
2774
2774
|
})
|
|
@@ -2776,7 +2776,7 @@ class yt extends T {
|
|
|
2776
2776
|
status: "valid",
|
|
2777
2777
|
value: s.status === "valid" ? s.value : this._def.catchValue({
|
|
2778
2778
|
get error() {
|
|
2779
|
-
return new
|
|
2779
|
+
return new W(r.common.issues);
|
|
2780
2780
|
},
|
|
2781
2781
|
input: r.data
|
|
2782
2782
|
})
|
|
@@ -2792,7 +2792,7 @@ yt.create = (t, e) => new yt({
|
|
|
2792
2792
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
2793
2793
|
...E(e)
|
|
2794
2794
|
});
|
|
2795
|
-
class
|
|
2795
|
+
class Ht extends T {
|
|
2796
2796
|
_parse(e) {
|
|
2797
2797
|
if (this._getType(e) !== g.nan) {
|
|
2798
2798
|
const r = this._getOrReturnCtx(e);
|
|
@@ -2805,12 +2805,12 @@ class Wt extends T {
|
|
|
2805
2805
|
return { status: "valid", value: e.data };
|
|
2806
2806
|
}
|
|
2807
2807
|
}
|
|
2808
|
-
|
|
2808
|
+
Ht.create = (t) => new Ht({
|
|
2809
2809
|
typeName: x.ZodNaN,
|
|
2810
2810
|
...E(t)
|
|
2811
2811
|
});
|
|
2812
|
-
const
|
|
2813
|
-
class
|
|
2812
|
+
const qa = Symbol("zod_brand");
|
|
2813
|
+
class Wn extends T {
|
|
2814
2814
|
_parse(e) {
|
|
2815
2815
|
const { ctx: n } = this._processInputParams(e), r = n.data;
|
|
2816
2816
|
return this._def.type._parse({
|
|
@@ -2877,7 +2877,7 @@ bt.create = (t, e) => new bt({
|
|
|
2877
2877
|
typeName: x.ZodReadonly,
|
|
2878
2878
|
...E(e)
|
|
2879
2879
|
});
|
|
2880
|
-
function
|
|
2880
|
+
function qr(t, e = {}, n) {
|
|
2881
2881
|
return t ? Ue.create().superRefine((r, s) => {
|
|
2882
2882
|
var a, i;
|
|
2883
2883
|
if (!t(r)) {
|
|
@@ -2886,16 +2886,16 @@ function Hr(t, e = {}, n) {
|
|
|
2886
2886
|
}
|
|
2887
2887
|
}) : Ue.create();
|
|
2888
2888
|
}
|
|
2889
|
-
const
|
|
2889
|
+
const Wa = {
|
|
2890
2890
|
object: j.lazycreate
|
|
2891
2891
|
};
|
|
2892
2892
|
var x;
|
|
2893
2893
|
(function(t) {
|
|
2894
2894
|
t.ZodString = "ZodString", t.ZodNumber = "ZodNumber", t.ZodNaN = "ZodNaN", t.ZodBigInt = "ZodBigInt", t.ZodBoolean = "ZodBoolean", t.ZodDate = "ZodDate", t.ZodSymbol = "ZodSymbol", t.ZodUndefined = "ZodUndefined", t.ZodNull = "ZodNull", t.ZodAny = "ZodAny", t.ZodUnknown = "ZodUnknown", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray", t.ZodObject = "ZodObject", t.ZodUnion = "ZodUnion", t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", t.ZodIntersection = "ZodIntersection", t.ZodTuple = "ZodTuple", t.ZodRecord = "ZodRecord", t.ZodMap = "ZodMap", t.ZodSet = "ZodSet", t.ZodFunction = "ZodFunction", t.ZodLazy = "ZodLazy", t.ZodLiteral = "ZodLiteral", t.ZodEnum = "ZodEnum", t.ZodEffects = "ZodEffects", t.ZodNativeEnum = "ZodNativeEnum", t.ZodOptional = "ZodOptional", t.ZodNullable = "ZodNullable", t.ZodDefault = "ZodDefault", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodReadonly";
|
|
2895
2895
|
})(x || (x = {}));
|
|
2896
|
-
const
|
|
2896
|
+
const Ha = (t, e = {
|
|
2897
2897
|
message: `Input not instance of ${t.name}`
|
|
2898
|
-
}) =>
|
|
2898
|
+
}) => qr((n) => n instanceof t, e), Wr = ee.create, Hr = ve.create, Ka = Ht.create, Ja = we.create, Kr = it.create, Ya = Se.create, Xa = Gt.create, Qa = ot.create, ei = ct.create, ti = Ue.create, ni = ke.create, ri = me.create, si = qt.create, ai = te.create, ii = j.create, oi = j.strictCreate, ci = ut.create, ui = nn.create, di = dt.create, li = oe.create, fi = lt.create, hi = Wt.create, pi = Re.create, mi = Ze.create, yi = ft.create, bi = ht.create, gi = xe.create, vi = pt.create, wi = Ge.create, wr = ne.create, xi = ae.create, _i = _e.create, Pi = ne.createWithPreprocess, Ei = Bt.create, Ai = () => Wr().optional(), Ci = () => Hr().optional(), Ti = () => Kr().optional(), $i = {
|
|
2899
2899
|
string: (t) => ee.create({ ...t, coerce: !0 }),
|
|
2900
2900
|
number: (t) => ve.create({ ...t, coerce: !0 }),
|
|
2901
2901
|
boolean: (t) => it.create({
|
|
@@ -2909,14 +2909,14 @@ var p = /* @__PURE__ */ Object.freeze({
|
|
|
2909
2909
|
__proto__: null,
|
|
2910
2910
|
defaultErrorMap: Ve,
|
|
2911
2911
|
setErrorMap: Pa,
|
|
2912
|
-
getErrorMap:
|
|
2912
|
+
getErrorMap: Lt,
|
|
2913
2913
|
makeIssue: Vt,
|
|
2914
2914
|
EMPTY_PATH: Ea,
|
|
2915
2915
|
addIssueToContext: b,
|
|
2916
2916
|
ParseStatus: z,
|
|
2917
2917
|
INVALID: _,
|
|
2918
2918
|
DIRTY: Fe,
|
|
2919
|
-
OK:
|
|
2919
|
+
OK: D,
|
|
2920
2920
|
isAborted: Tn,
|
|
2921
2921
|
isDirty: $n,
|
|
2922
2922
|
isValid: Ie,
|
|
@@ -2942,7 +2942,7 @@ var p = /* @__PURE__ */ Object.freeze({
|
|
|
2942
2942
|
ZodAny: Ue,
|
|
2943
2943
|
ZodUnknown: ke,
|
|
2944
2944
|
ZodNever: me,
|
|
2945
|
-
ZodVoid:
|
|
2945
|
+
ZodVoid: qt,
|
|
2946
2946
|
ZodArray: te,
|
|
2947
2947
|
ZodObject: j,
|
|
2948
2948
|
ZodUnion: ut,
|
|
@@ -2950,7 +2950,7 @@ var p = /* @__PURE__ */ Object.freeze({
|
|
|
2950
2950
|
ZodIntersection: dt,
|
|
2951
2951
|
ZodTuple: oe,
|
|
2952
2952
|
ZodRecord: lt,
|
|
2953
|
-
ZodMap:
|
|
2953
|
+
ZodMap: Wt,
|
|
2954
2954
|
ZodSet: Re,
|
|
2955
2955
|
ZodFunction: Ze,
|
|
2956
2956
|
ZodLazy: ft,
|
|
@@ -2964,15 +2964,15 @@ var p = /* @__PURE__ */ Object.freeze({
|
|
|
2964
2964
|
ZodNullable: _e,
|
|
2965
2965
|
ZodDefault: mt,
|
|
2966
2966
|
ZodCatch: yt,
|
|
2967
|
-
ZodNaN:
|
|
2968
|
-
BRAND:
|
|
2969
|
-
ZodBranded:
|
|
2967
|
+
ZodNaN: Ht,
|
|
2968
|
+
BRAND: qa,
|
|
2969
|
+
ZodBranded: Wn,
|
|
2970
2970
|
ZodPipeline: Bt,
|
|
2971
2971
|
ZodReadonly: bt,
|
|
2972
|
-
custom:
|
|
2972
|
+
custom: qr,
|
|
2973
2973
|
Schema: T,
|
|
2974
2974
|
ZodSchema: T,
|
|
2975
|
-
late:
|
|
2975
|
+
late: Wa,
|
|
2976
2976
|
get ZodFirstPartyTypeKind() {
|
|
2977
2977
|
return x;
|
|
2978
2978
|
},
|
|
@@ -2986,7 +2986,7 @@ var p = /* @__PURE__ */ Object.freeze({
|
|
|
2986
2986
|
effect: wr,
|
|
2987
2987
|
enum: gi,
|
|
2988
2988
|
function: mi,
|
|
2989
|
-
instanceof:
|
|
2989
|
+
instanceof: Ha,
|
|
2990
2990
|
intersection: di,
|
|
2991
2991
|
lazy: yi,
|
|
2992
2992
|
literal: bi,
|
|
@@ -2996,7 +2996,7 @@ var p = /* @__PURE__ */ Object.freeze({
|
|
|
2996
2996
|
never: ri,
|
|
2997
2997
|
null: ei,
|
|
2998
2998
|
nullable: _i,
|
|
2999
|
-
number:
|
|
2999
|
+
number: Hr,
|
|
3000
3000
|
object: ii,
|
|
3001
3001
|
oboolean: Ti,
|
|
3002
3002
|
onumber: Ci,
|
|
@@ -3008,7 +3008,7 @@ var p = /* @__PURE__ */ Object.freeze({
|
|
|
3008
3008
|
record: fi,
|
|
3009
3009
|
set: pi,
|
|
3010
3010
|
strictObject: oi,
|
|
3011
|
-
string:
|
|
3011
|
+
string: Wr,
|
|
3012
3012
|
symbol: Xa,
|
|
3013
3013
|
transformer: wr,
|
|
3014
3014
|
tuple: li,
|
|
@@ -3019,7 +3019,7 @@ var p = /* @__PURE__ */ Object.freeze({
|
|
|
3019
3019
|
NEVER: ki,
|
|
3020
3020
|
ZodIssueCode: h,
|
|
3021
3021
|
quotelessJson: _a,
|
|
3022
|
-
ZodError:
|
|
3022
|
+
ZodError: W
|
|
3023
3023
|
});
|
|
3024
3024
|
const Jr = "2.22.1";
|
|
3025
3025
|
let Xe = {
|
|
@@ -3148,17 +3148,17 @@ function Pe(t, { strict: e = !0 } = {}) {
|
|
|
3148
3148
|
function N(t) {
|
|
3149
3149
|
return Pe(t, { strict: !1 }) ? Math.ceil((t.length - 2) / 2) : t.length;
|
|
3150
3150
|
}
|
|
3151
|
-
function
|
|
3151
|
+
function Hn(t, { dir: e = "left" } = {}) {
|
|
3152
3152
|
let n = typeof t == "string" ? t.replace("0x", "") : t, r = 0;
|
|
3153
3153
|
for (let s = 0; s < n.length - 1 && n[e === "left" ? s : n.length - s - 1].toString() === "0"; s++)
|
|
3154
3154
|
r++;
|
|
3155
3155
|
return n = e === "left" ? n.slice(r) : n.slice(0, n.length - r), typeof t == "string" ? (n.length === 1 && e === "right" && (n = `${n}0`), `0x${n.length % 2 === 1 ? `0${n}` : n}`) : n;
|
|
3156
3156
|
}
|
|
3157
|
-
const
|
|
3157
|
+
const Mi = /* @__PURE__ */ new TextEncoder();
|
|
3158
3158
|
function Kn(t, e = {}) {
|
|
3159
|
-
return typeof t == "number" || typeof t == "bigint" ? ji(t, e) : typeof t == "boolean" ?
|
|
3159
|
+
return typeof t == "number" || typeof t == "bigint" ? ji(t, e) : typeof t == "boolean" ? Oi(t, e) : Pe(t) ? ye(t, e) : ts(t, e);
|
|
3160
3160
|
}
|
|
3161
|
-
function
|
|
3161
|
+
function Oi(t, e = {}) {
|
|
3162
3162
|
const n = new Uint8Array(1);
|
|
3163
3163
|
return n[0] = Number(t), typeof e.size == "number" ? (ce(n, { size: e.size }), Je(n, { size: e.size })) : n;
|
|
3164
3164
|
}
|
|
@@ -3193,11 +3193,11 @@ function ye(t, e = {}) {
|
|
|
3193
3193
|
return a;
|
|
3194
3194
|
}
|
|
3195
3195
|
function ji(t, e) {
|
|
3196
|
-
const n =
|
|
3196
|
+
const n = M(t, e);
|
|
3197
3197
|
return ye(n);
|
|
3198
3198
|
}
|
|
3199
3199
|
function ts(t, e = {}) {
|
|
3200
|
-
const n =
|
|
3200
|
+
const n = Mi.encode(t);
|
|
3201
3201
|
return typeof e.size == "number" ? (ce(n, { size: e.size }), Je(n, { dir: "right", size: e.size })) : n;
|
|
3202
3202
|
}
|
|
3203
3203
|
function ce(t, { size: e }) {
|
|
@@ -3216,12 +3216,12 @@ function gt(t, e = {}) {
|
|
|
3216
3216
|
const s = (t.length - 2) / 2, a = (1n << BigInt(s) * 8n - 1n) - 1n;
|
|
3217
3217
|
return r <= a ? r : r - BigInt(`0x${"f".padStart(s * 2, "f")}`) - 1n;
|
|
3218
3218
|
}
|
|
3219
|
-
function
|
|
3219
|
+
function qe(t, e = {}) {
|
|
3220
3220
|
return Number(gt(t, e));
|
|
3221
3221
|
}
|
|
3222
3222
|
const Bi = /* @__PURE__ */ Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
|
|
3223
3223
|
function Sn(t, e = {}) {
|
|
3224
|
-
return typeof t == "number" || typeof t == "bigint" ?
|
|
3224
|
+
return typeof t == "number" || typeof t == "bigint" ? M(t, e) : typeof t == "string" ? Jn(t, e) : typeof t == "boolean" ? ns(t, e) : G(t, e);
|
|
3225
3225
|
}
|
|
3226
3226
|
function ns(t, e = {}) {
|
|
3227
3227
|
const n = `0x${Number(t)}`;
|
|
@@ -3234,7 +3234,7 @@ function G(t, e = {}) {
|
|
|
3234
3234
|
const r = `0x${n}`;
|
|
3235
3235
|
return typeof e.size == "number" ? (ce(r, { size: e.size }), Je(r, { dir: "right", size: e.size })) : r;
|
|
3236
3236
|
}
|
|
3237
|
-
function
|
|
3237
|
+
function M(t, e = {}) {
|
|
3238
3238
|
const { signed: n, size: r } = e, s = BigInt(t);
|
|
3239
3239
|
let a;
|
|
3240
3240
|
r ? n ? a = (1n << BigInt(r) * 8n - 1n) - 1n : a = 2n ** (BigInt(r) * 8n) - 1n : typeof t == "number" && (a = BigInt(Number.MAX_SAFE_INTEGER));
|
|
@@ -3257,7 +3257,7 @@ function Jn(t, e = {}) {
|
|
|
3257
3257
|
const n = Ni.encode(t);
|
|
3258
3258
|
return G(n, e);
|
|
3259
3259
|
}
|
|
3260
|
-
function
|
|
3260
|
+
function We(t, { includeName: e = !1 } = {}) {
|
|
3261
3261
|
if (t.type !== "function" && t.type !== "event" && t.type !== "error")
|
|
3262
3262
|
throw new Ki(t.type);
|
|
3263
3263
|
return `${t.name}(${Yn(t.inputs, { includeName: e })})`;
|
|
@@ -3326,7 +3326,7 @@ class Xn extends y {
|
|
|
3326
3326
|
});
|
|
3327
3327
|
}
|
|
3328
3328
|
}
|
|
3329
|
-
class
|
|
3329
|
+
class Di extends y {
|
|
3330
3330
|
constructor({ expectedLength: e, givenLength: n, type: r }) {
|
|
3331
3331
|
super([
|
|
3332
3332
|
`ABI encoding array length mismatch for type ${r}.`,
|
|
@@ -3336,7 +3336,7 @@ class Li extends y {
|
|
|
3336
3336
|
`), { name: "AbiEncodingArrayLengthMismatchError" });
|
|
3337
3337
|
}
|
|
3338
3338
|
}
|
|
3339
|
-
class
|
|
3339
|
+
class Li extends y {
|
|
3340
3340
|
constructor({ expectedSize: e, value: n }) {
|
|
3341
3341
|
super(`Size of bytes "${n}" (bytes${N(n)}) does not match expected size (bytes${e}).`, { name: "AbiEncodingBytesSizeMismatchError" });
|
|
3342
3342
|
}
|
|
@@ -3398,8 +3398,8 @@ class Gi extends y {
|
|
|
3398
3398
|
constructor(e, n) {
|
|
3399
3399
|
super("Found ambiguous types in overloaded ABI items.", {
|
|
3400
3400
|
metaMessages: [
|
|
3401
|
-
`\`${e.type}\` in \`${
|
|
3402
|
-
`\`${n.type}\` in \`${
|
|
3401
|
+
`\`${e.type}\` in \`${We(e.abiItem)}\`, and`,
|
|
3402
|
+
`\`${n.type}\` in \`${We(n.abiItem)}\``,
|
|
3403
3403
|
"",
|
|
3404
3404
|
"These types encode differently and cannot be distinguished at runtime.",
|
|
3405
3405
|
"Remove one of the ambiguous items in the ABI."
|
|
@@ -3408,7 +3408,7 @@ class Gi extends y {
|
|
|
3408
3408
|
});
|
|
3409
3409
|
}
|
|
3410
3410
|
}
|
|
3411
|
-
class
|
|
3411
|
+
class qi extends y {
|
|
3412
3412
|
constructor(e, { docsPath: n }) {
|
|
3413
3413
|
super([
|
|
3414
3414
|
`Type "${e}" is not a valid encoding type.`,
|
|
@@ -3417,7 +3417,7 @@ class Hi extends y {
|
|
|
3417
3417
|
`), { docsPath: n, name: "InvalidAbiEncodingType" });
|
|
3418
3418
|
}
|
|
3419
3419
|
}
|
|
3420
|
-
class
|
|
3420
|
+
class Wi extends y {
|
|
3421
3421
|
constructor(e, { docsPath: n }) {
|
|
3422
3422
|
super([
|
|
3423
3423
|
`Type "${e}" is not a valid decoding type.`,
|
|
@@ -3426,7 +3426,7 @@ class qi extends y {
|
|
|
3426
3426
|
`), { docsPath: n, name: "InvalidAbiDecodingType" });
|
|
3427
3427
|
}
|
|
3428
3428
|
}
|
|
3429
|
-
class
|
|
3429
|
+
class Hi extends y {
|
|
3430
3430
|
constructor(e) {
|
|
3431
3431
|
super([`Value "${e}" is not a valid array.`].join(`
|
|
3432
3432
|
`), {
|
|
@@ -3443,7 +3443,7 @@ class Ki extends y {
|
|
|
3443
3443
|
`), { name: "InvalidDefinitionTypeError" });
|
|
3444
3444
|
}
|
|
3445
3445
|
}
|
|
3446
|
-
function
|
|
3446
|
+
function He(t) {
|
|
3447
3447
|
return typeof t[0] == "string" ? rn(t) : Ji(t);
|
|
3448
3448
|
}
|
|
3449
3449
|
function Ji(t) {
|
|
@@ -3595,7 +3595,7 @@ function Qn({ param: t, value: e }) {
|
|
|
3595
3595
|
return so(e, { param: t });
|
|
3596
3596
|
if (t.type === "string")
|
|
3597
3597
|
return oo(e);
|
|
3598
|
-
throw new
|
|
3598
|
+
throw new qi(t.type, {
|
|
3599
3599
|
docsPath: "/docs/contract/encodeAbiParameters"
|
|
3600
3600
|
});
|
|
3601
3601
|
}
|
|
@@ -3609,9 +3609,9 @@ function er(t) {
|
|
|
3609
3609
|
let s = 0;
|
|
3610
3610
|
for (let a = 0; a < t.length; a++) {
|
|
3611
3611
|
const { dynamic: i, encoded: o } = t[a];
|
|
3612
|
-
i ? (n.push(
|
|
3612
|
+
i ? (n.push(M(e + s, { size: 32 })), r.push(o), s += N(o)) : n.push(o);
|
|
3613
3613
|
}
|
|
3614
|
-
return
|
|
3614
|
+
return He([...n, ...r]);
|
|
3615
3615
|
}
|
|
3616
3616
|
function no(t) {
|
|
3617
3617
|
if (!Ee(t))
|
|
@@ -3621,9 +3621,9 @@ function no(t) {
|
|
|
3621
3621
|
function ro(t, { length: e, param: n }) {
|
|
3622
3622
|
const r = e === null;
|
|
3623
3623
|
if (!Array.isArray(t))
|
|
3624
|
-
throw new
|
|
3624
|
+
throw new Hi(t);
|
|
3625
3625
|
if (!r && t.length !== e)
|
|
3626
|
-
throw new
|
|
3626
|
+
throw new Di({
|
|
3627
3627
|
expectedLength: e,
|
|
3628
3628
|
givenLength: t.length,
|
|
3629
3629
|
type: `${n.type}[${e}]`
|
|
@@ -3637,10 +3637,10 @@ function ro(t, { length: e, param: n }) {
|
|
|
3637
3637
|
if (r || s) {
|
|
3638
3638
|
const i = er(a);
|
|
3639
3639
|
if (r) {
|
|
3640
|
-
const o =
|
|
3640
|
+
const o = M(a.length, { size: 32 });
|
|
3641
3641
|
return {
|
|
3642
3642
|
dynamic: !0,
|
|
3643
|
-
encoded: a.length > 0 ?
|
|
3643
|
+
encoded: a.length > 0 ? He([o, i]) : o
|
|
3644
3644
|
};
|
|
3645
3645
|
}
|
|
3646
3646
|
if (s)
|
|
@@ -3648,7 +3648,7 @@ function ro(t, { length: e, param: n }) {
|
|
|
3648
3648
|
}
|
|
3649
3649
|
return {
|
|
3650
3650
|
dynamic: !1,
|
|
3651
|
-
encoded:
|
|
3651
|
+
encoded: He(a.map(({ encoded: i }) => i))
|
|
3652
3652
|
};
|
|
3653
3653
|
}
|
|
3654
3654
|
function so(t, { param: e }) {
|
|
@@ -3660,11 +3660,11 @@ function so(t, { param: e }) {
|
|
|
3660
3660
|
size: Math.ceil((t.length - 2) / 2 / 32) * 32
|
|
3661
3661
|
})), {
|
|
3662
3662
|
dynamic: !0,
|
|
3663
|
-
encoded:
|
|
3663
|
+
encoded: He([ge(M(r, { size: 32 })), s])
|
|
3664
3664
|
};
|
|
3665
3665
|
}
|
|
3666
3666
|
if (r !== Number.parseInt(n))
|
|
3667
|
-
throw new
|
|
3667
|
+
throw new Li({
|
|
3668
3668
|
expectedSize: Number.parseInt(n),
|
|
3669
3669
|
value: t
|
|
3670
3670
|
});
|
|
@@ -3689,7 +3689,7 @@ function io(t, { signed: e, size: n = 256 }) {
|
|
|
3689
3689
|
}
|
|
3690
3690
|
return {
|
|
3691
3691
|
dynamic: !1,
|
|
3692
|
-
encoded:
|
|
3692
|
+
encoded: M(t, {
|
|
3693
3693
|
size: 32,
|
|
3694
3694
|
signed: e
|
|
3695
3695
|
})
|
|
@@ -3703,8 +3703,8 @@ function oo(t) {
|
|
|
3703
3703
|
}));
|
|
3704
3704
|
return {
|
|
3705
3705
|
dynamic: !0,
|
|
3706
|
-
encoded:
|
|
3707
|
-
ge(
|
|
3706
|
+
encoded: He([
|
|
3707
|
+
ge(M(N(e), { size: 32 })),
|
|
3708
3708
|
...r
|
|
3709
3709
|
])
|
|
3710
3710
|
};
|
|
@@ -3721,7 +3721,7 @@ function co(t, { param: e }) {
|
|
|
3721
3721
|
}
|
|
3722
3722
|
return {
|
|
3723
3723
|
dynamic: n,
|
|
3724
|
-
encoded: n ? er(r) :
|
|
3724
|
+
encoded: n ? er(r) : He(r.map(({ encoded: s }) => s))
|
|
3725
3725
|
};
|
|
3726
3726
|
}
|
|
3727
3727
|
function tr(t) {
|
|
@@ -3782,7 +3782,7 @@ async function lo({ hash: t, signature: e }) {
|
|
|
3782
3782
|
const { r: c, s: d, v: l, yParity: f } = e, m = Number(f ?? l), v = Er(m);
|
|
3783
3783
|
return new r.Signature(gt(c), gt(d)).addRecoveryBit(v);
|
|
3784
3784
|
}
|
|
3785
|
-
const i = Pe(e) ? e : Sn(e), o =
|
|
3785
|
+
const i = Pe(e) ? e : Sn(e), o = qe(`0x${i.slice(130)}`), u = Er(o);
|
|
3786
3786
|
return r.Signature.fromCompact(i.substring(2, 130)).addRecoveryBit(u);
|
|
3787
3787
|
})().recoverPublicKey(n.substring(2)).toHex(!1)}`;
|
|
3788
3788
|
}
|
|
@@ -3983,9 +3983,9 @@ function vo(t) {
|
|
|
3983
3983
|
const { chainId: e, contractAddress: n, nonce: r, to: s } = t, a = Nt(rn([
|
|
3984
3984
|
"0x05",
|
|
3985
3985
|
yo([
|
|
3986
|
-
e ?
|
|
3986
|
+
e ? M(e) : "0x",
|
|
3987
3987
|
n,
|
|
3988
|
-
r ?
|
|
3988
|
+
r ? M(r) : "0x"
|
|
3989
3989
|
])
|
|
3990
3990
|
]));
|
|
3991
3991
|
return s === "bytes" ? ye(a) : a;
|
|
@@ -4103,7 +4103,7 @@ Object.defineProperty(Yt, "nodeMessage", {
|
|
|
4103
4103
|
writable: !0,
|
|
4104
4104
|
value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
|
|
4105
4105
|
});
|
|
4106
|
-
class
|
|
4106
|
+
class Mn extends y {
|
|
4107
4107
|
constructor({ cause: e, maxFeePerGas: n } = {}) {
|
|
4108
4108
|
super(`The fee cap (\`maxFeePerGas\`${n ? ` = ${U(n)}` : ""} gwei) cannot be lower than the block base fee.`, {
|
|
4109
4109
|
cause: e,
|
|
@@ -4111,18 +4111,18 @@ class On extends y {
|
|
|
4111
4111
|
});
|
|
4112
4112
|
}
|
|
4113
4113
|
}
|
|
4114
|
-
Object.defineProperty(
|
|
4114
|
+
Object.defineProperty(Mn, "nodeMessage", {
|
|
4115
4115
|
enumerable: !0,
|
|
4116
4116
|
configurable: !0,
|
|
4117
4117
|
writable: !0,
|
|
4118
4118
|
value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
|
|
4119
4119
|
});
|
|
4120
|
-
class
|
|
4120
|
+
class On extends y {
|
|
4121
4121
|
constructor({ cause: e, nonce: n } = {}) {
|
|
4122
4122
|
super(`Nonce provided for the transaction ${n ? `(${n}) ` : ""}is higher than the next one expected.`, { cause: e, name: "NonceTooHighError" });
|
|
4123
4123
|
}
|
|
4124
4124
|
}
|
|
4125
|
-
Object.defineProperty(
|
|
4125
|
+
Object.defineProperty(On, "nodeMessage", {
|
|
4126
4126
|
enumerable: !0,
|
|
4127
4127
|
configurable: !0,
|
|
4128
4128
|
writable: !0,
|
|
@@ -4374,7 +4374,7 @@ class bs extends y {
|
|
|
4374
4374
|
}
|
|
4375
4375
|
}
|
|
4376
4376
|
const ko = -1;
|
|
4377
|
-
class
|
|
4377
|
+
class q extends y {
|
|
4378
4378
|
constructor(e, { code: n, docsPath: r, metaMessages: s, name: a, shortMessage: i }) {
|
|
4379
4379
|
super(i, {
|
|
4380
4380
|
cause: e,
|
|
@@ -4389,7 +4389,7 @@ class H extends y {
|
|
|
4389
4389
|
}), this.name = a || e.name, this.code = e instanceof bs ? e.code : n ?? ko;
|
|
4390
4390
|
}
|
|
4391
4391
|
}
|
|
4392
|
-
class Ye extends
|
|
4392
|
+
class Ye extends q {
|
|
4393
4393
|
constructor(e, n) {
|
|
4394
4394
|
super(e, n), Object.defineProperty(this, "data", {
|
|
4395
4395
|
enumerable: !0,
|
|
@@ -4399,7 +4399,7 @@ class Ye extends H {
|
|
|
4399
4399
|
}), this.data = n.data;
|
|
4400
4400
|
}
|
|
4401
4401
|
}
|
|
4402
|
-
class wt extends
|
|
4402
|
+
class wt extends q {
|
|
4403
4403
|
constructor(e) {
|
|
4404
4404
|
super(e, {
|
|
4405
4405
|
code: wt.code,
|
|
@@ -4414,7 +4414,7 @@ Object.defineProperty(wt, "code", {
|
|
|
4414
4414
|
writable: !0,
|
|
4415
4415
|
value: -32700
|
|
4416
4416
|
});
|
|
4417
|
-
class xt extends
|
|
4417
|
+
class xt extends q {
|
|
4418
4418
|
constructor(e) {
|
|
4419
4419
|
super(e, {
|
|
4420
4420
|
code: xt.code,
|
|
@@ -4429,7 +4429,7 @@ Object.defineProperty(xt, "code", {
|
|
|
4429
4429
|
writable: !0,
|
|
4430
4430
|
value: -32600
|
|
4431
4431
|
});
|
|
4432
|
-
class _t extends
|
|
4432
|
+
class _t extends q {
|
|
4433
4433
|
constructor(e, { method: n } = {}) {
|
|
4434
4434
|
super(e, {
|
|
4435
4435
|
code: _t.code,
|
|
@@ -4444,7 +4444,7 @@ Object.defineProperty(_t, "code", {
|
|
|
4444
4444
|
writable: !0,
|
|
4445
4445
|
value: -32601
|
|
4446
4446
|
});
|
|
4447
|
-
class Pt extends
|
|
4447
|
+
class Pt extends q {
|
|
4448
4448
|
constructor(e) {
|
|
4449
4449
|
super(e, {
|
|
4450
4450
|
code: Pt.code,
|
|
@@ -4463,22 +4463,22 @@ Object.defineProperty(Pt, "code", {
|
|
|
4463
4463
|
writable: !0,
|
|
4464
4464
|
value: -32602
|
|
4465
4465
|
});
|
|
4466
|
-
class
|
|
4466
|
+
class Me extends q {
|
|
4467
4467
|
constructor(e) {
|
|
4468
4468
|
super(e, {
|
|
4469
|
-
code:
|
|
4469
|
+
code: Me.code,
|
|
4470
4470
|
name: "InternalRpcError",
|
|
4471
4471
|
shortMessage: "An internal error was received."
|
|
4472
4472
|
});
|
|
4473
4473
|
}
|
|
4474
4474
|
}
|
|
4475
|
-
Object.defineProperty(
|
|
4475
|
+
Object.defineProperty(Me, "code", {
|
|
4476
4476
|
enumerable: !0,
|
|
4477
4477
|
configurable: !0,
|
|
4478
4478
|
writable: !0,
|
|
4479
4479
|
value: -32603
|
|
4480
4480
|
});
|
|
4481
|
-
class Et extends
|
|
4481
|
+
class Et extends q {
|
|
4482
4482
|
constructor(e) {
|
|
4483
4483
|
super(e, {
|
|
4484
4484
|
code: Et.code,
|
|
@@ -4497,7 +4497,7 @@ Object.defineProperty(Et, "code", {
|
|
|
4497
4497
|
writable: !0,
|
|
4498
4498
|
value: -32e3
|
|
4499
4499
|
});
|
|
4500
|
-
class At extends
|
|
4500
|
+
class At extends q {
|
|
4501
4501
|
constructor(e) {
|
|
4502
4502
|
super(e, {
|
|
4503
4503
|
code: At.code,
|
|
@@ -4517,7 +4517,7 @@ Object.defineProperty(At, "code", {
|
|
|
4517
4517
|
writable: !0,
|
|
4518
4518
|
value: -32001
|
|
4519
4519
|
});
|
|
4520
|
-
class Ct extends
|
|
4520
|
+
class Ct extends q {
|
|
4521
4521
|
constructor(e) {
|
|
4522
4522
|
super(e, {
|
|
4523
4523
|
code: Ct.code,
|
|
@@ -4532,7 +4532,7 @@ Object.defineProperty(Ct, "code", {
|
|
|
4532
4532
|
writable: !0,
|
|
4533
4533
|
value: -32002
|
|
4534
4534
|
});
|
|
4535
|
-
class Tt extends
|
|
4535
|
+
class Tt extends q {
|
|
4536
4536
|
constructor(e) {
|
|
4537
4537
|
super(e, {
|
|
4538
4538
|
code: Tt.code,
|
|
@@ -4547,7 +4547,7 @@ Object.defineProperty(Tt, "code", {
|
|
|
4547
4547
|
writable: !0,
|
|
4548
4548
|
value: -32003
|
|
4549
4549
|
});
|
|
4550
|
-
class $t extends
|
|
4550
|
+
class $t extends q {
|
|
4551
4551
|
constructor(e, { method: n } = {}) {
|
|
4552
4552
|
super(e, {
|
|
4553
4553
|
code: $t.code,
|
|
@@ -4562,7 +4562,7 @@ Object.defineProperty($t, "code", {
|
|
|
4562
4562
|
writable: !0,
|
|
4563
4563
|
value: -32004
|
|
4564
4564
|
});
|
|
4565
|
-
class Ke extends
|
|
4565
|
+
class Ke extends q {
|
|
4566
4566
|
constructor(e) {
|
|
4567
4567
|
super(e, {
|
|
4568
4568
|
code: Ke.code,
|
|
@@ -4577,7 +4577,7 @@ Object.defineProperty(Ke, "code", {
|
|
|
4577
4577
|
writable: !0,
|
|
4578
4578
|
value: -32005
|
|
4579
4579
|
});
|
|
4580
|
-
class kt extends
|
|
4580
|
+
class kt extends q {
|
|
4581
4581
|
constructor(e) {
|
|
4582
4582
|
super(e, {
|
|
4583
4583
|
code: kt.code,
|
|
@@ -4592,16 +4592,16 @@ Object.defineProperty(kt, "code", {
|
|
|
4592
4592
|
writable: !0,
|
|
4593
4593
|
value: -32006
|
|
4594
4594
|
});
|
|
4595
|
-
class
|
|
4595
|
+
class De extends Ye {
|
|
4596
4596
|
constructor(e) {
|
|
4597
4597
|
super(e, {
|
|
4598
|
-
code:
|
|
4598
|
+
code: De.code,
|
|
4599
4599
|
name: "UserRejectedRequestError",
|
|
4600
4600
|
shortMessage: "User rejected the request."
|
|
4601
4601
|
});
|
|
4602
4602
|
}
|
|
4603
4603
|
}
|
|
4604
|
-
Object.defineProperty(
|
|
4604
|
+
Object.defineProperty(De, "code", {
|
|
4605
4605
|
enumerable: !0,
|
|
4606
4606
|
configurable: !0,
|
|
4607
4607
|
writable: !0,
|
|
@@ -4652,37 +4652,37 @@ Object.defineProperty(Rt, "code", {
|
|
|
4652
4652
|
writable: !0,
|
|
4653
4653
|
value: 4900
|
|
4654
4654
|
});
|
|
4655
|
-
class
|
|
4655
|
+
class Mt extends Ye {
|
|
4656
4656
|
constructor(e) {
|
|
4657
4657
|
super(e, {
|
|
4658
|
-
code:
|
|
4658
|
+
code: Mt.code,
|
|
4659
4659
|
name: "ChainDisconnectedError",
|
|
4660
4660
|
shortMessage: "The Provider is not connected to the requested chain."
|
|
4661
4661
|
});
|
|
4662
4662
|
}
|
|
4663
4663
|
}
|
|
4664
|
-
Object.defineProperty(
|
|
4664
|
+
Object.defineProperty(Mt, "code", {
|
|
4665
4665
|
enumerable: !0,
|
|
4666
4666
|
configurable: !0,
|
|
4667
4667
|
writable: !0,
|
|
4668
4668
|
value: 4901
|
|
4669
4669
|
});
|
|
4670
|
-
class
|
|
4670
|
+
class Ot extends Ye {
|
|
4671
4671
|
constructor(e) {
|
|
4672
4672
|
super(e, {
|
|
4673
|
-
code:
|
|
4673
|
+
code: Ot.code,
|
|
4674
4674
|
name: "SwitchChainError",
|
|
4675
4675
|
shortMessage: "An error occurred when attempting to switch chain."
|
|
4676
4676
|
});
|
|
4677
4677
|
}
|
|
4678
4678
|
}
|
|
4679
|
-
Object.defineProperty(
|
|
4679
|
+
Object.defineProperty(Ot, "code", {
|
|
4680
4680
|
enumerable: !0,
|
|
4681
4681
|
configurable: !0,
|
|
4682
4682
|
writable: !0,
|
|
4683
4683
|
value: 4902
|
|
4684
4684
|
});
|
|
4685
|
-
class Io extends
|
|
4685
|
+
class Io extends q {
|
|
4686
4686
|
constructor(e) {
|
|
4687
4687
|
super(e, {
|
|
4688
4688
|
name: "UnknownRpcError",
|
|
@@ -4701,10 +4701,10 @@ function sr(t, e) {
|
|
|
4701
4701
|
}) : Yt.nodeMessage.test(n) ? new Yt({
|
|
4702
4702
|
cause: t,
|
|
4703
4703
|
maxFeePerGas: e == null ? void 0 : e.maxFeePerGas
|
|
4704
|
-
}) :
|
|
4704
|
+
}) : Mn.nodeMessage.test(n) ? new Mn({
|
|
4705
4705
|
cause: t,
|
|
4706
4706
|
maxFeePerGas: e == null ? void 0 : e.maxFeePerGas
|
|
4707
|
-
}) :
|
|
4707
|
+
}) : On.nodeMessage.test(n) ? new On({ cause: t, nonce: e == null ? void 0 : e.nonce }) : jn.nodeMessage.test(n) ? new jn({ cause: t, nonce: e == null ? void 0 : e.nonce }) : Bn.nodeMessage.test(n) ? new Bn({ cause: t, nonce: e == null ? void 0 : e.nonce }) : Nn.nodeMessage.test(n) ? new Nn({ cause: t }) : Fn.nodeMessage.test(n) ? new Fn({ cause: t, gas: e == null ? void 0 : e.gas }) : zn.nodeMessage.test(n) ? new zn({ cause: t, gas: e == null ? void 0 : e.gas }) : Zn.nodeMessage.test(n) ? new Zn({ cause: t }) : Xt.nodeMessage.test(n) ? new Xt({
|
|
4708
4708
|
cause: t,
|
|
4709
4709
|
maxFeePerGas: e == null ? void 0 : e.maxFeePerGas,
|
|
4710
4710
|
maxPriorityFeePerGas: e == null ? void 0 : e.maxPriorityFeePerGas
|
|
@@ -4743,17 +4743,17 @@ const Ro = {
|
|
|
4743
4743
|
};
|
|
4744
4744
|
function ir(t) {
|
|
4745
4745
|
const e = {};
|
|
4746
|
-
return typeof t.authorizationList < "u" && (e.authorizationList =
|
|
4746
|
+
return typeof t.authorizationList < "u" && (e.authorizationList = Mo(t.authorizationList)), typeof t.accessList < "u" && (e.accessList = t.accessList), typeof t.blobVersionedHashes < "u" && (e.blobVersionedHashes = t.blobVersionedHashes), typeof t.blobs < "u" && (typeof t.blobs[0] != "string" ? e.blobs = t.blobs.map((n) => G(n)) : e.blobs = t.blobs), typeof t.data < "u" && (e.data = t.data), typeof t.from < "u" && (e.from = t.from), typeof t.gas < "u" && (e.gas = M(t.gas)), typeof t.gasPrice < "u" && (e.gasPrice = M(t.gasPrice)), typeof t.maxFeePerBlobGas < "u" && (e.maxFeePerBlobGas = M(t.maxFeePerBlobGas)), typeof t.maxFeePerGas < "u" && (e.maxFeePerGas = M(t.maxFeePerGas)), typeof t.maxPriorityFeePerGas < "u" && (e.maxPriorityFeePerGas = M(t.maxPriorityFeePerGas)), typeof t.nonce < "u" && (e.nonce = M(t.nonce)), typeof t.to < "u" && (e.to = t.to), typeof t.type < "u" && (e.type = Ro[t.type]), typeof t.value < "u" && (e.value = M(t.value)), e;
|
|
4747
4747
|
}
|
|
4748
|
-
function
|
|
4748
|
+
function Mo(t) {
|
|
4749
4749
|
return t.map((e) => ({
|
|
4750
4750
|
address: e.contractAddress,
|
|
4751
4751
|
r: e.r,
|
|
4752
4752
|
s: e.s,
|
|
4753
|
-
chainId:
|
|
4754
|
-
nonce:
|
|
4755
|
-
...typeof e.yParity < "u" ? { yParity:
|
|
4756
|
-
...typeof e.v < "u" && typeof e.yParity > "u" ? { v:
|
|
4753
|
+
chainId: M(e.chainId),
|
|
4754
|
+
nonce: M(e.nonce),
|
|
4755
|
+
...typeof e.yParity < "u" ? { yParity: M(e.yParity) } : {},
|
|
4756
|
+
...typeof e.v < "u" && typeof e.yParity > "u" ? { v: M(e.v) } : {}
|
|
4757
4757
|
}));
|
|
4758
4758
|
}
|
|
4759
4759
|
function Z(t, e, n) {
|
|
@@ -4763,7 +4763,7 @@ function Z(t, e, n) {
|
|
|
4763
4763
|
const s = t[n];
|
|
4764
4764
|
return typeof s == "function" ? s : (a) => e(t, a);
|
|
4765
4765
|
}
|
|
4766
|
-
const
|
|
4766
|
+
const Oo = 2n ** 256n - 1n;
|
|
4767
4767
|
function un(t) {
|
|
4768
4768
|
const { account: e, gasPrice: n, maxFeePerGas: r, maxPriorityFeePerGas: s, to: a } = t, i = e ? ue(e) : void 0;
|
|
4769
4769
|
if (i && !Ee(i.address))
|
|
@@ -4772,7 +4772,7 @@ function un(t) {
|
|
|
4772
4772
|
throw new vt({ address: a });
|
|
4773
4773
|
if (typeof n < "u" && (typeof r < "u" || typeof s < "u"))
|
|
4774
4774
|
throw new Ao();
|
|
4775
|
-
if (r && r >
|
|
4775
|
+
if (r && r > Oo)
|
|
4776
4776
|
throw new Yt({ maxFeePerGas: r });
|
|
4777
4777
|
if (s && r && s > r)
|
|
4778
4778
|
throw new Xt({ maxFeePerGas: r, maxPriorityFeePerGas: s });
|
|
@@ -4781,7 +4781,7 @@ async function gs(t) {
|
|
|
4781
4781
|
const e = await t.request({
|
|
4782
4782
|
method: "eth_chainId"
|
|
4783
4783
|
}, { dedupe: !0 });
|
|
4784
|
-
return
|
|
4784
|
+
return qe(e);
|
|
4785
4785
|
}
|
|
4786
4786
|
class jo extends y {
|
|
4787
4787
|
constructor() {
|
|
@@ -4820,13 +4820,13 @@ function zo(t) {
|
|
|
4820
4820
|
...t,
|
|
4821
4821
|
blockHash: t.blockHash ? t.blockHash : null,
|
|
4822
4822
|
blockNumber: t.blockNumber ? BigInt(t.blockNumber) : null,
|
|
4823
|
-
chainId: t.chainId ?
|
|
4823
|
+
chainId: t.chainId ? qe(t.chainId) : void 0,
|
|
4824
4824
|
gas: t.gas ? BigInt(t.gas) : void 0,
|
|
4825
4825
|
gasPrice: t.gasPrice ? BigInt(t.gasPrice) : void 0,
|
|
4826
4826
|
maxFeePerBlobGas: t.maxFeePerBlobGas ? BigInt(t.maxFeePerBlobGas) : void 0,
|
|
4827
4827
|
maxFeePerGas: t.maxFeePerGas ? BigInt(t.maxFeePerGas) : void 0,
|
|
4828
4828
|
maxPriorityFeePerGas: t.maxPriorityFeePerGas ? BigInt(t.maxPriorityFeePerGas) : void 0,
|
|
4829
|
-
nonce: t.nonce ?
|
|
4829
|
+
nonce: t.nonce ? qe(t.nonce) : void 0,
|
|
4830
4830
|
to: t.to ? t.to : null,
|
|
4831
4831
|
transactionIndex: t.transactionIndex ? Number(t.transactionIndex) : null,
|
|
4832
4832
|
type: t.type ? Fo[t.type] : void 0,
|
|
@@ -4857,7 +4857,7 @@ function Zo(t) {
|
|
|
4857
4857
|
yParity: Number(e.yParity)
|
|
4858
4858
|
}));
|
|
4859
4859
|
}
|
|
4860
|
-
function
|
|
4860
|
+
function Do(t) {
|
|
4861
4861
|
const e = (t.transactions ?? []).map((n) => typeof n == "string" ? n : zo(n));
|
|
4862
4862
|
return {
|
|
4863
4863
|
...t,
|
|
@@ -4879,7 +4879,7 @@ function Lo(t) {
|
|
|
4879
4879
|
}
|
|
4880
4880
|
async function Qt(t, { blockHash: e, blockNumber: n, blockTag: r, includeTransactions: s } = {}) {
|
|
4881
4881
|
var d, l, f;
|
|
4882
|
-
const a = r ?? "latest", i = s ?? !1, o = n !== void 0 ?
|
|
4882
|
+
const a = r ?? "latest", i = s ?? !1, o = n !== void 0 ? M(n) : void 0;
|
|
4883
4883
|
let u = null;
|
|
4884
4884
|
if (e ? u = await t.request({
|
|
4885
4885
|
method: "eth_getBlockByHash",
|
|
@@ -4889,7 +4889,7 @@ async function Qt(t, { blockHash: e, blockNumber: n, blockTag: r, includeTransac
|
|
|
4889
4889
|
params: [o || a, i]
|
|
4890
4890
|
}, { dedupe: !!o }), !u)
|
|
4891
4891
|
throw new No({ blockHash: e, blockNumber: n });
|
|
4892
|
-
return (((f = (l = (d = t.chain) == null ? void 0 : d.formatters) == null ? void 0 : l.block) == null ? void 0 : f.format) ||
|
|
4892
|
+
return (((f = (l = (d = t.chain) == null ? void 0 : d.formatters) == null ? void 0 : l.block) == null ? void 0 : f.format) || Do)(u);
|
|
4893
4893
|
}
|
|
4894
4894
|
async function vs(t) {
|
|
4895
4895
|
const e = await t.request({
|
|
@@ -4897,7 +4897,7 @@ async function vs(t) {
|
|
|
4897
4897
|
});
|
|
4898
4898
|
return BigInt(e);
|
|
4899
4899
|
}
|
|
4900
|
-
async function
|
|
4900
|
+
async function Lo(t, e) {
|
|
4901
4901
|
var a, i;
|
|
4902
4902
|
const { block: n, chain: r = t.chain, request: s } = e || {};
|
|
4903
4903
|
try {
|
|
@@ -4956,7 +4956,7 @@ async function Cr(t, e) {
|
|
|
4956
4956
|
if (a === "eip1559") {
|
|
4957
4957
|
if (typeof d.baseFeePerGas != "bigint")
|
|
4958
4958
|
throw new or();
|
|
4959
|
-
const v = typeof (s == null ? void 0 : s.maxPriorityFeePerGas) == "bigint" ? s.maxPriorityFeePerGas : await
|
|
4959
|
+
const v = typeof (s == null ? void 0 : s.maxPriorityFeePerGas) == "bigint" ? s.maxPriorityFeePerGas : await Lo(t, {
|
|
4960
4960
|
block: d,
|
|
4961
4961
|
chain: r,
|
|
4962
4962
|
request: s
|
|
@@ -5018,7 +5018,7 @@ class Go extends y {
|
|
|
5018
5018
|
});
|
|
5019
5019
|
}
|
|
5020
5020
|
}
|
|
5021
|
-
class
|
|
5021
|
+
class qo extends y {
|
|
5022
5022
|
constructor() {
|
|
5023
5023
|
super("state and stateDiff are set on the same account.", {
|
|
5024
5024
|
name: "StateAssignmentConflictError"
|
|
@@ -5029,7 +5029,7 @@ function Tr(t) {
|
|
|
5029
5029
|
return t.reduce((e, { slot: n, value: r }) => `${e} ${n}: ${r}
|
|
5030
5030
|
`, "");
|
|
5031
5031
|
}
|
|
5032
|
-
function
|
|
5032
|
+
function Wo(t) {
|
|
5033
5033
|
return t.reduce((e, { address: n, ...r }) => {
|
|
5034
5034
|
let s = `${e} ${n}:
|
|
5035
5035
|
`;
|
|
@@ -5060,11 +5060,11 @@ function $r(t) {
|
|
|
5060
5060
|
return e[n] = r, e;
|
|
5061
5061
|
}, {});
|
|
5062
5062
|
}
|
|
5063
|
-
function
|
|
5063
|
+
function Ho(t) {
|
|
5064
5064
|
const { balance: e, nonce: n, state: r, stateDiff: s, code: a } = t, i = {};
|
|
5065
|
-
if (a !== void 0 && (i.code = a), e !== void 0 && (i.balance =
|
|
5065
|
+
if (a !== void 0 && (i.code = a), e !== void 0 && (i.balance = M(e)), n !== void 0 && (i.nonce = M(n)), r !== void 0 && (i.state = $r(r)), s !== void 0) {
|
|
5066
5066
|
if (i.state)
|
|
5067
|
-
throw new
|
|
5067
|
+
throw new qo();
|
|
5068
5068
|
i.stateDiff = $r(s);
|
|
5069
5069
|
}
|
|
5070
5070
|
return i;
|
|
@@ -5078,12 +5078,12 @@ function ws(t) {
|
|
|
5078
5078
|
throw new vt({ address: n });
|
|
5079
5079
|
if (e[n])
|
|
5080
5080
|
throw new Go({ address: n });
|
|
5081
|
-
e[n] =
|
|
5081
|
+
e[n] = Ho(r);
|
|
5082
5082
|
}
|
|
5083
5083
|
return e;
|
|
5084
5084
|
}
|
|
5085
5085
|
async function Ko(t, { address: e, blockNumber: n, blockTag: r = "latest" }) {
|
|
5086
|
-
const s = n ?
|
|
5086
|
+
const s = n ? M(n) : void 0, a = await t.request({
|
|
5087
5087
|
method: "eth_getBalance",
|
|
5088
5088
|
params: [e, s || r]
|
|
5089
5089
|
});
|
|
@@ -5100,14 +5100,14 @@ async function Jo(t, e) {
|
|
|
5100
5100
|
params: Te ? [J, X ?? "latest", Te] : X ? [J, X] : [J]
|
|
5101
5101
|
});
|
|
5102
5102
|
};
|
|
5103
|
-
const { accessList: o, authorizationList: u, blobs: c, blobVersionedHashes: d, blockNumber: l, blockTag: f, data: m, gas: v, gasPrice: $, maxFeePerBlobGas: P, maxFeePerGas: S, maxPriorityFeePerGas: R, nonce: A, value:
|
|
5103
|
+
const { accessList: o, authorizationList: u, blobs: c, blobVersionedHashes: d, blockNumber: l, blockTag: f, data: m, gas: v, gasPrice: $, maxFeePerBlobGas: P, maxFeePerGas: S, maxPriorityFeePerGas: R, nonce: A, value: O, stateOverride: H, ...F } = await Cs(t, {
|
|
5104
5104
|
...e,
|
|
5105
5105
|
parameters: (
|
|
5106
5106
|
// Some RPC Providers do not compute versioned hashes from blobs. We will need
|
|
5107
5107
|
// to compute them.
|
|
5108
5108
|
(r == null ? void 0 : r.type) === "local" ? void 0 : ["blobVersionedHashes"]
|
|
5109
5109
|
)
|
|
5110
|
-
}), re = (l ?
|
|
5110
|
+
}), re = (l ? M(l) : void 0) || f, C = ws(H), B = await (async () => {
|
|
5111
5111
|
if (F.to)
|
|
5112
5112
|
return F.to;
|
|
5113
5113
|
if (u && u.length > 0)
|
|
@@ -5134,7 +5134,7 @@ async function Jo(t, e) {
|
|
|
5134
5134
|
maxPriorityFeePerGas: R,
|
|
5135
5135
|
nonce: A,
|
|
5136
5136
|
to: B,
|
|
5137
|
-
value:
|
|
5137
|
+
value: O
|
|
5138
5138
|
});
|
|
5139
5139
|
let se = BigInt(await de({ block: re, request: K, rpcStateOverride: C }));
|
|
5140
5140
|
if (u) {
|
|
@@ -5146,7 +5146,7 @@ async function Jo(t, e) {
|
|
|
5146
5146
|
data: m,
|
|
5147
5147
|
from: r == null ? void 0 : r.address,
|
|
5148
5148
|
to: Te,
|
|
5149
|
-
value:
|
|
5149
|
+
value: M(V)
|
|
5150
5150
|
},
|
|
5151
5151
|
rpcStateOverride: C
|
|
5152
5152
|
}).catch(() => 100000n);
|
|
@@ -5166,9 +5166,9 @@ async function Jo(t, e) {
|
|
|
5166
5166
|
async function Yo(t, { address: e, blockTag: n = "latest", blockNumber: r }) {
|
|
5167
5167
|
const s = await t.request({
|
|
5168
5168
|
method: "eth_getTransactionCount",
|
|
5169
|
-
params: [e, r ?
|
|
5169
|
+
params: [e, r ? M(r) : n]
|
|
5170
5170
|
}, { dedupe: !!r });
|
|
5171
|
-
return
|
|
5171
|
+
return qe(s);
|
|
5172
5172
|
}
|
|
5173
5173
|
function xs(t) {
|
|
5174
5174
|
const { kzg: e } = t, n = t.to ?? (typeof t.blobs[0] == "string" ? "hex" : "bytes"), r = typeof t.blobs[0] == "string" ? t.blobs.map((a) => ye(a)) : t.blobs, s = [];
|
|
@@ -5361,7 +5361,7 @@ async function ic(t, { serializedTransaction: e }) {
|
|
|
5361
5361
|
}
|
|
5362
5362
|
const vn = new sn(128);
|
|
5363
5363
|
async function oc(t, e) {
|
|
5364
|
-
var S, R, A,
|
|
5364
|
+
var S, R, A, O;
|
|
5365
5365
|
const { account: n = t.account, chain: r = t.chain, accessList: s, authorizationList: a, blobs: i, data: o, gas: u, gasPrice: c, maxFeePerBlobGas: d, maxFeePerGas: l, maxPriorityFeePerGas: f, nonce: m, value: v, ...$ } = e;
|
|
5366
5366
|
if (typeof n > "u")
|
|
5367
5367
|
throw new us({
|
|
@@ -5370,7 +5370,7 @@ async function oc(t, e) {
|
|
|
5370
5370
|
const P = n ? ue(n) : null;
|
|
5371
5371
|
try {
|
|
5372
5372
|
un(e);
|
|
5373
|
-
const
|
|
5373
|
+
const H = await (async () => {
|
|
5374
5374
|
if (e.to)
|
|
5375
5375
|
return e.to;
|
|
5376
5376
|
if (a && a.length > 0)
|
|
@@ -5401,7 +5401,7 @@ async function oc(t, e) {
|
|
|
5401
5401
|
maxFeePerGas: l,
|
|
5402
5402
|
maxPriorityFeePerGas: f,
|
|
5403
5403
|
nonce: m,
|
|
5404
|
-
to:
|
|
5404
|
+
to: H,
|
|
5405
5405
|
value: v
|
|
5406
5406
|
}), B = vn.get(t.uid), Ce = B ? "wallet_sendTransaction" : "eth_sendTransaction";
|
|
5407
5407
|
try {
|
|
@@ -5442,8 +5442,8 @@ async function oc(t, e) {
|
|
|
5442
5442
|
parameters: [...As, "sidecars"],
|
|
5443
5443
|
value: v,
|
|
5444
5444
|
...$,
|
|
5445
|
-
to:
|
|
5446
|
-
}), Y = (
|
|
5445
|
+
to: H
|
|
5446
|
+
}), Y = (O = r == null ? void 0 : r.serializers) == null ? void 0 : O.transaction, re = await P.signTransaction(F, {
|
|
5447
5447
|
serializer: Y
|
|
5448
5448
|
});
|
|
5449
5449
|
return await Z(t, ic, "sendRawTransaction")({
|
|
@@ -5460,8 +5460,8 @@ async function oc(t, e) {
|
|
|
5460
5460
|
docsPath: "/docs/actions/wallet/sendTransaction",
|
|
5461
5461
|
type: P == null ? void 0 : P.type
|
|
5462
5462
|
});
|
|
5463
|
-
} catch (
|
|
5464
|
-
throw
|
|
5463
|
+
} catch (H) {
|
|
5464
|
+
throw H instanceof gn ? H : So(H, {
|
|
5465
5465
|
...e,
|
|
5466
5466
|
account: P,
|
|
5467
5467
|
chain: e.chain || void 0
|
|
@@ -5518,18 +5518,18 @@ function cc(t, e = {}) {
|
|
|
5518
5518
|
}
|
|
5519
5519
|
function uc(t, e = {}) {
|
|
5520
5520
|
let n = t;
|
|
5521
|
-
if (typeof e.size < "u" && (ce(n, { size: e.size }), n =
|
|
5521
|
+
if (typeof e.size < "u" && (ce(n, { size: e.size }), n = Hn(n)), n.length > 1 || n[0] > 1)
|
|
5522
5522
|
throw new Ii(n);
|
|
5523
5523
|
return !!n[0];
|
|
5524
5524
|
}
|
|
5525
5525
|
function pe(t, e = {}) {
|
|
5526
5526
|
typeof e.size < "u" && ce(t, { size: e.size });
|
|
5527
5527
|
const n = G(t, e);
|
|
5528
|
-
return
|
|
5528
|
+
return qe(n, e);
|
|
5529
5529
|
}
|
|
5530
5530
|
function dc(t, e = {}) {
|
|
5531
5531
|
let n = t;
|
|
5532
|
-
return typeof e.size < "u" && (ce(n, { size: e.size }), n =
|
|
5532
|
+
return typeof e.size < "u" && (ce(n, { size: e.size }), n = Hn(n, { dir: "right" })), new TextDecoder().decode(n);
|
|
5533
5533
|
}
|
|
5534
5534
|
function Ts(t, e) {
|
|
5535
5535
|
const n = typeof e == "string" ? ye(e) : e, r = nr(n);
|
|
@@ -5546,14 +5546,14 @@ function Ts(t, e) {
|
|
|
5546
5546
|
for (let i = 0; i < t.length; ++i) {
|
|
5547
5547
|
const o = t[i];
|
|
5548
5548
|
r.setPosition(s);
|
|
5549
|
-
const [u, c] =
|
|
5549
|
+
const [u, c] = Le(r, o, {
|
|
5550
5550
|
staticPosition: 0
|
|
5551
5551
|
});
|
|
5552
5552
|
s += c, a.push(u);
|
|
5553
5553
|
}
|
|
5554
5554
|
return a;
|
|
5555
5555
|
}
|
|
5556
|
-
function
|
|
5556
|
+
function Le(t, e, { staticPosition: n }) {
|
|
5557
5557
|
const r = tr(e.type);
|
|
5558
5558
|
if (r) {
|
|
5559
5559
|
const [s, a] = r;
|
|
@@ -5571,25 +5571,25 @@ function De(t, e, { staticPosition: n }) {
|
|
|
5571
5571
|
return mc(t, e);
|
|
5572
5572
|
if (e.type === "string")
|
|
5573
5573
|
return bc(t, { staticPosition: n });
|
|
5574
|
-
throw new
|
|
5574
|
+
throw new Wi(e.type, {
|
|
5575
5575
|
docsPath: "/docs/contract/decodeAbiParameters"
|
|
5576
5576
|
});
|
|
5577
5577
|
}
|
|
5578
|
-
const Rr = 32,
|
|
5578
|
+
const Rr = 32, Dn = 32;
|
|
5579
5579
|
function lc(t) {
|
|
5580
5580
|
const e = t.readBytes(32);
|
|
5581
5581
|
return [an(G(is(e, -20))), 32];
|
|
5582
5582
|
}
|
|
5583
5583
|
function fc(t, e, { length: n, staticPosition: r }) {
|
|
5584
5584
|
if (!n) {
|
|
5585
|
-
const i = pe(t.readBytes(
|
|
5585
|
+
const i = pe(t.readBytes(Dn)), o = r + i, u = o + Rr;
|
|
5586
5586
|
t.setPosition(o);
|
|
5587
5587
|
const c = pe(t.readBytes(Rr)), d = jt(e);
|
|
5588
5588
|
let l = 0;
|
|
5589
5589
|
const f = [];
|
|
5590
5590
|
for (let m = 0; m < c; ++m) {
|
|
5591
5591
|
t.setPosition(u + (d ? m * 32 : l));
|
|
5592
|
-
const [v, $] =
|
|
5592
|
+
const [v, $] = Le(t, e, {
|
|
5593
5593
|
staticPosition: u
|
|
5594
5594
|
});
|
|
5595
5595
|
l += $, f.push(v);
|
|
@@ -5597,10 +5597,10 @@ function fc(t, e, { length: n, staticPosition: r }) {
|
|
|
5597
5597
|
return t.setPosition(r + 32), [f, 32];
|
|
5598
5598
|
}
|
|
5599
5599
|
if (jt(e)) {
|
|
5600
|
-
const i = pe(t.readBytes(
|
|
5600
|
+
const i = pe(t.readBytes(Dn)), o = r + i, u = [];
|
|
5601
5601
|
for (let c = 0; c < n; ++c) {
|
|
5602
5602
|
t.setPosition(o + c * 32);
|
|
5603
|
-
const [d] =
|
|
5603
|
+
const [d] = Le(t, e, {
|
|
5604
5604
|
staticPosition: o
|
|
5605
5605
|
});
|
|
5606
5606
|
u.push(d);
|
|
@@ -5610,7 +5610,7 @@ function fc(t, e, { length: n, staticPosition: r }) {
|
|
|
5610
5610
|
let s = 0;
|
|
5611
5611
|
const a = [];
|
|
5612
5612
|
for (let i = 0; i < n; ++i) {
|
|
5613
|
-
const [o, u] =
|
|
5613
|
+
const [o, u] = Le(t, e, {
|
|
5614
5614
|
staticPosition: r + s
|
|
5615
5615
|
});
|
|
5616
5616
|
s += u, a.push(o);
|
|
@@ -5644,11 +5644,11 @@ function yc(t, e, { staticPosition: n }) {
|
|
|
5644
5644
|
const r = e.components.length === 0 || e.components.some(({ name: i }) => !i), s = r ? [] : {};
|
|
5645
5645
|
let a = 0;
|
|
5646
5646
|
if (jt(e)) {
|
|
5647
|
-
const i = pe(t.readBytes(
|
|
5647
|
+
const i = pe(t.readBytes(Dn)), o = n + i;
|
|
5648
5648
|
for (let u = 0; u < e.components.length; ++u) {
|
|
5649
5649
|
const c = e.components[u];
|
|
5650
5650
|
t.setPosition(o + a);
|
|
5651
|
-
const [d, l] =
|
|
5651
|
+
const [d, l] = Le(t, c, {
|
|
5652
5652
|
staticPosition: o
|
|
5653
5653
|
});
|
|
5654
5654
|
a += l, s[r ? u : c == null ? void 0 : c.name] = d;
|
|
@@ -5656,7 +5656,7 @@ function yc(t, e, { staticPosition: n }) {
|
|
|
5656
5656
|
return t.setPosition(n + 32), [s, 32];
|
|
5657
5657
|
}
|
|
5658
5658
|
for (let i = 0; i < e.components.length; ++i) {
|
|
5659
|
-
const o = e.components[i], [u, c] =
|
|
5659
|
+
const o = e.components[i], [u, c] = Le(t, o, {
|
|
5660
5660
|
staticPosition: n
|
|
5661
5661
|
});
|
|
5662
5662
|
s[r ? i : o == null ? void 0 : o.name] = u, a += c;
|
|
@@ -5669,7 +5669,7 @@ function bc(t, { staticPosition: e }) {
|
|
|
5669
5669
|
const s = pe(t.readBytes(32));
|
|
5670
5670
|
if (s === 0)
|
|
5671
5671
|
return t.setPosition(e + 32), ["", 32];
|
|
5672
|
-
const a = t.readBytes(s, 32), i = dc(
|
|
5672
|
+
const a = t.readBytes(s, 32), i = dc(Hn(a));
|
|
5673
5673
|
return t.setPosition(e + 32), [i, 32];
|
|
5674
5674
|
}
|
|
5675
5675
|
function jt(t) {
|
|
@@ -5687,10 +5687,10 @@ function vc(t) {
|
|
|
5687
5687
|
return gc(t);
|
|
5688
5688
|
}
|
|
5689
5689
|
const wc = "1.0.7";
|
|
5690
|
-
class
|
|
5690
|
+
class L extends Error {
|
|
5691
5691
|
constructor(e, n = {}) {
|
|
5692
5692
|
var i;
|
|
5693
|
-
const r = n.cause instanceof
|
|
5693
|
+
const r = n.cause instanceof L ? n.cause.details : (i = n.cause) != null && i.message ? n.cause.message : n.details, s = n.cause instanceof L && n.cause.docsPath || n.docsPath, a = [
|
|
5694
5694
|
e || "An error occurred.",
|
|
5695
5695
|
"",
|
|
5696
5696
|
...n.metaMessages ? [...n.metaMessages, ""] : [],
|
|
@@ -5731,18 +5731,18 @@ function Ae(t, e) {
|
|
|
5731
5731
|
const n = t.exec(e);
|
|
5732
5732
|
return n == null ? void 0 : n.groups;
|
|
5733
5733
|
}
|
|
5734
|
-
const $s = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, ks = /^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)?$/, Is = /^\(.+?\).*?$/,
|
|
5735
|
-
function
|
|
5734
|
+
const $s = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, ks = /^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)?$/, Is = /^\(.+?\).*?$/, Mr = /^tuple(?<array>(\[(\d*)\])*)$/;
|
|
5735
|
+
function Ln(t) {
|
|
5736
5736
|
let e = t.type;
|
|
5737
|
-
if (
|
|
5737
|
+
if (Mr.test(t.type) && "components" in t) {
|
|
5738
5738
|
e = "(";
|
|
5739
5739
|
const n = t.components.length;
|
|
5740
5740
|
for (let s = 0; s < n; s++) {
|
|
5741
5741
|
const a = t.components[s];
|
|
5742
|
-
e +=
|
|
5742
|
+
e += Ln(a), s < n - 1 && (e += ", ");
|
|
5743
5743
|
}
|
|
5744
|
-
const r = Ae(
|
|
5745
|
-
return e += `)${(r == null ? void 0 : r.array) ?? ""}`,
|
|
5744
|
+
const r = Ae(Mr, t.type);
|
|
5745
|
+
return e += `)${(r == null ? void 0 : r.array) ?? ""}`, Ln({
|
|
5746
5746
|
...t,
|
|
5747
5747
|
type: e
|
|
5748
5748
|
});
|
|
@@ -5754,7 +5754,7 @@ function Qe(t) {
|
|
|
5754
5754
|
const n = t.length;
|
|
5755
5755
|
for (let r = 0; r < n; r++) {
|
|
5756
5756
|
const s = t[r];
|
|
5757
|
-
e +=
|
|
5757
|
+
e += Ln(s), r !== n - 1 && (e += ", ");
|
|
5758
5758
|
}
|
|
5759
5759
|
return e;
|
|
5760
5760
|
}
|
|
@@ -5776,19 +5776,19 @@ function Ec(t) {
|
|
|
5776
5776
|
function Ac(t) {
|
|
5777
5777
|
return Ae(Rs, t);
|
|
5778
5778
|
}
|
|
5779
|
-
const
|
|
5779
|
+
const Ms = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;
|
|
5780
5780
|
function Cc(t) {
|
|
5781
|
-
return
|
|
5781
|
+
return Ms.test(t);
|
|
5782
5782
|
}
|
|
5783
5783
|
function Tc(t) {
|
|
5784
|
-
return Ae(
|
|
5784
|
+
return Ae(Ms, t);
|
|
5785
5785
|
}
|
|
5786
|
-
const
|
|
5786
|
+
const Os = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;
|
|
5787
5787
|
function js(t) {
|
|
5788
|
-
return
|
|
5788
|
+
return Os.test(t);
|
|
5789
5789
|
}
|
|
5790
5790
|
function $c(t) {
|
|
5791
|
-
return Ae(
|
|
5791
|
+
return Ae(Os, t);
|
|
5792
5792
|
}
|
|
5793
5793
|
const Bs = /^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;
|
|
5794
5794
|
function kc(t) {
|
|
@@ -5801,16 +5801,16 @@ const Sc = /^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;
|
|
|
5801
5801
|
function Rc(t) {
|
|
5802
5802
|
return Sc.test(t);
|
|
5803
5803
|
}
|
|
5804
|
-
const
|
|
5805
|
-
function
|
|
5806
|
-
return
|
|
5804
|
+
const Mc = /^receive\(\) external payable$/;
|
|
5805
|
+
function Oc(t) {
|
|
5806
|
+
return Mc.test(t);
|
|
5807
5807
|
}
|
|
5808
5808
|
const jc = /* @__PURE__ */ new Set(["indexed"]), Vn = /* @__PURE__ */ new Set([
|
|
5809
5809
|
"calldata",
|
|
5810
5810
|
"memory",
|
|
5811
5811
|
"storage"
|
|
5812
5812
|
]);
|
|
5813
|
-
class Bc extends
|
|
5813
|
+
class Bc extends L {
|
|
5814
5814
|
constructor({ type: e }) {
|
|
5815
5815
|
super("Unknown type.", {
|
|
5816
5816
|
metaMessages: [
|
|
@@ -5824,7 +5824,7 @@ class Bc extends D {
|
|
|
5824
5824
|
});
|
|
5825
5825
|
}
|
|
5826
5826
|
}
|
|
5827
|
-
class Nc extends
|
|
5827
|
+
class Nc extends L {
|
|
5828
5828
|
constructor({ type: e }) {
|
|
5829
5829
|
super("Unknown type.", {
|
|
5830
5830
|
metaMessages: [`Type "${e}" is not a valid ABI type.`]
|
|
@@ -5836,7 +5836,7 @@ class Nc extends D {
|
|
|
5836
5836
|
});
|
|
5837
5837
|
}
|
|
5838
5838
|
}
|
|
5839
|
-
class Fc extends
|
|
5839
|
+
class Fc extends L {
|
|
5840
5840
|
constructor({ param: e }) {
|
|
5841
5841
|
super("Invalid ABI parameter.", {
|
|
5842
5842
|
details: e
|
|
@@ -5848,7 +5848,7 @@ class Fc extends D {
|
|
|
5848
5848
|
});
|
|
5849
5849
|
}
|
|
5850
5850
|
}
|
|
5851
|
-
class zc extends
|
|
5851
|
+
class zc extends L {
|
|
5852
5852
|
constructor({ param: e, name: n }) {
|
|
5853
5853
|
super("Invalid ABI parameter.", {
|
|
5854
5854
|
details: e,
|
|
@@ -5863,7 +5863,7 @@ class zc extends D {
|
|
|
5863
5863
|
});
|
|
5864
5864
|
}
|
|
5865
5865
|
}
|
|
5866
|
-
class Zc extends
|
|
5866
|
+
class Zc extends L {
|
|
5867
5867
|
constructor({ param: e, type: n, modifier: r }) {
|
|
5868
5868
|
super("Invalid ABI parameter.", {
|
|
5869
5869
|
details: e,
|
|
@@ -5878,7 +5878,7 @@ class Zc extends D {
|
|
|
5878
5878
|
});
|
|
5879
5879
|
}
|
|
5880
5880
|
}
|
|
5881
|
-
class
|
|
5881
|
+
class Dc extends L {
|
|
5882
5882
|
constructor({ param: e, type: n, modifier: r }) {
|
|
5883
5883
|
super("Invalid ABI parameter.", {
|
|
5884
5884
|
details: e,
|
|
@@ -5894,7 +5894,7 @@ class Lc extends D {
|
|
|
5894
5894
|
});
|
|
5895
5895
|
}
|
|
5896
5896
|
}
|
|
5897
|
-
class
|
|
5897
|
+
class Lc extends L {
|
|
5898
5898
|
constructor({ abiParameter: e }) {
|
|
5899
5899
|
super("Invalid ABI parameter.", {
|
|
5900
5900
|
details: JSON.stringify(e, null, 2),
|
|
@@ -5907,7 +5907,7 @@ class Dc extends D {
|
|
|
5907
5907
|
});
|
|
5908
5908
|
}
|
|
5909
5909
|
}
|
|
5910
|
-
class rt extends
|
|
5910
|
+
class rt extends L {
|
|
5911
5911
|
constructor({ signature: e, type: n }) {
|
|
5912
5912
|
super(`Invalid ${n} signature.`, {
|
|
5913
5913
|
details: e
|
|
@@ -5919,7 +5919,7 @@ class rt extends D {
|
|
|
5919
5919
|
});
|
|
5920
5920
|
}
|
|
5921
5921
|
}
|
|
5922
|
-
class Vc extends
|
|
5922
|
+
class Vc extends L {
|
|
5923
5923
|
constructor({ signature: e }) {
|
|
5924
5924
|
super("Unknown signature.", {
|
|
5925
5925
|
details: e
|
|
@@ -5931,7 +5931,7 @@ class Vc extends D {
|
|
|
5931
5931
|
});
|
|
5932
5932
|
}
|
|
5933
5933
|
}
|
|
5934
|
-
class Uc extends
|
|
5934
|
+
class Uc extends L {
|
|
5935
5935
|
constructor({ signature: e }) {
|
|
5936
5936
|
super("Invalid struct signature.", {
|
|
5937
5937
|
details: e,
|
|
@@ -5944,7 +5944,7 @@ class Uc extends D {
|
|
|
5944
5944
|
});
|
|
5945
5945
|
}
|
|
5946
5946
|
}
|
|
5947
|
-
class Gc extends
|
|
5947
|
+
class Gc extends L {
|
|
5948
5948
|
constructor({ type: e }) {
|
|
5949
5949
|
super("Circular reference detected.", {
|
|
5950
5950
|
metaMessages: [`Struct "${e}" is a circular reference.`]
|
|
@@ -5956,7 +5956,7 @@ class Gc extends D {
|
|
|
5956
5956
|
});
|
|
5957
5957
|
}
|
|
5958
5958
|
}
|
|
5959
|
-
class
|
|
5959
|
+
class qc extends L {
|
|
5960
5960
|
constructor({ current: e, depth: n }) {
|
|
5961
5961
|
super("Unbalanced parentheses.", {
|
|
5962
5962
|
metaMessages: [
|
|
@@ -5971,7 +5971,7 @@ class Hc extends D {
|
|
|
5971
5971
|
});
|
|
5972
5972
|
}
|
|
5973
5973
|
}
|
|
5974
|
-
function
|
|
5974
|
+
function Wc(t, e, n) {
|
|
5975
5975
|
let r = "";
|
|
5976
5976
|
if (n)
|
|
5977
5977
|
for (const s of Object.entries(n)) {
|
|
@@ -6038,7 +6038,7 @@ const wn = /* @__PURE__ */ new Map([
|
|
|
6038
6038
|
{ type: "uint256", name: "tokenId", indexed: !0 }
|
|
6039
6039
|
]
|
|
6040
6040
|
]);
|
|
6041
|
-
function
|
|
6041
|
+
function Hc(t, e = {}) {
|
|
6042
6042
|
if (Cc(t)) {
|
|
6043
6043
|
const n = Tc(t);
|
|
6044
6044
|
if (!n)
|
|
@@ -6105,7 +6105,7 @@ function Wc(t, e = {}) {
|
|
|
6105
6105
|
}
|
|
6106
6106
|
if (Rc(t))
|
|
6107
6107
|
return { type: "fallback" };
|
|
6108
|
-
if (
|
|
6108
|
+
if (Oc(t))
|
|
6109
6109
|
return {
|
|
6110
6110
|
type: "receive",
|
|
6111
6111
|
stateMutability: "payable"
|
|
@@ -6115,7 +6115,7 @@ function Wc(t, e = {}) {
|
|
|
6115
6115
|
const Kc = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, Jc = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, Yc = /^u?int$/;
|
|
6116
6116
|
function $e(t, e) {
|
|
6117
6117
|
var l, f;
|
|
6118
|
-
const n =
|
|
6118
|
+
const n = Wc(t, e == null ? void 0 : e.type, e == null ? void 0 : e.structs);
|
|
6119
6119
|
if (wn.has(n))
|
|
6120
6120
|
return wn.get(n);
|
|
6121
6121
|
const r = Is.test(t), s = Ae(r ? Jc : Kc, t);
|
|
@@ -6145,7 +6145,7 @@ function $e(t, e) {
|
|
|
6145
6145
|
modifier: s.modifier
|
|
6146
6146
|
});
|
|
6147
6147
|
if (Vn.has(s.modifier) && !eu(u, !!s.array))
|
|
6148
|
-
throw new
|
|
6148
|
+
throw new Dc({
|
|
6149
6149
|
param: t,
|
|
6150
6150
|
type: e == null ? void 0 : e.type,
|
|
6151
6151
|
modifier: s.modifier
|
|
@@ -6177,7 +6177,7 @@ function Q(t, e = [], n = "", r = 0) {
|
|
|
6177
6177
|
if (n === "")
|
|
6178
6178
|
return e;
|
|
6179
6179
|
if (r !== 0)
|
|
6180
|
-
throw new
|
|
6180
|
+
throw new qc({ current: n, depth: r });
|
|
6181
6181
|
return e.push(n.trim()), e;
|
|
6182
6182
|
}
|
|
6183
6183
|
function Ns(t) {
|
|
@@ -6230,7 +6230,7 @@ function Fs(t, e, n = /* @__PURE__ */ new Set()) {
|
|
|
6230
6230
|
else {
|
|
6231
6231
|
const u = Ae(nu, i.type);
|
|
6232
6232
|
if (!(u != null && u.type))
|
|
6233
|
-
throw new
|
|
6233
|
+
throw new Lc({ abiParameter: i });
|
|
6234
6234
|
const { array: c, type: d } = u;
|
|
6235
6235
|
if (d in e) {
|
|
6236
6236
|
if (n.has(d))
|
|
@@ -6252,7 +6252,7 @@ function zs(t) {
|
|
|
6252
6252
|
const e = tu(t), n = [], r = t.length;
|
|
6253
6253
|
for (let s = 0; s < r; s++) {
|
|
6254
6254
|
const a = t[s];
|
|
6255
|
-
js(a) || n.push(
|
|
6255
|
+
js(a) || n.push(Hc(a, e));
|
|
6256
6256
|
}
|
|
6257
6257
|
return n;
|
|
6258
6258
|
}
|
|
@@ -6311,7 +6311,7 @@ function dr(t) {
|
|
|
6311
6311
|
return l ? Un(c, l) : !1;
|
|
6312
6312
|
})) {
|
|
6313
6313
|
if (i && "inputs" in i && i.inputs) {
|
|
6314
|
-
const c =
|
|
6314
|
+
const c = Ds(o.inputs, i.inputs, n);
|
|
6315
6315
|
if (c)
|
|
6316
6316
|
throw new Gi({
|
|
6317
6317
|
abiItem: o,
|
|
@@ -6345,11 +6345,11 @@ function Un(t, e) {
|
|
|
6345
6345
|
})) : !1;
|
|
6346
6346
|
}
|
|
6347
6347
|
}
|
|
6348
|
-
function
|
|
6348
|
+
function Ds(t, e, n) {
|
|
6349
6349
|
for (const r in t) {
|
|
6350
6350
|
const s = t[r], a = e[r];
|
|
6351
6351
|
if (s.type === "tuple" && a.type === "tuple" && "components" in s && "components" in a)
|
|
6352
|
-
return
|
|
6352
|
+
return Ds(s.components, a.components, n[r]);
|
|
6353
6353
|
const i = [s.type, a.type];
|
|
6354
6354
|
if (i.includes("address") && i.includes("bytes20") ? !0 : i.includes("address") && i.includes("string") ? Ee(n[r], { strict: !1 }) : i.includes("address") && i.includes("bytes") ? Ee(n[r], { strict: !1 }) : !1)
|
|
6355
6355
|
return i;
|
|
@@ -6375,7 +6375,7 @@ function lr(t) {
|
|
|
6375
6375
|
if (i && i.length === 1)
|
|
6376
6376
|
return i[0];
|
|
6377
6377
|
}
|
|
6378
|
-
const
|
|
6378
|
+
const Or = "/docs/contract/encodeFunctionData";
|
|
6379
6379
|
function iu(t) {
|
|
6380
6380
|
const { abi: e, args: n, functionName: r } = t;
|
|
6381
6381
|
let s = e[0];
|
|
@@ -6386,14 +6386,14 @@ function iu(t) {
|
|
|
6386
6386
|
name: r
|
|
6387
6387
|
});
|
|
6388
6388
|
if (!a)
|
|
6389
|
-
throw new Kt(r, { docsPath:
|
|
6389
|
+
throw new Kt(r, { docsPath: Or });
|
|
6390
6390
|
s = a;
|
|
6391
6391
|
}
|
|
6392
6392
|
if (s.type !== "function")
|
|
6393
|
-
throw new Kt(void 0, { docsPath:
|
|
6393
|
+
throw new Kt(void 0, { docsPath: Or });
|
|
6394
6394
|
return {
|
|
6395
6395
|
abi: [s],
|
|
6396
|
-
functionName: ur(
|
|
6396
|
+
functionName: ur(We(s))
|
|
6397
6397
|
};
|
|
6398
6398
|
}
|
|
6399
6399
|
function dn(t) {
|
|
@@ -6455,7 +6455,7 @@ function lu(t) {
|
|
|
6455
6455
|
const { abi: e, data: n } = t, r = Jt(n, 0, 4);
|
|
6456
6456
|
if (r === "0x")
|
|
6457
6457
|
throw new Xn();
|
|
6458
|
-
const a = [...e || [], uu, du].find((i) => i.type === "error" && r === ur(
|
|
6458
|
+
const a = [...e || [], uu, du].find((i) => i.type === "error" && r === ur(We(i)));
|
|
6459
6459
|
if (!a)
|
|
6460
6460
|
throw new rs(r, {
|
|
6461
6461
|
docsPath: "/docs/contract/decodeErrorResult"
|
|
@@ -6466,7 +6466,7 @@ function lu(t) {
|
|
|
6466
6466
|
errorName: a.name
|
|
6467
6467
|
};
|
|
6468
6468
|
}
|
|
6469
|
-
function
|
|
6469
|
+
function Ls({ abiItem: t, args: e, includeFunctionName: n = !0, includeName: r = !1 }) {
|
|
6470
6470
|
if ("name" in t && "inputs" in t && t.inputs)
|
|
6471
6471
|
return `${n ? t.name : ""}(${t.inputs.map((s, a) => `${r && s.name ? `${s.name}: ` : ""}${typeof e[a] == "object" ? cn(e[a]) : e[a]}`).join(", ")})`;
|
|
6472
6472
|
}
|
|
@@ -6486,7 +6486,7 @@ class fu extends y {
|
|
|
6486
6486
|
nonce: d
|
|
6487
6487
|
});
|
|
6488
6488
|
m && ($ += `
|
|
6489
|
-
${
|
|
6489
|
+
${Wo(m)}`), super(e.shortMessage, {
|
|
6490
6490
|
cause: e,
|
|
6491
6491
|
docsPath: r,
|
|
6492
6492
|
metaMessages: [
|
|
@@ -6505,12 +6505,12 @@ ${qo(m)}`), super(e.shortMessage, {
|
|
|
6505
6505
|
}
|
|
6506
6506
|
class hu extends y {
|
|
6507
6507
|
constructor(e, { abi: n, args: r, contractAddress: s, docsPath: a, functionName: i, sender: o }) {
|
|
6508
|
-
const u = dr({ abi: n, args: r, name: i }), c = u ?
|
|
6508
|
+
const u = dr({ abi: n, args: r, name: i }), c = u ? Ls({
|
|
6509
6509
|
abiItem: u,
|
|
6510
6510
|
args: r,
|
|
6511
6511
|
includeFunctionName: !1,
|
|
6512
6512
|
includeName: !1
|
|
6513
|
-
}) : void 0, d = u ?
|
|
6513
|
+
}) : void 0, d = u ? We(u, { includeName: !0 }) : void 0, l = Ft({
|
|
6514
6514
|
address: s && $o(s),
|
|
6515
6515
|
function: d,
|
|
6516
6516
|
args: c && c !== "()" && `${[...Array((i == null ? void 0 : i.length) ?? 0).keys()].map(() => " ").join("")}${c}`,
|
|
@@ -6576,7 +6576,7 @@ class pu extends y {
|
|
|
6576
6576
|
const [m] = f;
|
|
6577
6577
|
u = cu[m];
|
|
6578
6578
|
} else {
|
|
6579
|
-
const m = d ?
|
|
6579
|
+
const m = d ? We(d, { includeName: !0 }) : void 0, v = d && f ? Ls({
|
|
6580
6580
|
abiItem: d,
|
|
6581
6581
|
args: f,
|
|
6582
6582
|
includeFunctionName: !1,
|
|
@@ -6664,7 +6664,7 @@ class Vs extends y {
|
|
|
6664
6664
|
}
|
|
6665
6665
|
const bu = 3;
|
|
6666
6666
|
function fr(t, { abi: e, address: n, args: r, docsPath: s, functionName: a, sender: i }) {
|
|
6667
|
-
const o = t instanceof Vs ? t : t instanceof y ? t.walk((v) => "data" in v) || t.walk() : {}, { code: u, data: c, details: d, message: l, shortMessage: f } = o, m = t instanceof Xn ? new mu({ functionName: a }) : [bu,
|
|
6667
|
+
const o = t instanceof Vs ? t : t instanceof y ? t.walk((v) => "data" in v) || t.walk() : {}, { code: u, data: c, details: d, message: l, shortMessage: f } = o, m = t instanceof Xn ? new mu({ functionName: a }) : [bu, Me.code].includes(u) && (c || d || l || f) ? new pu({
|
|
6668
6668
|
abi: e,
|
|
6669
6669
|
data: typeof c == "object" ? c.data : c,
|
|
6670
6670
|
functionName: a,
|
|
@@ -6727,7 +6727,7 @@ function Pu({ fn: t, id: e, shouldSplitBatch: n, wait: r = 0, sort: s }) {
|
|
|
6727
6727
|
}
|
|
6728
6728
|
async function Us(t, e) {
|
|
6729
6729
|
var Ce, je, K, de;
|
|
6730
|
-
const { account: n = t.account, batch: r = !!((Ce = t.batch) != null && Ce.multicall), blockNumber: s, blockTag: a = "latest", accessList: i, blobs: o, code: u, data: c, factory: d, factoryData: l, gas: f, gasPrice: m, maxFeePerBlobGas: v, maxFeePerGas: $, maxPriorityFeePerGas: P, nonce: S, to: R, value: A, stateOverride:
|
|
6730
|
+
const { account: n = t.account, batch: r = !!((Ce = t.batch) != null && Ce.multicall), blockNumber: s, blockTag: a = "latest", accessList: i, blobs: o, code: u, data: c, factory: d, factoryData: l, gas: f, gasPrice: m, maxFeePerBlobGas: v, maxFeePerGas: $, maxPriorityFeePerGas: P, nonce: S, to: R, value: A, stateOverride: O, ...H } = e, F = n ? ue(n) : void 0;
|
|
6731
6731
|
if (u && (d || l))
|
|
6732
6732
|
throw new y("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
|
|
6733
6733
|
if (u && R)
|
|
@@ -6743,9 +6743,9 @@ async function Us(t, e) {
|
|
|
6743
6743
|
}) : c;
|
|
6744
6744
|
try {
|
|
6745
6745
|
un(e);
|
|
6746
|
-
const V = (s ?
|
|
6746
|
+
const V = (s ? M(s) : void 0) || a, X = ws(O), J = (de = (K = (je = t.chain) == null ? void 0 : je.formatters) == null ? void 0 : K.transactionRequest) == null ? void 0 : de.format, Be = (J || ir)({
|
|
6747
6747
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
6748
|
-
...ar(
|
|
6748
|
+
...ar(H, { format: J }),
|
|
6749
6749
|
from: F == null ? void 0 : F.address,
|
|
6750
6750
|
accessList: i,
|
|
6751
6751
|
blobs: o,
|
|
@@ -6780,7 +6780,7 @@ async function Us(t, e) {
|
|
|
6780
6780
|
});
|
|
6781
6781
|
return br === "0x" ? { data: void 0 } : { data: br };
|
|
6782
6782
|
} catch (se) {
|
|
6783
|
-
const V = $u(se), { offchainLookup: X, offchainLookupSignature: J } = await import("./ccip-
|
|
6783
|
+
const V = $u(se), { offchainLookup: X, offchainLookupSignature: J } = await import("./ccip-DDb_n-DK.js");
|
|
6784
6784
|
if (t.ccipRead !== !1 && (V == null ? void 0 : V.slice(0, 10)) === J && R)
|
|
6785
6785
|
return { data: await X(t, { data: V, to: R }) };
|
|
6786
6786
|
throw C && (V == null ? void 0 : V.slice(0, 10)) === "0x101bb98d" ? new yu({ factory: d }) : xu(se, {
|
|
@@ -6807,17 +6807,17 @@ async function Au(t, e) {
|
|
|
6807
6807
|
contract: "multicall3"
|
|
6808
6808
|
});
|
|
6809
6809
|
}
|
|
6810
|
-
const l = (s ?
|
|
6810
|
+
const l = (s ? M(s) : void 0) || a, { schedule: f } = Pu({
|
|
6811
6811
|
id: `${t.uid}.${l}`,
|
|
6812
6812
|
wait: r,
|
|
6813
6813
|
shouldSplitBatch(P) {
|
|
6814
6814
|
return P.reduce((R, { data: A }) => R + (A.length - 2), 0) > n * 2;
|
|
6815
6815
|
},
|
|
6816
6816
|
fn: async (P) => {
|
|
6817
|
-
const S = P.map((
|
|
6817
|
+
const S = P.map((O) => ({
|
|
6818
6818
|
allowFailure: !0,
|
|
6819
|
-
callData:
|
|
6820
|
-
target:
|
|
6819
|
+
callData: O.data,
|
|
6820
|
+
target: O.to
|
|
6821
6821
|
})), R = dn({
|
|
6822
6822
|
abi: Sr,
|
|
6823
6823
|
args: [S],
|
|
@@ -6926,7 +6926,7 @@ function Ru(t, { delay: e = 100, retryCount: n = 2, shouldRetry: r = () => !0 }
|
|
|
6926
6926
|
i();
|
|
6927
6927
|
});
|
|
6928
6928
|
}
|
|
6929
|
-
function
|
|
6929
|
+
function Mu(t, e = {}) {
|
|
6930
6930
|
return async (n, r = {}) => {
|
|
6931
6931
|
const { dedupe: s = !1, retryDelay: a = 150, retryCount: i = 3, uid: o } = {
|
|
6932
6932
|
...e,
|
|
@@ -6946,8 +6946,8 @@ function Ou(t, e = {}) {
|
|
|
6946
6946
|
throw new _t(d, { method: n.method });
|
|
6947
6947
|
case Pt.code:
|
|
6948
6948
|
throw new Pt(d);
|
|
6949
|
-
case
|
|
6950
|
-
throw new
|
|
6949
|
+
case Me.code:
|
|
6950
|
+
throw new Me(d);
|
|
6951
6951
|
case Et.code:
|
|
6952
6952
|
throw new Et(d);
|
|
6953
6953
|
case At.code:
|
|
@@ -6964,20 +6964,20 @@ function Ou(t, e = {}) {
|
|
|
6964
6964
|
throw new Ke(d);
|
|
6965
6965
|
case kt.code:
|
|
6966
6966
|
throw new kt(d);
|
|
6967
|
-
case
|
|
6968
|
-
throw new
|
|
6967
|
+
case De.code:
|
|
6968
|
+
throw new De(d);
|
|
6969
6969
|
case It.code:
|
|
6970
6970
|
throw new It(d);
|
|
6971
6971
|
case St.code:
|
|
6972
6972
|
throw new St(d);
|
|
6973
6973
|
case Rt.code:
|
|
6974
6974
|
throw new Rt(d);
|
|
6975
|
-
case Ot.code:
|
|
6976
|
-
throw new Ot(d);
|
|
6977
6975
|
case Mt.code:
|
|
6978
6976
|
throw new Mt(d);
|
|
6977
|
+
case Ot.code:
|
|
6978
|
+
throw new Ot(d);
|
|
6979
6979
|
case 5e3:
|
|
6980
|
-
throw new
|
|
6980
|
+
throw new De(d);
|
|
6981
6981
|
default:
|
|
6982
6982
|
throw c instanceof y ? c : new Io(d);
|
|
6983
6983
|
}
|
|
@@ -6993,12 +6993,12 @@ function Ou(t, e = {}) {
|
|
|
6993
6993
|
return ~~(1 << c) * a;
|
|
6994
6994
|
},
|
|
6995
6995
|
retryCount: i,
|
|
6996
|
-
shouldRetry: ({ error: c }) =>
|
|
6996
|
+
shouldRetry: ({ error: c }) => Ou(c)
|
|
6997
6997
|
}), { enabled: s, id: u });
|
|
6998
6998
|
};
|
|
6999
6999
|
}
|
|
7000
|
-
function
|
|
7001
|
-
return "code" in t && typeof t.code == "number" ? t.code === -1 || t.code === Ke.code || t.code ===
|
|
7000
|
+
function Ou(t) {
|
|
7001
|
+
return "code" in t && typeof t.code == "number" ? t.code === -1 || t.code === Ke.code || t.code === Me.code : t instanceof ys && t.status ? t.status === 403 || t.status === 408 || t.status === 413 || t.status === 429 || t.status === 500 || t.status === 502 || t.status === 503 || t.status === 504 : !0;
|
|
7002
7002
|
}
|
|
7003
7003
|
async function ju(t, e) {
|
|
7004
7004
|
const { abi: n, address: r, args: s, dataSuffix: a, functionName: i, ...o } = e, u = o.account ? ue(o.account) : t.account, c = dn({ abi: n, args: s, functionName: i });
|
|
@@ -7068,14 +7068,14 @@ async function Bu(t, e) {
|
|
|
7068
7068
|
}
|
|
7069
7069
|
}
|
|
7070
7070
|
const Gn = 256;
|
|
7071
|
-
let Zt = Gn,
|
|
7071
|
+
let Zt = Gn, Dt;
|
|
7072
7072
|
function Gs(t = 11) {
|
|
7073
|
-
if (!
|
|
7074
|
-
|
|
7073
|
+
if (!Dt || Zt + t > Gn * 2) {
|
|
7074
|
+
Dt = "", Zt = 0;
|
|
7075
7075
|
for (let e = 0; e < Gn; e++)
|
|
7076
|
-
|
|
7076
|
+
Dt += (256 + Math.random() * 256 | 0).toString(16).substring(1);
|
|
7077
7077
|
}
|
|
7078
|
-
return
|
|
7078
|
+
return Dt.substring(Zt, Zt++ + t);
|
|
7079
7079
|
}
|
|
7080
7080
|
function Nu(t) {
|
|
7081
7081
|
const { batch: e, cacheTime: n = t.pollingInterval ?? 4e3, ccipRead: r, key: s = "base", name: a = "Base Client", pollingInterval: i = 4e3, type: o = "base" } = t, u = t.chain, c = t.account ? ue(t.account) : void 0, { config: d, request: l, value: f } = t.transport({
|
|
@@ -7098,8 +7098,8 @@ function Nu(t) {
|
|
|
7098
7098
|
function $(P) {
|
|
7099
7099
|
return (S) => {
|
|
7100
7100
|
const R = S(P);
|
|
7101
|
-
for (const
|
|
7102
|
-
delete R[
|
|
7101
|
+
for (const O in v)
|
|
7102
|
+
delete R[O];
|
|
7103
7103
|
const A = { ...P, ...R };
|
|
7104
7104
|
return Object.assign(A, { extend: $(A) });
|
|
7105
7105
|
};
|
|
@@ -7118,7 +7118,7 @@ function Fu({ key: t, name: e, request: n, retryCount: r = 3, retryDelay: s = 15
|
|
|
7118
7118
|
timeout: a,
|
|
7119
7119
|
type: i
|
|
7120
7120
|
},
|
|
7121
|
-
request:
|
|
7121
|
+
request: Mu(n, { retryCount: r, retryDelay: s, uid: u }),
|
|
7122
7122
|
value: o
|
|
7123
7123
|
};
|
|
7124
7124
|
}
|
|
@@ -7200,18 +7200,18 @@ function pr(t, e, n) {
|
|
|
7200
7200
|
const s = t[n];
|
|
7201
7201
|
return typeof s == "function" ? s : (a) => e(t, a);
|
|
7202
7202
|
}
|
|
7203
|
-
const Zu = "2.13.8",
|
|
7204
|
-
var
|
|
7203
|
+
const Zu = "2.13.8", Du = () => `@wagmi/core@${Zu}`;
|
|
7204
|
+
var qs = function(t, e, n, r) {
|
|
7205
7205
|
if (n === "a" && !r) throw new TypeError("Private accessor was defined without a getter");
|
|
7206
7206
|
if (typeof e == "function" ? t !== e || !r : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
7207
7207
|
return n === "m" ? r : n === "a" ? r.call(t) : r ? r.value : e.get(t);
|
|
7208
|
-
}, en,
|
|
7209
|
-
class
|
|
7208
|
+
}, en, Ws;
|
|
7209
|
+
class Oe extends Error {
|
|
7210
7210
|
get docsBaseUrl() {
|
|
7211
7211
|
return "https://wagmi.sh/core";
|
|
7212
7212
|
}
|
|
7213
7213
|
get version() {
|
|
7214
|
-
return
|
|
7214
|
+
return Du();
|
|
7215
7215
|
}
|
|
7216
7216
|
constructor(e, n = {}) {
|
|
7217
7217
|
var r;
|
|
@@ -7241,7 +7241,7 @@ class Me extends Error {
|
|
|
7241
7241
|
writable: !0,
|
|
7242
7242
|
value: "WagmiCoreError"
|
|
7243
7243
|
});
|
|
7244
|
-
const s = n.cause instanceof
|
|
7244
|
+
const s = n.cause instanceof Oe ? n.cause.details : (r = n.cause) != null && r.message ? n.cause.message : n.details, a = n.cause instanceof Oe && n.cause.docsPath || n.docsPath;
|
|
7245
7245
|
this.message = [
|
|
7246
7246
|
e || "An error occurred.",
|
|
7247
7247
|
"",
|
|
@@ -7255,13 +7255,13 @@ class Me extends Error {
|
|
|
7255
7255
|
`), n.cause && (this.cause = n.cause), this.details = s, this.docsPath = a, this.metaMessages = n.metaMessages, this.shortMessage = e;
|
|
7256
7256
|
}
|
|
7257
7257
|
walk(e) {
|
|
7258
|
-
return
|
|
7258
|
+
return qs(this, en, "m", Ws).call(this, this, e);
|
|
7259
7259
|
}
|
|
7260
7260
|
}
|
|
7261
|
-
en = /* @__PURE__ */ new WeakSet(),
|
|
7262
|
-
return n != null && n(e) ? e : e.cause ?
|
|
7261
|
+
en = /* @__PURE__ */ new WeakSet(), Ws = function t(e, n) {
|
|
7262
|
+
return n != null && n(e) ? e : e.cause ? qs(this, en, "m", t).call(this, e.cause, n) : e;
|
|
7263
7263
|
};
|
|
7264
|
-
class
|
|
7264
|
+
class Lu extends Oe {
|
|
7265
7265
|
constructor() {
|
|
7266
7266
|
super("Connector not connected."), Object.defineProperty(this, "name", {
|
|
7267
7267
|
enumerable: !0,
|
|
@@ -7271,7 +7271,7 @@ class Du extends Me {
|
|
|
7271
7271
|
});
|
|
7272
7272
|
}
|
|
7273
7273
|
}
|
|
7274
|
-
class Vu extends
|
|
7274
|
+
class Vu extends Oe {
|
|
7275
7275
|
constructor({ address: e, connector: n }) {
|
|
7276
7276
|
super(`Account "${e}" not found for connector "${n.name}".`), Object.defineProperty(this, "name", {
|
|
7277
7277
|
enumerable: !0,
|
|
@@ -7281,7 +7281,7 @@ class Vu extends Me {
|
|
|
7281
7281
|
});
|
|
7282
7282
|
}
|
|
7283
7283
|
}
|
|
7284
|
-
class Uu extends
|
|
7284
|
+
class Uu extends Oe {
|
|
7285
7285
|
constructor({ connectionChainId: e, connectorChainId: n }) {
|
|
7286
7286
|
super(`The current chain of the connector (id: ${n}) does not match the connection's chain (id: ${e}).`, {
|
|
7287
7287
|
metaMessages: [
|
|
@@ -7296,7 +7296,7 @@ class Uu extends Me {
|
|
|
7296
7296
|
});
|
|
7297
7297
|
}
|
|
7298
7298
|
}
|
|
7299
|
-
class Gu extends
|
|
7299
|
+
class Gu extends Oe {
|
|
7300
7300
|
constructor({ connector: e }) {
|
|
7301
7301
|
super(`Connector "${e.name}" unavailable while reconnecting.`, {
|
|
7302
7302
|
details: [
|
|
@@ -7312,7 +7312,7 @@ class Gu extends Me {
|
|
|
7312
7312
|
});
|
|
7313
7313
|
}
|
|
7314
7314
|
}
|
|
7315
|
-
async function
|
|
7315
|
+
async function Hs(t, e = {}) {
|
|
7316
7316
|
let n;
|
|
7317
7317
|
if (e.connector) {
|
|
7318
7318
|
const { connector: c } = e;
|
|
@@ -7330,7 +7330,7 @@ async function Ws(t, e = {}) {
|
|
|
7330
7330
|
} else
|
|
7331
7331
|
n = t.state.connections.get(t.state.current);
|
|
7332
7332
|
if (!n)
|
|
7333
|
-
throw new
|
|
7333
|
+
throw new Lu();
|
|
7334
7334
|
const r = e.chainId ?? n.chainId, s = await n.connector.getChainId();
|
|
7335
7335
|
if (s !== n.chainId)
|
|
7336
7336
|
throw new Uu({
|
|
@@ -7354,10 +7354,10 @@ async function Ws(t, e = {}) {
|
|
|
7354
7354
|
transport: (c) => zu(u)({ ...c, retryCount: 0 })
|
|
7355
7355
|
});
|
|
7356
7356
|
}
|
|
7357
|
-
async function
|
|
7357
|
+
async function qn(t, e) {
|
|
7358
7358
|
const { abi: n, chainId: r, connector: s, ...a } = e;
|
|
7359
7359
|
let i;
|
|
7360
|
-
e.account ? i = e.account : i = (await
|
|
7360
|
+
e.account ? i = e.account : i = (await Hs(t, {
|
|
7361
7361
|
chainId: r,
|
|
7362
7362
|
connector: s
|
|
7363
7363
|
})).account;
|
|
@@ -7372,13 +7372,13 @@ function mr(t) {
|
|
|
7372
7372
|
return t.address !== void 0 && typeof t.address == "object" ? (e, n) => {
|
|
7373
7373
|
var r;
|
|
7374
7374
|
const s = hr(e), a = ln(e), i = (n == null ? void 0 : n.chainId) ?? a.chainId ?? s;
|
|
7375
|
-
return
|
|
7375
|
+
return qn(e, {
|
|
7376
7376
|
...n,
|
|
7377
7377
|
...t.functionName ? { functionName: t.functionName } : {},
|
|
7378
7378
|
address: (r = t.address) == null ? void 0 : r[i],
|
|
7379
7379
|
abi: t.abi
|
|
7380
7380
|
});
|
|
7381
|
-
} : (e, n) =>
|
|
7381
|
+
} : (e, n) => qn(e, {
|
|
7382
7382
|
...n,
|
|
7383
7383
|
...t.address ? { address: t.address } : {},
|
|
7384
7384
|
...t.functionName ? { functionName: t.functionName } : {},
|
|
@@ -7409,13 +7409,13 @@ function Ks(t) {
|
|
|
7409
7409
|
async function Br(t, e) {
|
|
7410
7410
|
const { account: n, chainId: r, connector: s, __mode: a, ...i } = e;
|
|
7411
7411
|
let o;
|
|
7412
|
-
typeof n == "object" && n.type === "local" ? o = t.getClient({ chainId: r }) : o = await
|
|
7412
|
+
typeof n == "object" && n.type === "local" ? o = t.getClient({ chainId: r }) : o = await Hs(t, { account: n, chainId: r, connector: s });
|
|
7413
7413
|
const { connector: u } = ln(t);
|
|
7414
7414
|
let c;
|
|
7415
7415
|
if (a === "prepared" || u != null && u.supportsSimulation)
|
|
7416
7416
|
c = i;
|
|
7417
7417
|
else {
|
|
7418
|
-
const { request: d } = await
|
|
7418
|
+
const { request: d } = await qn(t, {
|
|
7419
7419
|
...i,
|
|
7420
7420
|
account: n,
|
|
7421
7421
|
chainId: r
|
|
@@ -7620,13 +7620,13 @@ const be = [
|
|
|
7620
7620
|
outputs: [{ name: "", internalType: "bool", type: "bool" }],
|
|
7621
7621
|
stateMutability: "nonpayable"
|
|
7622
7622
|
}
|
|
7623
|
-
],
|
|
7623
|
+
], qu = /* @__PURE__ */ Ks({
|
|
7624
7624
|
abi: be,
|
|
7625
7625
|
functionName: "allowance"
|
|
7626
|
-
}),
|
|
7626
|
+
}), Wu = /* @__PURE__ */ Ks({
|
|
7627
7627
|
abi: be,
|
|
7628
7628
|
functionName: "balanceOf"
|
|
7629
|
-
}),
|
|
7629
|
+
}), Hu = /* @__PURE__ */ yr({
|
|
7630
7630
|
abi: be,
|
|
7631
7631
|
functionName: "approve"
|
|
7632
7632
|
}), Ku = /* @__PURE__ */ yr({
|
|
@@ -7647,7 +7647,7 @@ const be = [
|
|
|
7647
7647
|
}), ed = "0x6080604052348015600e575f80fd5b50610b398061001c5f395ff3fe6080604052600436106100d9575f3560e01c806340c10f191161007c57806395d89b411161005757806395d89b4114610323578063a9059cbb14610368578063d505accf14610387578063dd62ed3e146103a6575f80fd5b806340c10f19146102a257806370a08231146102c15780637ecebe00146102f2575f80fd5b806318160ddd116100b757806318160ddd1461017857806323b872dd1461019e578063313ce567146101bd5780633644e515146101d8575f80fd5b806306fdde03146100dd578063095ea7b31461013457806317d304b014610163575b5f80fd5b3480156100e8575f80fd5b5060408051808201909152600a81527f4d6f636b2045524332300000000000000000000000000000000000000000000060208201525b60405161012b9190610930565b60405180910390f35b34801561013f575f80fd5b5061015361014e3660046109ab565b6103c5565b604051901515815260200161012b565b6101766101713660046109ab565b610452565b005b348015610183575f80fd5b506805345cdf77eb68f44c545b60405190815260200161012b565b3480156101a9575f80fd5b506101536101b83660046109d3565b6104d8565b3480156101c8575f80fd5b506040516012815260200161012b565b3480156101e3575f80fd5b50604080518082018252600a81527f4d6f636b2045524332300000000000000000000000000000000000000000000060209182015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527fa5c9260bf133e670eeaf4d41f5c4289fc23bb146bf11ba8fa70a2ea91ba1a330918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc69181019190915246606082015230608082015260a09020610190565b3480156102ad575f80fd5b506101766102bc3660046109ab565b6104ca565b3480156102cc575f80fd5b506101906102db366004610a0d565b6387a211a2600c9081525f91909152602090205490565b3480156102fd575f80fd5b5061019061030c366004610a0d565b6338377508600c9081525f91909152602090205490565b34801561032e575f80fd5b5060408051808201909152600481527f4d4f434b00000000000000000000000000000000000000000000000000000000602082015261011e565b348015610373575f80fd5b506101536103823660046109ab565b6105a7565b348015610392575f80fd5b506101766103a1366004610a2d565b61061e565b3480156103b1575f80fd5b506101906103c0366004610a9a565b610834565b5f73ffffffffffffffffffffffffffffffffffffffff83166e22d473030f116ddee9f6b43ac78ba3188219151761040357633f68539a5f526004601cfd5b82602052637f5e9f20600c52335f52816034600c2055815f52602c5160601c337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560205fa35060015b92915050565b61045d606482610acb565b3410156104ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4d6f636b45524332303a2067696d6d65206d6f7265206d6f6e65792100000000604482015260640160405180910390fd5b6104d482826108b4565b5050565b5f8360601b6e22d473030f116ddee9f6b43ac78ba3331461052d5733602052637f5e9f208117600c526034600c20805480191561052a5780851115610524576313be252b5f526004601cfd5b84810382555b50505b6387a211a28117600c526020600c208054808511156105535763f4d678b85f526004601cfd5b84810382555050835f526020600c208381540181555082602052600c5160601c8160601c7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a3505060019392505050565b5f6387a211a2600c52335f526020600c208054808411156105cf5763f4d678b85f526004601cfd5b83810382555050825f526020600c208281540181555081602052600c5160601c337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff86166e22d473030f116ddee9f6b43ac78ba3188519151761065b57633f68539a5f526004601cfd5b60408051808201909152600a81527f4d6f636b204552433230000000000000000000000000000000000000000000006020909101527fa5c9260bf133e670eeaf4d41f5c4289fc23bb146bf11ba8fa70a2ea91ba1a3307fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6428610156106e757631a15a3cc5f526004601cfd5b6040518960601b60601c99508860601b60601c985065383775081901600e52895f526020600c2080547f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f835284602084015283604084015246606084015230608084015260a08320602e527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c983528b60208401528a60408401528960608401528060808401528860a084015260c08320604e526042602c205f528760ff16602052866040528560605260208060805f60015afa8c3d51146107cf5763ddafbaef5f526004601cfd5b019055777f5e9f20000000000000000000000000000000000000000089176040526034602c20889055888a7f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925602060608501a360405250505f60605250505050505050565b5f7fffffffffffffffffffffffffffffffffffdd2b8cfcf0ee922116094bc538745d73ffffffffffffffffffffffffffffffffffffffff83160161089957507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61044c565b50602052637f5e9f20600c9081525f91909152603490205490565b6805345cdf77eb68f44c54818101818110156108d75763e5cfe9575f526004601cfd5b806805345cdf77eb68f44c5550506387a211a2600c52815f526020600c208181540181555080602052600c5160601c5f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a35050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146109a6575f80fd5b919050565b5f80604083850312156109bc575f80fd5b6109c583610983565b946020939093013593505050565b5f805f606084860312156109e5575f80fd5b6109ee84610983565b92506109fc60208501610983565b929592945050506040919091013590565b5f60208284031215610a1d575f80fd5b610a2682610983565b9392505050565b5f805f805f805f60e0888a031215610a43575f80fd5b610a4c88610983565b9650610a5a60208901610983565b95506040880135945060608801359350608088013560ff81168114610a7d575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215610aab575f80fd5b610ab483610983565b9150610ac260208401610983565b90509250929050565b5f82610afe577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea2646970667358221220f5df3612b8f8d82660db05f290d8446fb4142408d492fd3d2eb82b366b3cf76964736f6c634300081a0033";
|
|
7648
7648
|
class Js extends ra {
|
|
7649
7649
|
async balanceOf(e, n) {
|
|
7650
|
-
return await
|
|
7650
|
+
return await Wu(this._config, {
|
|
7651
7651
|
address: this.assertValidAddress(),
|
|
7652
7652
|
args: [e],
|
|
7653
7653
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
@@ -7655,7 +7655,7 @@ class Js extends ra {
|
|
|
7655
7655
|
});
|
|
7656
7656
|
}
|
|
7657
7657
|
async allowance(e, n, r) {
|
|
7658
|
-
return await
|
|
7658
|
+
return await qu(this._config, {
|
|
7659
7659
|
address: this.assertValidAddress(),
|
|
7660
7660
|
args: [e, n],
|
|
7661
7661
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
@@ -7673,7 +7673,7 @@ class Js extends ra {
|
|
|
7673
7673
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
7674
7674
|
...r
|
|
7675
7675
|
});
|
|
7676
|
-
return { hash: await
|
|
7676
|
+
return { hash: await Hu(this._config, s), result: a };
|
|
7677
7677
|
}
|
|
7678
7678
|
async mint(e, n, r) {
|
|
7679
7679
|
return await this.awaitResult(this.mintRaw(e, n, r));
|
|
@@ -7800,11 +7800,11 @@ const td = [
|
|
|
7800
7800
|
const S = [];
|
|
7801
7801
|
let R;
|
|
7802
7802
|
for (const A of v) {
|
|
7803
|
-
let
|
|
7803
|
+
let O;
|
|
7804
7804
|
if (typeof A.budget == "string" && tn(A.budget))
|
|
7805
|
-
|
|
7805
|
+
O = m.ManagedBudget(A.budget);
|
|
7806
7806
|
else if (An(P, A.budget) && $)
|
|
7807
|
-
|
|
7807
|
+
O = $;
|
|
7808
7808
|
else {
|
|
7809
7809
|
let C = A.budget;
|
|
7810
7810
|
switch (C.type) {
|
|
@@ -7814,7 +7814,7 @@ const td = [
|
|
|
7814
7814
|
authorized: [...A.budget.authorized, f],
|
|
7815
7815
|
roles: [...A.budget.roles, En.MANAGER]
|
|
7816
7816
|
};
|
|
7817
|
-
|
|
7817
|
+
O = await l.initialize(
|
|
7818
7818
|
crypto.randomUUID(),
|
|
7819
7819
|
m.ManagedBudget(B)
|
|
7820
7820
|
);
|
|
@@ -7826,15 +7826,15 @@ const td = [
|
|
|
7826
7826
|
authorized: [...A.budget.authorized, f],
|
|
7827
7827
|
roles: [...A.budget.roles, En.MANAGER]
|
|
7828
7828
|
};
|
|
7829
|
-
|
|
7829
|
+
O = await l.initialize(
|
|
7830
7830
|
crypto.randomUUID(),
|
|
7831
7831
|
m.ManagedBudgetWithFeesV2(B)
|
|
7832
7832
|
);
|
|
7833
7833
|
}
|
|
7834
7834
|
}
|
|
7835
|
-
$ =
|
|
7835
|
+
$ = O, P = A.budget, R = O.assertValidAddress();
|
|
7836
7836
|
}
|
|
7837
|
-
const
|
|
7837
|
+
const H = A.incentives.map(async (C) => {
|
|
7838
7838
|
let B = 0n;
|
|
7839
7839
|
switch (C.type) {
|
|
7840
7840
|
case "AllowListIncentive":
|
|
@@ -7842,35 +7842,35 @@ const td = [
|
|
|
7842
7842
|
case "PointsIncentive":
|
|
7843
7843
|
return m.PointsIncentive(C);
|
|
7844
7844
|
case "ERC20Incentive":
|
|
7845
|
-
return C.strategy === Pn.RAFFLE && (B += C.reward), C.strategy === Pn.POOL && (B += C.reward * C.limit), C.shouldMintAndAllocate && await et(
|
|
7845
|
+
return C.strategy === Pn.RAFFLE && (B += C.reward), C.strategy === Pn.POOL && (B += C.reward * C.limit), C.shouldMintAndAllocate && await et(O, B, C.asset, {
|
|
7846
7846
|
config: i,
|
|
7847
7847
|
account: o
|
|
7848
7848
|
}), m.ERC20Incentive(C);
|
|
7849
7849
|
case "ERC20VariableCriteriaIncentiveV2":
|
|
7850
|
-
return B += C.limit, C.shouldMintAndAllocate && await et(
|
|
7850
|
+
return B += C.limit, C.shouldMintAndAllocate && await et(O, B, C.asset, {
|
|
7851
7851
|
config: i,
|
|
7852
7852
|
account: o
|
|
7853
7853
|
}), m.ERC20VariableCriteriaIncentiveV2(C);
|
|
7854
7854
|
case "ERC20PeggedVariableCriteriaIncentiveV2":
|
|
7855
|
-
return B += C.limit, C.shouldMintAndAllocate && await et(
|
|
7855
|
+
return B += C.limit, C.shouldMintAndAllocate && await et(O, B, C.asset, {
|
|
7856
7856
|
config: i,
|
|
7857
7857
|
account: o
|
|
7858
7858
|
}), m.ERC20PeggedVariableCriteriaIncentiveV2(C);
|
|
7859
7859
|
case "ERC20VariableIncentive":
|
|
7860
|
-
return B += C.limit, C.shouldMintAndAllocate && await et(
|
|
7860
|
+
return B += C.limit, C.shouldMintAndAllocate && await et(O, B, C.asset, {
|
|
7861
7861
|
config: i,
|
|
7862
7862
|
account: o
|
|
7863
7863
|
}), m.ERC20VariableIncentive(C);
|
|
7864
7864
|
case "CGDAIncentive":
|
|
7865
|
-
return B += C.totalBudget, C.shouldMintAndAllocate && await et(
|
|
7865
|
+
return B += C.totalBudget, C.shouldMintAndAllocate && await et(O, B, C.asset, {
|
|
7866
7866
|
config: i,
|
|
7867
7867
|
account: o
|
|
7868
7868
|
}), m.CGDAIncentive(C);
|
|
7869
7869
|
}
|
|
7870
|
-
}), F = await Promise.all(
|
|
7870
|
+
}), F = await Promise.all(H), Y = {
|
|
7871
7871
|
protocolFee: A.protocolFee,
|
|
7872
7872
|
maxParticipants: A.maxParticipants,
|
|
7873
|
-
budget:
|
|
7873
|
+
budget: O,
|
|
7874
7874
|
action: m.EventAction(A.action),
|
|
7875
7875
|
allowList: await ea(A, { core: m }),
|
|
7876
7876
|
incentives: F
|
|
@@ -8190,7 +8190,7 @@ export {
|
|
|
8190
8190
|
xd as P,
|
|
8191
8191
|
fd as S,
|
|
8192
8192
|
cn as a,
|
|
8193
|
-
|
|
8193
|
+
He as b,
|
|
8194
8194
|
Us as c,
|
|
8195
8195
|
lu as d,
|
|
8196
8196
|
os as e,
|