@pufferfinance/puffer-sdk 1.2.2 → 1.3.0

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.
@@ -2,10 +2,10 @@ var ci = Object.defineProperty;
2
2
  var di = (e, t, n) => t in e ? ci(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var j = (e, t, n) => di(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  const li = "1.0.0";
5
- let ne = class $n extends Error {
5
+ let ne = class kn extends Error {
6
6
  constructor(t, n = {}) {
7
7
  var i;
8
- const r = n.cause instanceof $n ? n.cause.details : (i = n.cause) != null && i.message ? n.cause.message : n.details, a = n.cause instanceof $n && n.cause.docsPath || n.docsPath, s = [
8
+ const r = n.cause instanceof kn ? n.cause.details : (i = n.cause) != null && i.message ? n.cause.message : n.details, a = n.cause instanceof kn && n.cause.docsPath || n.docsPath, s = [
9
9
  t || "An error occurred.",
10
10
  "",
11
11
  ...n.metaMessages ? [...n.metaMessages, ""] : [],
@@ -42,22 +42,22 @@ let ne = class $n extends Error {
42
42
  }), n.cause && (this.cause = n.cause), this.details = r, this.docsPath = a, this.metaMessages = n.metaMessages, this.shortMessage = t;
43
43
  }
44
44
  };
45
- function ke(e, t) {
45
+ function $e(e, t) {
46
46
  const n = e.exec(t);
47
47
  return n == null ? void 0 : n.groups;
48
48
  }
49
49
  const Pa = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, Ca = /^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)?$/, Aa = /^\(.+?\).*?$/, qr = /^tuple(?<array>(\[(\d*)\])*)$/;
50
- function kn(e) {
50
+ function $n(e) {
51
51
  let t = e.type;
52
52
  if (qr.test(e.type) && "components" in e) {
53
53
  t = "(";
54
54
  const n = e.components.length;
55
55
  for (let a = 0; a < n; a++) {
56
56
  const s = e.components[a];
57
- t += kn(s), a < n - 1 && (t += ", ");
57
+ t += $n(s), a < n - 1 && (t += ", ");
58
58
  }
59
- const r = ke(qr, e.type);
60
- return t += `)${(r == null ? void 0 : r.array) ?? ""}`, kn({
59
+ const r = $e(qr, e.type);
60
+ return t += `)${(r == null ? void 0 : r.array) ?? ""}`, $n({
61
61
  ...e,
62
62
  type: t
63
63
  });
@@ -69,7 +69,7 @@ function ct(e) {
69
69
  const n = e.length;
70
70
  for (let r = 0; r < n; r++) {
71
71
  const a = e[r];
72
- t += kn(a), r !== n - 1 && (t += ", ");
72
+ t += $n(a), r !== n - 1 && (t += ", ");
73
73
  }
74
74
  return t;
75
75
  }
@@ -81,35 +81,35 @@ function yi(e) {
81
81
  return Ia.test(e);
82
82
  }
83
83
  function fi(e) {
84
- return ke(Ia, e);
84
+ return $e(Ia, e);
85
85
  }
86
86
  const Ma = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
87
87
  function mi(e) {
88
88
  return Ma.test(e);
89
89
  }
90
90
  function bi(e) {
91
- return ke(Ma, e);
91
+ return $e(Ma, e);
92
92
  }
93
93
  const Sa = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;
94
94
  function hi(e) {
95
95
  return Sa.test(e);
96
96
  }
97
97
  function gi(e) {
98
- return ke(Sa, e);
98
+ return $e(Sa, e);
99
99
  }
100
100
  const Ba = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;
101
- function $a(e) {
101
+ function ka(e) {
102
102
  return Ba.test(e);
103
103
  }
104
104
  function wi(e) {
105
- return ke(Ba, e);
105
+ return $e(Ba, e);
106
106
  }
107
- const ka = /^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;
107
+ const $a = /^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;
108
108
  function Ti(e) {
109
- return ka.test(e);
109
+ return $a.test(e);
110
110
  }
111
111
  function vi(e) {
112
- return ke(ka, e);
112
+ return $e($a, e);
113
113
  }
114
114
  const xi = /^fallback\(\)$/;
115
115
  function Ei(e) {
@@ -177,7 +177,7 @@ class Bi extends ne {
177
177
  });
178
178
  }
179
179
  }
180
- class $i extends ne {
180
+ class ki extends ne {
181
181
  constructor({ param: t, type: n, modifier: r }) {
182
182
  super("Invalid ABI parameter.", {
183
183
  details: t,
@@ -192,7 +192,7 @@ class $i extends ne {
192
192
  });
193
193
  }
194
194
  }
195
- class ki extends ne {
195
+ class $i extends ne {
196
196
  constructor({ param: t, type: n, modifier: r }) {
197
197
  super("Invalid ABI parameter.", {
198
198
  details: t,
@@ -422,7 +422,7 @@ function Ne(e, t) {
422
422
  const n = Ui(e, t == null ? void 0 : t.type);
423
423
  if (wn.has(n))
424
424
  return wn.get(n);
425
- const r = Aa.test(e), a = ke(r ? Li : ji, e);
425
+ const r = Aa.test(e), a = $e(r ? Li : ji, e);
426
426
  if (!a)
427
427
  throw new Si({ param: e });
428
428
  if (a.name && qi(a.name))
@@ -431,9 +431,9 @@ function Ne(e, t) {
431
431
  let u, c = {};
432
432
  if (r) {
433
433
  u = "tuple";
434
- const m = ie(a.type), f = [], y = m.length;
435
- for (let b = 0; b < y; b++)
436
- f.push(Ne(m[b], { structs: o }));
434
+ const b = ie(a.type), f = [], y = b.length;
435
+ for (let m = 0; m < y; m++)
436
+ f.push(Ne(b[m], { structs: o }));
437
437
  c = { components: f };
438
438
  } else if (a.type in o)
439
439
  u = "tuple", c = { components: o[a.type] };
@@ -443,13 +443,13 @@ function Ne(e, t) {
443
443
  throw new Mi({ type: u });
444
444
  if (a.modifier) {
445
445
  if (!((p = (d = t == null ? void 0 : t.modifiers) == null ? void 0 : d.has) != null && p.call(d, a.modifier)))
446
- throw new $i({
446
+ throw new ki({
447
447
  param: e,
448
448
  type: t == null ? void 0 : t.type,
449
449
  modifier: a.modifier
450
450
  });
451
451
  if (On.has(a.modifier) && !Gi(u, !!a.array))
452
- throw new ki({
452
+ throw new $i({
453
453
  param: e,
454
454
  type: t == null ? void 0 : t.type,
455
455
  modifier: a.modifier
@@ -498,7 +498,7 @@ function Wi(e) {
498
498
  const t = {}, n = e.length;
499
499
  for (let i = 0; i < n; i++) {
500
500
  const o = e[i];
501
- if (!$a(o))
501
+ if (!ka(o))
502
502
  continue;
503
503
  const u = wi(o);
504
504
  if (!u)
@@ -532,7 +532,7 @@ function Ra(e, t, n = /* @__PURE__ */ new Set()) {
532
532
  if (Aa.test(i.type))
533
533
  r.push(i);
534
534
  else {
535
- const u = ke(Vi, i.type);
535
+ const u = $e(Vi, i.type);
536
536
  if (!(u != null && u.type))
537
537
  throw new Oi({ abiParameter: i });
538
538
  const { array: c, type: l } = u;
@@ -556,7 +556,7 @@ function Zi(e) {
556
556
  const t = Wi(e), n = [], r = e.length;
557
557
  for (let a = 0; a < r; a++) {
558
558
  const s = e[a];
559
- $a(s) || n.push(Hi(s, t));
559
+ ka(s) || n.push(Hi(s, t));
560
560
  }
561
561
  return n;
562
562
  }
@@ -566,7 +566,7 @@ function S(e, t, n) {
566
566
  return ((a = e[t.name]) == null ? void 0 : a.call(e, r)) ?? ((s = e[n]) == null ? void 0 : s.call(e, r)) ?? t(e, r);
567
567
  };
568
568
  }
569
- function he(e, { includeName: t = !1 } = {}) {
569
+ function be(e, { includeName: t = !1 } = {}) {
570
570
  if (e.type !== "function" && e.type !== "event" && e.type !== "error")
571
571
  throw new lo(e.type);
572
572
  return `${e.name}(${Xt(e.inputs, { includeName: t })})`;
@@ -577,11 +577,11 @@ function Xt(e, { includeName: t = !1 } = {}) {
577
577
  function Ki(e, { includeName: t }) {
578
578
  return e.type.startsWith("tuple") ? `(${Xt(e.components, { includeName: t })})${e.type.slice(5)}` : e.type + (t && e.name ? ` ${e.name}` : "");
579
579
  }
580
- function de(e, { strict: t = !0 } = {}) {
580
+ function ce(e, { strict: t = !0 } = {}) {
581
581
  return !e || typeof e != "string" ? !1 : t ? /^0x[0-9a-fA-F]*$/.test(e) : e.startsWith("0x");
582
582
  }
583
583
  function L(e) {
584
- return de(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
584
+ return ce(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
585
585
  }
586
586
  const Yi = "2.14.0", Ji = (e) => e, rr = (e) => e, Xi = () => `viem@${Yi}`;
587
587
  class v extends Error {
@@ -855,8 +855,8 @@ class so extends v {
855
855
  constructor(t, n) {
856
856
  super("Found ambiguous types in overloaded ABI items.", {
857
857
  metaMessages: [
858
- `\`${t.type}\` in \`${he(t.abiItem)}\`, and`,
859
- `\`${n.type}\` in \`${he(n.abiItem)}\``,
858
+ `\`${t.type}\` in \`${be(t.abiItem)}\`, and`,
859
+ `\`${n.type}\` in \`${be(n.abiItem)}\``,
860
860
  "",
861
861
  "These types encode differently and cannot be distinguished at runtime.",
862
862
  "Remove one of the ambiguous items in the ABI."
@@ -920,7 +920,7 @@ class ft extends v {
920
920
  class en extends v {
921
921
  constructor({ abiItem: t, param: n }) {
922
922
  super([
923
- `Expected a topic for indexed event parameter${n.name ? ` "${n.name}"` : ""} on event "${he(t, { includeName: !0 })}".`
923
+ `Expected a topic for indexed event parameter${n.name ? ` "${n.name}"` : ""} on event "${be(t, { includeName: !0 })}".`
924
924
  ].join(`
925
925
  `)), Object.defineProperty(this, "name", {
926
926
  enumerable: !0,
@@ -1095,7 +1095,7 @@ function tn(e, { dir: t = "left" } = {}) {
1095
1095
  r++;
1096
1096
  return n = t === "left" ? n.slice(r) : n.slice(0, n.length - r), typeof e == "string" ? (n.length === 1 && t === "right" && (n = `${n}0`), `0x${n.length % 2 === 1 ? `0${n}` : n}`) : n;
1097
1097
  }
1098
- function pe(e, { size: t }) {
1098
+ function le(e, { size: t }) {
1099
1099
  if (L(e) > t)
1100
1100
  throw new bo({
1101
1101
  givenSize: L(e),
@@ -1104,7 +1104,7 @@ function pe(e, { size: t }) {
1104
1104
  }
1105
1105
  function Ye(e, t = {}) {
1106
1106
  const { signed: n } = t;
1107
- t.size && pe(e, { size: t.size });
1107
+ t.size && le(e, { size: t.size });
1108
1108
  const r = BigInt(e);
1109
1109
  if (!n)
1110
1110
  return r;
@@ -1120,14 +1120,14 @@ function Oe(e, t = {}) {
1120
1120
  }
1121
1121
  function La(e, t = {}) {
1122
1122
  const n = `0x${Number(e)}`;
1123
- return typeof t.size == "number" ? (pe(n, { size: t.size }), rt(n, { size: t.size })) : n;
1123
+ return typeof t.size == "number" ? (le(n, { size: t.size }), rt(n, { size: t.size })) : n;
1124
1124
  }
1125
1125
  function q(e, t = {}) {
1126
1126
  let n = "";
1127
1127
  for (let a = 0; a < e.length; a++)
1128
1128
  n += ho[e[a]];
1129
1129
  const r = `0x${n}`;
1130
- return typeof t.size == "number" ? (pe(r, { size: t.size }), rt(r, { dir: "right", size: t.size })) : r;
1130
+ return typeof t.size == "number" ? (le(r, { size: t.size }), rt(r, { dir: "right", size: t.size })) : r;
1131
1131
  }
1132
1132
  function O(e, t = {}) {
1133
1133
  const { signed: n, size: r } = t, a = BigInt(e);
@@ -1154,13 +1154,13 @@ function ar(e, t = {}) {
1154
1154
  }
1155
1155
  const wo = /* @__PURE__ */ new TextEncoder();
1156
1156
  function Ie(e, t = {}) {
1157
- return typeof e == "number" || typeof e == "bigint" ? vo(e, t) : typeof e == "boolean" ? To(e, t) : de(e) ? Le(e, t) : me(e, t);
1157
+ return typeof e == "number" || typeof e == "bigint" ? vo(e, t) : typeof e == "boolean" ? To(e, t) : ce(e) ? Le(e, t) : fe(e, t);
1158
1158
  }
1159
1159
  function To(e, t = {}) {
1160
1160
  const n = new Uint8Array(1);
1161
- return n[0] = Number(e), typeof t.size == "number" ? (pe(n, { size: t.size }), rt(n, { size: t.size })) : n;
1161
+ return n[0] = Number(e), typeof t.size == "number" ? (le(n, { size: t.size }), rt(n, { size: t.size })) : n;
1162
1162
  }
1163
- const ye = {
1163
+ const pe = {
1164
1164
  zero: 48,
1165
1165
  nine: 57,
1166
1166
  A: 65,
@@ -1169,16 +1169,16 @@ const ye = {
1169
1169
  f: 102
1170
1170
  };
1171
1171
  function Zr(e) {
1172
- if (e >= ye.zero && e <= ye.nine)
1173
- return e - ye.zero;
1174
- if (e >= ye.A && e <= ye.F)
1175
- return e - (ye.A - 10);
1176
- if (e >= ye.a && e <= ye.f)
1177
- return e - (ye.a - 10);
1172
+ if (e >= pe.zero && e <= pe.nine)
1173
+ return e - pe.zero;
1174
+ if (e >= pe.A && e <= pe.F)
1175
+ return e - (pe.A - 10);
1176
+ if (e >= pe.a && e <= pe.f)
1177
+ return e - (pe.a - 10);
1178
1178
  }
1179
1179
  function Le(e, t = {}) {
1180
1180
  let n = e;
1181
- t.size && (pe(n, { size: t.size }), n = rt(n, { dir: "right", size: t.size }));
1181
+ t.size && (le(n, { size: t.size }), n = rt(n, { dir: "right", size: t.size }));
1182
1182
  let r = n.slice(2);
1183
1183
  r.length % 2 && (r = `0${r}`);
1184
1184
  const a = r.length / 2, s = new Uint8Array(a);
@@ -1194,9 +1194,9 @@ function vo(e, t) {
1194
1194
  const n = O(e, t);
1195
1195
  return Le(n);
1196
1196
  }
1197
- function me(e, t = {}) {
1197
+ function fe(e, t = {}) {
1198
1198
  const n = wo.encode(e);
1199
- return typeof t.size == "number" ? (pe(n, { size: t.size }), rt(n, { dir: "right", size: t.size })) : n;
1199
+ return typeof t.size == "number" ? (le(n, { size: t.size }), rt(n, { dir: "right", size: t.size })) : n;
1200
1200
  }
1201
1201
  function Wt(e) {
1202
1202
  if (!Number.isSafeInteger(e) || e < 0)
@@ -1242,17 +1242,17 @@ const Co = (e, t, n) => e << n | t >>> 32 - n, Ao = (e, t, n) => t << n | e >>>
1242
1242
  const _a = (e) => e instanceof Uint8Array, So = (e) => new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4)), vn = (e) => new DataView(e.buffer, e.byteOffset, e.byteLength), ue = (e, t) => e << 32 - t | e >>> t, Bo = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
1243
1243
  if (!Bo)
1244
1244
  throw new Error("Non little-endian hardware is not supported");
1245
- function $o(e) {
1245
+ function ko(e) {
1246
1246
  if (typeof e != "string")
1247
1247
  throw new Error(`utf8ToBytes expected string, got ${typeof e}`);
1248
1248
  return new Uint8Array(new TextEncoder().encode(e));
1249
1249
  }
1250
1250
  function nn(e) {
1251
- if (typeof e == "string" && (e = $o(e)), !_a(e))
1251
+ if (typeof e == "string" && (e = ko(e)), !_a(e))
1252
1252
  throw new Error(`expected Uint8Array, got ${typeof e}`);
1253
1253
  return e;
1254
1254
  }
1255
- function ko(...e) {
1255
+ function $o(...e) {
1256
1256
  const t = new Uint8Array(e.reduce((r, a) => r + a.length, 0));
1257
1257
  let n = 0;
1258
1258
  return e.forEach((r) => {
@@ -1292,8 +1292,8 @@ function Lo(e, t = 24) {
1292
1292
  n[i] = e[i] ^ e[i + 10] ^ e[i + 20] ^ e[i + 30] ^ e[i + 40];
1293
1293
  for (let i = 0; i < 10; i += 2) {
1294
1294
  const o = (i + 8) % 10, u = (i + 2) % 10, c = n[u], l = n[u + 1], d = Yr(c, l, 1) ^ n[o], p = Jr(c, l, 1) ^ n[o + 1];
1295
- for (let m = 0; m < 50; m += 10)
1296
- e[i + m] ^= d, e[i + m + 1] ^= p;
1295
+ for (let b = 0; b < 50; b += 10)
1296
+ e[i + b] ^= d, e[i + b + 1] ^= p;
1297
1297
  }
1298
1298
  let a = e[2], s = e[3];
1299
1299
  for (let i = 0; i < 24; i++) {
@@ -1376,7 +1376,7 @@ class or extends ir {
1376
1376
  }
1377
1377
  const zo = (e, t, n) => qa(() => new or(t, e, n)), _o = /* @__PURE__ */ zo(1, 136, 256 / 8);
1378
1378
  function Z(e, t) {
1379
- const n = t || "hex", r = _o(de(e, { strict: !1 }) ? Ie(e) : e);
1379
+ const n = t || "hex", r = _o(ce(e, { strict: !1 }) ? Ie(e) : e);
1380
1380
  return n === "bytes" ? r : Oe(r);
1381
1381
  }
1382
1382
  const qo = (e) => Z(Ie(e));
@@ -1448,7 +1448,7 @@ const xn = /* @__PURE__ */ new Ka(8192);
1448
1448
  function rn(e, t) {
1449
1449
  if (xn.has(`${e}.${t}`))
1450
1450
  return xn.get(`${e}.${t}`);
1451
- const n = e.substring(2).toLowerCase(), r = Z(me(n), "bytes"), a = n.split("");
1451
+ const n = e.substring(2).toLowerCase(), r = Z(fe(n), "bytes"), a = n.split("");
1452
1452
  for (let i = 0; i < 40; i += 2)
1453
1453
  r[i >> 1] >> 4 >= 8 && a[i] && (a[i] = a[i].toUpperCase()), (r[i >> 1] & 15) >= 8 && a[i + 1] && (a[i + 1] = a[i + 1].toUpperCase());
1454
1454
  const s = `0x${a.join("")}`;
@@ -1467,7 +1467,7 @@ function oe(e, t) {
1467
1467
  const a = Ko.test(e) ? e.toLowerCase() === e ? !0 : n ? rn(e) === e : !0 : !1;
1468
1468
  return En.set(r, a), a;
1469
1469
  }
1470
- function ge(e) {
1470
+ function he(e) {
1471
1471
  return typeof e[0] == "string" ? cr(e) : Yo(e);
1472
1472
  }
1473
1473
  function Yo(e) {
@@ -1484,7 +1484,7 @@ function cr(e) {
1484
1484
  return `0x${e.reduce((t, n) => t + n.replace("0x", ""), "")}`;
1485
1485
  }
1486
1486
  function Vt(e, t, n, { strict: r } = {}) {
1487
- return de(e, { strict: !1 }) ? Jo(e, t, n, {
1487
+ return ce(e, { strict: !1 }) ? Jo(e, t, n, {
1488
1488
  strict: r
1489
1489
  }) : Xa(e, t, n, {
1490
1490
  strict: r
@@ -1516,7 +1516,7 @@ function Jo(e, t, n, { strict: r } = {}) {
1516
1516
  const a = `0x${e.replace("0x", "").slice((t ?? 0) * 2, (n ?? e.length) * 2)}`;
1517
1517
  return r && Ja(a, t, n), a;
1518
1518
  }
1519
- function $t(e, t) {
1519
+ function kt(e, t) {
1520
1520
  if (e.length !== t.length)
1521
1521
  throw new no({
1522
1522
  expectedLength: e.length,
@@ -1572,7 +1572,7 @@ function lr(e) {
1572
1572
  const { dynamic: i, encoded: o } = e[s];
1573
1573
  i ? (n.push(O(t + a, { size: 32 })), r.push(o), a += L(o)) : n.push(o);
1574
1574
  }
1575
- return ge([...n, ...r]);
1575
+ return he([...n, ...r]);
1576
1576
  }
1577
1577
  function Qo(e) {
1578
1578
  if (!oe(e))
@@ -1601,7 +1601,7 @@ function eu(e, { length: t, param: n }) {
1601
1601
  const o = O(s.length, { size: 32 });
1602
1602
  return {
1603
1603
  dynamic: !0,
1604
- encoded: s.length > 0 ? ge([o, i]) : o
1604
+ encoded: s.length > 0 ? he([o, i]) : o
1605
1605
  };
1606
1606
  }
1607
1607
  if (a)
@@ -1609,7 +1609,7 @@ function eu(e, { length: t, param: n }) {
1609
1609
  }
1610
1610
  return {
1611
1611
  dynamic: !1,
1612
- encoded: ge(s.map(({ encoded: i }) => i))
1612
+ encoded: he(s.map(({ encoded: i }) => i))
1613
1613
  };
1614
1614
  }
1615
1615
  function tu(e, { param: t }) {
@@ -1621,7 +1621,7 @@ function tu(e, { param: t }) {
1621
1621
  size: Math.ceil((e.length - 2) / 2 / 32) * 32
1622
1622
  })), {
1623
1623
  dynamic: !0,
1624
- encoded: ge([te(O(r, { size: 32 })), a])
1624
+ encoded: he([te(O(r, { size: 32 })), a])
1625
1625
  };
1626
1626
  }
1627
1627
  if (r !== Number.parseInt(n))
@@ -1653,7 +1653,7 @@ function au(e) {
1653
1653
  }));
1654
1654
  return {
1655
1655
  dynamic: !0,
1656
- encoded: ge([
1656
+ encoded: he([
1657
1657
  te(O(L(t), { size: 32 })),
1658
1658
  ...r
1659
1659
  ])
@@ -1671,7 +1671,7 @@ function su(e, { param: t }) {
1671
1671
  }
1672
1672
  return {
1673
1673
  dynamic: n,
1674
- encoded: n ? lr(r) : ge(r.map(({ encoded: a }) => a))
1674
+ encoded: n ? lr(r) : he(r.map(({ encoded: a }) => a))
1675
1675
  };
1676
1676
  }
1677
1677
  function pr(e) {
@@ -1682,8 +1682,8 @@ function pr(e) {
1682
1682
  ) : void 0;
1683
1683
  }
1684
1684
  const yr = (e) => Vt(Za(e), 0, 4);
1685
- function kt(e) {
1686
- const { abi: t, args: n = [], name: r } = e, a = de(r, { strict: !1 }), s = t.filter((o) => a ? o.type === "function" ? yr(o) === r : o.type === "event" ? ur(o) === r : !1 : "name" in o && o.name === r);
1685
+ function $t(e) {
1686
+ const { abi: t, args: n = [], name: r } = e, a = ce(r, { strict: !1 }), s = t.filter((o) => a ? o.type === "function" ? yr(o) === r : o.type === "event" ? ur(o) === r : !1 : "name" in o && o.name === r);
1687
1687
  if (s.length === 0)
1688
1688
  return;
1689
1689
  if (s.length === 1)
@@ -1754,18 +1754,18 @@ function Ot(e) {
1754
1754
  const { abi: t, eventName: n, args: r } = e;
1755
1755
  let a = t[0];
1756
1756
  if (n) {
1757
- const c = kt({ abi: t, name: n });
1757
+ const c = $t({ abi: t, name: n });
1758
1758
  if (!c)
1759
1759
  throw new Wr(n, { docsPath: Xr });
1760
1760
  a = c;
1761
1761
  }
1762
1762
  if (a.type !== "event")
1763
1763
  throw new Wr(void 0, { docsPath: Xr });
1764
- const s = he(a), i = ur(s);
1764
+ const s = be(a), i = ur(s);
1765
1765
  let o = [];
1766
1766
  if (r && "inputs" in a) {
1767
1767
  const c = (u = a.inputs) == null ? void 0 : u.filter((d) => "indexed" in d && d.indexed), l = Array.isArray(r) ? r : Object.values(r).length > 0 ? (c == null ? void 0 : c.map((d) => r[d.name])) ?? [] : [];
1768
- l.length > 0 && (o = (c == null ? void 0 : c.map((d, p) => Array.isArray(l[p]) ? l[p].map((m, f) => Qr({ param: d, value: l[p][f] })) : l[p] ? Qr({ param: d, value: l[p] }) : null)) ?? []);
1768
+ l.length > 0 && (o = (c == null ? void 0 : c.map((d, p) => Array.isArray(l[p]) ? l[p].map((b, f) => Qr({ param: d, value: l[p][f] })) : l[p] ? Qr({ param: d, value: l[p] }) : null)) ?? []);
1769
1769
  }
1770
1770
  return [i, ...o];
1771
1771
  }
@@ -1774,7 +1774,7 @@ function Qr({ param: e, value: t }) {
1774
1774
  return Z(Ie(t));
1775
1775
  if (e.type === "tuple" || e.type.match(/^(.*)\[(\d+)?\]$/))
1776
1776
  throw new po(e.type);
1777
- return $t([e], [t]);
1777
+ return kt([e], [t]);
1778
1778
  }
1779
1779
  function an(e, { method: t }) {
1780
1780
  var r, a;
@@ -1819,7 +1819,7 @@ function iu(e) {
1819
1819
  const { abi: t, args: n, functionName: r } = e;
1820
1820
  let a = t[0];
1821
1821
  if (r) {
1822
- const s = kt({
1822
+ const s = $t({
1823
1823
  abi: t,
1824
1824
  args: n,
1825
1825
  name: r
@@ -1832,14 +1832,14 @@ function iu(e) {
1832
1832
  throw new Gt(void 0, { docsPath: ea });
1833
1833
  return {
1834
1834
  abi: [a],
1835
- functionName: yr(he(a))
1835
+ functionName: yr(be(a))
1836
1836
  };
1837
1837
  }
1838
1838
  function Re(e) {
1839
1839
  const { args: t } = e, { abi: n, functionName: r } = (() => {
1840
1840
  var o;
1841
1841
  return e.abi.length === 1 && ((o = e.functionName) != null && o.startsWith("0x")) ? e : iu(e);
1842
- })(), a = n[0], s = r, i = "inputs" in a && a.inputs ? $t(a.inputs, t ?? []) : void 0;
1842
+ })(), a = n[0], s = r, i = "inputs" in a && a.inputs ? kt(a.inputs, t ?? []) : void 0;
1843
1843
  return cr([s, i ?? "0x"]);
1844
1844
  }
1845
1845
  const es = {
@@ -2028,24 +2028,24 @@ function ns(e, { recursiveReadLimit: t = 8192 } = {}) {
2028
2028
  return n.bytes = e, n.dataView = new DataView(e.buffer, e.byteOffset, e.byteLength), n.positionReadCount = /* @__PURE__ */ new Map(), n.recursiveReadLimit = t, n;
2029
2029
  }
2030
2030
  function lu(e, t = {}) {
2031
- typeof t.size < "u" && pe(e, { size: t.size });
2031
+ typeof t.size < "u" && le(e, { size: t.size });
2032
2032
  const n = q(e, t);
2033
2033
  return Ye(n, t);
2034
2034
  }
2035
2035
  function pu(e, t = {}) {
2036
2036
  let n = e;
2037
- if (typeof t.size < "u" && (pe(n, { size: t.size }), n = tn(n)), n.length > 1 || n[0] > 1)
2037
+ if (typeof t.size < "u" && (le(n, { size: t.size }), n = tn(n)), n.length > 1 || n[0] > 1)
2038
2038
  throw new mo(n);
2039
2039
  return !!n[0];
2040
2040
  }
2041
- function be(e, t = {}) {
2042
- typeof t.size < "u" && pe(e, { size: t.size });
2041
+ function me(e, t = {}) {
2042
+ typeof t.size < "u" && le(e, { size: t.size });
2043
2043
  const n = q(e, t);
2044
2044
  return Ae(n, t);
2045
2045
  }
2046
2046
  function yu(e, t = {}) {
2047
2047
  let n = e;
2048
- return typeof t.size < "u" && (pe(n, { size: t.size }), n = tn(n, { dir: "right" })), new TextDecoder().decode(n);
2048
+ return typeof t.size < "u" && (le(n, { size: t.size }), n = tn(n, { dir: "right" })), new TextDecoder().decode(n);
2049
2049
  }
2050
2050
  function sn(e, t) {
2051
2051
  const n = typeof t == "string" ? Le(t) : t, r = ns(n);
@@ -2098,13 +2098,13 @@ function fu(e) {
2098
2098
  }
2099
2099
  function mu(e, t, { length: n, staticPosition: r }) {
2100
2100
  if (!n) {
2101
- const i = be(e.readBytes(Fn)), o = r + i, u = o + na;
2101
+ const i = me(e.readBytes(Fn)), o = r + i, u = o + na;
2102
2102
  e.setPosition(o);
2103
- const c = be(e.readBytes(na)), l = mt(t);
2103
+ const c = me(e.readBytes(na)), l = mt(t);
2104
2104
  let d = 0;
2105
2105
  const p = [];
2106
- for (let m = 0; m < c; ++m) {
2107
- e.setPosition(u + (l ? m * 32 : d));
2106
+ for (let b = 0; b < c; ++b) {
2107
+ e.setPosition(u + (l ? b * 32 : d));
2108
2108
  const [f, y] = Ke(e, t, {
2109
2109
  staticPosition: u
2110
2110
  });
@@ -2113,7 +2113,7 @@ function mu(e, t, { length: n, staticPosition: r }) {
2113
2113
  return e.setPosition(r + 32), [p, 32];
2114
2114
  }
2115
2115
  if (mt(t)) {
2116
- const i = be(e.readBytes(Fn)), o = r + i, u = [];
2116
+ const i = me(e.readBytes(Fn)), o = r + i, u = [];
2117
2117
  for (let c = 0; c < n; ++c) {
2118
2118
  e.setPosition(o + c * 32);
2119
2119
  const [l] = Ke(e, t, {
@@ -2139,9 +2139,9 @@ function bu(e) {
2139
2139
  function hu(e, t, { staticPosition: n }) {
2140
2140
  const [r, a] = t.type.split("bytes");
2141
2141
  if (!a) {
2142
- const i = be(e.readBytes(32));
2142
+ const i = me(e.readBytes(32));
2143
2143
  e.setPosition(n + i);
2144
- const o = be(e.readBytes(32));
2144
+ const o = me(e.readBytes(32));
2145
2145
  if (o === 0)
2146
2146
  return e.setPosition(n + 32), ["0x", 32];
2147
2147
  const u = e.readBytes(o);
@@ -2152,7 +2152,7 @@ function hu(e, t, { staticPosition: n }) {
2152
2152
  function gu(e, t) {
2153
2153
  const n = t.type.startsWith("int"), r = Number.parseInt(t.type.split("int")[1] || "256"), a = e.readBytes(32);
2154
2154
  return [
2155
- r > 48 ? lu(a, { signed: n }) : be(a, { signed: n }),
2155
+ r > 48 ? lu(a, { signed: n }) : me(a, { signed: n }),
2156
2156
  32
2157
2157
  ];
2158
2158
  }
@@ -2160,7 +2160,7 @@ function wu(e, t, { staticPosition: n }) {
2160
2160
  const r = t.components.length === 0 || t.components.some(({ name: i }) => !i), a = r ? [] : {};
2161
2161
  let s = 0;
2162
2162
  if (mt(t)) {
2163
- const i = be(e.readBytes(Fn)), o = n + i;
2163
+ const i = me(e.readBytes(Fn)), o = n + i;
2164
2164
  for (let u = 0; u < t.components.length; ++u) {
2165
2165
  const c = t.components[u];
2166
2166
  e.setPosition(o + s);
@@ -2180,9 +2180,9 @@ function wu(e, t, { staticPosition: n }) {
2180
2180
  return [a, s];
2181
2181
  }
2182
2182
  function Tu(e, { staticPosition: t }) {
2183
- const n = be(e.readBytes(32)), r = t + n;
2183
+ const n = me(e.readBytes(32)), r = t + n;
2184
2184
  e.setPosition(r);
2185
- const a = be(e.readBytes(32));
2185
+ const a = me(e.readBytes(32));
2186
2186
  if (a === 0)
2187
2187
  return e.setPosition(t + 32), ["", 32];
2188
2188
  const s = e.readBytes(a, 32), i = yu(tn(s));
@@ -2202,7 +2202,7 @@ function vu(e) {
2202
2202
  const { abi: t, data: n } = e, r = Vt(n, 0, 4);
2203
2203
  if (r === "0x")
2204
2204
  throw new Qt();
2205
- const s = [...t || [], ou, uu].find((i) => i.type === "error" && r === yr(he(i)));
2205
+ const s = [...t || [], ou, uu].find((i) => i.type === "error" && r === yr(be(i)));
2206
2206
  if (!s)
2207
2207
  throw new Da(r, {
2208
2208
  docsPath: "/docs/contract/decodeErrorResult"
@@ -2324,7 +2324,7 @@ class Mu extends v {
2324
2324
  class Su extends v {
2325
2325
  constructor(t, { account: n, docsPath: r, chain: a, data: s, gas: i, gasPrice: o, maxFeePerGas: u, maxPriorityFeePerGas: c, nonce: l, to: d, value: p }) {
2326
2326
  var f;
2327
- const m = Rt({
2327
+ const b = Rt({
2328
2328
  chain: a && `${a == null ? void 0 : a.name} (id: ${a == null ? void 0 : a.id})`,
2329
2329
  from: n == null ? void 0 : n.address,
2330
2330
  to: d,
@@ -2342,7 +2342,7 @@ class Su extends v {
2342
2342
  metaMessages: [
2343
2343
  ...t.metaMessages ? [...t.metaMessages, " "] : [],
2344
2344
  "Request Arguments:",
2345
- m
2345
+ b
2346
2346
  ].filter(Boolean)
2347
2347
  }), Object.defineProperty(this, "cause", {
2348
2348
  enumerable: !0,
@@ -2389,13 +2389,13 @@ class aa extends v {
2389
2389
  }
2390
2390
  }
2391
2391
  class os extends v {
2392
- constructor(t, { account: n, docsPath: r, chain: a, data: s, gas: i, gasPrice: o, maxFeePerGas: u, maxPriorityFeePerGas: c, nonce: l, to: d, value: p, stateOverride: m }) {
2393
- var b;
2392
+ constructor(t, { account: n, docsPath: r, chain: a, data: s, gas: i, gasPrice: o, maxFeePerGas: u, maxPriorityFeePerGas: c, nonce: l, to: d, value: p, stateOverride: b }) {
2393
+ var m;
2394
2394
  const f = n ? re(n) : void 0;
2395
2395
  let y = Rt({
2396
2396
  from: f == null ? void 0 : f.address,
2397
2397
  to: d,
2398
- value: typeof p < "u" && `${mr(p)} ${((b = a == null ? void 0 : a.nativeCurrency) == null ? void 0 : b.symbol) || "ETH"}`,
2398
+ value: typeof p < "u" && `${mr(p)} ${((m = a == null ? void 0 : a.nativeCurrency) == null ? void 0 : m.symbol) || "ETH"}`,
2399
2399
  data: s,
2400
2400
  gas: i,
2401
2401
  gasPrice: typeof o < "u" && `${K(o)} gwei`,
@@ -2403,8 +2403,8 @@ class os extends v {
2403
2403
  maxPriorityFeePerGas: typeof c < "u" && `${K(c)} gwei`,
2404
2404
  nonce: l
2405
2405
  });
2406
- m && (y += `
2407
- ${Au(m)}`), super(t.shortMessage, {
2406
+ b && (y += `
2407
+ ${Au(b)}`), super(t.shortMessage, {
2408
2408
  cause: t,
2409
2409
  docsPath: r,
2410
2410
  metaMessages: [
@@ -2427,12 +2427,12 @@ ${Au(m)}`), super(t.shortMessage, {
2427
2427
  }
2428
2428
  class Bu extends v {
2429
2429
  constructor(t, { abi: n, args: r, contractAddress: a, docsPath: s, functionName: i, sender: o }) {
2430
- const u = kt({ abi: n, args: r, name: i }), c = u ? rs({
2430
+ const u = $t({ abi: n, args: r, name: i }), c = u ? rs({
2431
2431
  abiItem: u,
2432
2432
  args: r,
2433
2433
  includeFunctionName: !1,
2434
2434
  includeName: !1
2435
- }) : void 0, l = u ? he(u, { includeName: !0 }) : void 0, d = Rt({
2435
+ }) : void 0, l = u ? be(u, { includeName: !0 }) : void 0, d = Rt({
2436
2436
  address: a && Ji(a),
2437
2437
  function: l,
2438
2438
  args: c && c !== "()" && `${[...Array((i == null ? void 0 : i.length) ?? 0).keys()].map(() => " ").join("")}${c}`,
@@ -2499,17 +2499,17 @@ class Nn extends v {
2499
2499
  if (d === "Error")
2500
2500
  u = p[0];
2501
2501
  else if (d === "Panic") {
2502
- const [m] = p;
2503
- u = es[m];
2502
+ const [b] = p;
2503
+ u = es[b];
2504
2504
  } else {
2505
- const m = l ? he(l, { includeName: !0 }) : void 0, f = l && p ? rs({
2505
+ const b = l ? be(l, { includeName: !0 }) : void 0, f = l && p ? rs({
2506
2506
  abiItem: l,
2507
2507
  args: p,
2508
2508
  includeFunctionName: !1,
2509
2509
  includeName: !1
2510
2510
  }) : void 0;
2511
2511
  o = [
2512
- m ? `Error: ${m}` : "",
2512
+ b ? `Error: ${b}` : "",
2513
2513
  f && f !== "()" ? ` ${[...Array((d == null ? void 0 : d.length) ?? 0).keys()].map(() => " ").join("")}${f}` : ""
2514
2514
  ];
2515
2515
  }
@@ -2552,7 +2552,7 @@ class Nn extends v {
2552
2552
  }), this.data = i, this.reason = u, this.signature = c;
2553
2553
  }
2554
2554
  }
2555
- class $u extends v {
2555
+ class ku extends v {
2556
2556
  constructor({ functionName: t }) {
2557
2557
  super(`The contract function "${t}" returned no data ("0x").`, {
2558
2558
  metaMessages: [
@@ -2569,7 +2569,7 @@ class $u extends v {
2569
2569
  });
2570
2570
  }
2571
2571
  }
2572
- class ku extends v {
2572
+ class $u extends v {
2573
2573
  constructor({ factory: t }) {
2574
2574
  super(`Deployment for counterfactual contract call failed for factory "${t}".`, {
2575
2575
  metaMessages: [
@@ -3073,7 +3073,7 @@ class Ru extends Y {
3073
3073
  }
3074
3074
  const Fu = 3;
3075
3075
  function St(e, { abi: t, address: n, args: r, docsPath: a, functionName: s, sender: i }) {
3076
- const { code: o, data: u, message: c, shortMessage: l } = e instanceof br ? e : e instanceof v ? e.walk((p) => "data" in p) || e.walk() : {}, d = e instanceof Qt ? new $u({ functionName: s }) : [Fu, ze.code].includes(o) && (u || c || l) ? new Nn({
3076
+ const { code: o, data: u, message: c, shortMessage: l } = e instanceof br ? e : e instanceof v ? e.walk((p) => "data" in p) || e.walk() : {}, d = e instanceof Qt ? new ku({ functionName: s }) : [Fu, ze.code].includes(o) && (u || c || l) ? new Nn({
3077
3077
  abi: t,
3078
3078
  data: typeof u == "object" ? u.data : u,
3079
3079
  functionName: s,
@@ -3091,7 +3091,7 @@ function St(e, { abi: t, address: n, args: r, docsPath: a, functionName: s, send
3091
3091
  class Nu extends v {
3092
3092
  constructor(t, { account: n, docsPath: r, chain: a, data: s, gas: i, gasPrice: o, maxFeePerGas: u, maxPriorityFeePerGas: c, nonce: l, to: d, value: p }) {
3093
3093
  var f;
3094
- const m = Rt({
3094
+ const b = Rt({
3095
3095
  from: n == null ? void 0 : n.address,
3096
3096
  to: d,
3097
3097
  value: typeof p < "u" && `${mr(p)} ${((f = a == null ? void 0 : a.nativeCurrency) == null ? void 0 : f.symbol) || "ETH"}`,
@@ -3108,7 +3108,7 @@ class Nu extends v {
3108
3108
  metaMessages: [
3109
3109
  ...t.metaMessages ? [...t.metaMessages, " "] : [],
3110
3110
  "Estimate Gas Arguments:",
3111
- m
3111
+ b
3112
3112
  ].filter(Boolean)
3113
3113
  }), Object.defineProperty(this, "cause", {
3114
3114
  enumerable: !0,
@@ -3618,7 +3618,7 @@ async function _u(e, t) {
3618
3618
  return Gn(e, t);
3619
3619
  }
3620
3620
  async function Gn(e, t) {
3621
- var p, m;
3621
+ var p, b;
3622
3622
  const { block: n, chain: r = e.chain, request: a, type: s = "eip1559" } = t || {}, i = await (async () => {
3623
3623
  var f, y;
3624
3624
  return typeof ((f = r == null ? void 0 : r.fees) == null ? void 0 : f.baseFeeMultiplier) == "function" ? r.fees.baseFeeMultiplier({
@@ -3630,7 +3630,7 @@ async function Gn(e, t) {
3630
3630
  if (i < 1)
3631
3631
  throw new ju();
3632
3632
  const u = 10 ** (((p = i.toString().split(".")[1]) == null ? void 0 : p.length) ?? 0), c = (f) => f * BigInt(Math.ceil(i * u)) / BigInt(u), l = n || await S(e, Se, "getBlock")({});
3633
- if (typeof ((m = r == null ? void 0 : r.fees) == null ? void 0 : m.estimateFeesPerGas) == "function") {
3633
+ if (typeof ((b = r == null ? void 0 : r.fees) == null ? void 0 : b.estimateFeesPerGas) == "function") {
3634
3634
  const f = await r.fees.estimateFeesPerGas({
3635
3635
  block: n,
3636
3636
  client: e,
@@ -3800,7 +3800,7 @@ const Wu = (e, t, n) => e & t ^ ~e & n, Vu = (e, t, n) => e & t ^ e & n ^ t & n,
3800
3800
  2756734187,
3801
3801
  3204031479,
3802
3802
  3329325298
3803
- ]), Ee = /* @__PURE__ */ new Uint32Array([
3803
+ ]), xe = /* @__PURE__ */ new Uint32Array([
3804
3804
  1779033703,
3805
3805
  3144134277,
3806
3806
  1013904242,
@@ -3809,10 +3809,10 @@ const Wu = (e, t, n) => e & t ^ ~e & n, Vu = (e, t, n) => e & t ^ e & n ^ t & n,
3809
3809
  2600822924,
3810
3810
  528734635,
3811
3811
  1541459225
3812
- ]), Pe = /* @__PURE__ */ new Uint32Array(64);
3812
+ ]), Ee = /* @__PURE__ */ new Uint32Array(64);
3813
3813
  class Ku extends Gu {
3814
3814
  constructor() {
3815
- super(64, 32, 8, !1), this.A = Ee[0] | 0, this.B = Ee[1] | 0, this.C = Ee[2] | 0, this.D = Ee[3] | 0, this.E = Ee[4] | 0, this.F = Ee[5] | 0, this.G = Ee[6] | 0, this.H = Ee[7] | 0;
3815
+ super(64, 32, 8, !1), this.A = xe[0] | 0, this.B = xe[1] | 0, this.C = xe[2] | 0, this.D = xe[3] | 0, this.E = xe[4] | 0, this.F = xe[5] | 0, this.G = xe[6] | 0, this.H = xe[7] | 0;
3816
3816
  }
3817
3817
  get() {
3818
3818
  const { A: t, B: n, C: r, D: a, E: s, F: i, G: o, H: u } = this;
@@ -3824,20 +3824,20 @@ class Ku extends Gu {
3824
3824
  }
3825
3825
  process(t, n) {
3826
3826
  for (let d = 0; d < 16; d++, n += 4)
3827
- Pe[d] = t.getUint32(n, !1);
3827
+ Ee[d] = t.getUint32(n, !1);
3828
3828
  for (let d = 16; d < 64; d++) {
3829
- const p = Pe[d - 15], m = Pe[d - 2], f = ue(p, 7) ^ ue(p, 18) ^ p >>> 3, y = ue(m, 17) ^ ue(m, 19) ^ m >>> 10;
3830
- Pe[d] = y + Pe[d - 7] + f + Pe[d - 16] | 0;
3829
+ const p = Ee[d - 15], b = Ee[d - 2], f = ue(p, 7) ^ ue(p, 18) ^ p >>> 3, y = ue(b, 17) ^ ue(b, 19) ^ b >>> 10;
3830
+ Ee[d] = y + Ee[d - 7] + f + Ee[d - 16] | 0;
3831
3831
  }
3832
3832
  let { A: r, B: a, C: s, D: i, E: o, F: u, G: c, H: l } = this;
3833
3833
  for (let d = 0; d < 64; d++) {
3834
- const p = ue(o, 6) ^ ue(o, 11) ^ ue(o, 25), m = l + p + Wu(o, u, c) + Zu[d] + Pe[d] | 0, y = (ue(r, 2) ^ ue(r, 13) ^ ue(r, 22)) + Vu(r, a, s) | 0;
3835
- l = c, c = u, u = o, o = i + m | 0, i = s, s = a, a = r, r = m + y | 0;
3834
+ const p = ue(o, 6) ^ ue(o, 11) ^ ue(o, 25), b = l + p + Wu(o, u, c) + Zu[d] + Ee[d] | 0, y = (ue(r, 2) ^ ue(r, 13) ^ ue(r, 22)) + Vu(r, a, s) | 0;
3835
+ l = c, c = u, u = o, o = i + b | 0, i = s, s = a, a = r, r = b + y | 0;
3836
3836
  }
3837
3837
  r = r + this.A | 0, a = a + this.B | 0, s = s + this.C | 0, i = i + this.D | 0, o = o + this.E | 0, u = u + this.F | 0, c = c + this.G | 0, l = l + this.H | 0, this.set(r, a, s, i, o, u, c, l);
3838
3838
  }
3839
3839
  roundClean() {
3840
- Pe.fill(0);
3840
+ Ee.fill(0);
3841
3841
  }
3842
3842
  destroy() {
3843
3843
  this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
@@ -3845,7 +3845,7 @@ class Ku extends Gu {
3845
3845
  }
3846
3846
  const gs = /* @__PURE__ */ qa(() => new Ku());
3847
3847
  function Yu(e, t) {
3848
- return gs(de(e, { strict: !1 }) ? Ie(e) : e);
3848
+ return gs(ce(e, { strict: !1 }) ? Ie(e) : e);
3849
3849
  }
3850
3850
  function Ju(e) {
3851
3851
  const { commitment: t, version: n = 1 } = e, r = e.to ?? (typeof t == "string" ? "hex" : "bytes"), a = Yu(t);
@@ -3949,24 +3949,24 @@ const vs = [
3949
3949
  ];
3950
3950
  async function cn(e, t) {
3951
3951
  const { account: n = e.account, blobs: r, chain: a, chainId: s, gas: i, kzg: o, nonce: u, parameters: c = vs, type: l } = t, d = n ? re(n) : void 0, p = { ...t, ...d ? { from: d == null ? void 0 : d.address } : {} };
3952
- let m;
3952
+ let b;
3953
3953
  async function f() {
3954
- return m || (m = await S(e, Se, "getBlock")({ blockTag: "latest" }), m);
3954
+ return b || (b = await S(e, Se, "getBlock")({ blockTag: "latest" }), b);
3955
3955
  }
3956
3956
  if ((c.includes("blobVersionedHashes") || c.includes("sidecars")) && r && o) {
3957
3957
  const y = bs({ blobs: r, kzg: o });
3958
3958
  if (c.includes("blobVersionedHashes")) {
3959
- const b = Xu({
3959
+ const m = Xu({
3960
3960
  commitments: y,
3961
3961
  to: "hex"
3962
3962
  });
3963
- p.blobVersionedHashes = b;
3963
+ p.blobVersionedHashes = m;
3964
3964
  }
3965
3965
  if (c.includes("sidecars")) {
3966
- const b = hs({ blobs: r, commitments: y, kzg: o }), h = nc({
3966
+ const m = hs({ blobs: r, commitments: y, kzg: o }), h = nc({
3967
3967
  blobs: r,
3968
3968
  commitments: y,
3969
- proofs: b,
3969
+ proofs: m,
3970
3970
  to: "hex"
3971
3971
  });
3972
3972
  p.sidecars = h;
@@ -3985,7 +3985,7 @@ async function cn(e, t) {
3985
3985
  if (c.includes("fees"))
3986
3986
  if (p.type !== "legacy" && p.type !== "eip2930") {
3987
3987
  if (typeof p.maxFeePerGas > "u" || typeof p.maxPriorityFeePerGas > "u") {
3988
- const y = await f(), { maxFeePerGas: b, maxPriorityFeePerGas: h } = await Gn(e, {
3988
+ const y = await f(), { maxFeePerGas: m, maxPriorityFeePerGas: h } = await Gn(e, {
3989
3989
  block: y,
3990
3990
  chain: a,
3991
3991
  request: p
@@ -3994,18 +3994,18 @@ async function cn(e, t) {
3994
3994
  throw new Lu({
3995
3995
  maxPriorityFeePerGas: h
3996
3996
  });
3997
- p.maxPriorityFeePerGas = h, p.maxFeePerGas = b;
3997
+ p.maxPriorityFeePerGas = h, p.maxFeePerGas = m;
3998
3998
  }
3999
3999
  } else {
4000
4000
  if (typeof t.maxFeePerGas < "u" || typeof t.maxPriorityFeePerGas < "u")
4001
4001
  throw new wr();
4002
- const y = await f(), { gasPrice: b } = await Gn(e, {
4002
+ const y = await f(), { gasPrice: m } = await Gn(e, {
4003
4003
  block: y,
4004
4004
  chain: a,
4005
4005
  request: p,
4006
4006
  type: "legacy"
4007
4007
  });
4008
- p.gasPrice = b;
4008
+ p.gasPrice = m;
4009
4009
  }
4010
4010
  return c.includes("gas") && typeof i > "u" && (p.gas = await S(e, xr, "estimateGas")({
4011
4011
  ...p,
@@ -4016,7 +4016,7 @@ async function xr(e, t) {
4016
4016
  var a, s, i;
4017
4017
  const n = t.account ?? e.account, r = n ? re(n) : void 0;
4018
4018
  try {
4019
- const { accessList: o, blobs: u, blobVersionedHashes: c, blockNumber: l, blockTag: d, data: p, gas: m, gasPrice: f, maxFeePerBlobGas: y, maxFeePerGas: b, maxPriorityFeePerGas: h, nonce: g, to: w, value: x, stateOverride: P, ...T } = await cn(e, {
4019
+ const { accessList: o, blobs: u, blobVersionedHashes: c, blockNumber: l, blockTag: d, data: p, gas: b, gasPrice: f, maxFeePerBlobGas: y, maxFeePerGas: m, maxPriorityFeePerGas: h, nonce: g, to: w, value: x, stateOverride: P, ...T } = await cn(e, {
4020
4020
  ...t,
4021
4021
  parameters: (
4022
4022
  // Some RPC Providers do not compute versioned hashes from blobs. We will need
@@ -4033,10 +4033,10 @@ async function xr(e, t) {
4033
4033
  blobs: u,
4034
4034
  blobVersionedHashes: c,
4035
4035
  data: p,
4036
- gas: m,
4036
+ gas: b,
4037
4037
  gasPrice: f,
4038
4038
  maxFeePerBlobGas: y,
4039
- maxFeePerGas: b,
4039
+ maxFeePerGas: m,
4040
4040
  maxPriorityFeePerGas: h,
4041
4041
  nonce: g,
4042
4042
  to: w,
@@ -4083,20 +4083,20 @@ function Er(e) {
4083
4083
  const { abi: t, data: n, strict: r, topics: a } = e, s = r ?? !0, [i, ...o] = a;
4084
4084
  if (!i)
4085
4085
  throw new ro({ docsPath: ca });
4086
- const u = t.find((y) => y.type === "event" && i === ur(he(y)));
4086
+ const u = t.find((y) => y.type === "event" && i === ur(be(y)));
4087
4087
  if (!(u && "name" in u) || u.type !== "event")
4088
4088
  throw new Ua(i, { docsPath: ca });
4089
4089
  const { name: c, inputs: l } = u, d = l == null ? void 0 : l.some((y) => !("name" in y && y.name));
4090
4090
  let p = d ? [] : {};
4091
- const m = l.filter((y) => "indexed" in y && y.indexed);
4092
- for (let y = 0; y < m.length; y++) {
4093
- const b = m[y], h = o[y];
4091
+ const b = l.filter((y) => "indexed" in y && y.indexed);
4092
+ for (let y = 0; y < b.length; y++) {
4093
+ const m = b[y], h = o[y];
4094
4094
  if (!h)
4095
4095
  throw new en({
4096
4096
  abiItem: u,
4097
- param: b
4097
+ param: m
4098
4098
  });
4099
- p[d ? y : b.name || y] = ac({ param: b, value: h });
4099
+ p[d ? y : m.name || y] = ac({ param: m, value: h });
4100
4100
  }
4101
4101
  const f = l.filter((y) => !("indexed" in y && y.indexed));
4102
4102
  if (f.length > 0) {
@@ -4107,8 +4107,8 @@ function Er(e) {
4107
4107
  if (d)
4108
4108
  p = [...p, ...y];
4109
4109
  else
4110
- for (let b = 0; b < f.length; b++)
4111
- p[f[b].name] = y[b];
4110
+ for (let m = 0; m < f.length; m++)
4111
+ p[f[m].name] = y[m];
4112
4112
  } catch (y) {
4113
4113
  if (s)
4114
4114
  throw y instanceof Na || y instanceof ts ? new ft({
@@ -4193,15 +4193,15 @@ async function Cr(e, { address: t, blockHash: n, fromBlock: r, toBlock: a, event
4193
4193
  }
4194
4194
  ]
4195
4195
  });
4196
- const m = p.map((f) => Be(f));
4196
+ const b = p.map((f) => Be(f));
4197
4197
  return l ? Pr({
4198
4198
  abi: l,
4199
- logs: m,
4199
+ logs: b,
4200
4200
  strict: c
4201
- }) : m;
4201
+ }) : b;
4202
4202
  }
4203
4203
  async function Ar(e, t) {
4204
- const { abi: n, address: r, args: a, blockHash: s, eventName: i, fromBlock: o, toBlock: u, strict: c } = t, l = i ? kt({ abi: n, name: i }) : void 0, d = l ? void 0 : n.filter((p) => p.type === "event");
4204
+ const { abi: n, address: r, args: a, blockHash: s, eventName: i, fromBlock: o, toBlock: u, strict: c } = t, l = i ? $t({ abi: n, name: i }) : void 0, d = l ? void 0 : n.filter((p) => p.type === "event");
4205
4205
  return S(e, Cr, "getLogs")({
4206
4206
  address: r,
4207
4207
  args: a,
@@ -4218,7 +4218,7 @@ function st(e) {
4218
4218
  const { abi: t, args: n, functionName: r, data: a } = e;
4219
4219
  let s = t[0];
4220
4220
  if (r) {
4221
- const o = kt({ abi: t, args: n, name: r });
4221
+ const o = $t({ abi: t, args: n, name: r });
4222
4222
  if (!o)
4223
4223
  throw new Gt(r, { docsPath: Pn });
4224
4224
  s = o;
@@ -4501,7 +4501,7 @@ function Ir(e) {
4501
4501
  throw new Gr({ docsPath: Cn });
4502
4502
  if (!a.inputs || a.inputs.length === 0)
4503
4503
  throw new Gr({ docsPath: Cn });
4504
- const s = $t(a.inputs, n);
4504
+ const s = kt(a.inputs, n);
4505
4505
  return cr([r, s]);
4506
4506
  }
4507
4507
  function it({ blockNumber: e, chain: t, contract: n }) {
@@ -4540,36 +4540,36 @@ function As({ fn: e, id: t, shouldSplitBatch: n, wait: r = 0, sort: a }) {
4540
4540
  i();
4541
4541
  const d = l.map(({ args: p }) => p);
4542
4542
  d.length !== 0 && e(d).then((p) => {
4543
- var m;
4543
+ var b;
4544
4544
  a && Array.isArray(p) && p.sort(a);
4545
4545
  for (let f = 0; f < l.length; f++) {
4546
4546
  const { pendingPromise: y } = l[f];
4547
- (m = y.resolve) == null || m.call(y, [p[f], p]);
4547
+ (b = y.resolve) == null || b.call(y, [p[f], p]);
4548
4548
  }
4549
4549
  }).catch((p) => {
4550
- var m;
4550
+ var b;
4551
4551
  for (let f = 0; f < l.length; f++) {
4552
4552
  const { pendingPromise: y } = l[f];
4553
- (m = y.reject) == null || m.call(y, p);
4553
+ (b = y.reject) == null || b.call(y, p);
4554
4554
  }
4555
4555
  });
4556
4556
  }, i = () => An.delete(t), o = () => u().map(({ args: l }) => l), u = () => An.get(t) || [], c = (l) => An.set(t, [...u(), l]);
4557
4557
  return {
4558
4558
  flush: i,
4559
4559
  async schedule(l) {
4560
- const d = {}, p = new Promise((y, b) => {
4561
- d.resolve = y, d.reject = b;
4560
+ const d = {}, p = new Promise((y, m) => {
4561
+ d.resolve = y, d.reject = m;
4562
4562
  });
4563
4563
  return (n == null ? void 0 : n([...o(), l])) && s(), u().length > 0 ? (c({ args: l, pendingPromise: d }), p) : (c({ args: l, pendingPromise: d }), setTimeout(s, r), p);
4564
4564
  }
4565
4565
  };
4566
4566
  }
4567
4567
  async function dn(e, t) {
4568
- var E, M, B, $;
4569
- const { account: n = e.account, batch: r = !!((E = e.batch) != null && E.multicall), blockNumber: a, blockTag: s = "latest", accessList: i, blobs: o, data: u, factory: c, factoryData: l, gas: d, gasPrice: p, maxFeePerBlobGas: m, maxFeePerGas: f, maxPriorityFeePerGas: y, nonce: b, to: h, value: g, stateOverride: w, ...x } = t, P = n ? re(n) : void 0, T = c && l && h && u, C = T ? mc({ data: u, factory: c, factoryData: l, to: h }) : u;
4568
+ var E, M, B, k;
4569
+ const { account: n = e.account, batch: r = !!((E = e.batch) != null && E.multicall), blockNumber: a, blockTag: s = "latest", accessList: i, blobs: o, data: u, factory: c, factoryData: l, gas: d, gasPrice: p, maxFeePerBlobGas: b, maxFeePerGas: f, maxPriorityFeePerGas: y, nonce: m, to: h, value: g, stateOverride: w, ...x } = t, P = n ? re(n) : void 0, T = c && l && h && u, C = T ? mc({ data: u, factory: c, factoryData: l, to: h }) : u;
4570
4570
  try {
4571
4571
  Ft(t);
4572
- const F = (a ? O(a) : void 0) || s, G = cs(w), A = ($ = (B = (M = e.chain) == null ? void 0 : M.formatters) == null ? void 0 : B.transactionRequest) == null ? void 0 : $.format, R = (A || un)({
4572
+ const F = (a ? O(a) : void 0) || s, G = cs(w), A = (k = (B = (M = e.chain) == null ? void 0 : M.formatters) == null ? void 0 : B.transactionRequest) == null ? void 0 : k.format, R = (A || un)({
4573
4573
  // Pick out extra data that might exist on the chain's transaction request type.
4574
4574
  ...gr(x, { format: A }),
4575
4575
  from: P == null ? void 0 : P.address,
@@ -4578,10 +4578,10 @@ async function dn(e, t) {
4578
4578
  data: C,
4579
4579
  gas: d,
4580
4580
  gasPrice: p,
4581
- maxFeePerBlobGas: m,
4581
+ maxFeePerBlobGas: b,
4582
4582
  maxFeePerGas: f,
4583
4583
  maxPriorityFeePerGas: y,
4584
- nonce: b,
4584
+ nonce: m,
4585
4585
  to: T ? void 0 : h,
4586
4586
  value: g
4587
4587
  });
@@ -4606,10 +4606,10 @@ async function dn(e, t) {
4606
4606
  });
4607
4607
  return U === "0x" ? { data: void 0 } : { data: U };
4608
4608
  } catch (N) {
4609
- const F = bc(N), { offchainLookup: G, offchainLookupSignature: A } = await import("./ccip-DRvnT9Rr.js");
4609
+ const F = bc(N), { offchainLookup: G, offchainLookupSignature: A } = await import("./ccip-3UC0TC9X.js");
4610
4610
  if (e.ccipRead !== !1 && (F == null ? void 0 : F.slice(0, 10)) === A && h)
4611
4611
  return { data: await G(e, { data: F, to: h }) };
4612
- throw T && (F == null ? void 0 : F.slice(0, 10)) === "0x101bb98d" ? new ku({ factory: c }) : pc(N, {
4612
+ throw T && (F == null ? void 0 : F.slice(0, 10)) === "0x101bb98d" ? new $u({ factory: c }) : pc(N, {
4613
4613
  ...t,
4614
4614
  account: P,
4615
4615
  chain: e.chain
@@ -4636,11 +4636,11 @@ async function fc(e, t) {
4636
4636
  const d = (a ? O(a) : void 0) || s, { schedule: p } = As({
4637
4637
  id: `${e.uid}.${d}`,
4638
4638
  wait: r,
4639
- shouldSplitBatch(b) {
4640
- return b.reduce((g, { data: w }) => g + (w.length - 2), 0) > n * 2;
4639
+ shouldSplitBatch(m) {
4640
+ return m.reduce((g, { data: w }) => g + (w.length - 2), 0) > n * 2;
4641
4641
  },
4642
- fn: async (b) => {
4643
- const h = b.map((x) => ({
4642
+ fn: async (m) => {
4643
+ const h = m.map((x) => ({
4644
4644
  allowFailure: !0,
4645
4645
  callData: x.data,
4646
4646
  target: x.to
@@ -4665,10 +4665,10 @@ async function fc(e, t) {
4665
4665
  data: w || "0x"
4666
4666
  });
4667
4667
  }
4668
- }), [{ returnData: m, success: f }] = await p({ data: i, to: u });
4668
+ }), [{ returnData: b, success: f }] = await p({ data: i, to: u });
4669
4669
  if (!f)
4670
- throw new br({ data: m });
4671
- return m === "0x" ? { data: void 0 } : { data: m };
4670
+ throw new br({ data: b });
4671
+ return b === "0x" ? { data: void 0 } : { data: b };
4672
4672
  }
4673
4673
  function mc(e) {
4674
4674
  const { data: t, factory: n, factoryData: r, to: a } = e;
@@ -4688,7 +4688,7 @@ function bc(e) {
4688
4688
  const t = e.walk();
4689
4689
  return typeof (t == null ? void 0 : t.data) == "object" ? (n = t.data) == null ? void 0 : n.data : t.data;
4690
4690
  }
4691
- async function le(e, t) {
4691
+ async function de(e, t) {
4692
4692
  const { abi: n, address: r, args: a, functionName: s, ...i } = t, o = Re({
4693
4693
  abi: n,
4694
4694
  args: a,
@@ -4730,7 +4730,7 @@ async function Is(e, t) {
4730
4730
  args: a,
4731
4731
  functionName: i,
4732
4732
  data: l || "0x"
4733
- }), p = n.filter((m) => "name" in m && m.name === t.functionName);
4733
+ }), p = n.filter((b) => "name" in b && b.name === t.functionName);
4734
4734
  return {
4735
4735
  result: d,
4736
4736
  request: {
@@ -4756,7 +4756,7 @@ async function Is(e, t) {
4756
4756
  }
4757
4757
  const In = /* @__PURE__ */ new Map(), pa = /* @__PURE__ */ new Map();
4758
4758
  let hc = 0;
4759
- function $e(e, t, n) {
4759
+ function ke(e, t, n) {
4760
4760
  const r = ++hc, a = () => In.get(e) || [], s = () => {
4761
4761
  const l = a();
4762
4762
  In.set(e, l.filter((d) => d.id !== r));
@@ -4772,11 +4772,11 @@ function $e(e, t, n) {
4772
4772
  const u = {};
4773
4773
  for (const l in t)
4774
4774
  u[l] = (...d) => {
4775
- var m, f;
4775
+ var b, f;
4776
4776
  const p = a();
4777
4777
  if (p.length !== 0)
4778
4778
  for (const y of p)
4779
- (f = (m = y.fns)[l]) == null || f.call(m, ...d);
4779
+ (f = (b = y.fns)[l]) == null || f.call(b, ...d);
4780
4780
  };
4781
4781
  const c = n(u);
4782
4782
  return typeof c == "function" && pa.set(e, c), i;
@@ -4856,7 +4856,7 @@ async function pn(e, { filter: t }) {
4856
4856
  function Ms(e, t) {
4857
4857
  const { abi: n, address: r, args: a, batch: s = !0, eventName: i, fromBlock: o, onError: u, onLogs: c, poll: l, pollingInterval: d = e.pollingInterval, strict: p } = t;
4858
4858
  return (typeof l < "u" ? l : typeof o == "bigint" ? !0 : !(e.transport.type === "webSocket" || e.transport.type === "fallback" && e.transport.transports[0].config.type === "webSocket")) ? (() => {
4859
- const b = p ?? !1, h = W([
4859
+ const m = p ?? !1, h = W([
4860
4860
  "watchContractEvent",
4861
4861
  r,
4862
4862
  a,
@@ -4864,10 +4864,10 @@ function Ms(e, t) {
4864
4864
  e.uid,
4865
4865
  i,
4866
4866
  d,
4867
- b,
4867
+ m,
4868
4868
  o
4869
4869
  ]);
4870
- return $e(h, { onLogs: c, onError: u }, (g) => {
4870
+ return ke(h, { onLogs: c, onError: u }, (g) => {
4871
4871
  let w;
4872
4872
  o !== void 0 && (w = o - 1n);
4873
4873
  let x, P = !1;
@@ -4880,7 +4880,7 @@ function Ms(e, t) {
4880
4880
  address: r,
4881
4881
  args: a,
4882
4882
  eventName: i,
4883
- strict: b,
4883
+ strict: m,
4884
4884
  fromBlock: o
4885
4885
  });
4886
4886
  } catch {
@@ -4901,7 +4901,7 @@ function Ms(e, t) {
4901
4901
  eventName: i,
4902
4902
  fromBlock: w + 1n,
4903
4903
  toBlock: M,
4904
- strict: b
4904
+ strict: m
4905
4905
  }) : E = [], w = M;
4906
4906
  }
4907
4907
  if (E.length === 0)
@@ -4923,7 +4923,7 @@ function Ms(e, t) {
4923
4923
  };
4924
4924
  });
4925
4925
  })() : (() => {
4926
- const b = p ?? !1, h = W([
4926
+ const m = p ?? !1, h = W([
4927
4927
  "watchContractEvent",
4928
4928
  r,
4929
4929
  a,
@@ -4931,10 +4931,10 @@ function Ms(e, t) {
4931
4931
  e.uid,
4932
4932
  i,
4933
4933
  d,
4934
- b
4934
+ m
4935
4935
  ]);
4936
4936
  let g = !0, w = () => g = !1;
4937
- return $e(h, { onLogs: c, onError: u }, (x) => ((async () => {
4937
+ return ke(h, { onLogs: c, onError: u }, (x) => ((async () => {
4938
4938
  try {
4939
4939
  const P = (() => {
4940
4940
  if (e.transport.type === "fallback") {
@@ -4954,22 +4954,22 @@ function Ms(e, t) {
4954
4954
  return;
4955
4955
  const M = E.result;
4956
4956
  try {
4957
- const { eventName: $, args: N } = Er({
4957
+ const { eventName: k, args: N } = Er({
4958
4958
  abi: n,
4959
4959
  data: M.data,
4960
4960
  topics: M.topics,
4961
4961
  strict: p
4962
4962
  }), F = Be(M, {
4963
4963
  args: N,
4964
- eventName: $
4964
+ eventName: k
4965
4965
  });
4966
4966
  x.onLogs([F]);
4967
- } catch ($) {
4967
+ } catch (k) {
4968
4968
  let N, F;
4969
- if ($ instanceof ft || $ instanceof en) {
4969
+ if (k instanceof ft || k instanceof en) {
4970
4970
  if (p)
4971
4971
  return;
4972
- N = $.abiItem.name, F = (B = $.abiItem.inputs) == null ? void 0 : B.some((A) => !("name" in A && A.name));
4972
+ N = k.abiItem.name, F = (B = k.abiItem.inputs) == null ? void 0 : B.some((A) => !("name" in A && A.name));
4973
4973
  }
4974
4974
  const G = Be(M, {
4975
4975
  args: F ? [] : {},
@@ -5031,21 +5031,21 @@ async function Mr(e, { serializedTransaction: t }) {
5031
5031
  }
5032
5032
  async function Sr(e, t) {
5033
5033
  var h, g, w, x;
5034
- const { account: n = e.account, chain: r = e.chain, accessList: a, blobs: s, data: i, gas: o, gasPrice: u, maxFeePerBlobGas: c, maxFeePerGas: l, maxPriorityFeePerGas: d, nonce: p, to: m, value: f, ...y } = t;
5034
+ const { account: n = e.account, chain: r = e.chain, accessList: a, blobs: s, data: i, gas: o, gasPrice: u, maxFeePerBlobGas: c, maxFeePerGas: l, maxPriorityFeePerGas: d, nonce: p, to: b, value: f, ...y } = t;
5035
5035
  if (!n)
5036
5036
  throw new yn({
5037
5037
  docsPath: "/docs/actions/wallet/sendTransaction"
5038
5038
  });
5039
- const b = re(n);
5039
+ const m = re(n);
5040
5040
  try {
5041
5041
  Ft(t);
5042
5042
  let P;
5043
5043
  if (r !== null && (P = await S(e, Nt, "getChainId")({}), Ss({
5044
5044
  currentChainId: P,
5045
5045
  chain: r
5046
- })), b.type === "local") {
5046
+ })), m.type === "local") {
5047
5047
  const M = await S(e, cn, "prepareTransactionRequest")({
5048
- account: b,
5048
+ account: m,
5049
5049
  accessList: a,
5050
5050
  blobs: s,
5051
5051
  chain: r,
@@ -5058,14 +5058,14 @@ async function Sr(e, t) {
5058
5058
  maxPriorityFeePerGas: d,
5059
5059
  nonce: p,
5060
5060
  parameters: [...vs, "sidecars"],
5061
- to: m,
5061
+ to: b,
5062
5062
  value: f,
5063
5063
  ...y
5064
- }), B = (h = r == null ? void 0 : r.serializers) == null ? void 0 : h.transaction, $ = await b.signTransaction(M, {
5064
+ }), B = (h = r == null ? void 0 : r.serializers) == null ? void 0 : h.transaction, k = await m.signTransaction(M, {
5065
5065
  serializer: B
5066
5066
  });
5067
5067
  return await S(e, Mr, "sendRawTransaction")({
5068
- serializedTransaction: $
5068
+ serializedTransaction: k
5069
5069
  });
5070
5070
  }
5071
5071
  const T = (x = (w = (g = e.chain) == null ? void 0 : g.formatters) == null ? void 0 : w.transactionRequest) == null ? void 0 : x.format, E = (T || un)({
@@ -5074,14 +5074,14 @@ async function Sr(e, t) {
5074
5074
  accessList: a,
5075
5075
  blobs: s,
5076
5076
  data: i,
5077
- from: b.address,
5077
+ from: m.address,
5078
5078
  gas: o,
5079
5079
  gasPrice: u,
5080
5080
  maxFeePerBlobGas: c,
5081
5081
  maxFeePerGas: l,
5082
5082
  maxPriorityFeePerGas: d,
5083
5083
  nonce: p,
5084
- to: m,
5084
+ to: b,
5085
5085
  value: f
5086
5086
  });
5087
5087
  return await e.request({
@@ -5091,7 +5091,7 @@ async function Sr(e, t) {
5091
5091
  } catch (P) {
5092
5092
  throw Ec(P, {
5093
5093
  ...t,
5094
- account: b,
5094
+ account: m,
5095
5095
  chain: t.chain || void 0
5096
5096
  });
5097
5097
  }
@@ -5115,94 +5115,94 @@ function ot({ abi: e, address: t, client: n }) {
5115
5115
  if (p.type === "function" ? p.stateMutability === "view" || p.stateMutability === "pure" ? c = !0 : l = !0 : p.type === "event" && (d = !0), c && l && d)
5116
5116
  break;
5117
5117
  return i && (c && (u.read = new Proxy({}, {
5118
- get(p, m) {
5118
+ get(p, b) {
5119
5119
  return (...f) => {
5120
- const { args: y, options: b } = Lt(f);
5121
- return S(a, le, "readContract")({
5120
+ const { args: y, options: m } = Lt(f);
5121
+ return S(a, de, "readContract")({
5122
5122
  abi: e,
5123
5123
  address: t,
5124
- functionName: m,
5124
+ functionName: b,
5125
5125
  args: y,
5126
- ...b
5126
+ ...m
5127
5127
  });
5128
5128
  };
5129
5129
  }
5130
5130
  })), l && (u.simulate = new Proxy({}, {
5131
- get(p, m) {
5131
+ get(p, b) {
5132
5132
  return (...f) => {
5133
- const { args: y, options: b } = Lt(f);
5133
+ const { args: y, options: m } = Lt(f);
5134
5134
  return S(a, Is, "simulateContract")({
5135
5135
  abi: e,
5136
5136
  address: t,
5137
- functionName: m,
5137
+ functionName: b,
5138
5138
  args: y,
5139
- ...b
5139
+ ...m
5140
5140
  });
5141
5141
  };
5142
5142
  }
5143
5143
  })), d && (u.createEventFilter = new Proxy({}, {
5144
- get(p, m) {
5144
+ get(p, b) {
5145
5145
  return (...f) => {
5146
- const y = e.find((g) => g.type === "event" && g.name === m), { args: b, options: h } = Mn(f, y);
5146
+ const y = e.find((g) => g.type === "event" && g.name === b), { args: m, options: h } = Mn(f, y);
5147
5147
  return S(a, fr, "createContractEventFilter")({
5148
5148
  abi: e,
5149
5149
  address: t,
5150
- eventName: m,
5151
- args: b,
5150
+ eventName: b,
5151
+ args: m,
5152
5152
  ...h
5153
5153
  });
5154
5154
  };
5155
5155
  }
5156
5156
  }), u.getEvents = new Proxy({}, {
5157
- get(p, m) {
5157
+ get(p, b) {
5158
5158
  return (...f) => {
5159
- const y = e.find((g) => g.type === "event" && g.name === m), { args: b, options: h } = Mn(f, y);
5159
+ const y = e.find((g) => g.type === "event" && g.name === b), { args: m, options: h } = Mn(f, y);
5160
5160
  return S(a, Ar, "getContractEvents")({
5161
5161
  abi: e,
5162
5162
  address: t,
5163
- eventName: m,
5164
- args: b,
5163
+ eventName: b,
5164
+ args: m,
5165
5165
  ...h
5166
5166
  });
5167
5167
  };
5168
5168
  }
5169
5169
  }), u.watchEvent = new Proxy({}, {
5170
- get(p, m) {
5170
+ get(p, b) {
5171
5171
  return (...f) => {
5172
- const y = e.find((g) => g.type === "event" && g.name === m), { args: b, options: h } = Mn(f, y);
5172
+ const y = e.find((g) => g.type === "event" && g.name === b), { args: m, options: h } = Mn(f, y);
5173
5173
  return S(a, Ms, "watchContractEvent")({
5174
5174
  abi: e,
5175
5175
  address: t,
5176
- eventName: m,
5177
- args: b,
5176
+ eventName: b,
5177
+ args: m,
5178
5178
  ...h
5179
5179
  });
5180
5180
  };
5181
5181
  }
5182
5182
  }))), o && l && (u.write = new Proxy({}, {
5183
- get(p, m) {
5183
+ get(p, b) {
5184
5184
  return (...f) => {
5185
- const { args: y, options: b } = Lt(f);
5185
+ const { args: y, options: m } = Lt(f);
5186
5186
  return S(s, Bs, "writeContract")({
5187
5187
  abi: e,
5188
5188
  address: t,
5189
- functionName: m,
5189
+ functionName: b,
5190
5190
  args: y,
5191
- ...b
5191
+ ...m
5192
5192
  });
5193
5193
  };
5194
5194
  }
5195
5195
  })), (i || o) && l && (u.estimateGas = new Proxy({}, {
5196
- get(p, m) {
5196
+ get(p, b) {
5197
5197
  return (...f) => {
5198
- const { args: y, options: b } = Lt(f);
5198
+ const { args: y, options: m } = Lt(f);
5199
5199
  return S(a ?? s, xs, "estimateContractGas")({
5200
5200
  abi: e,
5201
5201
  address: t,
5202
- functionName: m,
5202
+ functionName: b,
5203
5203
  args: y,
5204
- ...b,
5205
- account: b.account ?? s.account
5204
+ ...m,
5205
+ account: m.account ?? s.account
5206
5206
  });
5207
5207
  };
5208
5208
  }
@@ -5238,7 +5238,7 @@ class Pc extends v {
5238
5238
  async function Cc(e, t) {
5239
5239
  const { address: n, factory: r, factoryData: a } = t;
5240
5240
  try {
5241
- const [s, i, o, u, c, l, d] = await S(e, le, "readContract")({
5241
+ const [s, i, o, u, c, l, d] = await S(e, de, "readContract")({
5242
5242
  abi: Ac,
5243
5243
  address: n,
5244
5244
  functionName: "eip712Domain",
@@ -5303,11 +5303,11 @@ function Mc(e = 11) {
5303
5303
  }
5304
5304
  return _t.substring(zt, zt++ + e);
5305
5305
  }
5306
- function $s(e) {
5306
+ function ks(e) {
5307
5307
  const { batch: t, cacheTime: n = e.pollingInterval ?? 4e3, ccipRead: r, key: a = "base", name: s = "Base Client", pollingInterval: i = 4e3, type: o = "base" } = e, u = e.chain, c = e.account ? re(e.account) : void 0, { config: l, request: d, value: p } = e.transport({
5308
5308
  chain: u,
5309
5309
  pollingInterval: i
5310
- }), m = { ...l, ...p }, f = {
5310
+ }), b = { ...l, ...p }, f = {
5311
5311
  account: c,
5312
5312
  batch: t,
5313
5313
  cacheTime: n,
@@ -5317,16 +5317,16 @@ function $s(e) {
5317
5317
  name: s,
5318
5318
  pollingInterval: i,
5319
5319
  request: d,
5320
- transport: m,
5320
+ transport: b,
5321
5321
  type: o,
5322
5322
  uid: Mc()
5323
5323
  };
5324
- function y(b) {
5324
+ function y(m) {
5325
5325
  return (h) => {
5326
- const g = h(b);
5326
+ const g = h(m);
5327
5327
  for (const x in f)
5328
5328
  delete g[x];
5329
- const w = { ...b, ...g };
5329
+ const w = { ...m, ...g };
5330
5330
  return Object.assign(w, { extend: y(w) });
5331
5331
  };
5332
5332
  }
@@ -5430,7 +5430,7 @@ function Br({ key: e, name: t, request: n, retryCount: r = 3, retryDelay: a = 15
5430
5430
  value: o
5431
5431
  };
5432
5432
  }
5433
- function $c(e, t = {}) {
5433
+ function kc(e, t = {}) {
5434
5434
  const { key: n = "custom", name: r = "Custom Provider", retryDelay: a } = t;
5435
5435
  return ({ retryCount: s }) => Br({
5436
5436
  key: n,
@@ -5441,16 +5441,16 @@ function $c(e, t = {}) {
5441
5441
  type: "custom"
5442
5442
  });
5443
5443
  }
5444
- function kc(e, t = {}) {
5444
+ function $c(e, t = {}) {
5445
5445
  const { key: n = "fallback", name: r = "Fallback", rank: a = !1, retryCount: s, retryDelay: i } = t;
5446
5446
  return ({ chain: o, pollingInterval: u = 4e3, timeout: c, ...l }) => {
5447
5447
  let d = e, p = () => {
5448
5448
  };
5449
- const m = Br({
5449
+ const b = Br({
5450
5450
  key: n,
5451
5451
  name: r,
5452
5452
  async request({ method: f, params: y }) {
5453
- const b = async (h = 0) => {
5453
+ const m = async (h = 0) => {
5454
5454
  const g = d[h]({
5455
5455
  ...l,
5456
5456
  chain: o,
@@ -5478,10 +5478,10 @@ function kc(e, t = {}) {
5478
5478
  status: "error"
5479
5479
  }), Oc(w) || h === d.length - 1)
5480
5480
  throw w;
5481
- return b(h + 1);
5481
+ return m(h + 1);
5482
5482
  }
5483
5483
  };
5484
- return b();
5484
+ return m();
5485
5485
  },
5486
5486
  retryCount: s,
5487
5487
  retryDelay: i,
@@ -5502,7 +5502,7 @@ function kc(e, t = {}) {
5502
5502
  weights: f.weights
5503
5503
  });
5504
5504
  }
5505
- return m;
5505
+ return b;
5506
5506
  };
5507
5507
  }
5508
5508
  function Oc(e) {
@@ -5511,7 +5511,7 @@ function Oc(e) {
5511
5511
  function Rc({ chain: e, interval: t = 4e3, onTransports: n, sampleCount: r = 10, timeout: a = 1e3, transports: s, weights: i = {} }) {
5512
5512
  const { stability: o = 0.7, latency: u = 0.3 } = i, c = [], l = async () => {
5513
5513
  const d = await Promise.all(s.map(async (f) => {
5514
- const y = f({ chain: e, retryCount: 0, timeout: a }), b = Date.now();
5514
+ const y = f({ chain: e, retryCount: 0, timeout: a }), m = Date.now();
5515
5515
  let h, g;
5516
5516
  try {
5517
5517
  await y.request({ method: "net_listening" }), g = 1;
@@ -5520,17 +5520,17 @@ function Rc({ chain: e, interval: t = 4e3, onTransports: n, sampleCount: r = 10,
5520
5520
  } finally {
5521
5521
  h = Date.now();
5522
5522
  }
5523
- return { latency: h - b, success: g };
5523
+ return { latency: h - m, success: g };
5524
5524
  }));
5525
5525
  c.push(d), c.length > r && c.shift();
5526
- const p = Math.max(...c.map((f) => Math.max(...f.map(({ latency: y }) => y)))), m = s.map((f, y) => {
5527
- const b = c.map((P) => P[y].latency), g = 1 - b.reduce((P, T) => P + T, 0) / b.length / p, w = c.map((P) => P[y].success), x = w.reduce((P, T) => P + T, 0) / w.length;
5526
+ const p = Math.max(...c.map((f) => Math.max(...f.map(({ latency: y }) => y)))), b = s.map((f, y) => {
5527
+ const m = c.map((P) => P[y].latency), g = 1 - m.reduce((P, T) => P + T, 0) / m.length / p, w = c.map((P) => P[y].success), x = w.reduce((P, T) => P + T, 0) / w.length;
5528
5528
  return x === 0 ? [0, y] : [
5529
5529
  u * g + o * x,
5530
5530
  y
5531
5531
  ];
5532
5532
  }).sort((f, y) => y[0] - f[0]);
5533
- n(m.map(([, f]) => s[f])), await Yt(t), l();
5533
+ n(b.map(([, f]) => s[f])), await Yt(t), l();
5534
5534
  };
5535
5535
  l();
5536
5536
  }
@@ -5597,24 +5597,24 @@ function Uc(e, t = {}) {
5597
5597
  },
5598
5598
  method: c || "POST",
5599
5599
  signal: l || (i > 0 ? f : null)
5600
- }, b = new Request(e, y);
5601
- return a && await a(b), await fetch(e, y);
5600
+ }, m = new Request(e, y);
5601
+ return a && await a(m), await fetch(e, y);
5602
5602
  }, {
5603
5603
  errorInstance: new sa({ body: r, url: e }),
5604
5604
  timeout: i,
5605
5605
  signal: !0
5606
5606
  });
5607
5607
  s && await s(p);
5608
- let m;
5609
- if ((d = p.headers.get("Content-Type")) != null && d.startsWith("application/json") ? m = await p.json() : (m = await p.text(), m = JSON.parse(m || "{}")), !p.ok)
5608
+ let b;
5609
+ if ((d = p.headers.get("Content-Type")) != null && d.startsWith("application/json") ? b = await p.json() : (b = await p.text(), b = JSON.parse(b || "{}")), !p.ok)
5610
5610
  throw new yt({
5611
5611
  body: r,
5612
- details: W(m.error) || p.statusText,
5612
+ details: W(b.error) || p.statusText,
5613
5613
  headers: p.headers,
5614
5614
  status: p.status,
5615
5615
  url: e
5616
5616
  });
5617
- return m;
5617
+ return b;
5618
5618
  } catch (p) {
5619
5619
  throw p instanceof yt || p instanceof sa ? p : new yt({
5620
5620
  body: r,
@@ -5628,10 +5628,10 @@ function Uc(e, t = {}) {
5628
5628
  function Yn(e, t = {}) {
5629
5629
  const { batch: n, fetchOptions: r, key: a = "http", name: s = "HTTP JSON-RPC", onFetchRequest: i, onFetchResponse: o, retryDelay: u } = t;
5630
5630
  return ({ chain: c, retryCount: l, timeout: d }) => {
5631
- const { batchSize: p = 1e3, wait: m = 0 } = typeof n == "object" ? n : {}, f = t.retryCount ?? l, y = d ?? t.timeout ?? 1e4, b = e || (c == null ? void 0 : c.rpcUrls.default.http[0]);
5632
- if (!b)
5631
+ const { batchSize: p = 1e3, wait: b = 0 } = typeof n == "object" ? n : {}, f = t.retryCount ?? l, y = d ?? t.timeout ?? 1e4, m = e || (c == null ? void 0 : c.rpcUrls.default.http[0]);
5632
+ if (!m)
5633
5633
  throw new Fc();
5634
- const h = Uc(b, {
5634
+ const h = Uc(m, {
5635
5635
  fetchOptions: r,
5636
5636
  onRequest: i,
5637
5637
  onResponse: o,
@@ -5642,8 +5642,8 @@ function Yn(e, t = {}) {
5642
5642
  name: s,
5643
5643
  async request({ method: g, params: w }) {
5644
5644
  const x = { method: g, params: w }, { schedule: P } = As({
5645
- id: b,
5646
- wait: m,
5645
+ id: m,
5646
+ wait: b,
5647
5647
  shouldSplitBatch(M) {
5648
5648
  return M.length > p;
5649
5649
  },
@@ -5660,7 +5660,7 @@ function Yn(e, t = {}) {
5660
5660
  throw new us({
5661
5661
  body: x,
5662
5662
  error: C,
5663
- url: b
5663
+ url: m
5664
5664
  });
5665
5665
  return E;
5666
5666
  },
@@ -5670,22 +5670,22 @@ function Yn(e, t = {}) {
5670
5670
  type: "http"
5671
5671
  }, {
5672
5672
  fetchOptions: r,
5673
- url: b
5673
+ url: m
5674
5674
  });
5675
5675
  };
5676
5676
  }
5677
- function $r(e, t) {
5677
+ function kr(e, t) {
5678
5678
  var r, a, s, i, o, u;
5679
5679
  if (!(e instanceof v))
5680
5680
  return !1;
5681
5681
  const n = e.walk((c) => c instanceof Nn);
5682
5682
  return n instanceof Nn ? !!(((r = n.data) == null ? void 0 : r.errorName) === "ResolverNotFound" || ((a = n.data) == null ? void 0 : a.errorName) === "ResolverWildcardNotSupported" || ((s = n.data) == null ? void 0 : s.errorName) === "ResolverNotContract" || ((i = n.data) == null ? void 0 : i.errorName) === "ResolverError" || ((o = n.data) == null ? void 0 : o.errorName) === "HttpError" || (u = n.reason) != null && u.includes("Wildcard on non-extended resolvers is not supported") || t === "reverse" && n.reason === es[50]) : !1;
5683
5683
  }
5684
- function ks(e) {
5684
+ function $s(e) {
5685
5685
  if (e.length !== 66 || e.indexOf("[") !== 0 || e.indexOf("]") !== 65)
5686
5686
  return null;
5687
5687
  const t = `0x${e.slice(1, 65)}`;
5688
- return de(t) ? t : null;
5688
+ return ce(t) ? t : null;
5689
5689
  }
5690
5690
  function qt(e) {
5691
5691
  let t = new Uint8Array(32).fill(0);
@@ -5693,8 +5693,8 @@ function qt(e) {
5693
5693
  return q(t);
5694
5694
  const n = e.split(".");
5695
5695
  for (let r = n.length - 1; r >= 0; r -= 1) {
5696
- const a = ks(n[r]), s = a ? Ie(a) : Z(me(n[r]), "bytes");
5697
- t = Z(ge([t, s]), "bytes");
5696
+ const a = $s(n[r]), s = a ? Ie(a) : Z(fe(n[r]), "bytes");
5697
+ t = Z(he([t, s]), "bytes");
5698
5698
  }
5699
5699
  return q(t);
5700
5700
  }
@@ -5703,18 +5703,18 @@ function Hc(e) {
5703
5703
  }
5704
5704
  function jc(e) {
5705
5705
  const t = new Uint8Array(32).fill(0);
5706
- return e ? ks(e) || Z(me(e)) : q(t);
5706
+ return e ? $s(e) || Z(fe(e)) : q(t);
5707
5707
  }
5708
5708
  function fn(e) {
5709
5709
  const t = e.replace(/^\.|\.$/gm, "");
5710
5710
  if (t.length === 0)
5711
5711
  return new Uint8Array(1);
5712
- const n = new Uint8Array(me(t).byteLength + 2);
5712
+ const n = new Uint8Array(fe(t).byteLength + 2);
5713
5713
  let r = 0;
5714
5714
  const a = t.split(".");
5715
5715
  for (let s = 0; s < a.length; s++) {
5716
- let i = me(a[s]);
5717
- i.byteLength > 255 && (i = me(Hc(jc(a[s])))), n[r] = i.length, n.set(i, r + 1), r += i.length + 1;
5716
+ let i = fe(a[s]);
5717
+ i.byteLength > 255 && (i = fe(Hc(jc(a[s])))), n[r] = i.length, n.set(i, r + 1), r += i.length + 1;
5718
5718
  }
5719
5719
  return n.byteLength !== r + 1 ? n.slice(0, r + 1) : n;
5720
5720
  }
@@ -5741,23 +5741,23 @@ async function Lc(e, { blockNumber: t, blockTag: n, coinType: r, name: a, gatewa
5741
5741
  args: [Oe(fn(a)), c],
5742
5742
  blockNumber: t,
5743
5743
  blockTag: n
5744
- }, d = S(e, le, "readContract"), p = s ? await d({
5744
+ }, d = S(e, de, "readContract"), p = s ? await d({
5745
5745
  ...l,
5746
5746
  args: [...l.args, s]
5747
5747
  }) : await d(l);
5748
5748
  if (p[0] === "0x")
5749
5749
  return null;
5750
- const m = st({
5750
+ const b = st({
5751
5751
  abi: la,
5752
5752
  args: r != null ? [qt(a), BigInt(r)] : void 0,
5753
5753
  functionName: "addr",
5754
5754
  data: p[0]
5755
5755
  });
5756
- return m === "0x" || tn(m) === "0x00" ? null : m;
5756
+ return b === "0x" || tn(b) === "0x00" ? null : b;
5757
5757
  } catch (c) {
5758
5758
  if (i)
5759
5759
  throw c;
5760
- if ($r(c, "resolve"))
5760
+ if (kr(c, "resolve"))
5761
5761
  return null;
5762
5762
  throw c;
5763
5763
  }
@@ -5788,7 +5788,7 @@ class lt extends v {
5788
5788
  });
5789
5789
  }
5790
5790
  }
5791
- class kr extends v {
5791
+ class $r extends v {
5792
5792
  constructor({ uri: t }) {
5793
5793
  super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`), Object.defineProperty(this, "name", {
5794
5794
  enumerable: !0,
@@ -5837,8 +5837,8 @@ function Os({ uri: e, gatewayUrls: t }) {
5837
5837
  return { uri: e, isOnChain: !0, isEncoded: n };
5838
5838
  const r = fa(t == null ? void 0 : t.ipfs, "https://ipfs.io"), a = fa(t == null ? void 0 : t.arweave, "https://arweave.net"), s = e.match(qc), { protocol: i, subpath: o, target: u, subtarget: c = "" } = (s == null ? void 0 : s.groups) || {}, l = i === "ipns:/" || o === "ipns/", d = i === "ipfs:/" || o === "ipfs/" || Gc.test(e);
5839
5839
  if (e.startsWith("http") && !l && !d) {
5840
- let m = e;
5841
- return t != null && t.arweave && (m = e.replace(/https:\/\/arweave.net/g, t == null ? void 0 : t.arweave)), { uri: m, isOnChain: !1, isEncoded: !1 };
5840
+ let b = e;
5841
+ return t != null && t.arweave && (b = e.replace(/https:\/\/arweave.net/g, t == null ? void 0 : t.arweave)), { uri: b, isOnChain: !1, isEncoded: !1 };
5842
5842
  }
5843
5843
  if ((l || d) && u)
5844
5844
  return {
@@ -5859,7 +5859,7 @@ function Os({ uri: e, gatewayUrls: t }) {
5859
5859
  isOnChain: !0,
5860
5860
  isEncoded: !1
5861
5861
  };
5862
- throw new kr({ uri: e });
5862
+ throw new $r({ uri: e });
5863
5863
  }
5864
5864
  function Rs(e) {
5865
5865
  if (typeof e != "object" || !("image" in e) && !("image_url" in e) && !("image_data" in e))
@@ -5874,14 +5874,14 @@ async function Kc({ gatewayUrls: e, uri: t }) {
5874
5874
  uri: Rs(n)
5875
5875
  });
5876
5876
  } catch {
5877
- throw new kr({ uri: t });
5877
+ throw new $r({ uri: t });
5878
5878
  }
5879
5879
  }
5880
5880
  async function Or({ gatewayUrls: e, uri: t }) {
5881
5881
  const { uri: n, isOnChain: r } = Os({ uri: t, gatewayUrls: e });
5882
5882
  if (r || await Zc(n))
5883
5883
  return n;
5884
- throw new kr({ uri: t });
5884
+ throw new $r({ uri: t });
5885
5885
  }
5886
5886
  function Yc(e) {
5887
5887
  let t = e;
@@ -5908,7 +5908,7 @@ function Yc(e) {
5908
5908
  }
5909
5909
  async function Jc(e, { nft: t }) {
5910
5910
  if (t.namespace === "erc721")
5911
- return le(e, {
5911
+ return de(e, {
5912
5912
  address: t.contractAddress,
5913
5913
  abi: [
5914
5914
  {
@@ -5923,7 +5923,7 @@ async function Jc(e, { nft: t }) {
5923
5923
  args: [BigInt(t.tokenID)]
5924
5924
  });
5925
5925
  if (t.namespace === "erc1155")
5926
- return le(e, {
5926
+ return de(e, {
5927
5927
  address: t.contractAddress,
5928
5928
  abi: [
5929
5929
  {
@@ -5986,7 +5986,7 @@ async function Fs(e, { blockNumber: t, blockTag: n, name: r, key: a, gatewayUrls
5986
5986
  ],
5987
5987
  blockNumber: t,
5988
5988
  blockTag: n
5989
- }, l = S(e, le, "readContract"), d = s ? await l({
5989
+ }, l = S(e, de, "readContract"), d = s ? await l({
5990
5990
  ...c,
5991
5991
  args: [...c.args, s]
5992
5992
  }) : await l(c);
@@ -6001,7 +6001,7 @@ async function Fs(e, { blockNumber: t, blockTag: n, name: r, key: a, gatewayUrls
6001
6001
  } catch (c) {
6002
6002
  if (i)
6003
6003
  throw c;
6004
- if ($r(c, "resolve"))
6004
+ if (kr(c, "resolve"))
6005
6005
  return null;
6006
6006
  throw c;
6007
6007
  }
@@ -6047,7 +6047,7 @@ async function td(e, { address: t, blockNumber: n, blockTag: r, gatewayUrls: a,
6047
6047
  args: [Oe(fn(u))],
6048
6048
  blockNumber: n,
6049
6049
  blockTag: r
6050
- }, l = S(e, le, "readContract"), [d, p] = a ? await l({
6050
+ }, l = S(e, de, "readContract"), [d, p] = a ? await l({
6051
6051
  ...c,
6052
6052
  args: [...c.args, a]
6053
6053
  }) : await l(c);
@@ -6055,7 +6055,7 @@ async function td(e, { address: t, blockNumber: n, blockTag: r, gatewayUrls: a,
6055
6055
  } catch (c) {
6056
6056
  if (s)
6057
6057
  throw c;
6058
- if ($r(c, "reverse"))
6058
+ if (kr(c, "reverse"))
6059
6059
  return null;
6060
6060
  throw c;
6061
6061
  }
@@ -6071,7 +6071,7 @@ async function nd(e, { blockNumber: t, blockTag: n, name: r, universalResolverAd
6071
6071
  contract: "ensUniversalResolver"
6072
6072
  });
6073
6073
  }
6074
- const [i] = await S(e, le, "readContract")({
6074
+ const [i] = await S(e, de, "readContract")({
6075
6075
  address: s,
6076
6076
  abi: [
6077
6077
  {
@@ -6238,7 +6238,7 @@ function fd(e) {
6238
6238
  data: n,
6239
6239
  primaryType: r,
6240
6240
  types: a
6241
- })), Z(ge(s));
6241
+ })), Z(he(s));
6242
6242
  }
6243
6243
  function md({ domain: e, types: t }) {
6244
6244
  return Hs({
@@ -6266,7 +6266,7 @@ function js({ data: e, primaryType: t, types: n }) {
6266
6266
  });
6267
6267
  r.push(i), a.push(o);
6268
6268
  }
6269
- return $t(r, a);
6269
+ return kt(r, a);
6270
6270
  }
6271
6271
  function bd({ primaryType: e, types: t }) {
6272
6272
  const n = Oe(hd({ primaryType: e, types: t }));
@@ -6309,7 +6309,7 @@ function zs({ types: e, name: t, type: n, value: r }) {
6309
6309
  }));
6310
6310
  return [
6311
6311
  { type: "bytes32" },
6312
- Z($t(s.map(([i]) => i), s.map(([, i]) => i)))
6312
+ Z(kt(s.map(([i]) => i), s.map(([, i]) => i)))
6313
6313
  ];
6314
6314
  }
6315
6315
  return [{ type: n }, r];
@@ -6318,8 +6318,8 @@ function gd(e) {
6318
6318
  const { domain: t, message: n, primaryType: r, types: a } = e, s = (u, c) => {
6319
6319
  const l = { ...c };
6320
6320
  for (const d of u) {
6321
- const { name: p, type: m } = d;
6322
- m === "address" && (l[p] = l[p].toLowerCase());
6321
+ const { name: p, type: b } = d;
6322
+ b === "address" && (l[p] = l[p].toLowerCase());
6323
6323
  }
6324
6324
  return l;
6325
6325
  }, i = a.EIP712Domain ? t ? s(a.EIP712Domain, t) : {} : {}, o = (() => {
@@ -6333,20 +6333,20 @@ function _s(e) {
6333
6333
  for (const u of i) {
6334
6334
  const { name: c, type: l } = u, d = o[c], p = l.match(yd);
6335
6335
  if (p && (typeof d == "number" || typeof d == "bigint")) {
6336
- const [y, b, h] = p;
6336
+ const [y, m, h] = p;
6337
6337
  O(d, {
6338
- signed: b === "int",
6338
+ signed: m === "int",
6339
6339
  size: Number.parseInt(h) / 8
6340
6340
  });
6341
6341
  }
6342
6342
  if (l === "address" && typeof d == "string" && !oe(d))
6343
6343
  throw new Me({ address: d });
6344
- const m = l.match(pd);
6345
- if (m) {
6346
- const [y, b] = m;
6347
- if (b && L(d) !== Number.parseInt(b))
6344
+ const b = l.match(pd);
6345
+ if (b) {
6346
+ const [y, m] = b;
6347
+ if (m && L(d) !== Number.parseInt(m))
6348
6348
  throw new io({
6349
- expectedSize: Number.parseInt(b),
6349
+ expectedSize: Number.parseInt(m),
6350
6350
  givenSize: L(d)
6351
6351
  });
6352
6352
  }
@@ -6394,8 +6394,8 @@ function Td(e) {
6394
6394
  const vd = `Ethereum Signed Message:
6395
6395
  `;
6396
6396
  function Gs(e, t) {
6397
- const n = typeof e == "string" ? me(e) : e.raw instanceof Uint8Array ? e.raw : Ie(e.raw), r = me(`${vd}${n.length}`);
6398
- return Z(ge([r, n]), t);
6397
+ const n = typeof e == "string" ? fe(e) : e.raw instanceof Uint8Array ? e.raw : Ie(e.raw), r = fe(`${vd}${n.length}`);
6398
+ return Z(he([r, n]), t);
6399
6399
  }
6400
6400
  function xd(e) {
6401
6401
  return e.map((t) => ({
@@ -6466,8 +6466,8 @@ async function Jn(e, { hash: t }) {
6466
6466
  return (((i = (s = (a = e.chain) == null ? void 0 : a.formatters) == null ? void 0 : s.transactionReceipt) == null ? void 0 : i.format) || Td)(n);
6467
6467
  }
6468
6468
  async function Id(e, t) {
6469
- var b;
6470
- const { allowFailure: n = !0, batchSize: r, blockNumber: a, blockTag: s, multicallAddress: i, stateOverride: o } = t, u = t.contracts, c = r ?? (typeof ((b = e.batch) == null ? void 0 : b.multicall) == "object" && e.batch.multicall.batchSize || 1024);
6469
+ var m;
6470
+ const { allowFailure: n = !0, batchSize: r, blockNumber: a, blockTag: s, multicallAddress: i, stateOverride: o } = t, u = t.contracts, c = r ?? (typeof ((m = e.batch) == null ? void 0 : m.multicall) == "object" && e.batch.multicall.batchSize || 1024);
6471
6471
  let l = i;
6472
6472
  if (!l) {
6473
6473
  if (!e.chain)
@@ -6479,15 +6479,15 @@ async function Id(e, t) {
6479
6479
  });
6480
6480
  }
6481
6481
  const d = [[]];
6482
- let p = 0, m = 0;
6482
+ let p = 0, b = 0;
6483
6483
  for (let h = 0; h < u.length; h++) {
6484
6484
  const { abi: g, address: w, args: x, functionName: P } = u[h];
6485
6485
  try {
6486
6486
  const T = Re({ abi: g, args: x, functionName: P });
6487
- m += (T.length - 2) / 2, // Check if batching is enabled.
6487
+ b += (T.length - 2) / 2, // Check if batching is enabled.
6488
6488
  c > 0 && // Check if the current size of the batch exceeds the size limit.
6489
- m > c && // Check if the current chunk is not already empty.
6490
- d[p].length > 0 && (p++, m = (T.length - 2) / 2, d[p] = []), d[p] = [
6489
+ b > c && // Check if the current chunk is not already empty.
6490
+ d[p].length > 0 && (p++, b = (T.length - 2) / 2, d[p] = []), d[p] = [
6491
6491
  ...d[p],
6492
6492
  {
6493
6493
  allowFailure: !0,
@@ -6515,7 +6515,7 @@ async function Id(e, t) {
6515
6515
  ];
6516
6516
  }
6517
6517
  }
6518
- const f = await Promise.allSettled(d.map((h) => S(e, le, "readContract")({
6518
+ const f = await Promise.allSettled(d.map((h) => S(e, de, "readContract")({
6519
6519
  abi: Wn,
6520
6520
  address: l,
6521
6521
  args: [h],
@@ -6539,7 +6539,7 @@ async function Id(e, t) {
6539
6539
  }
6540
6540
  const w = g.value;
6541
6541
  for (let x = 0; x < w.length; x++) {
6542
- const { returnData: P, success: T } = w[x], { callData: C } = d[h][x], { abi: E, address: M, functionName: B, args: $ } = u[y.length];
6542
+ const { returnData: P, success: T } = w[x], { callData: C } = d[h][x], { abi: E, address: M, functionName: B, args: k } = u[y.length];
6543
6543
  try {
6544
6544
  if (C === "0x")
6545
6545
  throw new Qt();
@@ -6547,7 +6547,7 @@ async function Id(e, t) {
6547
6547
  throw new br({ data: P });
6548
6548
  const N = st({
6549
6549
  abi: E,
6550
- args: $,
6550
+ args: k,
6551
6551
  data: P,
6552
6552
  functionName: B
6553
6553
  });
@@ -6556,7 +6556,7 @@ async function Id(e, t) {
6556
6556
  const F = St(N, {
6557
6557
  abi: E,
6558
6558
  address: M,
6559
- args: $,
6559
+ args: k,
6560
6560
  docsPath: "/docs/contract/multicall",
6561
6561
  functionName: B
6562
6562
  });
@@ -6655,12 +6655,12 @@ function Zs(e, t) {
6655
6655
  return !1;
6656
6656
  return !0;
6657
6657
  }
6658
- function $d(e) {
6658
+ function kd(e) {
6659
6659
  if (typeof e != "string")
6660
6660
  throw new Error(`utf8ToBytes expected string, got ${typeof e}`);
6661
6661
  return new Uint8Array(new TextEncoder().encode(e));
6662
6662
  }
6663
- function kd(e) {
6663
+ function $d(e) {
6664
6664
  let t;
6665
6665
  for (t = 0; e > Ws; e >>= mn, t += 1)
6666
6666
  ;
@@ -6689,17 +6689,17 @@ function Ks(e, t, n) {
6689
6689
  const p = [];
6690
6690
  for (; d < t; ) {
6691
6691
  r = o();
6692
- const m = r.slice();
6693
- p.push(m), d += r.length;
6692
+ const b = r.slice();
6693
+ p.push(b), d += r.length;
6694
6694
  }
6695
6695
  return Bt(...p);
6696
6696
  };
6697
6697
  return (d, p) => {
6698
6698
  i(), u(d);
6699
- let m;
6700
- for (; !(m = p(c())); )
6699
+ let b;
6700
+ for (; !(b = p(c())); )
6701
6701
  u();
6702
- return i(), m;
6702
+ return i(), b;
6703
6703
  };
6704
6704
  }
6705
6705
  const Fd = {
@@ -6731,7 +6731,7 @@ function Ht(e, t, n = {}) {
6731
6731
  const Nd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6732
6732
  __proto__: null,
6733
6733
  bitGet: Od,
6734
- bitLen: kd,
6734
+ bitLen: $d,
6735
6735
  bitMask: Ur,
6736
6736
  bitSet: Rd,
6737
6737
  bytesToHex: et,
@@ -6747,11 +6747,11 @@ const Nd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6747
6747
  numberToBytesLE: Dr,
6748
6748
  numberToHexUnpadded: Vs,
6749
6749
  numberToVarBytesBE: Bd,
6750
- utf8ToBytes: $d,
6750
+ utf8ToBytes: kd,
6751
6751
  validateObject: Ht
6752
6752
  }, Symbol.toStringTag, { value: "Module" }));
6753
6753
  function Dd(e, t) {
6754
- const n = de(e) ? Ie(e) : e, r = de(t) ? Ie(t) : t;
6754
+ const n = ce(e) ? Ie(e) : e, r = ce(t) ? Ie(t) : t;
6755
6755
  return Zs(n, r);
6756
6756
  }
6757
6757
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -6814,11 +6814,11 @@ function jd(e) {
6814
6814
  for (; !o.eql(p, o.ONE); ) {
6815
6815
  if (o.eql(p, o.ZERO))
6816
6816
  return o.ZERO;
6817
- let m = 1;
6818
- for (let y = o.sqr(p); m < c && !o.eql(y, o.ONE); m++)
6817
+ let b = 1;
6818
+ for (let y = o.sqr(p); b < c && !o.eql(y, o.ONE); b++)
6819
6819
  y = o.sqr(y);
6820
- const f = o.pow(l, H << BigInt(c - m - 1));
6821
- l = o.sqr(f), d = o.mul(d, f), p = o.mul(p, l), c = m;
6820
+ const f = o.pow(l, H << BigInt(c - b - 1));
6821
+ l = o.sqr(f), d = o.mul(d, f), p = o.mul(p, l), c = b;
6822
6822
  }
6823
6823
  return d;
6824
6824
  };
@@ -7008,13 +7008,13 @@ function Kd(e, t) {
7008
7008
  wNAF(a, s, i) {
7009
7009
  const { windows: o, windowSize: u } = r(a);
7010
7010
  let c = e.ZERO, l = e.BASE;
7011
- const d = BigInt(2 ** a - 1), p = 2 ** a, m = BigInt(a);
7011
+ const d = BigInt(2 ** a - 1), p = 2 ** a, b = BigInt(a);
7012
7012
  for (let f = 0; f < o; f++) {
7013
7013
  const y = f * u;
7014
- let b = Number(i & d);
7015
- i >>= m, b > u && (b -= p, i += Bn);
7016
- const h = y, g = y + Math.abs(b) - 1, w = f % 2 !== 0, x = b < 0;
7017
- b === 0 ? l = l.add(n(w, s[h])) : c = c.add(n(x, s[g]));
7014
+ let m = Number(i & d);
7015
+ i >>= b, m > u && (m -= p, i += Bn);
7016
+ const h = y, g = y + Math.abs(m) - 1, w = f % 2 !== 0, x = m < 0;
7017
+ m === 0 ? l = l.add(n(w, s[h])) : c = c.add(n(x, s[g]));
7018
7018
  }
7019
7019
  return { p: c, f: l };
7020
7020
  },
@@ -7105,43 +7105,43 @@ const { bytesToNumberBE: Jd, hexToBytes: Xd } = Nd, Ue = {
7105
7105
  }, r = t(n(e.s)), a = t(n(e.r)), s = r.length / 2, i = a.length / 2, o = n(s), u = n(i);
7106
7106
  return `30${n(i + s + 4)}02${u}${a}02${o}${r}`;
7107
7107
  }
7108
- }, fe = BigInt(0), ee = BigInt(1);
7108
+ }, ye = BigInt(0), ee = BigInt(1);
7109
7109
  BigInt(2);
7110
7110
  const ga = BigInt(3);
7111
7111
  BigInt(4);
7112
7112
  function Qd(e) {
7113
- const t = Yd(e), { Fp: n } = t, r = t.toBytes || ((f, y, b) => {
7113
+ const t = Yd(e), { Fp: n } = t, r = t.toBytes || ((f, y, m) => {
7114
7114
  const h = y.toAffine();
7115
7115
  return Bt(Uint8Array.from([4]), n.toBytes(h.x), n.toBytes(h.y));
7116
7116
  }), a = t.fromBytes || ((f) => {
7117
- const y = f.subarray(1), b = n.fromBytes(y.subarray(0, n.BYTES)), h = n.fromBytes(y.subarray(n.BYTES, 2 * n.BYTES));
7118
- return { x: b, y: h };
7117
+ const y = f.subarray(1), m = n.fromBytes(y.subarray(0, n.BYTES)), h = n.fromBytes(y.subarray(n.BYTES, 2 * n.BYTES));
7118
+ return { x: m, y: h };
7119
7119
  });
7120
7120
  function s(f) {
7121
- const { a: y, b } = t, h = n.sqr(f), g = n.mul(h, f);
7122
- return n.add(n.add(g, n.mul(f, y)), b);
7121
+ const { a: y, b: m } = t, h = n.sqr(f), g = n.mul(h, f);
7122
+ return n.add(n.add(g, n.mul(f, y)), m);
7123
7123
  }
7124
7124
  if (!n.eql(n.sqr(t.Gy), s(t.Gx)))
7125
7125
  throw new Error("bad generator point: equation left != right");
7126
7126
  function i(f) {
7127
- return typeof f == "bigint" && fe < f && f < t.n;
7127
+ return typeof f == "bigint" && ye < f && f < t.n;
7128
7128
  }
7129
7129
  function o(f) {
7130
7130
  if (!i(f))
7131
7131
  throw new Error("Expected valid bigint: 0 < bigint < curve.n");
7132
7132
  }
7133
7133
  function u(f) {
7134
- const { allowedPrivateKeyLengths: y, nByteLength: b, wrapPrivateKey: h, n: g } = t;
7134
+ const { allowedPrivateKeyLengths: y, nByteLength: m, wrapPrivateKey: h, n: g } = t;
7135
7135
  if (y && typeof f != "bigint") {
7136
7136
  if (f instanceof Uint8Array && (f = et(f)), typeof f != "string" || !y.includes(f.length))
7137
7137
  throw new Error("Invalid key");
7138
- f = f.padStart(b * 2, "0");
7138
+ f = f.padStart(m * 2, "0");
7139
7139
  }
7140
7140
  let w;
7141
7141
  try {
7142
- w = typeof f == "bigint" ? f : je(se("private key", f, b));
7142
+ w = typeof f == "bigint" ? f : je(se("private key", f, m));
7143
7143
  } catch {
7144
- throw new Error(`private key must be ${b} bytes, hex or bigint, not ${typeof f}`);
7144
+ throw new Error(`private key must be ${m} bytes, hex or bigint, not ${typeof f}`);
7145
7145
  }
7146
7146
  return h && (w = V(w, g)), o(w), w;
7147
7147
  }
@@ -7151,10 +7151,10 @@ function Qd(e) {
7151
7151
  throw new Error("ProjectivePoint expected");
7152
7152
  }
7153
7153
  class d {
7154
- constructor(y, b, h) {
7155
- if (this.px = y, this.py = b, this.pz = h, y == null || !n.isValid(y))
7154
+ constructor(y, m, h) {
7155
+ if (this.px = y, this.py = m, this.pz = h, y == null || !n.isValid(y))
7156
7156
  throw new Error("x required");
7157
- if (b == null || !n.isValid(b))
7157
+ if (m == null || !n.isValid(m))
7158
7158
  throw new Error("y required");
7159
7159
  if (h == null || !n.isValid(h))
7160
7160
  throw new Error("z required");
@@ -7162,13 +7162,13 @@ function Qd(e) {
7162
7162
  // Does not validate if the point is on-curve.
7163
7163
  // Use fromHex instead, or call assertValidity() later.
7164
7164
  static fromAffine(y) {
7165
- const { x: b, y: h } = y || {};
7166
- if (!y || !n.isValid(b) || !n.isValid(h))
7165
+ const { x: m, y: h } = y || {};
7166
+ if (!y || !n.isValid(m) || !n.isValid(h))
7167
7167
  throw new Error("invalid affine point");
7168
7168
  if (y instanceof d)
7169
7169
  throw new Error("projective point not allowed");
7170
7170
  const g = (w) => n.eql(w, n.ZERO);
7171
- return g(b) && g(h) ? d.ZERO : new d(b, h, n.ONE);
7171
+ return g(m) && g(h) ? d.ZERO : new d(m, h, n.ONE);
7172
7172
  }
7173
7173
  get x() {
7174
7174
  return this.toAffine().x;
@@ -7183,16 +7183,16 @@ function Qd(e) {
7183
7183
  * Optimization: converts a list of projective points to a list of identical points with Z=1.
7184
7184
  */
7185
7185
  static normalizeZ(y) {
7186
- const b = n.invertBatch(y.map((h) => h.pz));
7187
- return y.map((h, g) => h.toAffine(b[g])).map(d.fromAffine);
7186
+ const m = n.invertBatch(y.map((h) => h.pz));
7187
+ return y.map((h, g) => h.toAffine(m[g])).map(d.fromAffine);
7188
7188
  }
7189
7189
  /**
7190
7190
  * Converts hash string or Uint8Array to Point.
7191
7191
  * @param hex short/long ECDSA hex
7192
7192
  */
7193
7193
  static fromHex(y) {
7194
- const b = d.fromAffine(a(se("pointHex", y)));
7195
- return b.assertValidity(), b;
7194
+ const m = d.fromAffine(a(se("pointHex", y)));
7195
+ return m.assertValidity(), m;
7196
7196
  }
7197
7197
  // Multiplies generator point by privateKey.
7198
7198
  static fromPrivateKey(y) {
@@ -7209,10 +7209,10 @@ function Qd(e) {
7209
7209
  return;
7210
7210
  throw new Error("bad point: ZERO");
7211
7211
  }
7212
- const { x: y, y: b } = this.toAffine();
7213
- if (!n.isValid(y) || !n.isValid(b))
7212
+ const { x: y, y: m } = this.toAffine();
7213
+ if (!n.isValid(y) || !n.isValid(m))
7214
7214
  throw new Error("bad point: x or y not FE");
7215
- const h = n.sqr(b), g = s(y);
7215
+ const h = n.sqr(m), g = s(y);
7216
7216
  if (!n.eql(h, g))
7217
7217
  throw new Error("bad point: equation left != right");
7218
7218
  if (!this.isTorsionFree())
@@ -7229,7 +7229,7 @@ function Qd(e) {
7229
7229
  */
7230
7230
  equals(y) {
7231
7231
  l(y);
7232
- const { px: b, py: h, pz: g } = this, { px: w, py: x, pz: P } = y, T = n.eql(n.mul(b, P), n.mul(w, g)), C = n.eql(n.mul(h, P), n.mul(x, g));
7232
+ const { px: m, py: h, pz: g } = this, { px: w, py: x, pz: P } = y, T = n.eql(n.mul(m, P), n.mul(w, g)), C = n.eql(n.mul(h, P), n.mul(x, g));
7233
7233
  return T && C;
7234
7234
  }
7235
7235
  /**
@@ -7243,9 +7243,9 @@ function Qd(e) {
7243
7243
  // https://eprint.iacr.org/2015/1060, algorithm 3
7244
7244
  // Cost: 8M + 3S + 3*a + 2*b3 + 15add.
7245
7245
  double() {
7246
- const { a: y, b } = t, h = n.mul(b, ga), { px: g, py: w, pz: x } = this;
7247
- let P = n.ZERO, T = n.ZERO, C = n.ZERO, E = n.mul(g, g), M = n.mul(w, w), B = n.mul(x, x), $ = n.mul(g, w);
7248
- return $ = n.add($, $), C = n.mul(g, x), C = n.add(C, C), P = n.mul(y, C), T = n.mul(h, B), T = n.add(P, T), P = n.sub(M, T), T = n.add(M, T), T = n.mul(P, T), P = n.mul($, P), C = n.mul(h, C), B = n.mul(y, B), $ = n.sub(E, B), $ = n.mul(y, $), $ = n.add($, C), C = n.add(E, E), E = n.add(C, E), E = n.add(E, B), E = n.mul(E, $), T = n.add(T, E), B = n.mul(w, x), B = n.add(B, B), E = n.mul(B, $), P = n.sub(P, E), C = n.mul(B, M), C = n.add(C, C), C = n.add(C, C), new d(P, T, C);
7246
+ const { a: y, b: m } = t, h = n.mul(m, ga), { px: g, py: w, pz: x } = this;
7247
+ let P = n.ZERO, T = n.ZERO, C = n.ZERO, E = n.mul(g, g), M = n.mul(w, w), B = n.mul(x, x), k = n.mul(g, w);
7248
+ return k = n.add(k, k), C = n.mul(g, x), C = n.add(C, C), P = n.mul(y, C), T = n.mul(h, B), T = n.add(P, T), P = n.sub(M, T), T = n.add(M, T), T = n.mul(P, T), P = n.mul(k, P), C = n.mul(h, C), B = n.mul(y, B), k = n.sub(E, B), k = n.mul(y, k), k = n.add(k, C), C = n.add(E, E), E = n.add(C, E), E = n.add(E, B), E = n.mul(E, k), T = n.add(T, E), B = n.mul(w, x), B = n.add(B, B), E = n.mul(B, k), P = n.sub(P, E), C = n.mul(B, M), C = n.add(C, C), C = n.add(C, C), new d(P, T, C);
7249
7249
  }
7250
7250
  // Renes-Costello-Batina exception-free addition formula.
7251
7251
  // There is 30% faster Jacobian formula, but it is not complete.
@@ -7253,13 +7253,13 @@ function Qd(e) {
7253
7253
  // Cost: 12M + 0S + 3*a + 3*b3 + 23add.
7254
7254
  add(y) {
7255
7255
  l(y);
7256
- const { px: b, py: h, pz: g } = this, { px: w, py: x, pz: P } = y;
7256
+ const { px: m, py: h, pz: g } = this, { px: w, py: x, pz: P } = y;
7257
7257
  let T = n.ZERO, C = n.ZERO, E = n.ZERO;
7258
7258
  const M = t.a, B = n.mul(t.b, ga);
7259
- let $ = n.mul(b, w), N = n.mul(h, x), F = n.mul(g, P), G = n.add(b, h), A = n.add(w, x);
7260
- G = n.mul(G, A), A = n.add($, N), G = n.sub(G, A), A = n.add(b, g);
7259
+ let k = n.mul(m, w), N = n.mul(h, x), F = n.mul(g, P), G = n.add(m, h), A = n.add(w, x);
7260
+ G = n.mul(G, A), A = n.add(k, N), G = n.sub(G, A), A = n.add(m, g);
7261
7261
  let I = n.add(w, P);
7262
- return A = n.mul(A, I), I = n.add($, F), A = n.sub(A, I), I = n.add(h, g), T = n.add(x, P), I = n.mul(I, T), T = n.add(N, F), I = n.sub(I, T), E = n.mul(M, A), T = n.mul(B, F), E = n.add(T, E), T = n.sub(N, E), E = n.add(N, E), C = n.mul(T, E), N = n.add($, $), N = n.add(N, $), F = n.mul(M, F), A = n.mul(B, A), N = n.add(N, F), F = n.sub($, F), F = n.mul(M, F), A = n.add(A, F), $ = n.mul(N, A), C = n.add(C, $), $ = n.mul(I, A), T = n.mul(G, T), T = n.sub(T, $), $ = n.mul(G, N), E = n.mul(I, E), E = n.add(E, $), new d(T, C, E);
7262
+ return A = n.mul(A, I), I = n.add(k, F), A = n.sub(A, I), I = n.add(h, g), T = n.add(x, P), I = n.mul(I, T), T = n.add(N, F), I = n.sub(I, T), E = n.mul(M, A), T = n.mul(B, F), E = n.add(T, E), T = n.sub(N, E), E = n.add(N, E), C = n.mul(T, E), N = n.add(k, k), N = n.add(N, k), F = n.mul(M, F), A = n.mul(B, A), N = n.add(N, F), F = n.sub(k, F), F = n.mul(M, F), A = n.add(A, F), k = n.mul(N, A), C = n.add(C, k), k = n.mul(I, A), T = n.mul(G, T), T = n.sub(T, k), k = n.mul(G, N), E = n.mul(I, E), E = n.add(E, k), new d(T, C, E);
7263
7263
  }
7264
7264
  subtract(y) {
7265
7265
  return this.add(y.negate());
@@ -7268,9 +7268,9 @@ function Qd(e) {
7268
7268
  return this.equals(d.ZERO);
7269
7269
  }
7270
7270
  wNAF(y) {
7271
- return m.wNAFCached(this, c, y, (b) => {
7272
- const h = n.invertBatch(b.map((g) => g.pz));
7273
- return b.map((g, w) => g.toAffine(h[w])).map(d.fromAffine);
7271
+ return b.wNAFCached(this, c, y, (m) => {
7272
+ const h = n.invertBatch(m.map((g) => g.pz));
7273
+ return m.map((g, w) => g.toAffine(h[w])).map(d.fromAffine);
7274
7274
  });
7275
7275
  }
7276
7276
  /**
@@ -7279,16 +7279,16 @@ function Qd(e) {
7279
7279
  * an exposed private key e.g. sig verification, which works over *public* keys.
7280
7280
  */
7281
7281
  multiplyUnsafe(y) {
7282
- const b = d.ZERO;
7283
- if (y === fe)
7284
- return b;
7282
+ const m = d.ZERO;
7283
+ if (y === ye)
7284
+ return m;
7285
7285
  if (o(y), y === ee)
7286
7286
  return this;
7287
7287
  const { endo: h } = t;
7288
7288
  if (!h)
7289
- return m.unsafeLadder(this, y);
7290
- let { k1neg: g, k1: w, k2neg: x, k2: P } = h.splitScalar(y), T = b, C = b, E = this;
7291
- for (; w > fe || P > fe; )
7289
+ return b.unsafeLadder(this, y);
7290
+ let { k1neg: g, k1: w, k2neg: x, k2: P } = h.splitScalar(y), T = m, C = m, E = this;
7291
+ for (; w > ye || P > ye; )
7292
7292
  w & ee && (T = T.add(E)), P & ee && (C = C.add(E)), E = E.double(), w >>= ee, P >>= ee;
7293
7293
  return g && (T = T.negate()), x && (C = C.negate()), C = new d(n.mul(C.px, h.beta), C.py, C.pz), T.add(C);
7294
7294
  }
@@ -7303,14 +7303,14 @@ function Qd(e) {
7303
7303
  */
7304
7304
  multiply(y) {
7305
7305
  o(y);
7306
- let b = y, h, g;
7306
+ let m = y, h, g;
7307
7307
  const { endo: w } = t;
7308
7308
  if (w) {
7309
- const { k1neg: x, k1: P, k2neg: T, k2: C } = w.splitScalar(b);
7310
- let { p: E, f: M } = this.wNAF(P), { p: B, f: $ } = this.wNAF(C);
7311
- E = m.constTimeNegate(x, E), B = m.constTimeNegate(T, B), B = new d(n.mul(B.px, w.beta), B.py, B.pz), h = E.add(B), g = M.add($);
7309
+ const { k1neg: x, k1: P, k2neg: T, k2: C } = w.splitScalar(m);
7310
+ let { p: E, f: M } = this.wNAF(P), { p: B, f: k } = this.wNAF(C);
7311
+ E = b.constTimeNegate(x, E), B = b.constTimeNegate(T, B), B = new d(n.mul(B.px, w.beta), B.py, B.pz), h = E.add(B), g = M.add(k);
7312
7312
  } else {
7313
- const { p: x, f: P } = this.wNAF(b);
7313
+ const { p: x, f: P } = this.wNAF(m);
7314
7314
  h = x, g = P;
7315
7315
  }
7316
7316
  return d.normalizeZ([h, g])[0];
@@ -7321,17 +7321,17 @@ function Qd(e) {
7321
7321
  * The trick could be useful if both P and Q are not G (not in our case).
7322
7322
  * @returns non-zero affine point
7323
7323
  */
7324
- multiplyAndAddUnsafe(y, b, h) {
7325
- const g = d.BASE, w = (P, T) => T === fe || T === ee || !P.equals(g) ? P.multiplyUnsafe(T) : P.multiply(T), x = w(this, b).add(w(y, h));
7324
+ multiplyAndAddUnsafe(y, m, h) {
7325
+ const g = d.BASE, w = (P, T) => T === ye || T === ee || !P.equals(g) ? P.multiplyUnsafe(T) : P.multiply(T), x = w(this, m).add(w(y, h));
7326
7326
  return x.is0() ? void 0 : x;
7327
7327
  }
7328
7328
  // Converts Projective point to affine (x, y) coordinates.
7329
7329
  // Can accept precomputed Z^-1 - for example, from invertBatch.
7330
7330
  // (x, y, z) ∋ (x=x/z, y=y/z)
7331
7331
  toAffine(y) {
7332
- const { px: b, py: h, pz: g } = this, w = this.is0();
7332
+ const { px: m, py: h, pz: g } = this, w = this.is0();
7333
7333
  y == null && (y = w ? n.ONE : n.inv(g));
7334
- const x = n.mul(b, y), P = n.mul(h, y), T = n.mul(g, y);
7334
+ const x = n.mul(m, y), P = n.mul(h, y), T = n.mul(g, y);
7335
7335
  if (w)
7336
7336
  return { x: n.ZERO, y: n.ZERO };
7337
7337
  if (!n.eql(T, n.ONE))
@@ -7339,16 +7339,16 @@ function Qd(e) {
7339
7339
  return { x, y: P };
7340
7340
  }
7341
7341
  isTorsionFree() {
7342
- const { h: y, isTorsionFree: b } = t;
7342
+ const { h: y, isTorsionFree: m } = t;
7343
7343
  if (y === ee)
7344
7344
  return !0;
7345
- if (b)
7346
- return b(d, this);
7345
+ if (m)
7346
+ return m(d, this);
7347
7347
  throw new Error("isTorsionFree() has not been declared for the elliptic curve");
7348
7348
  }
7349
7349
  clearCofactor() {
7350
- const { h: y, clearCofactor: b } = t;
7351
- return y === ee ? this : b ? b(d, this) : this.multiplyUnsafe(t.h);
7350
+ const { h: y, clearCofactor: m } = t;
7351
+ return y === ee ? this : m ? m(d, this) : this.multiplyUnsafe(t.h);
7352
7352
  }
7353
7353
  toRawBytes(y = !0) {
7354
7354
  return this.assertValidity(), r(d, this, y);
@@ -7358,7 +7358,7 @@ function Qd(e) {
7358
7358
  }
7359
7359
  }
7360
7360
  d.BASE = new d(t.Gx, t.Gy, n.ONE), d.ZERO = new d(n.ZERO, n.ONE, n.ZERO);
7361
- const p = t.nBitLength, m = Kd(d, t.endo ? Math.ceil(p / 2) : p);
7361
+ const p = t.nBitLength, b = Kd(d, t.endo ? Math.ceil(p / 2) : p);
7362
7362
  return {
7363
7363
  CURVE: t,
7364
7364
  ProjectivePoint: d,
@@ -7382,7 +7382,7 @@ function el(e) {
7382
7382
  function tl(e) {
7383
7383
  const t = el(e), { Fp: n, n: r } = t, a = n.BYTES + 1, s = 2 * n.BYTES + 1;
7384
7384
  function i(A) {
7385
- return fe < A && A < n.ORDER;
7385
+ return ye < A && A < n.ORDER;
7386
7386
  }
7387
7387
  function o(A) {
7388
7388
  return V(A, r);
@@ -7412,7 +7412,7 @@ function tl(e) {
7412
7412
  } else
7413
7413
  throw new Error(`Point of length ${I} was invalid. Expected ${a} compressed bytes or ${s} uncompressed bytes`);
7414
7414
  }
7415
- }), m = (A) => et(nt(A, t.nByteLength));
7415
+ }), b = (A) => et(nt(A, t.nByteLength));
7416
7416
  function f(A) {
7417
7417
  const I = r >> ee;
7418
7418
  return A > I;
@@ -7420,7 +7420,7 @@ function tl(e) {
7420
7420
  function y(A) {
7421
7421
  return f(A) ? o(-A) : A;
7422
7422
  }
7423
- const b = (A, I, R) => je(A.slice(I, R));
7423
+ const m = (A, I, R) => je(A.slice(I, R));
7424
7424
  class h {
7425
7425
  constructor(I, R, U) {
7426
7426
  this.r = I, this.s = R, this.recovery = U, this.assertValidity();
@@ -7428,7 +7428,7 @@ function tl(e) {
7428
7428
  // pair (bytes of r, bytes of s)
7429
7429
  static fromCompact(I) {
7430
7430
  const R = t.nByteLength;
7431
- return I = se("compactSignature", I, R * 2), new h(b(I, 0, R), b(I, R, 2 * R));
7431
+ return I = se("compactSignature", I, R * 2), new h(m(I, 0, R), m(I, R, 2 * R));
7432
7432
  }
7433
7433
  // DER encoded ECDSA signature
7434
7434
  // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script
@@ -7452,10 +7452,10 @@ function tl(e) {
7452
7452
  const J = D === 2 || D === 3 ? R + t.n : R;
7453
7453
  if (J >= n.ORDER)
7454
7454
  throw new Error("recovery id 2 or 3 invalid");
7455
- const X = D & 1 ? "03" : "02", Te = c.fromHex(X + m(J)), ve = u(J), qe = o(-z * ve), ut = o(U * ve), xe = c.BASE.multiplyAndAddUnsafe(Te, qe, ut);
7456
- if (!xe)
7455
+ const X = D & 1 ? "03" : "02", we = c.fromHex(X + b(J)), Te = u(J), qe = o(-z * Te), ut = o(U * Te), ve = c.BASE.multiplyAndAddUnsafe(we, qe, ut);
7456
+ if (!ve)
7457
7457
  throw new Error("point at infinify");
7458
- return xe.assertValidity(), xe;
7458
+ return ve.assertValidity(), ve;
7459
7459
  }
7460
7460
  // Signatures should be low-s, to prevent malleability.
7461
7461
  hasHighS() {
@@ -7476,7 +7476,7 @@ function tl(e) {
7476
7476
  return tt(this.toCompactHex());
7477
7477
  }
7478
7478
  toCompactHex() {
7479
- return m(this.r) + m(this.s);
7479
+ return b(this.r) + b(this.s);
7480
7480
  }
7481
7481
  }
7482
7482
  const g = {
@@ -7531,39 +7531,39 @@ function tl(e) {
7531
7531
  function M(A) {
7532
7532
  if (typeof A != "bigint")
7533
7533
  throw new Error("bigint expected");
7534
- if (!(fe <= A && A < E))
7534
+ if (!(ye <= A && A < E))
7535
7535
  throw new Error(`bigint expected < 2^${t.nBitLength}`);
7536
7536
  return nt(A, t.nByteLength);
7537
7537
  }
7538
- function B(A, I, R = $) {
7538
+ function B(A, I, R = k) {
7539
7539
  if (["recovered", "canonical"].some((Fe) => Fe in R))
7540
7540
  throw new Error("sign() legacy options not supported");
7541
7541
  const { hash: U, randomBytes: D } = t;
7542
7542
  let { lowS: z, prehash: J, extraEntropy: X } = R;
7543
7543
  z == null && (z = !0), A = se("msgHash", A), J && (A = se("prehashed msgHash", U(A)));
7544
- const Te = C(A), ve = l(I), qe = [M(ve), M(Te)];
7544
+ const we = C(A), Te = l(I), qe = [M(Te), M(we)];
7545
7545
  if (X != null) {
7546
7546
  const Fe = X === !0 ? D(n.BYTES) : X;
7547
7547
  qe.push(se("extraEntropy", Fe));
7548
7548
  }
7549
- const ut = Bt(...qe), xe = Te;
7549
+ const ut = Bt(...qe), ve = we;
7550
7550
  function gn(Fe) {
7551
7551
  const Ge = T(Fe);
7552
7552
  if (!p(Ge))
7553
7553
  return;
7554
7554
  const Lr = u(Ge), We = c.BASE.multiply(Ge).toAffine(), ae = o(We.x);
7555
- if (ae === fe)
7555
+ if (ae === ye)
7556
7556
  return;
7557
- const Ve = o(Lr * o(xe + ae * ve));
7558
- if (Ve === fe)
7557
+ const Ve = o(Lr * o(ve + ae * Te));
7558
+ if (Ve === ye)
7559
7559
  return;
7560
7560
  let zr = (We.x === ae ? 0 : 2) | Number(We.y & ee), _r = Ve;
7561
7561
  return z && f(Ve) && (_r = y(Ve), zr ^= 1), new h(ae, _r, zr);
7562
7562
  }
7563
7563
  return { seed: ut, k2sig: gn };
7564
7564
  }
7565
- const $ = { lowS: t.lowS, prehash: !1 }, N = { lowS: t.lowS, prehash: !1 };
7566
- function F(A, I, R = $) {
7565
+ const k = { lowS: t.lowS, prehash: !1 }, N = { lowS: t.lowS, prehash: !1 };
7566
+ function F(A, I, R = k) {
7567
7567
  const { seed: U, k2sig: D } = B(A, I, R), z = t;
7568
7568
  return Ks(z.hash.outputLen, z.nByteLength, z.hmac)(U, D);
7569
7569
  }
@@ -7574,7 +7574,7 @@ function tl(e) {
7574
7574
  if (I = se("msgHash", I), R = se("publicKey", R), "strict" in U)
7575
7575
  throw new Error("options.strict was renamed to lowS");
7576
7576
  const { lowS: z, prehash: J } = U;
7577
- let X, Te;
7577
+ let X, we;
7578
7578
  try {
7579
7579
  if (typeof D == "string" || D instanceof Uint8Array)
7580
7580
  try {
@@ -7589,7 +7589,7 @@ function tl(e) {
7589
7589
  X = new h(ae, Ve);
7590
7590
  } else
7591
7591
  throw new Error("PARSE");
7592
- Te = c.fromHex(R);
7592
+ we = c.fromHex(R);
7593
7593
  } catch (ae) {
7594
7594
  if (ae.message === "PARSE")
7595
7595
  throw new Error("signature must be Signature instance, Uint8Array or hex string");
@@ -7598,8 +7598,8 @@ function tl(e) {
7598
7598
  if (z && X.hasHighS())
7599
7599
  return !1;
7600
7600
  J && (I = t.hash(I));
7601
- const { r: ve, s: qe } = X, ut = C(I), xe = u(qe), gn = o(ut * xe), Fe = o(ve * xe), Ge = (We = c.BASE.multiplyAndAddUnsafe(Te, gn, Fe)) == null ? void 0 : We.toAffine();
7602
- return Ge ? o(Ge.x) === ve : !1;
7601
+ const { r: Te, s: qe } = X, ut = C(I), ve = u(qe), gn = o(ut * ve), Fe = o(Te * ve), Ge = (We = c.BASE.multiplyAndAddUnsafe(we, gn, Fe)) == null ? void 0 : We.toAffine();
7602
+ return Ge ? o(Ge.x) === Te : !1;
7603
7603
  }
7604
7604
  return {
7605
7605
  CURVE: t,
@@ -7653,7 +7653,7 @@ ti.create = (e, t) => new ei(e, t);
7653
7653
  function nl(e) {
7654
7654
  return {
7655
7655
  hash: e,
7656
- hmac: (t, ...n) => ti(e, t, ko(...n)),
7656
+ hmac: (t, ...n) => ti(e, t, $o(...n)),
7657
7657
  randomBytes: Oo
7658
7658
  };
7659
7659
  }
@@ -7664,7 +7664,7 @@ function rl(e, t) {
7664
7664
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
7665
7665
  const ni = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), wa = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), al = BigInt(1), er = BigInt(2), Ta = (e, t) => (e + t / er) / t;
7666
7666
  function sl(e) {
7667
- const t = ni, n = BigInt(3), r = BigInt(6), a = BigInt(11), s = BigInt(22), i = BigInt(23), o = BigInt(44), u = BigInt(88), c = e * e * e % t, l = c * c * e % t, d = Q(l, n, t) * l % t, p = Q(d, n, t) * l % t, m = Q(p, er, t) * c % t, f = Q(m, a, t) * m % t, y = Q(f, s, t) * f % t, b = Q(y, o, t) * y % t, h = Q(b, u, t) * b % t, g = Q(h, o, t) * y % t, w = Q(g, n, t) * l % t, x = Q(w, i, t) * f % t, P = Q(x, r, t) * c % t, T = Q(P, er, t);
7667
+ const t = ni, n = BigInt(3), r = BigInt(6), a = BigInt(11), s = BigInt(22), i = BigInt(23), o = BigInt(44), u = BigInt(88), c = e * e * e % t, l = c * c * e % t, d = Q(l, n, t) * l % t, p = Q(d, n, t) * l % t, b = Q(p, er, t) * c % t, f = Q(b, a, t) * b % t, y = Q(f, s, t) * f % t, m = Q(y, o, t) * y % t, h = Q(m, u, t) * m % t, g = Q(h, o, t) * y % t, w = Q(g, n, t) * l % t, x = Q(w, i, t) * f % t, P = Q(x, r, t) * c % t, T = Q(P, er, t);
7668
7668
  if (!tr.eql(tr.sqr(T), e))
7669
7669
  throw new Error("Cannot find square root");
7670
7670
  return T;
@@ -7710,7 +7710,7 @@ function il({ r: e, s: t, v: n, yParity: r }) {
7710
7710
  return `0x${new Hr.Signature(Ye(e), Ye(t)).toCompactHex()}${a === 0 ? "1b" : "1c"}`;
7711
7711
  }
7712
7712
  async function jr(e, { address: t, hash: n, signature: r, ...a }) {
7713
- const s = de(r) ? r : typeof r == "object" && "r" in r && "s" in r ? il(r) : q(r);
7713
+ const s = ce(r) ? r : typeof r == "object" && "r" in r && "s" in r ? il(r) : q(r);
7714
7714
  try {
7715
7715
  const { data: i } = await S(e, dn, "call")({
7716
7716
  data: Ir({
@@ -7756,8 +7756,8 @@ function ri(e, { emitOnBegin: t = !1, emitMissed: n = !1, onBlockNumber: r, onEr
7756
7756
  n,
7757
7757
  i
7758
7758
  ]);
7759
- return $e(d, { onBlockNumber: r, onError: a }, (p) => Dt(async () => {
7760
- var m;
7759
+ return ke(d, { onBlockNumber: r, onError: a }, (p) => Dt(async () => {
7760
+ var b;
7761
7761
  try {
7762
7762
  const f = await S(e, Ut, "getBlockNumber")({ cacheTime: 0 });
7763
7763
  if (u) {
@@ -7769,7 +7769,7 @@ function ri(e, { emitOnBegin: t = !1, emitMissed: n = !1, onBlockNumber: r, onEr
7769
7769
  }
7770
7770
  (!u || f > u) && (p.onBlockNumber(f, u), u = f);
7771
7771
  } catch (f) {
7772
- (m = p.onError) == null || m.call(p, f);
7772
+ (b = p.onError) == null || b.call(p, f);
7773
7773
  }
7774
7774
  }, {
7775
7775
  emitOnBegin: t,
@@ -7782,8 +7782,8 @@ function ri(e, { emitOnBegin: t = !1, emitMissed: n = !1, onBlockNumber: r, onEr
7782
7782
  t,
7783
7783
  n
7784
7784
  ]);
7785
- return $e(d, { onBlockNumber: r, onError: a }, (p) => {
7786
- let m = !0, f = () => m = !1;
7785
+ return ke(d, { onBlockNumber: r, onError: a }, (p) => {
7786
+ let b = !0, f = () => b = !1;
7787
7787
  return (async () => {
7788
7788
  try {
7789
7789
  const y = (() => {
@@ -7792,11 +7792,11 @@ function ri(e, { emitOnBegin: t = !1, emitMissed: n = !1, onBlockNumber: r, onEr
7792
7792
  return h ? h.value : e.transport;
7793
7793
  }
7794
7794
  return e.transport;
7795
- })(), { unsubscribe: b } = await y.subscribe({
7795
+ })(), { unsubscribe: m } = await y.subscribe({
7796
7796
  params: ["newHeads"],
7797
7797
  onData(h) {
7798
7798
  var w;
7799
- if (!m)
7799
+ if (!b)
7800
7800
  return;
7801
7801
  const g = Ye((w = h.result) == null ? void 0 : w.number);
7802
7802
  p.onBlockNumber(g, u), u = g;
@@ -7806,7 +7806,7 @@ function ri(e, { emitOnBegin: t = !1, emitMissed: n = !1, onBlockNumber: r, onEr
7806
7806
  (g = p.onError) == null || g.call(p, h);
7807
7807
  }
7808
7808
  });
7809
- f = b, m || f();
7809
+ f = m, b || f();
7810
7810
  } catch (y) {
7811
7811
  a == null || a(y);
7812
7812
  }
@@ -7825,10 +7825,10 @@ async function cl(e, {
7825
7825
  timeout: o
7826
7826
  }) {
7827
7827
  const u = W(["waitForTransactionReceipt", e.uid, n]);
7828
- let c = 0, l, d, p, m = !1;
7828
+ let c = 0, l, d, p, b = !1;
7829
7829
  return new Promise((f, y) => {
7830
7830
  o && setTimeout(() => y(new aa({ hash: n })), o);
7831
- const b = $e(u, { onReplaced: r, resolve: f, reject: y }, (h) => {
7831
+ const m = ke(u, { onReplaced: r, resolve: f, reject: y }, (h) => {
7832
7832
  const g = S(e, ri, "watchBlockNumber")({
7833
7833
  emitMissed: !0,
7834
7834
  emitOnBegin: !0,
@@ -7836,10 +7836,10 @@ async function cl(e, {
7836
7836
  pollingInterval: a,
7837
7837
  async onBlockNumber(w) {
7838
7838
  const x = (T) => {
7839
- g(), T(), b();
7839
+ g(), T(), m();
7840
7840
  };
7841
7841
  let P = w;
7842
- if (!m) {
7842
+ if (!b) {
7843
7843
  c > s && x(() => h.reject(new aa({ hash: n })));
7844
7844
  try {
7845
7845
  if (p) {
@@ -7848,22 +7848,22 @@ async function cl(e, {
7848
7848
  x(() => h.resolve(p));
7849
7849
  return;
7850
7850
  }
7851
- if (l || (m = !0, await Kn(async () => {
7851
+ if (l || (b = !0, await Kn(async () => {
7852
7852
  l = await S(e, Rr, "getTransaction")({ hash: n }), l.blockNumber && (P = l.blockNumber);
7853
7853
  }, {
7854
7854
  delay: i,
7855
7855
  retryCount: s
7856
- }), m = !1), p = await S(e, Jn, "getTransactionReceipt")({ hash: n }), t > 1 && (!p.blockNumber || P - p.blockNumber + 1n < t))
7856
+ }), b = !1), p = await S(e, Jn, "getTransactionReceipt")({ hash: n }), t > 1 && (!p.blockNumber || P - p.blockNumber + 1n < t))
7857
7857
  return;
7858
7858
  x(() => h.resolve(p));
7859
7859
  } catch (T) {
7860
7860
  if (T instanceof ss || T instanceof is) {
7861
7861
  if (!l) {
7862
- m = !1;
7862
+ b = !1;
7863
7863
  return;
7864
7864
  }
7865
7865
  try {
7866
- d = l, m = !0;
7866
+ d = l, b = !0;
7867
7867
  const C = await Kn(() => S(e, Se, "getBlock")({
7868
7868
  blockNumber: P,
7869
7869
  includeTransactions: !0
@@ -7872,8 +7872,8 @@ async function cl(e, {
7872
7872
  retryCount: s,
7873
7873
  shouldRetry: ({ error: B }) => B instanceof ds
7874
7874
  });
7875
- m = !1;
7876
- const E = C.transactions.find(({ from: B, nonce: $ }) => B === d.from && $ === d.nonce);
7875
+ b = !1;
7876
+ const E = C.transactions.find(({ from: B, nonce: k }) => B === d.from && k === d.nonce);
7877
7877
  if (!E || (p = await S(e, Jn, "getTransactionReceipt")({
7878
7878
  hash: E.hash
7879
7879
  }), t > 1 && (!p.blockNumber || P - p.blockNumber + 1n < t)))
@@ -7915,8 +7915,8 @@ function dl(e, { blockTag: t = "latest", emitMissed: n = !1, emitOnBegin: r = !1
7915
7915
  l,
7916
7916
  u
7917
7917
  ]);
7918
- return $e(f, { onBlock: a, onError: s }, (y) => Dt(async () => {
7919
- var b;
7918
+ return ke(f, { onBlock: a, onError: s }, (y) => Dt(async () => {
7919
+ var m;
7920
7920
  try {
7921
7921
  const h = await S(e, Se, "getBlock")({
7922
7922
  blockTag: t,
@@ -7940,7 +7940,7 @@ function dl(e, { blockTag: t = "latest", emitMissed: n = !1, emitOnBegin: r = !1
7940
7940
  // We don't want to emit blocks in the past.
7941
7941
  h.number && h.number > d.number) && (y.onBlock(h, d), d = h);
7942
7942
  } catch (h) {
7943
- (b = y.onError) == null || b.call(y, h);
7943
+ (m = y.onError) == null || m.call(y, h);
7944
7944
  }
7945
7945
  }, {
7946
7946
  emitOnBegin: r,
@@ -7950,13 +7950,13 @@ function dl(e, { blockTag: t = "latest", emitMissed: n = !1, emitOnBegin: r = !1
7950
7950
  let f = !0, y = () => f = !1;
7951
7951
  return (async () => {
7952
7952
  try {
7953
- const b = (() => {
7953
+ const m = (() => {
7954
7954
  if (e.transport.type === "fallback") {
7955
7955
  const g = e.transport.transports.find((w) => w.config.type === "webSocket");
7956
7956
  return g ? g.value : e.transport;
7957
7957
  }
7958
7958
  return e.transport;
7959
- })(), { unsubscribe: h } = await b.subscribe({
7959
+ })(), { unsubscribe: h } = await m.subscribe({
7960
7960
  params: ["newHeads"],
7961
7961
  onData(g) {
7962
7962
  var P, T, C;
@@ -7970,16 +7970,16 @@ function dl(e, { blockTag: t = "latest", emitMissed: n = !1, emitOnBegin: r = !1
7970
7970
  }
7971
7971
  });
7972
7972
  y = h, f || y();
7973
- } catch (b) {
7974
- s == null || s(b);
7973
+ } catch (m) {
7974
+ s == null || s(m);
7975
7975
  }
7976
7976
  })(), () => y();
7977
7977
  })();
7978
7978
  }
7979
7979
  function ll(e, { address: t, args: n, batch: r = !0, event: a, events: s, fromBlock: i, onError: o, onLogs: u, poll: c, pollingInterval: l = e.pollingInterval, strict: d }) {
7980
- const p = typeof c < "u" ? c : typeof i == "bigint" ? !0 : !(e.transport.type === "webSocket" || e.transport.type === "fallback" && e.transport.transports[0].config.type === "webSocket"), m = d ?? !1;
7980
+ const p = typeof c < "u" ? c : typeof i == "bigint" ? !0 : !(e.transport.type === "webSocket" || e.transport.type === "fallback" && e.transport.transports[0].config.type === "webSocket"), b = d ?? !1;
7981
7981
  return p ? (() => {
7982
- const b = W([
7982
+ const m = W([
7983
7983
  "watchEvent",
7984
7984
  t,
7985
7985
  n,
@@ -7989,7 +7989,7 @@ function ll(e, { address: t, args: n, batch: r = !0, event: a, events: s, fromBl
7989
7989
  l,
7990
7990
  i
7991
7991
  ]);
7992
- return $e(b, { onLogs: u, onError: o }, (h) => {
7992
+ return ke(m, { onLogs: u, onError: o }, (h) => {
7993
7993
  let g;
7994
7994
  i !== void 0 && (g = i - 1n);
7995
7995
  let w, x = !1;
@@ -8002,7 +8002,7 @@ function ll(e, { address: t, args: n, batch: r = !0, event: a, events: s, fromBl
8002
8002
  args: n,
8003
8003
  event: a,
8004
8004
  events: s,
8005
- strict: m,
8005
+ strict: b,
8006
8006
  fromBlock: i
8007
8007
  });
8008
8008
  } catch {
@@ -8044,7 +8044,7 @@ function ll(e, { address: t, args: n, batch: r = !0, event: a, events: s, fromBl
8044
8044
  };
8045
8045
  });
8046
8046
  })() : (() => {
8047
- let b = !0, h = () => b = !1;
8047
+ let m = !0, h = () => m = !1;
8048
8048
  return (async () => {
8049
8049
  try {
8050
8050
  const g = (() => {
@@ -8066,7 +8066,7 @@ function ll(e, { address: t, args: n, batch: r = !0, event: a, events: s, fromBl
8066
8066
  params: ["logs", { address: t, topics: x }],
8067
8067
  onData(T) {
8068
8068
  var E;
8069
- if (!b)
8069
+ if (!m)
8070
8070
  return;
8071
8071
  const C = T.result;
8072
8072
  try {
@@ -8074,18 +8074,18 @@ function ll(e, { address: t, args: n, batch: r = !0, event: a, events: s, fromBl
8074
8074
  abi: w ?? [],
8075
8075
  data: C.data,
8076
8076
  topics: C.topics,
8077
- strict: m
8078
- }), $ = Be(C, { args: B, eventName: M });
8079
- u([$]);
8077
+ strict: b
8078
+ }), k = Be(C, { args: B, eventName: M });
8079
+ u([k]);
8080
8080
  } catch (M) {
8081
- let B, $;
8081
+ let B, k;
8082
8082
  if (M instanceof ft || M instanceof en) {
8083
8083
  if (d)
8084
8084
  return;
8085
- B = M.abiItem.name, $ = (E = M.abiItem.inputs) == null ? void 0 : E.some((F) => !("name" in F && F.name));
8085
+ B = M.abiItem.name, k = (E = M.abiItem.inputs) == null ? void 0 : E.some((F) => !("name" in F && F.name));
8086
8086
  }
8087
8087
  const N = Be(C, {
8088
- args: $ ? [] : {},
8088
+ args: k ? [] : {},
8089
8089
  eventName: B
8090
8090
  });
8091
8091
  u([N]);
@@ -8095,7 +8095,7 @@ function ll(e, { address: t, args: n, batch: r = !0, event: a, events: s, fromBl
8095
8095
  o == null || o(T);
8096
8096
  }
8097
8097
  });
8098
- h = P, b || h();
8098
+ h = P, m || h();
8099
8099
  } catch (g) {
8100
8100
  o == null || o(g);
8101
8101
  }
@@ -8110,10 +8110,10 @@ function pl(e, { batch: t = !0, onError: n, onTransactions: r, poll: a, pollingI
8110
8110
  t,
8111
8111
  s
8112
8112
  ]);
8113
- return $e(c, { onTransactions: r, onError: n }, (l) => {
8113
+ return ke(c, { onTransactions: r, onError: n }, (l) => {
8114
8114
  let d;
8115
8115
  const p = Dt(async () => {
8116
- var m;
8116
+ var b;
8117
8117
  try {
8118
8118
  if (!d)
8119
8119
  try {
@@ -8131,7 +8131,7 @@ function pl(e, { batch: t = !0, onError: n, onTransactions: r, poll: a, pollingI
8131
8131
  for (const y of f)
8132
8132
  l.onTransactions([y]);
8133
8133
  } catch (f) {
8134
- (m = l.onError) == null || m.call(l, f);
8134
+ (b = l.onError) == null || b.call(l, f);
8135
8135
  }
8136
8136
  }, {
8137
8137
  emitOnBegin: !0,
@@ -8150,8 +8150,8 @@ function pl(e, { batch: t = !0, onError: n, onTransactions: r, poll: a, pollingI
8150
8150
  onData(p) {
8151
8151
  if (!c)
8152
8152
  return;
8153
- const m = p.result;
8154
- r([m]);
8153
+ const b = p.result;
8154
+ r([b]);
8155
8155
  },
8156
8156
  onError(p) {
8157
8157
  n == null || n(p);
@@ -8165,8 +8165,8 @@ function pl(e, { batch: t = !0, onError: n, onTransactions: r, poll: a, pollingI
8165
8165
  })();
8166
8166
  }
8167
8167
  function yl(e) {
8168
- var d, p, m;
8169
- const { scheme: t, statement: n, ...r } = ((d = e.match(fl)) == null ? void 0 : d.groups) ?? {}, { chainId: a, expirationTime: s, issuedAt: i, notBefore: o, requestId: u, ...c } = ((p = e.match(ml)) == null ? void 0 : p.groups) ?? {}, l = (m = e.split("Resources:")[1]) == null ? void 0 : m.split(`
8168
+ var d, p, b;
8169
+ const { scheme: t, statement: n, ...r } = ((d = e.match(fl)) == null ? void 0 : d.groups) ?? {}, { chainId: a, expirationTime: s, issuedAt: i, notBefore: o, requestId: u, ...c } = ((p = e.match(ml)) == null ? void 0 : p.groups) ?? {}, l = (b = e.split("Resources:")[1]) == null ? void 0 : b.split(`
8170
8170
  - `).slice(1);
8171
8171
  return {
8172
8172
  ...r,
@@ -8251,7 +8251,7 @@ function gl(e) {
8251
8251
  getTransactionReceipt: (t) => Jn(e, t),
8252
8252
  multicall: (t) => Id(e, t),
8253
8253
  prepareTransactionRequest: (t) => cn(e, t),
8254
- readContract: (t) => le(e, t),
8254
+ readContract: (t) => de(e, t),
8255
8255
  sendRawTransaction: (t) => Mr(e, t),
8256
8256
  simulateContract: (t) => Is(e, t),
8257
8257
  verifyMessage: (t) => ol(e, t),
@@ -8268,7 +8268,7 @@ function gl(e) {
8268
8268
  }
8269
8269
  function ai(e) {
8270
8270
  const { key: t = "public", name: n = "Public Client" } = e;
8271
- return $s({
8271
+ return ks({
8272
8272
  ...e,
8273
8273
  key: t,
8274
8274
  name: n,
@@ -8400,7 +8400,7 @@ function Sl(e) {
8400
8400
  }
8401
8401
  function si(e) {
8402
8402
  const { key: t = "wallet", name: n = "Wallet Client", transport: r } = e;
8403
- return $s({
8403
+ return ks({
8404
8404
  ...e,
8405
8405
  key: t,
8406
8406
  name: n,
@@ -8489,12 +8489,12 @@ const ii = /* @__PURE__ */ Us({
8489
8489
  }
8490
8490
  }
8491
8491
  });
8492
- var k = ((e) => (e[e.Mainnet = oi.id] = "Mainnet", e[e.Holesky = ii.id] = "Holesky", e))(k || {});
8493
- const we = {
8494
- [k.Mainnet]: oi,
8495
- [k.Holesky]: ii
8492
+ var $ = ((e) => (e[e.Mainnet = oi.id] = "Mainnet", e[e.Holesky = ii.id] = "Holesky", e))($ || {});
8493
+ const ge = {
8494
+ [$.Mainnet]: oi,
8495
+ [$.Holesky]: ii
8496
8496
  }, Ce = {
8497
- [k.Mainnet]: {
8497
+ [$.Mainnet]: {
8498
8498
  PufferVault: "0xD9A442856C234a39a81a089C06451EBAa4306a72",
8499
8499
  PufferDepositor: "0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff",
8500
8500
  // TODO: Update the addresses once the contracts are deployed on chain.
@@ -8502,15 +8502,15 @@ const we = {
8502
8502
  PufferL2Depositor: "0x0000000000000000000000000000000000000000",
8503
8503
  PufLocker: "0x0000000000000000000000000000000000000000"
8504
8504
  },
8505
- [k.Holesky]: {
8505
+ [$.Holesky]: {
8506
8506
  PufferVault: "0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9",
8507
8507
  PufferDepositor: "0x824AC05aeb86A0aD770b8acDe0906d2d4a6c4A8c",
8508
8508
  // TODO: Update the addresses once the contracts are deployed on chain.
8509
8509
  // See https://dev.azure.com/pufferfi/Frontend/_workitems/edit/1797.
8510
- PufferL2Depositor: "0x300480bf80b1ad93a9f6349623646142776e9156",
8511
- PufLocker: "0x367551e0834c26e29e0a17ce3ed4dca87ff0c204"
8510
+ PufferL2Depositor: "0x0df3f7328761d4122bd8456474305d3259e51699",
8511
+ PufLocker: "0x2764d89cb5b0dfe4cb9103e23257568bebb3afba"
8512
8512
  }
8513
- }, $l = [
8513
+ }, kl = [
8514
8514
  {
8515
8515
  type: "constructor",
8516
8516
  inputs: [
@@ -10369,7 +10369,7 @@ const we = {
10369
10369
  name: "WithdrawalsAreDisabled",
10370
10370
  inputs: []
10371
10371
  }
10372
- ], kl = [
10372
+ ], $l = [
10373
10373
  {
10374
10374
  type: "constructor",
10375
10375
  inputs: [
@@ -12152,11 +12152,11 @@ const we = {
12152
12152
  inputs: []
12153
12153
  }
12154
12154
  ], Ol = {
12155
- [k.Mainnet]: {
12156
- PufferVaultV2: $l
12157
- },
12158
- [k.Holesky]: {
12155
+ [$.Mainnet]: {
12159
12156
  PufferVaultV2: kl
12157
+ },
12158
+ [$.Holesky]: {
12159
+ PufferVaultV2: $l
12160
12160
  }
12161
12161
  };
12162
12162
  class Rl {
@@ -12172,7 +12172,7 @@ class Rl {
12172
12172
  */
12173
12173
  constructor(t, n, r) {
12174
12174
  j(this, "viemChain");
12175
- this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = we[t];
12175
+ this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = ge[t];
12176
12176
  }
12177
12177
  /**
12178
12178
  * Get the contract. This is a method because the typings are complex
@@ -13019,7 +13019,8 @@ const Fl = [
13019
13019
  {
13020
13020
  inputs: [
13021
13021
  { internalType: "address", name: "accessManager", type: "address" },
13022
- { internalType: "address", name: "weth", type: "address" }
13022
+ { internalType: "address", name: "weth", type: "address" },
13023
+ { internalType: "contract IPufLocker", name: "locker", type: "address" }
13023
13024
  ],
13024
13025
  stateMutability: "nonpayable",
13025
13026
  type: "constructor"
@@ -13187,6 +13188,15 @@ const Fl = [
13187
13188
  name: "TokenRemoved",
13188
13189
  type: "event"
13189
13190
  },
13191
+ {
13192
+ inputs: [],
13193
+ name: "PUFFER_LOCKER",
13194
+ outputs: [
13195
+ { internalType: "contract IPufLocker", name: "", type: "address" }
13196
+ ],
13197
+ stateMutability: "view",
13198
+ type: "function"
13199
+ },
13190
13200
  {
13191
13201
  inputs: [],
13192
13202
  name: "WETH",
@@ -13224,7 +13234,8 @@ const Fl = [
13224
13234
  name: "permitData",
13225
13235
  type: "tuple"
13226
13236
  },
13227
- { internalType: "uint256", name: "referralCode", type: "uint256" }
13237
+ { internalType: "uint256", name: "referralCode", type: "uint256" },
13238
+ { internalType: "uint128", name: "lockPeriod", type: "uint128" }
13228
13239
  ],
13229
13240
  name: "deposit",
13230
13241
  outputs: [],
@@ -13234,7 +13245,8 @@ const Fl = [
13234
13245
  {
13235
13246
  inputs: [
13236
13247
  { internalType: "address", name: "account", type: "address" },
13237
- { internalType: "uint256", name: "referralCode", type: "uint256" }
13248
+ { internalType: "uint256", name: "referralCode", type: "uint256" },
13249
+ { internalType: "uint128", name: "lockPeriod", type: "uint128" }
13238
13250
  ],
13239
13251
  name: "depositETH",
13240
13252
  outputs: [],
@@ -13299,15 +13311,15 @@ const Fl = [
13299
13311
  type: "function"
13300
13312
  }
13301
13313
  ], Dl = {
13302
- [k.Mainnet]: {
13314
+ [$.Mainnet]: {
13303
13315
  PufferDepositor: Fl
13304
13316
  },
13305
- [k.Holesky]: {
13317
+ [$.Holesky]: {
13306
13318
  PufferDepositor: Nl
13307
13319
  }
13308
13320
  }, Ul = {
13309
- [k.Mainnet]: { PufferL2Depositor: va },
13310
- [k.Holesky]: { PufferL2Depositor: va }
13321
+ [$.Mainnet]: { PufferL2Depositor: va },
13322
+ [$.Holesky]: { PufferL2Depositor: va }
13311
13323
  }, Hl = [
13312
13324
  {
13313
13325
  type: "function",
@@ -13839,80 +13851,80 @@ const Jl = {
13839
13851
  wstETH: "pufWstETH",
13840
13852
  pufETH: "pufpufETH"
13841
13853
  /* pufpufETH */
13842
- }, ce = {
13854
+ }, Pe = {
13843
13855
  USDT: {
13844
- [k.Mainnet]: "0xdac17f958d2ee523a2206206994597c13d831ec7",
13845
- [k.Holesky]: "0xd5bef2c64f418fd460319521d37862327122e3bc"
13856
+ [$.Mainnet]: "0xdac17f958d2ee523a2206206994597c13d831ec7",
13857
+ [$.Holesky]: "0xd5bef2c64f418fd460319521d37862327122e3bc"
13846
13858
  },
13847
13859
  USDC: {
13848
- [k.Mainnet]: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
13849
- [k.Holesky]: "0x64Cc0de0429bcb87e875905a0c313ec88f6d1d3E"
13860
+ [$.Mainnet]: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
13861
+ [$.Holesky]: "0x64Cc0de0429bcb87e875905a0c313ec88f6d1d3E"
13850
13862
  },
13851
13863
  DAI: {
13852
- [k.Mainnet]: "0x6b175474e89094c44da98b954eedeac495271d0f",
13853
- [k.Holesky]: "0x4478905505ddfb7eA1c8A9f46eAEC3695cE542ac"
13864
+ [$.Mainnet]: "0x6b175474e89094c44da98b954eedeac495271d0f",
13865
+ [$.Holesky]: "0x4478905505ddfb7eA1c8A9f46eAEC3695cE542ac"
13854
13866
  },
13855
13867
  ETH: {},
13856
13868
  // WETH does not support permit signatures (ERC20Permit).
13857
13869
  WETH: {
13858
- [k.Mainnet]: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
13859
- [k.Holesky]: "0x35B1167b4D37931540F4e5189004d1756d1381B0"
13870
+ [$.Mainnet]: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
13871
+ [$.Holesky]: "0x35B1167b4D37931540F4e5189004d1756d1381B0"
13860
13872
  },
13861
13873
  stETH: {
13862
- [k.Mainnet]: "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
13863
- [k.Holesky]: "0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034"
13874
+ [$.Mainnet]: "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
13875
+ [$.Holesky]: "0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034"
13864
13876
  },
13865
13877
  wstETH: {
13866
- [k.Mainnet]: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
13867
- [k.Holesky]: "0x8d09a4502Cc8Cf1547aD300E066060D043f6982D"
13878
+ [$.Mainnet]: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
13879
+ [$.Holesky]: "0x8d09a4502Cc8Cf1547aD300E066060D043f6982D"
13868
13880
  },
13869
13881
  pufETH: {
13870
- [k.Mainnet]: "0xd9a442856c234a39a81a089c06451ebaa4306a72",
13871
- [k.Holesky]: "0x9196830bb4c05504e0a8475a0ad566aceeb6bec9"
13882
+ [$.Mainnet]: "0xd9a442856c234a39a81a089c06451ebaa4306a72",
13883
+ [$.Holesky]: "0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9"
13872
13884
  },
13873
13885
  // TODO: Update the addresses once the contracts are deployed on chain.
13874
13886
  // See https://dev.azure.com/pufferfi/Frontend/_workitems/edit/1797.
13875
13887
  // Wrapped PufTokens.
13876
13888
  pufUSDT: {
13877
- [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13878
- [k.Holesky]: "0x61e7C87c387178D6e0aE6c04748b7FF753fC9b81"
13889
+ [$.Mainnet]: "0x0000000000000000000000000000000000000000",
13890
+ [$.Holesky]: "0x61e7C87c387178D6e0aE6c04748b7FF753fC9b81"
13879
13891
  },
13880
13892
  pufUSDC: {
13881
- [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13882
- [k.Holesky]: "0xC4731029b6F4fEd5930A56F0FFa3E8Ae688f9dA8"
13893
+ [$.Mainnet]: "0x0000000000000000000000000000000000000000",
13894
+ [$.Holesky]: "0x6D900a9f5784A2cA0004B5c3D3e08D7A9cE4A1b3"
13883
13895
  },
13884
13896
  pufDAI: {
13885
- [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13886
- [k.Holesky]: "0xcA1C3DBC6Ea41f018B8d91C3AbE6FacDBDd4F63e"
13897
+ [$.Mainnet]: "0x0000000000000000000000000000000000000000",
13898
+ [$.Holesky]: "0x28177665f597DA2dcF43c3680cc40D855672A700"
13887
13899
  },
13888
13900
  pufEETH: {
13889
- [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13890
- [k.Holesky]: "0x0000000000000000000000000000000000000000"
13901
+ [$.Mainnet]: "0x0000000000000000000000000000000000000000",
13902
+ [$.Holesky]: "0x0000000000000000000000000000000000000000"
13891
13903
  },
13892
13904
  pufWETH: {
13893
- [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13894
- [k.Holesky]: "0x2207119500757bDD269F98d86Dca6356535b876E"
13905
+ [$.Mainnet]: "0x0000000000000000000000000000000000000000",
13906
+ [$.Holesky]: "0x1E1Aaeff72905B682b9CEc5bC6D3425087df9edf"
13895
13907
  },
13896
13908
  pufStETH: {
13897
- [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13898
- [k.Holesky]: "0x0000000000000000000000000000000000000000"
13909
+ [$.Mainnet]: "0x0000000000000000000000000000000000000000",
13910
+ [$.Holesky]: "0x0000000000000000000000000000000000000000"
13899
13911
  },
13900
13912
  pufWstETH: {
13901
- [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13902
- [k.Holesky]: "0x0000000000000000000000000000000000000000"
13913
+ [$.Mainnet]: "0x0000000000000000000000000000000000000000",
13914
+ [$.Holesky]: "0x0000000000000000000000000000000000000000"
13903
13915
  },
13904
13916
  pufALT: {
13905
- [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13906
- [k.Holesky]: "0x0000000000000000000000000000000000000000"
13917
+ [$.Mainnet]: "0x0000000000000000000000000000000000000000",
13918
+ [$.Holesky]: "0x0000000000000000000000000000000000000000"
13907
13919
  },
13908
13920
  pufpufETH: {
13909
- [k.Mainnet]: "0x0000000000000000000000000000000000000000",
13910
- [k.Holesky]: "0xECa244cBBe52A68EB6c4fdC266c2c50D568bcd22"
13921
+ [$.Mainnet]: "0x0000000000000000000000000000000000000000",
13922
+ [$.Holesky]: "0x2dE087aB00E427aa7c7e94f5ae6ceB129625F87c"
13911
13923
  }
13912
13924
  }, Ll = {
13913
13925
  USDT: "2",
13914
13926
  // USDC does not support permit signatures (ERC20Permit).
13915
- USDC: "2",
13927
+ USDC: "",
13916
13928
  DAI: "1",
13917
13929
  ETH: "",
13918
13930
  // WETH does not support permit signatures (ERC20Permit).
@@ -13945,7 +13957,7 @@ class hn {
13945
13957
  constructor(t, n, r) {
13946
13958
  j(this, "viemChain");
13947
13959
  j(this, "token");
13948
- this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = we[t], this.token = Jt.ETH;
13960
+ this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = ge[t], this.token = Jt.ETH;
13949
13961
  }
13950
13962
  /**
13951
13963
  * Set the token to use for executing transactions on the contract.
@@ -13964,7 +13976,7 @@ class hn {
13964
13976
  */
13965
13977
  getContract() {
13966
13978
  return ot({
13967
- address: ce[this.token][this.chain],
13979
+ address: Pe[this.token][this.chain],
13968
13980
  abi: jl,
13969
13981
  client: {
13970
13982
  wallet: this.walletClient,
@@ -13986,7 +13998,7 @@ class hn {
13986
13998
  name: await a.read.name(),
13987
13999
  version: this.getPermitVersion(this.token),
13988
14000
  chainId: this.chain,
13989
- verifyingContract: ce[this.token][this.chain]
14001
+ verifyingContract: Pe[this.token][this.chain]
13990
14002
  }, u = {
13991
14003
  Permit: [
13992
14004
  { name: "owner", type: "address" },
@@ -14042,7 +14054,7 @@ class _l {
14042
14054
  constructor(t, n, r) {
14043
14055
  j(this, "viemChain");
14044
14056
  j(this, "erc20PermitHandler");
14045
- this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = we[t], this.erc20PermitHandler = new hn(
14057
+ this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = ge[t], this.erc20PermitHandler = new hn(
14046
14058
  t,
14047
14059
  n,
14048
14060
  r
@@ -15013,8 +15025,8 @@ const xa = [
15013
15025
  inputs: []
15014
15026
  }
15015
15027
  ], ql = {
15016
- [k.Mainnet]: { PufToken: xa },
15017
- [k.Holesky]: { PufToken: xa }
15028
+ [$.Mainnet]: { PufToken: xa },
15029
+ [$.Holesky]: { PufToken: xa }
15018
15030
  };
15019
15031
  class Gl {
15020
15032
  /**
@@ -15030,7 +15042,7 @@ class Gl {
15030
15042
  constructor(t, n, r) {
15031
15043
  j(this, "viemChain");
15032
15044
  j(this, "pufToken");
15033
- this.chain = t, this.walletClient = n, this.publicClient = r, this.pufToken = ui.pufWETH, this.viemChain = we[t];
15045
+ this.chain = t, this.walletClient = n, this.publicClient = r, this.pufToken = ui.pufWETH, this.viemChain = ge[t];
15034
15046
  }
15035
15047
  /**
15036
15048
  * Set the PufToken to use for executing transactions on the contract.
@@ -15049,7 +15061,7 @@ class Gl {
15049
15061
  */
15050
15062
  getContract() {
15051
15063
  return ot({
15052
- address: ce[this.pufToken][this.chain],
15064
+ address: Pe[this.pufToken][this.chain],
15053
15065
  abi: ql[this.chain].PufToken,
15054
15066
  client: {
15055
15067
  wallet: this.walletClient,
@@ -15199,7 +15211,7 @@ class Wl {
15199
15211
  constructor(t, n, r) {
15200
15212
  j(this, "viemChain");
15201
15213
  j(this, "erc20PermitHandler");
15202
- this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = we[t], this.erc20PermitHandler = new hn(
15214
+ this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = ge[t], this.erc20PermitHandler = new hn(
15203
15215
  t,
15204
15216
  n,
15205
15217
  r
@@ -15221,43 +15233,6 @@ class Wl {
15221
15233
  }
15222
15234
  });
15223
15235
  }
15224
- /**
15225
- * Deposit the given token which is pre-approved using
15226
- * `Token.approve()` in exchange for wrapped PufToken. This doesn't
15227
- * make the transaction but returns two methods namely `transact` and
15228
- * `estimate`.
15229
- *
15230
- * @param token Token to deposit.
15231
- * @param walletAddress Wallet address to take the token from.
15232
- * @param value Value in wei of the token to deposit.
15233
- * @returns `transact: () => Promise<Address>` - Used to make the
15234
- * transaction.
15235
- *
15236
- * `estimate: () => Promise<bigint>` - Gas estimate of the
15237
- * transaction.
15238
- */
15239
- depositPreApproved(t, n, r) {
15240
- const a = [
15241
- ce[t][this.chain],
15242
- n,
15243
- // Only `amount` is needed if `Token.approve()` is already called.
15244
- // So using mock values for other properties.
15245
- {
15246
- r: te("0x", { size: 32 }),
15247
- s: te("0x", { size: 32 }),
15248
- v: 0,
15249
- deadline: 0n,
15250
- amount: r
15251
- },
15252
- r
15253
- ];
15254
- return { transact: () => this.getContract().write.deposit(a, {
15255
- account: n,
15256
- chain: this.viemChain
15257
- }), estimate: () => this.getContract().estimateGas.deposit(a, {
15258
- account: n
15259
- }) };
15260
- }
15261
15236
  /**
15262
15237
  * Deposit the given token in exchange for the wrapped PufToken. This
15263
15238
  * doesn't make the transaction but returns two methods namely
@@ -15265,40 +15240,65 @@ class Wl {
15265
15240
  *
15266
15241
  * Note that not all token contracts support permit signatures (e.g.
15267
15242
  * USDC). If a token's contract doesn't support permit signatures, use
15268
- * `Token.approve()` and call `this.depositPreApproved()` instead.
15243
+ * `Token.approve()` and be sure to set the option `isPreapproved` to
15244
+ * `true`.
15269
15245
  *
15270
- * @param token Token to deposit.
15271
- * @param walletAddress Wallet address to take the token from.
15272
- * @param value Value in wei of the token to deposit.
15273
- * @param referralCode Referral code for the deposit.
15246
+ * @param depositParams.token Token to deposit.
15247
+ * @param depositParams.account Wallet address to take the token from.
15248
+ * @param depositParams.value Value in wei of the token to deposit.
15249
+ * @param depositParams.referralCode Referral code for the deposit.
15250
+ * @param depositParams.lockPeriod The period for the deposit in
15251
+ * seconds.
15252
+ * @param depositParams.isPreapproved Whether the token is
15253
+ * pre-approved or needs a permit.
15274
15254
  * @returns `transact: () => Promise<Address>` - Used to make the
15275
15255
  * transaction.
15276
15256
  *
15277
15257
  * `estimate: () => Promise<bigint>` - Gas estimate of the
15278
15258
  * transaction.
15279
15259
  */
15280
- async deposit(t, n, r, a = 0n) {
15281
- const { r: s, s: i, v: o, yParity: u, deadline: c } = await this.erc20PermitHandler.withToken(t).getPermitSignature(
15282
- n,
15283
- Ce[this.chain].PufferL2Depositor,
15284
- r
15285
- ), l = {
15286
- r: s,
15287
- s: i,
15288
- v: Number(o ?? u),
15289
- deadline: c,
15290
- amount: r
15291
- }, d = [
15292
- ce[t][this.chain],
15293
- n,
15294
- l,
15295
- a
15260
+ async deposit(t) {
15261
+ const {
15262
+ token: n,
15263
+ account: r,
15264
+ value: a,
15265
+ referralCode: s = 0n,
15266
+ lockPeriod: i = 0n,
15267
+ isPreapproved: o = !1
15268
+ } = t;
15269
+ let u = {
15270
+ r: te("0x", { size: 32 }),
15271
+ s: te("0x", { size: 32 }),
15272
+ v: 0,
15273
+ deadline: 0n,
15274
+ amount: a
15275
+ };
15276
+ if (!o) {
15277
+ const { r: p, s: b, v: f, yParity: y, deadline: m } = await this.erc20PermitHandler.withToken(n).getPermitSignature(
15278
+ r,
15279
+ Ce[this.chain].PufferL2Depositor,
15280
+ a
15281
+ );
15282
+ u = {
15283
+ r: p,
15284
+ s: b,
15285
+ v: Number(f ?? y),
15286
+ deadline: m,
15287
+ amount: a
15288
+ };
15289
+ }
15290
+ const c = [
15291
+ Pe[n][this.chain],
15292
+ r,
15293
+ u,
15294
+ s,
15295
+ i
15296
15296
  ];
15297
- return { transact: () => this.getContract().write.deposit(d, {
15298
- account: n,
15297
+ return { transact: () => this.getContract().write.deposit(c, {
15298
+ account: r,
15299
15299
  chain: this.viemChain
15300
- }), estimate: () => this.getContract().estimateGas.deposit(d, {
15301
- account: n
15300
+ }), estimate: () => this.getContract().estimateGas.deposit(c, {
15301
+ account: r
15302
15302
  }) };
15303
15303
  }
15304
15304
  }
@@ -15514,6 +15514,7 @@ const Ea = [
15514
15514
  {
15515
15515
  inputs: [
15516
15516
  { internalType: "address", name: "token", type: "address" },
15517
+ { internalType: "address", name: "recipient", type: "address" },
15517
15518
  { internalType: "uint128", name: "lockPeriod", type: "uint128" },
15518
15519
  {
15519
15520
  components: [
@@ -15659,8 +15660,8 @@ const Ea = [
15659
15660
  type: "function"
15660
15661
  }
15661
15662
  ], Vl = {
15662
- [k.Mainnet]: { PufLocker: Ea },
15663
- [k.Holesky]: { PufLocker: Ea }
15663
+ [$.Mainnet]: { PufLocker: Ea },
15664
+ [$.Holesky]: { PufLocker: Ea }
15664
15665
  };
15665
15666
  class Zl {
15666
15667
  /**
@@ -15676,7 +15677,7 @@ class Zl {
15676
15677
  constructor(t, n, r) {
15677
15678
  j(this, "viemChain");
15678
15679
  j(this, "erc20PermitHandler");
15679
- this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = we[t], this.erc20PermitHandler = new hn(
15680
+ this.chain = t, this.walletClient = n, this.publicClient = r, this.viemChain = ge[t], this.erc20PermitHandler = new hn(
15680
15681
  t,
15681
15682
  n,
15682
15683
  r
@@ -15707,7 +15708,7 @@ class Zl {
15707
15708
  */
15708
15709
  getAllDeposits(t, n) {
15709
15710
  return this.getContract().read.getAllDeposits([
15710
- ce[t][this.chain],
15711
+ Pe[t][this.chain],
15711
15712
  n
15712
15713
  ]);
15713
15714
  }
@@ -15723,7 +15724,7 @@ class Zl {
15723
15724
  getDeposits(t, n, r, a) {
15724
15725
  return this.getContract().read.getDeposits([
15725
15726
  n,
15726
- ce[t][this.chain],
15727
+ Pe[t][this.chain],
15727
15728
  r,
15728
15729
  a
15729
15730
  ]);
@@ -15737,79 +15738,65 @@ class Zl {
15737
15738
  getLockPeriods() {
15738
15739
  return this.getContract().read.getLockPeriods();
15739
15740
  }
15740
- /**
15741
- * Deposit the given pre-approved PufToken into the locker. A token
15742
- * can be pre-approved using `Token.approve()`, This doesn't make the
15743
- * transaction but returns two methods namely `transact` and
15744
- * `estimate`.
15745
- *
15746
- * @param pufToken PufToken to deposit.
15747
- * @param walletAddress Wallet address of the depositor.
15748
- * @param value Amount of the deposit.
15749
- * @param lockPeriod The period for the deposit in seconds.
15750
- * @returns `transact: () => Promise<Address>` - Used to make the
15751
- * transaction.
15752
- *
15753
- * `estimate: () => Promise<bigint>` - Gas estimate of the
15754
- * transaction.
15755
- */
15756
- async depositPreApproved(t, n, r, a) {
15757
- const s = [
15758
- ce[t][this.chain],
15759
- a,
15760
- // Only `amount` is needed if `Token.approve()` is already called.
15761
- // So using mock values for other properties.
15762
- {
15763
- r: te("0x", { size: 32 }),
15764
- s: te("0x", { size: 32 }),
15765
- v: 0,
15766
- deadline: 0n,
15767
- amount: r
15768
- }
15769
- ];
15770
- return { transact: () => this.getContract().write.deposit(s, {
15771
- account: n,
15772
- chain: this.viemChain
15773
- }), estimate: () => this.getContract().estimateGas.deposit(s, {
15774
- account: n
15775
- }) };
15776
- }
15777
15741
  /**
15778
15742
  * Deposit the given PufToken into the locker. This doesn't make the
15779
15743
  * transaction but returns two methods namely `transact` and
15780
15744
  * `estimate`.
15781
15745
  *
15782
- * @param pufToken PufToken to deposit.
15783
- * @param walletAddress Wallet address of the depositor.
15784
- * @param value Amount of the deposit.
15785
- * @param lockPeriod The period for the deposit in seconds.
15746
+ * @param depositParams.pufToken PufToken to deposit.
15747
+ * @param depositParams.account Wallet address of the depositor.
15748
+ * @param depositParams.value Amount of the deposit.
15749
+ * @param depositParams.lockPeriod The period for the deposit in
15750
+ * seconds.
15751
+ * @param depositParams.isPreapproved Whether the token is
15752
+ * pre-approved or needs a permit.
15786
15753
  * @returns `transact: () => Promise<Address>` - Used to make the
15787
15754
  * transaction.
15788
15755
  *
15789
15756
  * `estimate: () => Promise<bigint>` - Gas estimate of the
15790
15757
  * transaction.
15791
15758
  */
15792
- async deposit(t, n, r, a) {
15793
- const { r: s, s: i, v: o, yParity: u, deadline: c } = await this.erc20PermitHandler.withToken(t).getPermitSignature(
15794
- n,
15795
- Ce[this.chain].PufLocker,
15796
- r
15797
- ), l = {
15798
- r: s,
15799
- s: i,
15800
- v: Number(o ?? u),
15801
- deadline: c,
15802
- amount: r
15803
- }, d = [
15804
- ce[t][this.chain],
15759
+ async deposit(t) {
15760
+ const {
15761
+ token: n,
15762
+ account: r,
15763
+ recipient: a,
15764
+ value: s,
15765
+ lockPeriod: i,
15766
+ isPreapproved: o = !1
15767
+ } = t;
15768
+ let u = {
15769
+ r: te("0x", { size: 32 }),
15770
+ s: te("0x", { size: 32 }),
15771
+ v: 0,
15772
+ deadline: 0n,
15773
+ amount: s
15774
+ };
15775
+ if (!o) {
15776
+ const { r: p, s: b, v: f, yParity: y, deadline: m } = await this.erc20PermitHandler.withToken(n).getPermitSignature(
15777
+ r,
15778
+ Ce[this.chain].PufLocker,
15779
+ s
15780
+ );
15781
+ u = {
15782
+ r: p,
15783
+ s: b,
15784
+ v: Number(f ?? y),
15785
+ deadline: m,
15786
+ amount: s
15787
+ };
15788
+ }
15789
+ const c = [
15790
+ Pe[n][this.chain],
15805
15791
  a,
15806
- l
15792
+ i,
15793
+ u
15807
15794
  ];
15808
- return { transact: () => this.getContract().write.deposit(d, {
15809
- account: n,
15795
+ return { transact: () => this.getContract().write.deposit(c, {
15796
+ account: r,
15810
15797
  chain: this.viemChain
15811
- }), estimate: () => this.getContract().estimateGas.deposit(d, {
15812
- account: n
15798
+ }), estimate: () => this.getContract().estimateGas.deposit(c, {
15799
+ account: r
15813
15800
  }) };
15814
15801
  }
15815
15802
  /**
@@ -15824,7 +15811,7 @@ class Zl {
15824
15811
  */
15825
15812
  withdraw(t, n, r, a) {
15826
15813
  const s = [
15827
- ce[t][this.chain],
15814
+ Pe[t][this.chain],
15828
15815
  a,
15829
15816
  r
15830
15817
  ];
@@ -15862,7 +15849,7 @@ class Xl {
15862
15849
  j(this, "pufToken");
15863
15850
  /** Handler for the `PufLocker` contract. */
15864
15851
  j(this, "pufLocker");
15865
- const a = we[t];
15852
+ const a = ge[t];
15866
15853
  this.walletClient = n ?? si({
15867
15854
  chain: a,
15868
15855
  transport: Yn()
@@ -15914,7 +15901,7 @@ class nr {
15914
15901
  */
15915
15902
  static createPublicClient(t) {
15916
15903
  return ai({
15917
- chain: we[t.chain],
15904
+ chain: ge[t.chain],
15918
15905
  transport: nr.extractTransportConfig(t)
15919
15906
  });
15920
15907
  }
@@ -15927,34 +15914,34 @@ class nr {
15927
15914
  */
15928
15915
  static createWalletClient(t) {
15929
15916
  return si({
15930
- chain: we[t.chain],
15917
+ chain: ge[t.chain],
15931
15918
  transport: nr.extractTransportConfig(t)
15932
15919
  });
15933
15920
  }
15934
15921
  static extractTransportConfig(t) {
15935
- return "rpcUrls" in t ? kc(t.rpcUrls.map((n) => Yn(n))) : $c(t.provider, t.config);
15922
+ return "rpcUrls" in t ? $c(t.rpcUrls.map((n) => Yn(n))) : kc(t.provider, t.config);
15936
15923
  }
15937
15924
  }
15938
15925
  export {
15939
15926
  v as B,
15940
- k as C,
15927
+ $ as C,
15941
15928
  yt as H,
15942
15929
  Xl as P,
15943
15930
  Jt as T,
15944
- we as V,
15945
- ge as a,
15946
- de as b,
15931
+ ge as V,
15932
+ he as a,
15933
+ ce as b,
15947
15934
  dn as c,
15948
15935
  vu as d,
15949
- $t as e,
15936
+ kt as e,
15950
15937
  nr as f,
15951
15938
  rr as g,
15952
15939
  ui as h,
15953
15940
  ld as i,
15954
15941
  Jl as j,
15955
- ce as k,
15942
+ Pe as k,
15956
15943
  Ll as l,
15957
15944
  Ce as m,
15958
15945
  W as s
15959
15946
  };
15960
- //# sourceMappingURL=main-DKOXyfBM.js.map
15947
+ //# sourceMappingURL=main-pCx1muph.js.map