@boostxyz/cli 7.0.0-canary.3 → 7.0.0-canary.4
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-6kqWjVCt.js → ccip-BZMQ5y3q.js} +1 -1
- package/dist/{ccip-DanTFsGy.cjs → ccip-h61XKzWe.cjs} +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/deploy.cjs +1 -1
- package/dist/commands/deploy.js +13 -13
- 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-1aqlUQTN.cjs → seed-CHyq3tBu.cjs} +22 -22
- package/dist/{seed-BIeYt0os.js → seed-Dq5rIA2E.js} +280 -280
- package/package.json +2 -2
|
@@ -169,7 +169,7 @@ const g = I.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 H extends Error {
|
|
173
173
|
get errors() {
|
|
174
174
|
return this.issues;
|
|
175
175
|
}
|
|
@@ -206,7 +206,7 @@ class W extends Error {
|
|
|
206
206
|
return s(this), r;
|
|
207
207
|
}
|
|
208
208
|
static assert(e) {
|
|
209
|
-
if (!(e instanceof
|
|
209
|
+
if (!(e instanceof H))
|
|
210
210
|
throw new Error(`Not a ZodError: ${e}`);
|
|
211
211
|
}
|
|
212
212
|
toString() {
|
|
@@ -228,7 +228,7 @@ class W extends Error {
|
|
|
228
228
|
return this.flatten();
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
|
|
231
|
+
H.create = (t) => new H(t);
|
|
232
232
|
const Ve = (t, e) => {
|
|
233
233
|
let n;
|
|
234
234
|
switch (t.code) {
|
|
@@ -285,12 +285,12 @@ const Ve = (t, e) => {
|
|
|
285
285
|
}
|
|
286
286
|
return { message: n };
|
|
287
287
|
};
|
|
288
|
-
let
|
|
288
|
+
let Lr = Ve;
|
|
289
289
|
function Pa(t) {
|
|
290
|
-
|
|
290
|
+
Lr = t;
|
|
291
291
|
}
|
|
292
|
-
function
|
|
293
|
-
return
|
|
292
|
+
function Dt() {
|
|
293
|
+
return Lr;
|
|
294
294
|
}
|
|
295
295
|
const Vt = (t) => {
|
|
296
296
|
const { data: e, path: n, errorMaps: r, issueData: s } = t, a = [...n, ...s.path || []], i = {
|
|
@@ -314,7 +314,7 @@ const Vt = (t) => {
|
|
|
314
314
|
};
|
|
315
315
|
}, Ea = [];
|
|
316
316
|
function b(t, e) {
|
|
317
|
-
const n =
|
|
317
|
+
const n = Dt(), 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 }), Z = (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 Zr(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 H(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 Hn({
|
|
612
612
|
typeName: x.ZodBranded,
|
|
613
613
|
type: this,
|
|
614
614
|
...E(this._def)
|
|
@@ -645,20 +645,20 @@ class T {
|
|
|
645
645
|
}
|
|
646
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, Oa = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
647
647
|
let pn;
|
|
648
|
-
const Ma = /^(?:(?: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}(=)?))?$/,
|
|
648
|
+
const Ma = /^(?:(?: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}(=)?))?$/, Dr = "((\\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])))", La = new RegExp(`^${Dr}$`);
|
|
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 Za(t) {
|
|
654
654
|
return new RegExp(`^${Vr(t)}$`);
|
|
655
655
|
}
|
|
656
656
|
function Ur(t) {
|
|
657
|
-
let e = `${
|
|
657
|
+
let e = `${Dr}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
|
|
661
|
+
function Da(t, e) {
|
|
662
662
|
return !!((e === "v4" || !e) && Ma.test(t) || (e === "v6" || !e) && Ba.test(t));
|
|
663
663
|
}
|
|
664
664
|
function Va(t, e) {
|
|
@@ -794,11 +794,11 @@ class ee extends T {
|
|
|
794
794
|
code: p.invalid_string,
|
|
795
795
|
validation: "datetime",
|
|
796
796
|
message: a.message
|
|
797
|
-
}), r.dirty()) : a.kind === "date" ?
|
|
797
|
+
}), r.dirty()) : a.kind === "date" ? La.test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
|
|
798
798
|
code: p.invalid_string,
|
|
799
799
|
validation: "date",
|
|
800
800
|
message: a.message
|
|
801
|
-
}), r.dirty()) : a.kind === "time" ?
|
|
801
|
+
}), r.dirty()) : a.kind === "time" ? Za(a).test(e.data) || (s = this._getOrReturnCtx(e, s), b(s, {
|
|
802
802
|
code: p.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: p.invalid_string,
|
|
808
808
|
message: a.message
|
|
809
|
-
}), r.dirty()) : a.kind === "ip" ?
|
|
809
|
+
}), r.dirty()) : a.kind === "ip" ? Da(e.data, a.version) || (s = this._getOrReturnCtx(e, s), b(s, {
|
|
810
810
|
validation: "ip",
|
|
811
811
|
code: p.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 Z(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 Z(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 Z(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 Z(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 Z(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 Z(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 Wt 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 Z(e.data);
|
|
1572
1572
|
}
|
|
1573
1573
|
}
|
|
1574
|
-
|
|
1574
|
+
Wt.create = (t) => new Wt({
|
|
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 H(o.ctx.common.issues));
|
|
1965
1965
|
return b(n, {
|
|
1966
1966
|
code: p.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 H(u));
|
|
2012
2012
|
return b(n, {
|
|
2013
2013
|
code: p.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 ? I.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 ? I.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 Hn || 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 Ht extends T {
|
|
2246
2246
|
get keySchema() {
|
|
2247
2247
|
return this._def.keyType;
|
|
2248
2248
|
}
|
|
@@ -2284,7 +2284,7 @@ class Wt extends T {
|
|
|
2284
2284
|
}
|
|
2285
2285
|
}
|
|
2286
2286
|
}
|
|
2287
|
-
|
|
2287
|
+
Ht.create = (t, e, n) => new Ht({
|
|
2288
2288
|
valueType: e,
|
|
2289
2289
|
keyType: t,
|
|
2290
2290
|
typeName: x.ZodMap,
|
|
@@ -2354,7 +2354,7 @@ Re.create = (t, e) => new Re({
|
|
|
2354
2354
|
typeName: x.ZodSet,
|
|
2355
2355
|
...E(e)
|
|
2356
2356
|
});
|
|
2357
|
-
class
|
|
2357
|
+
class Le extends T {
|
|
2358
2358
|
constructor() {
|
|
2359
2359
|
super(...arguments), this.validate = this.implement;
|
|
2360
2360
|
}
|
|
@@ -2373,7 +2373,7 @@ class Ze extends T {
|
|
|
2373
2373
|
errorMaps: [
|
|
2374
2374
|
n.common.contextualErrorMap,
|
|
2375
2375
|
n.schemaErrorMap,
|
|
2376
|
-
|
|
2376
|
+
Dt(),
|
|
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
|
+
Dt(),
|
|
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 Z(async function(...u) {
|
|
2405
|
+
const c = new H([]), d = await o._def.args.parseAsync(u, a).catch((m) => {
|
|
2406
2406
|
throw c.addIssue(r(u, m)), c;
|
|
2407
2407
|
}), f = await Reflect.apply(i, this, d);
|
|
2408
2408
|
return await o._def.returns._def.type.parseAsync(f, 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 Z(function(...u) {
|
|
2415
2415
|
const c = o._def.args.safeParse(u, a);
|
|
2416
2416
|
if (!c.success)
|
|
2417
|
-
throw new
|
|
2417
|
+
throw new H([r(u, c.error)]);
|
|
2418
2418
|
const d = Reflect.apply(i, this, c.data), f = o._def.returns.safeParse(d, a);
|
|
2419
2419
|
if (!f.success)
|
|
2420
|
-
throw new
|
|
2420
|
+
throw new H([s(d, f.error)]);
|
|
2421
2421
|
return f.data;
|
|
2422
2422
|
});
|
|
2423
2423
|
}
|
|
@@ -2429,13 +2429,13 @@ class Ze extends T {
|
|
|
2429
2429
|
return this._def.returns;
|
|
2430
2430
|
}
|
|
2431
2431
|
args(...e) {
|
|
2432
|
-
return new
|
|
2432
|
+
return new Le({
|
|
2433
2433
|
...this._def,
|
|
2434
2434
|
args: oe.create(e).rest(ke.create())
|
|
2435
2435
|
});
|
|
2436
2436
|
}
|
|
2437
2437
|
returns(e) {
|
|
2438
|
-
return new
|
|
2438
|
+
return new Le({
|
|
2439
2439
|
...this._def,
|
|
2440
2440
|
returns: e
|
|
2441
2441
|
});
|
|
@@ -2447,7 +2447,7 @@ class Ze extends T {
|
|
|
2447
2447
|
return this.parse(e);
|
|
2448
2448
|
}
|
|
2449
2449
|
static create(e, n, r) {
|
|
2450
|
-
return new
|
|
2450
|
+
return new Le({
|
|
2451
2451
|
args: e || oe.create([]).rest(ke.create()),
|
|
2452
2452
|
returns: n || ke.create(),
|
|
2453
2453
|
typeName: x.ZodFunction,
|
|
@@ -2510,7 +2510,7 @@ class xe extends T {
|
|
|
2510
2510
|
code: p.invalid_type
|
|
2511
2511
|
}), _;
|
|
2512
2512
|
}
|
|
2513
|
-
if (Ut(this, tt) ||
|
|
2513
|
+
if (Ut(this, tt) || Zr(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 Z(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: p.invalid_type
|
|
2571
2571
|
}), _;
|
|
2572
2572
|
}
|
|
2573
|
-
if (Ut(this, nt) ||
|
|
2573
|
+
if (Ut(this, nt) || Zr(this, nt, new Set(I.getValidEnumValues(this._def.values))), !Ut(this, nt).has(e.data)) {
|
|
2574
2574
|
const s = I.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 Z(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 Z(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 ? Z(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 ? Z(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 H(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 H(r.common.issues);
|
|
2780
2780
|
},
|
|
2781
2781
|
input: r.data
|
|
2782
2782
|
})
|
|
@@ -2809,8 +2809,8 @@ qt.create = (t) => new qt({
|
|
|
2809
2809
|
typeName: x.ZodNaN,
|
|
2810
2810
|
...E(t)
|
|
2811
2811
|
});
|
|
2812
|
-
const
|
|
2813
|
-
class
|
|
2812
|
+
const Wa = Symbol("zod_brand");
|
|
2813
|
+
class Hn 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 Wr(t, e = {}, n) {
|
|
2881
2881
|
return t ? Ue.create().superRefine((r, s) => {
|
|
2882
2882
|
var a, i;
|
|
2883
2883
|
if (!t(r)) {
|
|
@@ -2886,7 +2886,7 @@ function Hr(t, e = {}, n) {
|
|
|
2886
2886
|
}
|
|
2887
2887
|
}) : Ue.create();
|
|
2888
2888
|
}
|
|
2889
|
-
const
|
|
2889
|
+
const Ha = {
|
|
2890
2890
|
object: j.lazycreate
|
|
2891
2891
|
};
|
|
2892
2892
|
var x;
|
|
@@ -2895,7 +2895,7 @@ var x;
|
|
|
2895
2895
|
})(x || (x = {}));
|
|
2896
2896
|
const qa = (t, e = {
|
|
2897
2897
|
message: `Input not instance of ${t.name}`
|
|
2898
|
-
}) =>
|
|
2898
|
+
}) => Wr((n) => n instanceof t, e), Hr = ee.create, qr = ve.create, Ka = qt.create, Ya = we.create, Kr = it.create, Ja = Se.create, Qa = Gt.create, Xa = ot.create, ei = ct.create, ti = Ue.create, ni = ke.create, ri = me.create, si = Wt.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 = Ht.create, pi = Re.create, mi = Le.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 = () => Hr().optional(), Ci = () => qr().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 l = /* @__PURE__ */ Object.freeze({
|
|
|
2909
2909
|
__proto__: null,
|
|
2910
2910
|
defaultErrorMap: Ve,
|
|
2911
2911
|
setErrorMap: Pa,
|
|
2912
|
-
getErrorMap:
|
|
2912
|
+
getErrorMap: Dt,
|
|
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: Z,
|
|
2920
2920
|
isAborted: Tn,
|
|
2921
2921
|
isDirty: $n,
|
|
2922
2922
|
isValid: Ie,
|
|
@@ -2942,7 +2942,7 @@ var l = /* @__PURE__ */ Object.freeze({
|
|
|
2942
2942
|
ZodAny: Ue,
|
|
2943
2943
|
ZodUnknown: ke,
|
|
2944
2944
|
ZodNever: me,
|
|
2945
|
-
ZodVoid:
|
|
2945
|
+
ZodVoid: Wt,
|
|
2946
2946
|
ZodArray: te,
|
|
2947
2947
|
ZodObject: j,
|
|
2948
2948
|
ZodUnion: ut,
|
|
@@ -2950,9 +2950,9 @@ var l = /* @__PURE__ */ Object.freeze({
|
|
|
2950
2950
|
ZodIntersection: dt,
|
|
2951
2951
|
ZodTuple: oe,
|
|
2952
2952
|
ZodRecord: lt,
|
|
2953
|
-
ZodMap:
|
|
2953
|
+
ZodMap: Ht,
|
|
2954
2954
|
ZodSet: Re,
|
|
2955
|
-
ZodFunction:
|
|
2955
|
+
ZodFunction: Le,
|
|
2956
2956
|
ZodLazy: ft,
|
|
2957
2957
|
ZodLiteral: ht,
|
|
2958
2958
|
ZodEnum: xe,
|
|
@@ -2965,23 +2965,23 @@ var l = /* @__PURE__ */ Object.freeze({
|
|
|
2965
2965
|
ZodDefault: mt,
|
|
2966
2966
|
ZodCatch: yt,
|
|
2967
2967
|
ZodNaN: qt,
|
|
2968
|
-
BRAND:
|
|
2969
|
-
ZodBranded:
|
|
2968
|
+
BRAND: Wa,
|
|
2969
|
+
ZodBranded: Hn,
|
|
2970
2970
|
ZodPipeline: Bt,
|
|
2971
2971
|
ZodReadonly: bt,
|
|
2972
|
-
custom:
|
|
2972
|
+
custom: Wr,
|
|
2973
2973
|
Schema: T,
|
|
2974
2974
|
ZodSchema: T,
|
|
2975
|
-
late:
|
|
2975
|
+
late: Ha,
|
|
2976
2976
|
get ZodFirstPartyTypeKind() {
|
|
2977
2977
|
return x;
|
|
2978
2978
|
},
|
|
2979
2979
|
coerce: $i,
|
|
2980
2980
|
any: ti,
|
|
2981
2981
|
array: ai,
|
|
2982
|
-
bigint:
|
|
2982
|
+
bigint: Ya,
|
|
2983
2983
|
boolean: Kr,
|
|
2984
|
-
date:
|
|
2984
|
+
date: Ja,
|
|
2985
2985
|
discriminatedUnion: ui,
|
|
2986
2986
|
effect: wr,
|
|
2987
2987
|
enum: gi,
|
|
@@ -3008,7 +3008,7 @@ var l = /* @__PURE__ */ Object.freeze({
|
|
|
3008
3008
|
record: fi,
|
|
3009
3009
|
set: pi,
|
|
3010
3010
|
strictObject: oi,
|
|
3011
|
-
string:
|
|
3011
|
+
string: Hr,
|
|
3012
3012
|
symbol: Qa,
|
|
3013
3013
|
transformer: wr,
|
|
3014
3014
|
tuple: li,
|
|
@@ -3019,12 +3019,12 @@ var l = /* @__PURE__ */ Object.freeze({
|
|
|
3019
3019
|
NEVER: ki,
|
|
3020
3020
|
ZodIssueCode: p,
|
|
3021
3021
|
quotelessJson: _a,
|
|
3022
|
-
ZodError:
|
|
3022
|
+
ZodError: H
|
|
3023
3023
|
});
|
|
3024
|
-
const
|
|
3024
|
+
const Yr = "2.22.1";
|
|
3025
3025
|
let Qe = {
|
|
3026
3026
|
getDocsUrl: ({ docsBaseUrl: t, docsPath: e = "", docsSlug: n }) => e ? `${t ?? "https://viem.sh"}${e}${n ? `#${n}` : ""}` : void 0,
|
|
3027
|
-
version: `viem@${
|
|
3027
|
+
version: `viem@${Yr}`
|
|
3028
3028
|
}, y = class In extends Error {
|
|
3029
3029
|
constructor(e, n = {}) {
|
|
3030
3030
|
var o;
|
|
@@ -3070,14 +3070,14 @@ let Qe = {
|
|
|
3070
3070
|
configurable: !0,
|
|
3071
3071
|
writable: !0,
|
|
3072
3072
|
value: "BaseError"
|
|
3073
|
-
}), this.details = r, this.docsPath = s, this.metaMessages = n.metaMessages, this.name = n.name ?? this.name, this.shortMessage = e, this.version =
|
|
3073
|
+
}), this.details = r, this.docsPath = s, this.metaMessages = n.metaMessages, this.name = n.name ?? this.name, this.shortMessage = e, this.version = Yr;
|
|
3074
3074
|
}
|
|
3075
3075
|
walk(e) {
|
|
3076
|
-
return
|
|
3076
|
+
return Jr(this, e);
|
|
3077
3077
|
}
|
|
3078
3078
|
};
|
|
3079
|
-
function
|
|
3080
|
-
return e != null && e(t) ? t : t && typeof t == "object" && "cause" in t && t.cause !== void 0 ?
|
|
3079
|
+
function Jr(t, e) {
|
|
3080
|
+
return e != null && e(t) ? t : t && typeof t == "object" && "cause" in t && t.cause !== void 0 ? Jr(t.cause, e) : e ? null : t;
|
|
3081
3081
|
}
|
|
3082
3082
|
class Qr extends y {
|
|
3083
3083
|
constructor({ max: e, min: n, signed: r, size: s, value: a }) {
|
|
@@ -3111,7 +3111,7 @@ class xr extends y {
|
|
|
3111
3111
|
super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${e} ${r} long.`, { name: "InvalidBytesLengthError" });
|
|
3112
3112
|
}
|
|
3113
3113
|
}
|
|
3114
|
-
function
|
|
3114
|
+
function Ye(t, { dir: e, size: n = 32 } = {}) {
|
|
3115
3115
|
return typeof t == "string" ? ge(t, { dir: e, size: n }) : Ri(t, { dir: e, size: n });
|
|
3116
3116
|
}
|
|
3117
3117
|
function ge(t, { dir: e, size: n = 32 } = {}) {
|
|
@@ -3160,7 +3160,7 @@ function Kn(t, e = {}) {
|
|
|
3160
3160
|
}
|
|
3161
3161
|
function Mi(t, e = {}) {
|
|
3162
3162
|
const n = new Uint8Array(1);
|
|
3163
|
-
return n[0] = Number(t), typeof e.size == "number" ? (ce(n, { size: e.size }),
|
|
3163
|
+
return n[0] = Number(t), typeof e.size == "number" ? (ce(n, { size: e.size }), Ye(n, { size: e.size })) : n;
|
|
3164
3164
|
}
|
|
3165
3165
|
const le = {
|
|
3166
3166
|
zero: 48,
|
|
@@ -3180,7 +3180,7 @@ function _r(t) {
|
|
|
3180
3180
|
}
|
|
3181
3181
|
function ye(t, e = {}) {
|
|
3182
3182
|
let n = t;
|
|
3183
|
-
e.size && (ce(n, { size: e.size }), n =
|
|
3183
|
+
e.size && (ce(n, { size: e.size }), n = Ye(n, { dir: "right", size: e.size }));
|
|
3184
3184
|
let r = n.slice(2);
|
|
3185
3185
|
r.length % 2 && (r = `0${r}`);
|
|
3186
3186
|
const s = r.length / 2, a = new Uint8Array(s);
|
|
@@ -3198,7 +3198,7 @@ function ji(t, e) {
|
|
|
3198
3198
|
}
|
|
3199
3199
|
function ts(t, e = {}) {
|
|
3200
3200
|
const n = Oi.encode(t);
|
|
3201
|
-
return typeof e.size == "number" ? (ce(n, { size: e.size }),
|
|
3201
|
+
return typeof e.size == "number" ? (ce(n, { size: e.size }), Ye(n, { dir: "right", size: e.size })) : n;
|
|
3202
3202
|
}
|
|
3203
3203
|
function ce(t, { size: e }) {
|
|
3204
3204
|
if (N(t) > e)
|
|
@@ -3216,23 +3216,23 @@ 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 We(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" ? O(t, e) : typeof t == "string" ?
|
|
3224
|
+
return typeof t == "number" || typeof t == "bigint" ? O(t, e) : typeof t == "string" ? Yn(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)}`;
|
|
3228
|
-
return typeof e.size == "number" ? (ce(n, { size: e.size }),
|
|
3228
|
+
return typeof e.size == "number" ? (ce(n, { size: e.size }), Ye(n, { size: e.size })) : n;
|
|
3229
3229
|
}
|
|
3230
3230
|
function G(t, e = {}) {
|
|
3231
3231
|
let n = "";
|
|
3232
3232
|
for (let s = 0; s < t.length; s++)
|
|
3233
3233
|
n += Bi[t[s]];
|
|
3234
3234
|
const r = `0x${n}`;
|
|
3235
|
-
return typeof e.size == "number" ? (ce(r, { size: e.size }),
|
|
3235
|
+
return typeof e.size == "number" ? (ce(r, { size: e.size }), Ye(r, { dir: "right", size: e.size })) : r;
|
|
3236
3236
|
}
|
|
3237
3237
|
function O(t, e = {}) {
|
|
3238
3238
|
const { signed: n, size: r } = e, s = BigInt(t);
|
|
@@ -3250,23 +3250,23 @@ function O(t, e = {}) {
|
|
|
3250
3250
|
});
|
|
3251
3251
|
}
|
|
3252
3252
|
const o = `0x${(n && s < 0 ? (1n << BigInt(r * 8)) + BigInt(s) : s).toString(16)}`;
|
|
3253
|
-
return r ?
|
|
3253
|
+
return r ? Ye(o, { size: r }) : o;
|
|
3254
3254
|
}
|
|
3255
3255
|
const Ni = /* @__PURE__ */ new TextEncoder();
|
|
3256
|
-
function
|
|
3256
|
+
function Yn(t, e = {}) {
|
|
3257
3257
|
const n = Ni.encode(t);
|
|
3258
3258
|
return G(n, e);
|
|
3259
3259
|
}
|
|
3260
|
-
function
|
|
3260
|
+
function He(t, { includeName: e = !1 } = {}) {
|
|
3261
3261
|
if (t.type !== "function" && t.type !== "event" && t.type !== "error")
|
|
3262
3262
|
throw new Ki(t.type);
|
|
3263
|
-
return `${t.name}(${
|
|
3263
|
+
return `${t.name}(${Jn(t.inputs, { includeName: e })})`;
|
|
3264
3264
|
}
|
|
3265
|
-
function
|
|
3265
|
+
function Jn(t, { includeName: e = !1 } = {}) {
|
|
3266
3266
|
return t ? t.map((n) => Fi(n, { includeName: e })).join(e ? ", " : ",") : "";
|
|
3267
3267
|
}
|
|
3268
3268
|
function Fi(t, { includeName: e }) {
|
|
3269
|
-
return t.type.startsWith("tuple") ? `(${
|
|
3269
|
+
return t.type.startsWith("tuple") ? `(${Jn(t.components, { includeName: e })})${t.type.slice(5)}` : t.type + (e && t.name ? ` ${t.name}` : "");
|
|
3270
3270
|
}
|
|
3271
3271
|
class zi extends y {
|
|
3272
3272
|
constructor({ docsPath: e }) {
|
|
@@ -3292,12 +3292,12 @@ class Pr extends y {
|
|
|
3292
3292
|
});
|
|
3293
3293
|
}
|
|
3294
3294
|
}
|
|
3295
|
-
class
|
|
3295
|
+
class Li extends y {
|
|
3296
3296
|
constructor({ data: e, params: n, size: r }) {
|
|
3297
3297
|
super([`Data size of ${r} bytes is too small for given parameters.`].join(`
|
|
3298
3298
|
`), {
|
|
3299
3299
|
metaMessages: [
|
|
3300
|
-
`Params: (${
|
|
3300
|
+
`Params: (${Jn(n, { includeName: !0 })})`,
|
|
3301
3301
|
`Data: ${e} (${r} bytes)`
|
|
3302
3302
|
],
|
|
3303
3303
|
name: "AbiDecodingDataSizeTooSmallError"
|
|
@@ -3326,7 +3326,7 @@ class Qn extends y {
|
|
|
3326
3326
|
});
|
|
3327
3327
|
}
|
|
3328
3328
|
}
|
|
3329
|
-
class
|
|
3329
|
+
class Zi 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 Di extends y {
|
|
|
3336
3336
|
`), { name: "AbiEncodingArrayLengthMismatchError" });
|
|
3337
3337
|
}
|
|
3338
3338
|
}
|
|
3339
|
-
class
|
|
3339
|
+
class Di 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 \`${He(e.abiItem)}\`, and`,
|
|
3402
|
+
`\`${n.type}\` in \`${He(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 Wi 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 Hi extends y {
|
|
3421
3421
|
constructor(e, { docsPath: n }) {
|
|
3422
3422
|
super([
|
|
3423
3423
|
`Type "${e}" is not a valid decoding type.`,
|
|
@@ -3444,9 +3444,9 @@ class Ki extends y {
|
|
|
3444
3444
|
}
|
|
3445
3445
|
}
|
|
3446
3446
|
function qe(t) {
|
|
3447
|
-
return typeof t[0] == "string" ? rn(t) :
|
|
3447
|
+
return typeof t[0] == "string" ? rn(t) : Yi(t);
|
|
3448
3448
|
}
|
|
3449
|
-
function
|
|
3449
|
+
function Yi(t) {
|
|
3450
3450
|
let e = 0;
|
|
3451
3451
|
for (const s of t)
|
|
3452
3452
|
e += s.length;
|
|
@@ -3505,7 +3505,7 @@ function an(t, e) {
|
|
|
3505
3505
|
const a = `0x${s.join("")}`;
|
|
3506
3506
|
return mn.set(`${t}.${e}`, a), a;
|
|
3507
3507
|
}
|
|
3508
|
-
function
|
|
3508
|
+
function Ji(t, e) {
|
|
3509
3509
|
if (!Ee(t, { strict: !1 }))
|
|
3510
3510
|
throw new vt({ address: t });
|
|
3511
3511
|
return an(t, e);
|
|
@@ -3518,7 +3518,7 @@ function Ee(t, e) {
|
|
|
3518
3518
|
const s = Qi.test(t) ? t.toLowerCase() === t ? !0 : n ? an(t) === t : !0 : !1;
|
|
3519
3519
|
return yn.set(r, s), s;
|
|
3520
3520
|
}
|
|
3521
|
-
function
|
|
3521
|
+
function Yt(t, e, n, { strict: r } = {}) {
|
|
3522
3522
|
return Pe(t, { strict: !1 }) ? Xi(t, e, n, {
|
|
3523
3523
|
strict: r
|
|
3524
3524
|
}) : is(t, e, n, {
|
|
@@ -3595,7 +3595,7 @@ function Xn({ 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 Wi(t.type, {
|
|
3599
3599
|
docsPath: "/docs/contract/encodeAbiParameters"
|
|
3600
3600
|
});
|
|
3601
3601
|
}
|
|
@@ -3623,7 +3623,7 @@ function ro(t, { length: e, param: n }) {
|
|
|
3623
3623
|
if (!Array.isArray(t))
|
|
3624
3624
|
throw new qi(t);
|
|
3625
3625
|
if (!r && t.length !== e)
|
|
3626
|
-
throw new
|
|
3626
|
+
throw new Zi({
|
|
3627
3627
|
expectedLength: e,
|
|
3628
3628
|
givenLength: t.length,
|
|
3629
3629
|
type: `${n.type}[${e}]`
|
|
@@ -3664,7 +3664,7 @@ function so(t, { param: e }) {
|
|
|
3664
3664
|
};
|
|
3665
3665
|
}
|
|
3666
3666
|
if (r !== Number.parseInt(n))
|
|
3667
|
-
throw new
|
|
3667
|
+
throw new Di({
|
|
3668
3668
|
expectedSize: Number.parseInt(n),
|
|
3669
3669
|
value: t
|
|
3670
3670
|
});
|
|
@@ -3696,9 +3696,9 @@ function io(t, { signed: e, size: n = 256 }) {
|
|
|
3696
3696
|
};
|
|
3697
3697
|
}
|
|
3698
3698
|
function oo(t) {
|
|
3699
|
-
const e =
|
|
3699
|
+
const e = Yn(t), n = Math.ceil(N(e) / 32), r = [];
|
|
3700
3700
|
for (let s = 0; s < n; s++)
|
|
3701
|
-
r.push(ge(
|
|
3701
|
+
r.push(ge(Yt(e, s * 32, (s + 1) * 32), {
|
|
3702
3702
|
dir: "right"
|
|
3703
3703
|
}));
|
|
3704
3704
|
return {
|
|
@@ -3782,7 +3782,7 @@ async function lo({ hash: t, signature: e }) {
|
|
|
3782
3782
|
const { r: c, s: d, v: f, yParity: h } = e, m = Number(h ?? f), 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 = We(`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
|
}
|
|
@@ -4089,7 +4089,7 @@ Object.defineProperty(ze, "nodeMessage", {
|
|
|
4089
4089
|
writable: !0,
|
|
4090
4090
|
value: /execution reverted/
|
|
4091
4091
|
});
|
|
4092
|
-
class
|
|
4092
|
+
class Jt extends y {
|
|
4093
4093
|
constructor({ cause: e, maxFeePerGas: n } = {}) {
|
|
4094
4094
|
super(`The fee cap (\`maxFeePerGas\`${n ? ` = ${U(n)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
|
|
4095
4095
|
cause: e,
|
|
@@ -4097,7 +4097,7 @@ class Yt extends y {
|
|
|
4097
4097
|
});
|
|
4098
4098
|
}
|
|
4099
4099
|
}
|
|
4100
|
-
Object.defineProperty(
|
|
4100
|
+
Object.defineProperty(Jt, "nodeMessage", {
|
|
4101
4101
|
enumerable: !0,
|
|
4102
4102
|
configurable: !0,
|
|
4103
4103
|
writable: !0,
|
|
@@ -4209,7 +4209,7 @@ Object.defineProperty(zn, "nodeMessage", {
|
|
|
4209
4209
|
writable: !0,
|
|
4210
4210
|
value: /intrinsic gas too low/
|
|
4211
4211
|
});
|
|
4212
|
-
class
|
|
4212
|
+
class Ln extends y {
|
|
4213
4213
|
constructor({ cause: e }) {
|
|
4214
4214
|
super("The transaction type is not supported for this chain.", {
|
|
4215
4215
|
cause: e,
|
|
@@ -4217,7 +4217,7 @@ class Zn extends y {
|
|
|
4217
4217
|
});
|
|
4218
4218
|
}
|
|
4219
4219
|
}
|
|
4220
|
-
Object.defineProperty(
|
|
4220
|
+
Object.defineProperty(Ln, "nodeMessage", {
|
|
4221
4221
|
enumerable: !0,
|
|
4222
4222
|
configurable: !0,
|
|
4223
4223
|
writable: !0,
|
|
@@ -4374,7 +4374,7 @@ class bs extends y {
|
|
|
4374
4374
|
}
|
|
4375
4375
|
}
|
|
4376
4376
|
const ko = -1;
|
|
4377
|
-
class
|
|
4377
|
+
class W 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
|
|
4392
|
+
class Je extends W {
|
|
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 W {
|
|
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 W {
|
|
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 W {
|
|
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 W {
|
|
4448
4448
|
constructor(e) {
|
|
4449
4449
|
super(e, {
|
|
4450
4450
|
code: Pt.code,
|
|
@@ -4463,7 +4463,7 @@ Object.defineProperty(Pt, "code", {
|
|
|
4463
4463
|
writable: !0,
|
|
4464
4464
|
value: -32602
|
|
4465
4465
|
});
|
|
4466
|
-
class Oe extends
|
|
4466
|
+
class Oe extends W {
|
|
4467
4467
|
constructor(e) {
|
|
4468
4468
|
super(e, {
|
|
4469
4469
|
code: Oe.code,
|
|
@@ -4478,7 +4478,7 @@ Object.defineProperty(Oe, "code", {
|
|
|
4478
4478
|
writable: !0,
|
|
4479
4479
|
value: -32603
|
|
4480
4480
|
});
|
|
4481
|
-
class Et extends
|
|
4481
|
+
class Et extends W {
|
|
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 W {
|
|
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 W {
|
|
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 W {
|
|
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 W {
|
|
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 W {
|
|
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 W {
|
|
4581
4581
|
constructor(e) {
|
|
4582
4582
|
super(e, {
|
|
4583
4583
|
code: kt.code,
|
|
@@ -4592,22 +4592,22 @@ Object.defineProperty(kt, "code", {
|
|
|
4592
4592
|
writable: !0,
|
|
4593
4593
|
value: -32006
|
|
4594
4594
|
});
|
|
4595
|
-
class
|
|
4595
|
+
class Ze extends Je {
|
|
4596
4596
|
constructor(e) {
|
|
4597
4597
|
super(e, {
|
|
4598
|
-
code:
|
|
4598
|
+
code: Ze.code,
|
|
4599
4599
|
name: "UserRejectedRequestError",
|
|
4600
4600
|
shortMessage: "User rejected the request."
|
|
4601
4601
|
});
|
|
4602
4602
|
}
|
|
4603
4603
|
}
|
|
4604
|
-
Object.defineProperty(
|
|
4604
|
+
Object.defineProperty(Ze, "code", {
|
|
4605
4605
|
enumerable: !0,
|
|
4606
4606
|
configurable: !0,
|
|
4607
4607
|
writable: !0,
|
|
4608
4608
|
value: 4001
|
|
4609
4609
|
});
|
|
4610
|
-
class It extends
|
|
4610
|
+
class It extends Je {
|
|
4611
4611
|
constructor(e) {
|
|
4612
4612
|
super(e, {
|
|
4613
4613
|
code: It.code,
|
|
@@ -4622,7 +4622,7 @@ Object.defineProperty(It, "code", {
|
|
|
4622
4622
|
writable: !0,
|
|
4623
4623
|
value: 4100
|
|
4624
4624
|
});
|
|
4625
|
-
class St extends
|
|
4625
|
+
class St extends Je {
|
|
4626
4626
|
constructor(e, { method: n } = {}) {
|
|
4627
4627
|
super(e, {
|
|
4628
4628
|
code: St.code,
|
|
@@ -4637,7 +4637,7 @@ Object.defineProperty(St, "code", {
|
|
|
4637
4637
|
writable: !0,
|
|
4638
4638
|
value: 4200
|
|
4639
4639
|
});
|
|
4640
|
-
class Rt extends
|
|
4640
|
+
class Rt extends Je {
|
|
4641
4641
|
constructor(e) {
|
|
4642
4642
|
super(e, {
|
|
4643
4643
|
code: Rt.code,
|
|
@@ -4652,7 +4652,7 @@ Object.defineProperty(Rt, "code", {
|
|
|
4652
4652
|
writable: !0,
|
|
4653
4653
|
value: 4900
|
|
4654
4654
|
});
|
|
4655
|
-
class Ot extends
|
|
4655
|
+
class Ot extends Je {
|
|
4656
4656
|
constructor(e) {
|
|
4657
4657
|
super(e, {
|
|
4658
4658
|
code: Ot.code,
|
|
@@ -4667,7 +4667,7 @@ Object.defineProperty(Ot, "code", {
|
|
|
4667
4667
|
writable: !0,
|
|
4668
4668
|
value: 4901
|
|
4669
4669
|
});
|
|
4670
|
-
class Mt extends
|
|
4670
|
+
class Mt extends Je {
|
|
4671
4671
|
constructor(e) {
|
|
4672
4672
|
super(e, {
|
|
4673
4673
|
code: Mt.code,
|
|
@@ -4682,7 +4682,7 @@ Object.defineProperty(Mt, "code", {
|
|
|
4682
4682
|
writable: !0,
|
|
4683
4683
|
value: 4902
|
|
4684
4684
|
});
|
|
4685
|
-
class Io extends
|
|
4685
|
+
class Io extends W {
|
|
4686
4686
|
constructor(e) {
|
|
4687
4687
|
super(e, {
|
|
4688
4688
|
name: "UnknownRpcError",
|
|
@@ -4698,13 +4698,13 @@ function sr(t, e) {
|
|
|
4698
4698
|
}) : ze.nodeMessage.test(n) ? new ze({
|
|
4699
4699
|
cause: t,
|
|
4700
4700
|
message: t.details
|
|
4701
|
-
}) :
|
|
4701
|
+
}) : Jt.nodeMessage.test(n) ? new Jt({
|
|
4702
4702
|
cause: t,
|
|
4703
4703
|
maxFeePerGas: e == null ? void 0 : e.maxFeePerGas
|
|
4704
4704
|
}) : On.nodeMessage.test(n) ? new On({
|
|
4705
4705
|
cause: t,
|
|
4706
4706
|
maxFeePerGas: e == null ? void 0 : e.maxFeePerGas
|
|
4707
|
-
}) : Mn.nodeMessage.test(n) ? new Mn({ 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 }) :
|
|
4707
|
+
}) : Mn.nodeMessage.test(n) ? new Mn({ 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 }) : Ln.nodeMessage.test(n) ? new Ln({ cause: t }) : Qt.nodeMessage.test(n) ? new Qt({
|
|
4708
4708
|
cause: t,
|
|
4709
4709
|
maxFeePerGas: e == null ? void 0 : e.maxFeePerGas,
|
|
4710
4710
|
maxPriorityFeePerGas: e == null ? void 0 : e.maxPriorityFeePerGas
|
|
@@ -4756,7 +4756,7 @@ function Oo(t) {
|
|
|
4756
4756
|
...typeof e.v < "u" && typeof e.yParity > "u" ? { v: O(e.v) } : {}
|
|
4757
4757
|
}));
|
|
4758
4758
|
}
|
|
4759
|
-
function
|
|
4759
|
+
function L(t, e, n) {
|
|
4760
4760
|
const r = t[e.name];
|
|
4761
4761
|
if (typeof r == "function")
|
|
4762
4762
|
return r;
|
|
@@ -4773,7 +4773,7 @@ function un(t) {
|
|
|
4773
4773
|
if (typeof n < "u" && (typeof r < "u" || typeof s < "u"))
|
|
4774
4774
|
throw new Ao();
|
|
4775
4775
|
if (r && r > Mo)
|
|
4776
|
-
throw new
|
|
4776
|
+
throw new Jt({ maxFeePerGas: r });
|
|
4777
4777
|
if (s && r && s > r)
|
|
4778
4778
|
throw new Qt({ maxFeePerGas: r, maxPriorityFeePerGas: s });
|
|
4779
4779
|
}
|
|
@@ -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 We(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 ? We(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 ? We(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,
|
|
@@ -4834,7 +4834,7 @@ function zo(t) {
|
|
|
4834
4834
|
value: t.value ? BigInt(t.value) : void 0,
|
|
4835
4835
|
v: t.v ? BigInt(t.v) : void 0
|
|
4836
4836
|
};
|
|
4837
|
-
return t.authorizationList && (e.authorizationList =
|
|
4837
|
+
return t.authorizationList && (e.authorizationList = Lo(t.authorizationList)), e.yParity = (() => {
|
|
4838
4838
|
if (t.yParity)
|
|
4839
4839
|
return Number(t.yParity);
|
|
4840
4840
|
if (typeof e.v == "bigint") {
|
|
@@ -4847,7 +4847,7 @@ function zo(t) {
|
|
|
4847
4847
|
}
|
|
4848
4848
|
})(), e.type === "legacy" && (delete e.accessList, delete e.maxFeePerBlobGas, delete e.maxFeePerGas, delete e.maxPriorityFeePerGas, delete e.yParity), e.type === "eip2930" && (delete e.maxFeePerBlobGas, delete e.maxFeePerGas, delete e.maxPriorityFeePerGas), e.type === "eip1559" && delete e.maxFeePerBlobGas, e;
|
|
4849
4849
|
}
|
|
4850
|
-
function
|
|
4850
|
+
function Lo(t) {
|
|
4851
4851
|
return t.map((e) => ({
|
|
4852
4852
|
contractAddress: e.address,
|
|
4853
4853
|
chainId: Number(e.chainId),
|
|
@@ -4857,7 +4857,7 @@ function Zo(t) {
|
|
|
4857
4857
|
yParity: Number(e.yParity)
|
|
4858
4858
|
}));
|
|
4859
4859
|
}
|
|
4860
|
-
function
|
|
4860
|
+
function Zo(t) {
|
|
4861
4861
|
const e = (t.transactions ?? []).map((n) => typeof n == "string" ? n : zo(n));
|
|
4862
4862
|
return {
|
|
4863
4863
|
...t,
|
|
@@ -4889,7 +4889,7 @@ async function Xt(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 (((h = (f = (d = t.chain) == null ? void 0 : d.formatters) == null ? void 0 : f.block) == null ? void 0 : h.format) ||
|
|
4892
|
+
return (((h = (f = (d = t.chain) == null ? void 0 : d.formatters) == null ? void 0 : f.block) == null ? void 0 : h.format) || Zo)(u);
|
|
4893
4893
|
}
|
|
4894
4894
|
async function vs(t) {
|
|
4895
4895
|
const e = await t.request({
|
|
@@ -4897,13 +4897,13 @@ async function vs(t) {
|
|
|
4897
4897
|
});
|
|
4898
4898
|
return BigInt(e);
|
|
4899
4899
|
}
|
|
4900
|
-
async function
|
|
4900
|
+
async function Do(t, e) {
|
|
4901
4901
|
var a, i;
|
|
4902
4902
|
const { block: n, chain: r = t.chain, request: s } = e || {};
|
|
4903
4903
|
try {
|
|
4904
4904
|
const o = ((a = r == null ? void 0 : r.fees) == null ? void 0 : a.maxPriorityFeePerGas) ?? ((i = r == null ? void 0 : r.fees) == null ? void 0 : i.defaultPriorityFee);
|
|
4905
4905
|
if (typeof o == "function") {
|
|
4906
|
-
const c = n || await
|
|
4906
|
+
const c = n || await L(t, Xt, "getBlock")({}), d = await o({
|
|
4907
4907
|
block: c,
|
|
4908
4908
|
client: t,
|
|
4909
4909
|
request: s
|
|
@@ -4920,8 +4920,8 @@ async function Lo(t, e) {
|
|
|
4920
4920
|
return gt(u);
|
|
4921
4921
|
} catch {
|
|
4922
4922
|
const [o, u] = await Promise.all([
|
|
4923
|
-
n ? Promise.resolve(n) :
|
|
4924
|
-
|
|
4923
|
+
n ? Promise.resolve(n) : L(t, Xt, "getBlock")({}),
|
|
4924
|
+
L(t, vs, "getGasPrice")({})
|
|
4925
4925
|
]);
|
|
4926
4926
|
if (typeof o.baseFeePerGas != "bigint")
|
|
4927
4927
|
throw new or();
|
|
@@ -4941,7 +4941,7 @@ async function Cr(t, e) {
|
|
|
4941
4941
|
})();
|
|
4942
4942
|
if (i < 1)
|
|
4943
4943
|
throw new jo();
|
|
4944
|
-
const u = 10 ** (((h = i.toString().split(".")[1]) == null ? void 0 : h.length) ?? 0), c = (v) => v * BigInt(Math.ceil(i * u)) / BigInt(u), d = n || await
|
|
4944
|
+
const u = 10 ** (((h = i.toString().split(".")[1]) == null ? void 0 : h.length) ?? 0), c = (v) => v * BigInt(Math.ceil(i * u)) / BigInt(u), d = n || await L(t, Xt, "getBlock")({});
|
|
4945
4945
|
if (typeof ((m = r == null ? void 0 : r.fees) == null ? void 0 : m.estimateFeesPerGas) == "function") {
|
|
4946
4946
|
const v = await r.fees.estimateFeesPerGas({
|
|
4947
4947
|
block: n,
|
|
@@ -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 Do(t, {
|
|
4960
4960
|
block: d,
|
|
4961
4961
|
chain: r,
|
|
4962
4962
|
request: s
|
|
@@ -4967,7 +4967,7 @@ async function Cr(t, e) {
|
|
|
4967
4967
|
};
|
|
4968
4968
|
}
|
|
4969
4969
|
return {
|
|
4970
|
-
gasPrice: (s == null ? void 0 : s.gasPrice) ?? c(await
|
|
4970
|
+
gasPrice: (s == null ? void 0 : s.gasPrice) ?? c(await L(t, vs, "getGasPrice")({}))
|
|
4971
4971
|
};
|
|
4972
4972
|
}
|
|
4973
4973
|
class Vo extends y {
|
|
@@ -5018,7 +5018,7 @@ class Go extends y {
|
|
|
5018
5018
|
});
|
|
5019
5019
|
}
|
|
5020
5020
|
}
|
|
5021
|
-
class
|
|
5021
|
+
class Wo 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 Ho(t) {
|
|
5033
5033
|
return t.reduce((e, { address: n, ...r }) => {
|
|
5034
5034
|
let s = `${e} ${n}:
|
|
5035
5035
|
`;
|
|
@@ -5064,7 +5064,7 @@ function qo(t) {
|
|
|
5064
5064
|
const { balance: e, nonce: n, state: r, stateDiff: s, code: a } = t, i = {};
|
|
5065
5065
|
if (a !== void 0 && (i.code = a), e !== void 0 && (i.balance = O(e)), n !== void 0 && (i.nonce = O(n)), r !== void 0 && (i.state = $r(r)), s !== void 0) {
|
|
5066
5066
|
if (i.state)
|
|
5067
|
-
throw new
|
|
5067
|
+
throw new Wo();
|
|
5068
5068
|
i.stateDiff = $r(s);
|
|
5069
5069
|
}
|
|
5070
5070
|
return i;
|
|
@@ -5089,15 +5089,15 @@ async function Ko(t, { address: e, blockNumber: n, blockTag: r = "latest" }) {
|
|
|
5089
5089
|
});
|
|
5090
5090
|
return BigInt(a);
|
|
5091
5091
|
}
|
|
5092
|
-
async function
|
|
5092
|
+
async function Yo(t, e) {
|
|
5093
5093
|
var s, a, i;
|
|
5094
5094
|
const { account: n = t.account } = e, r = n ? ue(n) : void 0;
|
|
5095
5095
|
try {
|
|
5096
5096
|
let de = function(V) {
|
|
5097
|
-
const { block: Q, request:
|
|
5097
|
+
const { block: Q, request: Y, rpcStateOverride: Te } = V;
|
|
5098
5098
|
return t.request({
|
|
5099
5099
|
method: "eth_estimateGas",
|
|
5100
|
-
params: Te ? [
|
|
5100
|
+
params: Te ? [Y, Q ?? "latest", Te] : Q ? [Y, Q] : [Y]
|
|
5101
5101
|
});
|
|
5102
5102
|
};
|
|
5103
5103
|
const { accessList: o, authorizationList: u, blobs: c, blobVersionedHashes: d, blockNumber: f, blockTag: h, data: m, gas: v, gasPrice: $, maxFeePerBlobGas: P, maxFeePerGas: S, maxPriorityFeePerGas: R, nonce: A, value: M, stateOverride: q, ...F } = await Cs(t, {
|
|
@@ -5138,8 +5138,8 @@ async function Jo(t, e) {
|
|
|
5138
5138
|
});
|
|
5139
5139
|
let se = BigInt(await de({ block: re, request: K, rpcStateOverride: C }));
|
|
5140
5140
|
if (u) {
|
|
5141
|
-
const V = await Ko(t, { address: K.from }), Q = await Promise.all(u.map(async (
|
|
5142
|
-
const { contractAddress: Te } =
|
|
5141
|
+
const V = await Ko(t, { address: K.from }), Q = await Promise.all(u.map(async (Y) => {
|
|
5142
|
+
const { contractAddress: Te } = Y, Be = await de({
|
|
5143
5143
|
block: re,
|
|
5144
5144
|
request: {
|
|
5145
5145
|
authorizationList: void 0,
|
|
@@ -5152,7 +5152,7 @@ async function Jo(t, e) {
|
|
|
5152
5152
|
}).catch(() => 100000n);
|
|
5153
5153
|
return 2n * BigInt(Be);
|
|
5154
5154
|
}));
|
|
5155
|
-
se += Q.reduce((
|
|
5155
|
+
se += Q.reduce((Y, Te) => Y + Te, 0n);
|
|
5156
5156
|
}
|
|
5157
5157
|
return se;
|
|
5158
5158
|
} catch (o) {
|
|
@@ -5163,12 +5163,12 @@ async function Jo(t, e) {
|
|
|
5163
5163
|
});
|
|
5164
5164
|
}
|
|
5165
5165
|
}
|
|
5166
|
-
async function
|
|
5166
|
+
async function Jo(t, { address: e, blockTag: n = "latest", blockNumber: r }) {
|
|
5167
5167
|
const s = await t.request({
|
|
5168
5168
|
method: "eth_getTransactionCount",
|
|
5169
5169
|
params: [e, r ? O(r) : n]
|
|
5170
5170
|
}, { dedupe: !!r });
|
|
5171
|
-
return
|
|
5171
|
+
return We(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 = [];
|
|
@@ -5278,11 +5278,11 @@ async function Cs(t, e) {
|
|
|
5278
5278
|
const { account: n = t.account, blobs: r, chain: s, gas: a, kzg: i, nonce: o, nonceManager: u, parameters: c = As, type: d } = e, f = n && ue(n), h = { ...e, ...f ? { from: f == null ? void 0 : f.address } : {} };
|
|
5279
5279
|
let m;
|
|
5280
5280
|
async function v() {
|
|
5281
|
-
return m || (m = await
|
|
5281
|
+
return m || (m = await L(t, Xt, "getBlock")({ blockTag: "latest" }), m);
|
|
5282
5282
|
}
|
|
5283
5283
|
let $;
|
|
5284
5284
|
async function P() {
|
|
5285
|
-
return $ || (s ? s.id : typeof e.chainId < "u" ? e.chainId : ($ = await
|
|
5285
|
+
return $ || (s ? s.id : typeof e.chainId < "u" ? e.chainId : ($ = await L(t, gs, "getChainId")({}), $));
|
|
5286
5286
|
}
|
|
5287
5287
|
if ((c.includes("blobVersionedHashes") || c.includes("sidecars")) && r && i) {
|
|
5288
5288
|
const S = xs({ blobs: r, kzg: i });
|
|
@@ -5312,7 +5312,7 @@ async function Cs(t, e) {
|
|
|
5312
5312
|
client: t
|
|
5313
5313
|
});
|
|
5314
5314
|
} else
|
|
5315
|
-
h.nonce = await
|
|
5315
|
+
h.nonce = await L(t, Jo, "getTransactionCount")({
|
|
5316
5316
|
address: f.address,
|
|
5317
5317
|
blockTag: "pending"
|
|
5318
5318
|
});
|
|
@@ -5348,7 +5348,7 @@ async function Cs(t, e) {
|
|
|
5348
5348
|
});
|
|
5349
5349
|
h.gasPrice = R;
|
|
5350
5350
|
}
|
|
5351
|
-
return c.includes("gas") && typeof a > "u" && (h.gas = await
|
|
5351
|
+
return c.includes("gas") && typeof a > "u" && (h.gas = await L(t, Yo, "estimateGas")({
|
|
5352
5352
|
...h,
|
|
5353
5353
|
account: f && { address: f.address, type: "json-rpc" }
|
|
5354
5354
|
})), un(h), delete h.parameters, h;
|
|
@@ -5382,13 +5382,13 @@ async function oc(t, e) {
|
|
|
5382
5382
|
})();
|
|
5383
5383
|
if ((P == null ? void 0 : P.type) === "json-rpc" || P === null) {
|
|
5384
5384
|
let F;
|
|
5385
|
-
r !== null && (F = await
|
|
5385
|
+
r !== null && (F = await L(t, gs, "getChainId")({}), _o({
|
|
5386
5386
|
currentChainId: F,
|
|
5387
5387
|
chain: r
|
|
5388
5388
|
}));
|
|
5389
|
-
const
|
|
5389
|
+
const J = (A = (R = (S = t.chain) == null ? void 0 : S.formatters) == null ? void 0 : R.transactionRequest) == null ? void 0 : A.format, C = (J || ir)({
|
|
5390
5390
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
5391
|
-
...ar($, { format:
|
|
5391
|
+
...ar($, { format: J }),
|
|
5392
5392
|
accessList: s,
|
|
5393
5393
|
authorizationList: a,
|
|
5394
5394
|
blobs: i,
|
|
@@ -5425,7 +5425,7 @@ async function oc(t, e) {
|
|
|
5425
5425
|
}
|
|
5426
5426
|
}
|
|
5427
5427
|
if ((P == null ? void 0 : P.type) === "local") {
|
|
5428
|
-
const F = await
|
|
5428
|
+
const F = await L(t, Cs, "prepareTransactionRequest")({
|
|
5429
5429
|
account: P,
|
|
5430
5430
|
accessList: s,
|
|
5431
5431
|
authorizationList: a,
|
|
@@ -5443,10 +5443,10 @@ async function oc(t, e) {
|
|
|
5443
5443
|
value: v,
|
|
5444
5444
|
...$,
|
|
5445
5445
|
to: q
|
|
5446
|
-
}),
|
|
5447
|
-
serializer:
|
|
5446
|
+
}), J = (M = r == null ? void 0 : r.serializers) == null ? void 0 : M.transaction, re = await P.signTransaction(F, {
|
|
5447
|
+
serializer: J
|
|
5448
5448
|
});
|
|
5449
|
-
return await
|
|
5449
|
+
return await L(t, ic, "sendRawTransaction")({
|
|
5450
5450
|
serializedTransaction: re
|
|
5451
5451
|
});
|
|
5452
5452
|
}
|
|
@@ -5525,7 +5525,7 @@ function uc(t, e = {}) {
|
|
|
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 We(n, e);
|
|
5529
5529
|
}
|
|
5530
5530
|
function dc(t, e = {}) {
|
|
5531
5531
|
let n = t;
|
|
@@ -5536,7 +5536,7 @@ function Ts(t, e) {
|
|
|
5536
5536
|
if (N(n) === 0 && t.length > 0)
|
|
5537
5537
|
throw new Qn();
|
|
5538
5538
|
if (N(e) && N(e) < 32)
|
|
5539
|
-
throw new
|
|
5539
|
+
throw new Li({
|
|
5540
5540
|
data: typeof e == "string" ? e : G(e),
|
|
5541
5541
|
params: t,
|
|
5542
5542
|
size: N(e)
|
|
@@ -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] = De(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 De(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 Le(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 Hi(e.type, {
|
|
5575
5575
|
docsPath: "/docs/contract/decodeAbiParameters"
|
|
5576
5576
|
});
|
|
5577
5577
|
}
|
|
5578
|
-
const Rr = 32,
|
|
5578
|
+
const Rr = 32, Zn = 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(Zn)), 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 f = 0;
|
|
5589
5589
|
const h = [];
|
|
5590
5590
|
for (let m = 0; m < c; ++m) {
|
|
5591
5591
|
t.setPosition(u + (d ? m * 32 : f));
|
|
5592
|
-
const [v, $] =
|
|
5592
|
+
const [v, $] = De(t, e, {
|
|
5593
5593
|
staticPosition: u
|
|
5594
5594
|
});
|
|
5595
5595
|
f += $, h.push(v);
|
|
@@ -5597,10 +5597,10 @@ function fc(t, e, { length: n, staticPosition: r }) {
|
|
|
5597
5597
|
return t.setPosition(r + 32), [h, 32];
|
|
5598
5598
|
}
|
|
5599
5599
|
if (jt(e)) {
|
|
5600
|
-
const i = pe(t.readBytes(
|
|
5600
|
+
const i = pe(t.readBytes(Zn)), 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] = De(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] = De(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(Zn)), 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, f] =
|
|
5651
|
+
const [d, f] = De(t, c, {
|
|
5652
5652
|
staticPosition: o
|
|
5653
5653
|
});
|
|
5654
5654
|
a += f, 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] = De(t, o, {
|
|
5660
5660
|
staticPosition: n
|
|
5661
5661
|
});
|
|
5662
5662
|
s[r ? i : o == null ? void 0 : o.name] = u, a += c;
|
|
@@ -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 D extends Error {
|
|
5691
5691
|
constructor(e, n = {}) {
|
|
5692
5692
|
var i;
|
|
5693
|
-
const r = n.cause instanceof
|
|
5693
|
+
const r = n.cause instanceof D ? n.cause.details : (i = n.cause) != null && i.message ? n.cause.message : n.details, s = n.cause instanceof D && n.cause.docsPath || n.docsPath, a = [
|
|
5694
5694
|
e || "An error occurred.",
|
|
5695
5695
|
"",
|
|
5696
5696
|
...n.metaMessages ? [...n.metaMessages, ""] : [],
|
|
@@ -5732,17 +5732,17 @@ function Ae(t, e) {
|
|
|
5732
5732
|
return n == null ? void 0 : n.groups;
|
|
5733
5733
|
}
|
|
5734
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 = /^\(.+?\).*?$/, Or = /^tuple(?<array>(\[(\d*)\])*)$/;
|
|
5735
|
-
function
|
|
5735
|
+
function Dn(t) {
|
|
5736
5736
|
let e = t.type;
|
|
5737
5737
|
if (Or.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 += Dn(a), s < n - 1 && (e += ", ");
|
|
5743
5743
|
}
|
|
5744
5744
|
const r = Ae(Or, t.type);
|
|
5745
|
-
return e += `)${(r == null ? void 0 : r.array) ?? ""}`,
|
|
5745
|
+
return e += `)${(r == null ? void 0 : r.array) ?? ""}`, Dn({
|
|
5746
5746
|
...t,
|
|
5747
5747
|
type: e
|
|
5748
5748
|
});
|
|
@@ -5754,7 +5754,7 @@ function Xe(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 += Dn(s), r !== n - 1 && (e += ", ");
|
|
5758
5758
|
}
|
|
5759
5759
|
return e;
|
|
5760
5760
|
}
|
|
@@ -5810,7 +5810,7 @@ const jc = /* @__PURE__ */ new Set(["indexed"]), Vn = /* @__PURE__ */ new Set([
|
|
|
5810
5810
|
"memory",
|
|
5811
5811
|
"storage"
|
|
5812
5812
|
]);
|
|
5813
|
-
class Bc extends
|
|
5813
|
+
class Bc extends D {
|
|
5814
5814
|
constructor({ type: e }) {
|
|
5815
5815
|
super("Unknown type.", {
|
|
5816
5816
|
metaMessages: [
|
|
@@ -5824,7 +5824,7 @@ class Bc extends L {
|
|
|
5824
5824
|
});
|
|
5825
5825
|
}
|
|
5826
5826
|
}
|
|
5827
|
-
class Nc extends
|
|
5827
|
+
class Nc extends D {
|
|
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 L {
|
|
|
5836
5836
|
});
|
|
5837
5837
|
}
|
|
5838
5838
|
}
|
|
5839
|
-
class Fc extends
|
|
5839
|
+
class Fc extends D {
|
|
5840
5840
|
constructor({ param: e }) {
|
|
5841
5841
|
super("Invalid ABI parameter.", {
|
|
5842
5842
|
details: e
|
|
@@ -5848,7 +5848,7 @@ class Fc extends L {
|
|
|
5848
5848
|
});
|
|
5849
5849
|
}
|
|
5850
5850
|
}
|
|
5851
|
-
class zc extends
|
|
5851
|
+
class zc extends D {
|
|
5852
5852
|
constructor({ param: e, name: n }) {
|
|
5853
5853
|
super("Invalid ABI parameter.", {
|
|
5854
5854
|
details: e,
|
|
@@ -5863,7 +5863,7 @@ class zc extends L {
|
|
|
5863
5863
|
});
|
|
5864
5864
|
}
|
|
5865
5865
|
}
|
|
5866
|
-
class
|
|
5866
|
+
class Lc extends D {
|
|
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 L {
|
|
|
5878
5878
|
});
|
|
5879
5879
|
}
|
|
5880
5880
|
}
|
|
5881
|
-
class
|
|
5881
|
+
class Zc extends D {
|
|
5882
5882
|
constructor({ param: e, type: n, modifier: r }) {
|
|
5883
5883
|
super("Invalid ABI parameter.", {
|
|
5884
5884
|
details: e,
|
|
@@ -5894,7 +5894,7 @@ class Dc extends L {
|
|
|
5894
5894
|
});
|
|
5895
5895
|
}
|
|
5896
5896
|
}
|
|
5897
|
-
class
|
|
5897
|
+
class Dc extends D {
|
|
5898
5898
|
constructor({ abiParameter: e }) {
|
|
5899
5899
|
super("Invalid ABI parameter.", {
|
|
5900
5900
|
details: JSON.stringify(e, null, 2),
|
|
@@ -5907,7 +5907,7 @@ class Lc extends L {
|
|
|
5907
5907
|
});
|
|
5908
5908
|
}
|
|
5909
5909
|
}
|
|
5910
|
-
class rt extends
|
|
5910
|
+
class rt extends D {
|
|
5911
5911
|
constructor({ signature: e, type: n }) {
|
|
5912
5912
|
super(`Invalid ${n} signature.`, {
|
|
5913
5913
|
details: e
|
|
@@ -5919,7 +5919,7 @@ class rt extends L {
|
|
|
5919
5919
|
});
|
|
5920
5920
|
}
|
|
5921
5921
|
}
|
|
5922
|
-
class Vc extends
|
|
5922
|
+
class Vc extends D {
|
|
5923
5923
|
constructor({ signature: e }) {
|
|
5924
5924
|
super("Unknown signature.", {
|
|
5925
5925
|
details: e
|
|
@@ -5931,7 +5931,7 @@ class Vc extends L {
|
|
|
5931
5931
|
});
|
|
5932
5932
|
}
|
|
5933
5933
|
}
|
|
5934
|
-
class Uc extends
|
|
5934
|
+
class Uc extends D {
|
|
5935
5935
|
constructor({ signature: e }) {
|
|
5936
5936
|
super("Invalid struct signature.", {
|
|
5937
5937
|
details: e,
|
|
@@ -5944,7 +5944,7 @@ class Uc extends L {
|
|
|
5944
5944
|
});
|
|
5945
5945
|
}
|
|
5946
5946
|
}
|
|
5947
|
-
class Gc extends
|
|
5947
|
+
class Gc extends D {
|
|
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 L {
|
|
|
5956
5956
|
});
|
|
5957
5957
|
}
|
|
5958
5958
|
}
|
|
5959
|
-
class
|
|
5959
|
+
class Wc extends D {
|
|
5960
5960
|
constructor({ current: e, depth: n }) {
|
|
5961
5961
|
super("Unbalanced parentheses.", {
|
|
5962
5962
|
metaMessages: [
|
|
@@ -5971,7 +5971,7 @@ class Hc extends L {
|
|
|
5971
5971
|
});
|
|
5972
5972
|
}
|
|
5973
5973
|
}
|
|
5974
|
-
function
|
|
5974
|
+
function Hc(t, e, n) {
|
|
5975
5975
|
let r = "";
|
|
5976
5976
|
if (n)
|
|
5977
5977
|
for (const s of Object.entries(n)) {
|
|
@@ -6112,13 +6112,13 @@ function qc(t, e = {}) {
|
|
|
6112
6112
|
};
|
|
6113
6113
|
throw new Vc({ signature: t });
|
|
6114
6114
|
}
|
|
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$_]*))?$/,
|
|
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$_]*))?$/, Yc = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, Jc = /^u?int$/;
|
|
6116
6116
|
function $e(t, e) {
|
|
6117
6117
|
var f, h;
|
|
6118
|
-
const n =
|
|
6118
|
+
const n = Hc(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
|
-
const r = Is.test(t), s = Ae(r ?
|
|
6121
|
+
const r = Is.test(t), s = Ae(r ? Yc : Kc, t);
|
|
6122
6122
|
if (!s)
|
|
6123
6123
|
throw new Fc({ param: t });
|
|
6124
6124
|
if (s.name && Xc(s.name))
|
|
@@ -6133,19 +6133,19 @@ function $e(t, e) {
|
|
|
6133
6133
|
c = { components: v };
|
|
6134
6134
|
} else if (s.type in o)
|
|
6135
6135
|
u = "tuple", c = { components: o[s.type] };
|
|
6136
|
-
else if (
|
|
6136
|
+
else if (Jc.test(s.type))
|
|
6137
6137
|
u = `${s.type}256`;
|
|
6138
6138
|
else if (u = s.type, (e == null ? void 0 : e.type) !== "struct" && !Ns(u))
|
|
6139
6139
|
throw new Nc({ type: u });
|
|
6140
6140
|
if (s.modifier) {
|
|
6141
6141
|
if (!((h = (f = e == null ? void 0 : e.modifiers) == null ? void 0 : f.has) != null && h.call(f, s.modifier)))
|
|
6142
|
-
throw new
|
|
6142
|
+
throw new Lc({
|
|
6143
6143
|
param: t,
|
|
6144
6144
|
type: e == null ? void 0 : e.type,
|
|
6145
6145
|
modifier: s.modifier
|
|
6146
6146
|
});
|
|
6147
6147
|
if (Vn.has(s.modifier) && !eu(u, !!s.array))
|
|
6148
|
-
throw new
|
|
6148
|
+
throw new Zc({
|
|
6149
6149
|
param: t,
|
|
6150
6150
|
type: e == null ? void 0 : e.type,
|
|
6151
6151
|
modifier: s.modifier
|
|
@@ -6177,7 +6177,7 @@ function X(t, e = [], n = "", r = 0) {
|
|
|
6177
6177
|
if (n === "")
|
|
6178
6178
|
return e;
|
|
6179
6179
|
if (r !== 0)
|
|
6180
|
-
throw new
|
|
6180
|
+
throw new Wc({ 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 Dc({ abiParameter: i });
|
|
6234
6234
|
const { array: c, type: d } = u;
|
|
6235
6235
|
if (d in e) {
|
|
6236
6236
|
if (n.has(d))
|
|
@@ -6285,10 +6285,10 @@ const su = (t) => {
|
|
|
6285
6285
|
const e = typeof t == "string" ? t : xc(t);
|
|
6286
6286
|
return ru(e);
|
|
6287
6287
|
};
|
|
6288
|
-
function
|
|
6288
|
+
function Ls(t) {
|
|
6289
6289
|
return vc(su(t));
|
|
6290
6290
|
}
|
|
6291
|
-
const au =
|
|
6291
|
+
const au = Ls, ur = (t) => Yt(Ls(t), 0, 4);
|
|
6292
6292
|
function dr(t) {
|
|
6293
6293
|
const { abi: e, args: n = [], name: r } = t, s = Pe(r, { strict: !1 }), a = e.filter((o) => s ? o.type === "function" ? ur(o) === r : o.type === "event" ? au(o) === r : !1 : "name" in o && o.name === r);
|
|
6294
6294
|
if (a.length === 0)
|
|
@@ -6311,7 +6311,7 @@ function dr(t) {
|
|
|
6311
6311
|
return f ? Un(c, f) : !1;
|
|
6312
6312
|
})) {
|
|
6313
6313
|
if (i && "inputs" in i && i.inputs) {
|
|
6314
|
-
const c =
|
|
6314
|
+
const c = Zs(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 Zs(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 Zs(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;
|
|
@@ -6393,7 +6393,7 @@ function iu(t) {
|
|
|
6393
6393
|
throw new Kt(void 0, { docsPath: Mr });
|
|
6394
6394
|
return {
|
|
6395
6395
|
abi: [s],
|
|
6396
|
-
functionName: ur(
|
|
6396
|
+
functionName: ur(He(s))
|
|
6397
6397
|
};
|
|
6398
6398
|
}
|
|
6399
6399
|
function dn(t) {
|
|
@@ -6452,21 +6452,21 @@ const cu = {
|
|
|
6452
6452
|
type: "error"
|
|
6453
6453
|
};
|
|
6454
6454
|
function lu(t) {
|
|
6455
|
-
const { abi: e, data: n } = t, r =
|
|
6455
|
+
const { abi: e, data: n } = t, r = Yt(n, 0, 4);
|
|
6456
6456
|
if (r === "0x")
|
|
6457
6457
|
throw new Qn();
|
|
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(He(i)));
|
|
6459
6459
|
if (!a)
|
|
6460
6460
|
throw new rs(r, {
|
|
6461
6461
|
docsPath: "/docs/contract/decodeErrorResult"
|
|
6462
6462
|
});
|
|
6463
6463
|
return {
|
|
6464
6464
|
abiItem: a,
|
|
6465
|
-
args: "inputs" in a && a.inputs && a.inputs.length > 0 ? Ts(a.inputs,
|
|
6465
|
+
args: "inputs" in a && a.inputs && a.inputs.length > 0 ? Ts(a.inputs, Yt(n, 4)) : void 0,
|
|
6466
6466
|
errorName: a.name
|
|
6467
6467
|
};
|
|
6468
6468
|
}
|
|
6469
|
-
function
|
|
6469
|
+
function Ds({ 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
|
+
${Ho(m)}`), super(e.shortMessage, {
|
|
6490
6490
|
cause: e,
|
|
6491
6491
|
docsPath: r,
|
|
6492
6492
|
metaMessages: [
|
|
@@ -6505,12 +6505,12 @@ ${Wo(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 ? Ds({
|
|
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 ? He(u, { includeName: !0 }) : void 0, f = 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] = h;
|
|
6577
6577
|
u = cu[m];
|
|
6578
6578
|
} else {
|
|
6579
|
-
const m = d ?
|
|
6579
|
+
const m = d ? He(d, { includeName: !0 }) : void 0, v = d && h ? Ds({
|
|
6580
6580
|
abiItem: d,
|
|
6581
6581
|
args: h,
|
|
6582
6582
|
includeFunctionName: !1,
|
|
@@ -6732,7 +6732,7 @@ async function Us(t, e) {
|
|
|
6732
6732
|
throw new y("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
|
|
6733
6733
|
if (u && R)
|
|
6734
6734
|
throw new y("Cannot provide both `code` & `to` as parameters.");
|
|
6735
|
-
const
|
|
6735
|
+
const J = u && c, re = d && f && R && c, C = J || re, B = J ? Cu({
|
|
6736
6736
|
code: u,
|
|
6737
6737
|
data: c
|
|
6738
6738
|
}) : re ? Tu({
|
|
@@ -6743,9 +6743,9 @@ async function Us(t, e) {
|
|
|
6743
6743
|
}) : c;
|
|
6744
6744
|
try {
|
|
6745
6745
|
un(e);
|
|
6746
|
-
const V = (s ? O(s) : void 0) || a, Q = ws(M),
|
|
6746
|
+
const V = (s ? O(s) : void 0) || a, Q = ws(M), Y = (de = (K = (je = t.chain) == null ? void 0 : je.formatters) == null ? void 0 : K.transactionRequest) == null ? void 0 : de.format, Be = (Y || ir)({
|
|
6747
6747
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
6748
|
-
...ar(q, { format:
|
|
6748
|
+
...ar(q, { format: Y }),
|
|
6749
6749
|
from: F == null ? void 0 : F.address,
|
|
6750
6750
|
accessList: i,
|
|
6751
6751
|
blobs: o,
|
|
@@ -6780,8 +6780,8 @@ 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: Q, offchainLookupSignature:
|
|
6784
|
-
if (t.ccipRead !== !1 && (V == null ? void 0 : V.slice(0, 10)) ===
|
|
6783
|
+
const V = $u(se), { offchainLookup: Q, offchainLookupSignature: Y } = await import("./ccip-BZMQ5y3q.js");
|
|
6784
|
+
if (t.ccipRead !== !1 && (V == null ? void 0 : V.slice(0, 10)) === Y && R)
|
|
6785
6785
|
return { data: await Q(t, { data: V, to: R }) };
|
|
6786
6786
|
throw C && (V == null ? void 0 : V.slice(0, 10)) === "0x101bb98d" ? new yu({ factory: d }) : xu(se, {
|
|
6787
6787
|
...e,
|
|
@@ -6874,7 +6874,7 @@ async function ku(t, e) {
|
|
|
6874
6874
|
functionName: a
|
|
6875
6875
|
});
|
|
6876
6876
|
try {
|
|
6877
|
-
const { data: u } = await
|
|
6877
|
+
const { data: u } = await L(t, Us, "call")({
|
|
6878
6878
|
...i,
|
|
6879
6879
|
data: o,
|
|
6880
6880
|
to: r
|
|
@@ -6931,7 +6931,7 @@ function Ou(t, e = {}) {
|
|
|
6931
6931
|
const { dedupe: s = !1, retryDelay: a = 150, retryCount: i = 3, uid: o } = {
|
|
6932
6932
|
...e,
|
|
6933
6933
|
...r
|
|
6934
|
-
}, u = s ? Nt(
|
|
6934
|
+
}, u = s ? Nt(Yn(`${o}.${cn(n)}`)) : void 0;
|
|
6935
6935
|
return Su(() => Ru(async () => {
|
|
6936
6936
|
try {
|
|
6937
6937
|
return await t(n);
|
|
@@ -6964,8 +6964,8 @@ 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 Ze.code:
|
|
6968
|
+
throw new Ze(d);
|
|
6969
6969
|
case It.code:
|
|
6970
6970
|
throw new It(d);
|
|
6971
6971
|
case St.code:
|
|
@@ -6977,7 +6977,7 @@ function Ou(t, e = {}) {
|
|
|
6977
6977
|
case Mt.code:
|
|
6978
6978
|
throw new Mt(d);
|
|
6979
6979
|
case 5e3:
|
|
6980
|
-
throw new
|
|
6980
|
+
throw new Ze(d);
|
|
6981
6981
|
default:
|
|
6982
6982
|
throw c instanceof y ? c : new Io(d);
|
|
6983
6983
|
}
|
|
@@ -7003,7 +7003,7 @@ function Mu(t) {
|
|
|
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 });
|
|
7005
7005
|
try {
|
|
7006
|
-
const { data: d } = await
|
|
7006
|
+
const { data: d } = await L(t, Us, "call")({
|
|
7007
7007
|
batch: !1,
|
|
7008
7008
|
data: `${c}${a ? a.replace("0x", "") : ""}`,
|
|
7009
7009
|
to: r,
|
|
@@ -7050,7 +7050,7 @@ async function Bu(t, e) {
|
|
|
7050
7050
|
functionName: o
|
|
7051
7051
|
});
|
|
7052
7052
|
try {
|
|
7053
|
-
return await
|
|
7053
|
+
return await L(t, oc, "sendTransaction")({
|
|
7054
7054
|
data: `${d}${i ? i.replace("0x", "") : ""}`,
|
|
7055
7055
|
to: s,
|
|
7056
7056
|
account: c,
|
|
@@ -7068,14 +7068,14 @@ async function Bu(t, e) {
|
|
|
7068
7068
|
}
|
|
7069
7069
|
}
|
|
7070
7070
|
const Gn = 256;
|
|
7071
|
-
let
|
|
7071
|
+
let Lt = Gn, Zt;
|
|
7072
7072
|
function Gs(t = 11) {
|
|
7073
|
-
if (!
|
|
7074
|
-
|
|
7073
|
+
if (!Zt || Lt + t > Gn * 2) {
|
|
7074
|
+
Zt = "", Lt = 0;
|
|
7075
7075
|
for (let e = 0; e < Gn; e++)
|
|
7076
|
-
|
|
7076
|
+
Zt += (256 + Math.random() * 256 | 0).toString(16).substring(1);
|
|
7077
7077
|
}
|
|
7078
|
-
return
|
|
7078
|
+
return Zt.substring(Lt, Lt++ + 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: f, value: h } = t.transport({
|
|
@@ -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
|
|
7204
|
-
var
|
|
7203
|
+
const Lu = "2.13.8", Zu = () => `@wagmi/core@${Lu}`;
|
|
7204
|
+
var Ws = 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,
|
|
7208
|
+
}, en, Hs;
|
|
7209
7209
|
class Me extends Error {
|
|
7210
7210
|
get docsBaseUrl() {
|
|
7211
7211
|
return "https://wagmi.sh/core";
|
|
7212
7212
|
}
|
|
7213
7213
|
get version() {
|
|
7214
|
-
return
|
|
7214
|
+
return Zu();
|
|
7215
7215
|
}
|
|
7216
7216
|
constructor(e, n = {}) {
|
|
7217
7217
|
var r;
|
|
@@ -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 Ws(this, en, "m", Hs).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(), Hs = function t(e, n) {
|
|
7262
|
+
return n != null && n(e) ? e : e.cause ? Ws(this, en, "m", t).call(this, e.cause, n) : e;
|
|
7263
7263
|
};
|
|
7264
|
-
class
|
|
7264
|
+
class Du extends Me {
|
|
7265
7265
|
constructor() {
|
|
7266
7266
|
super("Connector not connected."), Object.defineProperty(this, "name", {
|
|
7267
7267
|
enumerable: !0,
|
|
@@ -7330,7 +7330,7 @@ async function qs(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 Du();
|
|
7334
7334
|
const r = e.chainId ?? n.chainId, s = await n.connector.getChainId();
|
|
7335
7335
|
if (s !== n.chainId)
|
|
7336
7336
|
throw new Uu({
|
|
@@ -7341,7 +7341,7 @@ async function qs(t, e = {}) {
|
|
|
7341
7341
|
if (a.getClient)
|
|
7342
7342
|
return a.getClient({ chainId: r });
|
|
7343
7343
|
const i = ue(e.account ?? n.accounts[0]);
|
|
7344
|
-
if (i.address =
|
|
7344
|
+
if (i.address = Ji(i.address), e.account && !n.accounts.some((c) => c.toLowerCase() === i.address.toLowerCase()))
|
|
7345
7345
|
throw new Vu({
|
|
7346
7346
|
address: i.address,
|
|
7347
7347
|
connector: a
|
|
@@ -7354,7 +7354,7 @@ async function qs(t, e = {}) {
|
|
|
7354
7354
|
transport: (c) => zu(u)({ ...c, retryCount: 0 })
|
|
7355
7355
|
});
|
|
7356
7356
|
}
|
|
7357
|
-
async function
|
|
7357
|
+
async function Wn(t, e) {
|
|
7358
7358
|
const { abi: n, chainId: r, connector: s, ...a } = e;
|
|
7359
7359
|
let i;
|
|
7360
7360
|
e.account ? i = e.account : i = (await qs(t, {
|
|
@@ -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 Wn(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) => Wn(e, {
|
|
7382
7382
|
...n,
|
|
7383
7383
|
...t.address ? { address: t.address } : {},
|
|
7384
7384
|
...t.functionName ? { functionName: t.functionName } : {},
|
|
@@ -7415,7 +7415,7 @@ async function Br(t, e) {
|
|
|
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 Wn(t, {
|
|
7419
7419
|
...i,
|
|
7420
7420
|
account: n,
|
|
7421
7421
|
chainId: r
|
|
@@ -7620,10 +7620,10 @@ const be = [
|
|
|
7620
7620
|
outputs: [{ name: "", internalType: "bool", type: "bool" }],
|
|
7621
7621
|
stateMutability: "nonpayable"
|
|
7622
7622
|
}
|
|
7623
|
-
],
|
|
7623
|
+
], Wu = /* @__PURE__ */ Ks({
|
|
7624
7624
|
abi: be,
|
|
7625
7625
|
functionName: "allowance"
|
|
7626
|
-
}),
|
|
7626
|
+
}), Hu = /* @__PURE__ */ Ks({
|
|
7627
7627
|
abi: be,
|
|
7628
7628
|
functionName: "balanceOf"
|
|
7629
7629
|
}), qu = /* @__PURE__ */ yr({
|
|
@@ -7632,10 +7632,10 @@ const be = [
|
|
|
7632
7632
|
}), Ku = /* @__PURE__ */ yr({
|
|
7633
7633
|
abi: be,
|
|
7634
7634
|
functionName: "mint"
|
|
7635
|
-
}),
|
|
7635
|
+
}), Yu = /* @__PURE__ */ yr({
|
|
7636
7636
|
abi: be,
|
|
7637
7637
|
functionName: "mintPayable"
|
|
7638
|
-
}),
|
|
7638
|
+
}), Ju = /* @__PURE__ */ mr({
|
|
7639
7639
|
abi: be,
|
|
7640
7640
|
functionName: "approve"
|
|
7641
7641
|
}), Qu = /* @__PURE__ */ mr({
|
|
@@ -7644,10 +7644,10 @@ const be = [
|
|
|
7644
7644
|
}), Xu = /* @__PURE__ */ mr({
|
|
7645
7645
|
abi: be,
|
|
7646
7646
|
functionName: "mintPayable"
|
|
7647
|
-
}), ed = "
|
|
7648
|
-
class
|
|
7647
|
+
}), ed = "0x6080604052348015600e575f80fd5b50610b398061001c5f395ff3fe6080604052600436106100d9575f3560e01c806340c10f191161007c57806395d89b411161005757806395d89b4114610323578063a9059cbb14610368578063d505accf14610387578063dd62ed3e146103a6575f80fd5b806340c10f19146102a257806370a08231146102c15780637ecebe00146102f2575f80fd5b806318160ddd116100b757806318160ddd1461017857806323b872dd1461019e578063313ce567146101bd5780633644e515146101d8575f80fd5b806306fdde03146100dd578063095ea7b31461013457806317d304b014610163575b5f80fd5b3480156100e8575f80fd5b5060408051808201909152600a81527f4d6f636b2045524332300000000000000000000000000000000000000000000060208201525b60405161012b9190610930565b60405180910390f35b34801561013f575f80fd5b5061015361014e3660046109ab565b6103c5565b604051901515815260200161012b565b6101766101713660046109ab565b610452565b005b348015610183575f80fd5b506805345cdf77eb68f44c545b60405190815260200161012b565b3480156101a9575f80fd5b506101536101b83660046109d3565b6104d8565b3480156101c8575f80fd5b506040516012815260200161012b565b3480156101e3575f80fd5b50604080518082018252600a81527f4d6f636b2045524332300000000000000000000000000000000000000000000060209182015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81527fa5c9260bf133e670eeaf4d41f5c4289fc23bb146bf11ba8fa70a2ea91ba1a330918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc69181019190915246606082015230608082015260a09020610190565b3480156102ad575f80fd5b506101766102bc3660046109ab565b6104ca565b3480156102cc575f80fd5b506101906102db366004610a0d565b6387a211a2600c9081525f91909152602090205490565b3480156102fd575f80fd5b5061019061030c366004610a0d565b6338377508600c9081525f91909152602090205490565b34801561032e575f80fd5b5060408051808201909152600481527f4d4f434b00000000000000000000000000000000000000000000000000000000602082015261011e565b348015610373575f80fd5b506101536103823660046109ab565b6105a7565b348015610392575f80fd5b506101766103a1366004610a2d565b61061e565b3480156103b1575f80fd5b506101906103c0366004610a9a565b610834565b5f73ffffffffffffffffffffffffffffffffffffffff83166e22d473030f116ddee9f6b43ac78ba3188219151761040357633f68539a5f526004601cfd5b82602052637f5e9f20600c52335f52816034600c2055815f52602c5160601c337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560205fa35060015b92915050565b61045d606482610acb565b3410156104ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4d6f636b45524332303a2067696d6d65206d6f7265206d6f6e65792100000000604482015260640160405180910390fd5b6104d482826108b4565b5050565b5f8360601b6e22d473030f116ddee9f6b43ac78ba3331461052d5733602052637f5e9f208117600c526034600c20805480191561052a5780851115610524576313be252b5f526004601cfd5b84810382555b50505b6387a211a28117600c526020600c208054808511156105535763f4d678b85f526004601cfd5b84810382555050835f526020600c208381540181555082602052600c5160601c8160601c7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a3505060019392505050565b5f6387a211a2600c52335f526020600c208054808411156105cf5763f4d678b85f526004601cfd5b83810382555050825f526020600c208281540181555081602052600c5160601c337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff86166e22d473030f116ddee9f6b43ac78ba3188519151761065b57633f68539a5f526004601cfd5b60408051808201909152600a81527f4d6f636b204552433230000000000000000000000000000000000000000000006020909101527fa5c9260bf133e670eeaf4d41f5c4289fc23bb146bf11ba8fa70a2ea91ba1a3307fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6428610156106e757631a15a3cc5f526004601cfd5b6040518960601b60601c99508860601b60601c985065383775081901600e52895f526020600c2080547f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f835284602084015283604084015246606084015230608084015260a08320602e527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c983528b60208401528a60408401528960608401528060808401528860a084015260c08320604e526042602c205f528760ff16602052866040528560605260208060805f60015afa8c3d51146107cf5763ddafbaef5f526004601cfd5b019055777f5e9f20000000000000000000000000000000000000000089176040526034602c20889055888a7f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925602060608501a360405250505f60605250505050505050565b5f7fffffffffffffffffffffffffffffffffffdd2b8cfcf0ee922116094bc538745d73ffffffffffffffffffffffffffffffffffffffff83160161089957507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61044c565b50602052637f5e9f20600c9081525f91909152603490205490565b6805345cdf77eb68f44c54818101818110156108d75763e5cfe9575f526004601cfd5b806805345cdf77eb68f44c5550506387a211a2600c52815f526020600c208181540181555080602052600c5160601c5f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a35050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146109a6575f80fd5b919050565b5f80604083850312156109bc575f80fd5b6109c583610983565b946020939093013593505050565b5f805f606084860312156109e5575f80fd5b6109ee84610983565b92506109fc60208501610983565b929592945050506040919091013590565b5f60208284031215610a1d575f80fd5b610a2682610983565b9392505050565b5f805f805f805f60e0888a031215610a43575f80fd5b610a4c88610983565b9650610a5a60208901610983565b95506040880135945060608801359350608088013560ff81168114610a7d575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215610aab575f80fd5b610ab483610983565b9150610ac260208401610983565b90509250929050565b5f82610afe577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea2646970667358221220dcec948e703d7841a9bac2a0a714923268527cd72b6ee68975fb52d9176ce95b64736f6c634300081a0033";
|
|
7648
|
+
class Ys extends ra {
|
|
7649
7649
|
async balanceOf(e, n) {
|
|
7650
|
-
return await
|
|
7650
|
+
return await Hu(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 Wu(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
|
|
@@ -7666,7 +7666,7 @@ class Js extends ra {
|
|
|
7666
7666
|
return await this.awaitResult(this.approveRaw(e, n, r));
|
|
7667
7667
|
}
|
|
7668
7668
|
async approveRaw(e, n, r) {
|
|
7669
|
-
const { request: s, result: a } = await
|
|
7669
|
+
const { request: s, result: a } = await Ju(this._config, {
|
|
7670
7670
|
address: this.assertValidAddress(),
|
|
7671
7671
|
args: [e, n],
|
|
7672
7672
|
...this.optionallyAttachAccount(),
|
|
@@ -7705,7 +7705,7 @@ class Js extends ra {
|
|
|
7705
7705
|
...r
|
|
7706
7706
|
}
|
|
7707
7707
|
);
|
|
7708
|
-
return { hash: await
|
|
7708
|
+
return { hash: await Yu(this._config, s), result: a };
|
|
7709
7709
|
}
|
|
7710
7710
|
buildParameters(e = {}, n) {
|
|
7711
7711
|
const [, r] = this.validateDeploymentConfig(e, n);
|
|
@@ -7770,7 +7770,7 @@ const td = [
|
|
|
7770
7770
|
if (e.at(0) === "generate")
|
|
7771
7771
|
return Ad({ account: o == null ? void 0 : o.address, chainId: c });
|
|
7772
7772
|
if (e.at(0) === "erc20") {
|
|
7773
|
-
let A = new
|
|
7773
|
+
let A = new Ys({ config: i, account: o }, {});
|
|
7774
7774
|
return await A.deploy(), {
|
|
7775
7775
|
erc20: A.assertValidAddress()
|
|
7776
7776
|
};
|
|
@@ -7867,7 +7867,7 @@ const td = [
|
|
|
7867
7867
|
account: o
|
|
7868
7868
|
}), m.CGDAIncentive(C);
|
|
7869
7869
|
}
|
|
7870
|
-
}), F = await Promise.all(q),
|
|
7870
|
+
}), F = await Promise.all(q), J = {
|
|
7871
7871
|
protocolFee: A.protocolFee,
|
|
7872
7872
|
maxParticipants: A.maxParticipants,
|
|
7873
7873
|
budget: M,
|
|
@@ -7875,8 +7875,8 @@ const td = [
|
|
|
7875
7875
|
allowList: await ea(A, { core: m }),
|
|
7876
7876
|
incentives: F
|
|
7877
7877
|
};
|
|
7878
|
-
A.validator && (
|
|
7879
|
-
const re = await m.createBoost(
|
|
7878
|
+
A.validator && (J.validator = m.SignerValidator(A.validator));
|
|
7879
|
+
const re = await m.createBoost(J);
|
|
7880
7880
|
S.push(re.id.toString());
|
|
7881
7881
|
}
|
|
7882
7882
|
return {
|
|
@@ -7886,7 +7886,7 @@ const td = [
|
|
|
7886
7886
|
};
|
|
7887
7887
|
async function et(t, e, n, r) {
|
|
7888
7888
|
if (n && e) {
|
|
7889
|
-
let s = new
|
|
7889
|
+
let s = new Ys(r, n);
|
|
7890
7890
|
await Ed(r, s, t, zr(e.toString()));
|
|
7891
7891
|
}
|
|
7892
7892
|
}
|
|
@@ -7899,12 +7899,12 @@ async function rd(t) {
|
|
|
7899
7899
|
const sd = l.custom(ma, "invalid Hex payload"), k = l.string().transform((t, e) => (/^0x[a-fA-F0-9]{40}$/.test(t) || e.addIssue({
|
|
7900
7900
|
code: l.ZodIssueCode.custom,
|
|
7901
7901
|
message: `Invalid Address ${t}`
|
|
7902
|
-
}), t)).pipe(l.custom(tn, "invalid eth address")),
|
|
7902
|
+
}), t)).pipe(l.custom(tn, "invalid eth address")), Js = l.coerce.number().min(1).max(2).transform(BigInt).pipe(l.custom()), ad = l.object({
|
|
7903
7903
|
type: l.literal("ManagedBudgetWithFeesV2"),
|
|
7904
7904
|
owner: k,
|
|
7905
7905
|
authorized: l.array(k),
|
|
7906
7906
|
managementFee: l.coerce.bigint().nonnegative().lt(10000n),
|
|
7907
|
-
roles: l.array(
|
|
7907
|
+
roles: l.array(Js)
|
|
7908
7908
|
}).refine(
|
|
7909
7909
|
(t) => t.authorized.length === t.roles.length,
|
|
7910
7910
|
"length mismatch authorized and roles"
|
|
@@ -7912,7 +7912,7 @@ const sd = l.custom(ma, "invalid Hex payload"), k = l.string().transform((t, e)
|
|
|
7912
7912
|
type: l.literal("ManagedBudget"),
|
|
7913
7913
|
owner: k,
|
|
7914
7914
|
authorized: l.array(k),
|
|
7915
|
-
roles: l.array(
|
|
7915
|
+
roles: l.array(Js)
|
|
7916
7916
|
}).refine(
|
|
7917
7917
|
(t) => t.authorized.length === t.roles.length,
|
|
7918
7918
|
"length mismatch authorized and roles"
|