@pufferfinance/puffer-sdk 1.22.2 → 1.23.1

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.
Files changed (100) hide show
  1. package/dist/api/puffer-client-helpers.cjs +1 -1
  2. package/dist/api/puffer-client-helpers.js +13 -13
  3. package/dist/api/puffer-client.cjs +1 -1
  4. package/dist/api/puffer-client.cjs.map +1 -1
  5. package/dist/api/puffer-client.d.ts +3 -0
  6. package/dist/api/puffer-client.js +30 -23
  7. package/dist/api/puffer-client.js.map +1 -1
  8. package/dist/{ccip-ChHXXL5d.js → ccip-CiQCCFUl.js} +14 -14
  9. package/dist/{ccip-ChHXXL5d.js.map → ccip-CiQCCFUl.js.map} +1 -1
  10. package/dist/{ccip-oOJ9rRj3.cjs → ccip-DIWF4nDh.cjs} +2 -2
  11. package/dist/{ccip-oOJ9rRj3.cjs.map → ccip-DIWF4nDh.cjs.map} +1 -1
  12. package/dist/chains/constants.cjs +1 -1
  13. package/dist/chains/constants.js +1 -1
  14. package/dist/{constants-LC89CXNv.js → constants-BaHwPdbi.js} +60 -60
  15. package/dist/{constants-LC89CXNv.js.map → constants-BaHwPdbi.js.map} +1 -1
  16. package/dist/{constants-BI6T6ZbJ.cjs → constants-c-vATmlG.cjs} +2 -2
  17. package/dist/{constants-BI6T6ZbJ.cjs.map → constants-c-vATmlG.cjs.map} +1 -1
  18. package/dist/contracts/abis/mainnet/InstitutionalAccessManager.cjs +2 -0
  19. package/dist/contracts/abis/mainnet/InstitutionalAccessManager.cjs.map +1 -0
  20. package/dist/contracts/abis/mainnet/InstitutionalAccessManager.d.ts +513 -0
  21. package/dist/contracts/abis/mainnet/InstitutionalAccessManager.js +310 -0
  22. package/dist/contracts/abis/mainnet/InstitutionalAccessManager.js.map +1 -0
  23. package/dist/contracts/addresses.cjs +1 -1
  24. package/dist/contracts/addresses.js +1 -1
  25. package/dist/contracts/handlers/carrot-staking-handler.cjs +1 -1
  26. package/dist/contracts/handlers/carrot-staking-handler.js +2 -2
  27. package/dist/contracts/handlers/concrete-vault-handler.cjs +1 -1
  28. package/dist/contracts/handlers/concrete-vault-handler.js +2 -2
  29. package/dist/contracts/handlers/distributor-handler.cjs +1 -1
  30. package/dist/contracts/handlers/distributor-handler.js +2 -2
  31. package/dist/contracts/handlers/erc20-permit-handler.cjs +1 -1
  32. package/dist/contracts/handlers/erc20-permit-handler.js +3 -3
  33. package/dist/contracts/handlers/guardian-module-handler.cjs +1 -1
  34. package/dist/contracts/handlers/guardian-module-handler.js +2 -2
  35. package/dist/contracts/handlers/institutional-access-manager-handler.cjs +2 -0
  36. package/dist/contracts/handlers/institutional-access-manager-handler.cjs.map +1 -0
  37. package/dist/contracts/handlers/institutional-access-manager-handler.d.ts +15374 -0
  38. package/dist/contracts/handlers/institutional-access-manager-handler.js +504 -0
  39. package/dist/contracts/handlers/institutional-access-manager-handler.js.map +1 -0
  40. package/dist/contracts/handlers/institutional-vault-handler.cjs +1 -1
  41. package/dist/contracts/handlers/institutional-vault-handler.js +2 -2
  42. package/dist/contracts/handlers/l1-reward-manager-handler.cjs +1 -1
  43. package/dist/contracts/handlers/l1-reward-manager-handler.js +2 -2
  44. package/dist/contracts/handlers/l2-reward-manager-handler.cjs +1 -1
  45. package/dist/contracts/handlers/l2-reward-manager-handler.js +2 -2
  46. package/dist/contracts/handlers/mtw-carrot-handler.cjs +1 -1
  47. package/dist/contracts/handlers/mtw-carrot-handler.js +2 -2
  48. package/dist/contracts/handlers/nucleus-accountant-handler.cjs +1 -1
  49. package/dist/contracts/handlers/nucleus-accountant-handler.js +1 -1
  50. package/dist/contracts/handlers/nucleus-atomic-queue-handler.cjs +1 -1
  51. package/dist/contracts/handlers/nucleus-atomic-queue-handler.js +2 -2
  52. package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs +1 -1
  53. package/dist/contracts/handlers/nucleus-boring-vault-handler.js +2 -2
  54. package/dist/contracts/handlers/nucleus-teller-handler.cjs +1 -1
  55. package/dist/contracts/handlers/nucleus-teller-handler.js +2 -2
  56. package/dist/contracts/handlers/puf-locker-handler.cjs +1 -1
  57. package/dist/contracts/handlers/puf-locker-handler.js +2 -2
  58. package/dist/contracts/handlers/puffer-depositor-handler.cjs +1 -1
  59. package/dist/contracts/handlers/puffer-depositor-handler.js +2 -2
  60. package/dist/contracts/handlers/puffer-l2-depositor-handler.cjs +1 -1
  61. package/dist/contracts/handlers/puffer-l2-depositor-handler.js +2 -2
  62. package/dist/contracts/handlers/puffer-oracle-v2-handler.cjs +1 -1
  63. package/dist/contracts/handlers/puffer-oracle-v2-handler.js +2 -2
  64. package/dist/contracts/handlers/puffer-protocol-handler.cjs +1 -1
  65. package/dist/contracts/handlers/puffer-protocol-handler.js +2 -2
  66. package/dist/contracts/handlers/puffer-vault-handler.cjs +1 -1
  67. package/dist/contracts/handlers/puffer-vault-handler.js +2 -2
  68. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.cjs +1 -1
  69. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.js +2 -2
  70. package/dist/contracts/handlers/validator-ticket-handler.cjs +1 -1
  71. package/dist/contracts/handlers/validator-ticket-handler.js +2 -2
  72. package/dist/contracts/tokens.cjs +1 -1
  73. package/dist/contracts/tokens.cjs.map +1 -1
  74. package/dist/contracts/tokens.d.ts +2 -1
  75. package/dist/contracts/tokens.js +10 -6
  76. package/dist/contracts/tokens.js.map +1 -1
  77. package/dist/contracts/vaults-addresses.cjs +1 -1
  78. package/dist/contracts/vaults-addresses.js +1 -1
  79. package/dist/{createWalletClient-BI9ya5Hq.js → createWalletClient-D74YRepQ.js} +44 -44
  80. package/dist/{createWalletClient-BI9ya5Hq.js.map → createWalletClient-D74YRepQ.js.map} +1 -1
  81. package/dist/{createWalletClient-KYWq_Sx_.cjs → createWalletClient-DKSH6l9_.cjs} +2 -2
  82. package/dist/{createWalletClient-KYWq_Sx_.cjs.map → createWalletClient-DKSH6l9_.cjs.map} +1 -1
  83. package/dist/{getContract-Ck2VtUkY.js → getContract-DGV8J5xI.js} +11 -11
  84. package/dist/{getContract-Ck2VtUkY.js.map → getContract-DGV8J5xI.js.map} +1 -1
  85. package/dist/{getContract-CPwqa1sR.cjs → getContract-RNLlK54b.cjs} +2 -2
  86. package/dist/{getContract-CPwqa1sR.cjs.map → getContract-RNLlK54b.cjs.map} +1 -1
  87. package/dist/main.cjs +1 -1
  88. package/dist/main.js +1 -1
  89. package/dist/{secp256k1-rB-jsNOU.js → secp256k1-B-LxKJrQ.js} +2 -2
  90. package/dist/{secp256k1-rB-jsNOU.js.map → secp256k1-B-LxKJrQ.js.map} +1 -1
  91. package/dist/secp256k1-CC-cv1vD.cjs +2 -0
  92. package/dist/{secp256k1-93KDDbJS.cjs.map → secp256k1-CC-cv1vD.cjs.map} +1 -1
  93. package/dist/utils/version.cjs +1 -1
  94. package/dist/utils/version.js +1 -1
  95. package/dist/{writeContract-DlZ0jYhZ.js → writeContract-BU3yK-Xj.js} +513 -512
  96. package/dist/{writeContract-DlZ0jYhZ.js.map → writeContract-BU3yK-Xj.js.map} +1 -1
  97. package/dist/{writeContract-DPtg3nGu.cjs → writeContract-CKqv1dsa.cjs} +17 -17
  98. package/dist/{writeContract-DPtg3nGu.cjs.map → writeContract-CKqv1dsa.cjs.map} +1 -1
  99. package/package.json +1 -1
  100. package/dist/secp256k1-93KDDbJS.cjs +0 -2
@@ -1,9 +1,9 @@
1
- import { B as h, f as D, k as ie, g as qe, n as v, c as ee, h as H, I as te, p as W, j as On, l as zn, m as Gn, o as le, i as je, q as Ue, u as he, v as J, w as ge, x as Ve, y as Dn, z as fe, A as Yt, D as _n, F as Xt, G as Ln, J as Ze, K, L as Qt, M as $t, N as Hn, E as de, O as Ne, P as Ft, Q as Mt, R as St, S as Ct, T as kt, U as Tt, W as It, X as Bt, Y as Oe, Z as we, _ as Rt, $ as qn, a0 as Un, a1 as Vn, a2 as Zn, a3 as Wn, a4 as Kn, a5 as Jn, a6 as Yn, a7 as Xn, a8 as pe, a9 as ze, aa as en, ab as Qn, ac as er, ad as tr, ae as nr } from "./constants-LC89CXNv.js";
1
+ import { B as h, l as D, m as ie, a as qe, n as v, c as ee, o as H, I as te, p as W, q as On, u as zn, v as Gn, w as le, i as je, x as Ue, y as he, z as Ve, b as J, A as ge, D as Dn, h as fe, F as Yt, G as _n, J as Xt, K as Ln, L as Ze, M as K, N as Qt, t as $t, O as Hn, E as de, P as Ne, Q as Ft, R as Mt, S as St, T as Ct, U as kt, W as Tt, X as It, Y as Bt, Z as Oe, _ as we, $ as Rt, a0 as qn, a1 as Un, a2 as Vn, a3 as Zn, a4 as Wn, a5 as Kn, a6 as Jn, a7 as Yn, a8 as Xn, a9 as pe, aa as ze, ab as en, ac as Qn, ad as er, ae as tr, af as nr } from "./constants-BaHwPdbi.js";
2
2
  const rr = "1.0.8";
3
3
  class C extends Error {
4
4
  constructor(t, n = {}) {
5
- var o;
6
- const r = n.cause instanceof C ? n.cause.details : (o = n.cause) != null && o.message ? n.cause.message : n.details, s = n.cause instanceof C && n.cause.docsPath || n.docsPath, a = [
5
+ var a;
6
+ const r = n.cause instanceof C ? n.cause.details : (a = n.cause) != null && a.message ? n.cause.message : n.details, s = n.cause instanceof C && n.cause.docsPath || n.docsPath, o = [
7
7
  t || "An error occurred.",
8
8
  "",
9
9
  ...n.metaMessages ? [...n.metaMessages, ""] : [],
@@ -12,7 +12,7 @@ class C extends Error {
12
12
  `Version: abitype@${rr}`
13
13
  ].join(`
14
14
  `);
15
- super(a), Object.defineProperty(this, "details", {
15
+ super(o), Object.defineProperty(this, "details", {
16
16
  enumerable: !0,
17
17
  configurable: !0,
18
18
  writable: !0,
@@ -51,8 +51,8 @@ function Ge(e) {
51
51
  t = "(";
52
52
  const n = e.components.length;
53
53
  for (let s = 0; s < n; s++) {
54
- const a = e.components[s];
55
- t += Ge(a), s < n - 1 && (t += ", ");
54
+ const o = e.components[s];
55
+ t += Ge(o), s < n - 1 && (t += ", ");
56
56
  }
57
57
  const r = U(jt, e.type);
58
58
  return t += `)${(r == null ? void 0 : r.array) ?? ""}`, Ge({
@@ -62,7 +62,7 @@ function Ge(e) {
62
62
  }
63
63
  return "indexed" in e && e.indexed && (t = `${t} indexed`), e.name ? `${t} ${e.name}` : t;
64
64
  }
65
- function oe(e) {
65
+ function ae(e) {
66
66
  let t = "";
67
67
  const n = e.length;
68
68
  for (let r = 0; r < n; r++) {
@@ -73,28 +73,28 @@ function oe(e) {
73
73
  }
74
74
  function sr(e) {
75
75
  var t;
76
- return e.type === "function" ? `function ${e.name}(${oe(e.inputs)})${e.stateMutability && e.stateMutability !== "nonpayable" ? ` ${e.stateMutability}` : ""}${(t = e.outputs) != null && t.length ? ` returns (${oe(e.outputs)})` : ""}` : e.type === "event" ? `event ${e.name}(${oe(e.inputs)})` : e.type === "error" ? `error ${e.name}(${oe(e.inputs)})` : e.type === "constructor" ? `constructor(${oe(e.inputs)})${e.stateMutability === "payable" ? " payable" : ""}` : e.type === "fallback" ? `fallback() external${e.stateMutability === "payable" ? " payable" : ""}` : "receive() external payable";
76
+ return e.type === "function" ? `function ${e.name}(${ae(e.inputs)})${e.stateMutability && e.stateMutability !== "nonpayable" ? ` ${e.stateMutability}` : ""}${(t = e.outputs) != null && t.length ? ` returns (${ae(e.outputs)})` : ""}` : e.type === "event" ? `event ${e.name}(${ae(e.inputs)})` : e.type === "error" ? `error ${e.name}(${ae(e.inputs)})` : e.type === "constructor" ? `constructor(${ae(e.inputs)})${e.stateMutability === "payable" ? " payable" : ""}` : e.type === "fallback" ? `fallback() external${e.stateMutability === "payable" ? " payable" : ""}` : "receive() external payable";
77
77
  }
78
78
  const sn = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
79
- function or(e) {
79
+ function ar(e) {
80
80
  return sn.test(e);
81
81
  }
82
- function ar(e) {
82
+ function or(e) {
83
83
  return U(sn, e);
84
84
  }
85
- const on = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
85
+ const an = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
86
86
  function ir(e) {
87
- return on.test(e);
87
+ return an.test(e);
88
88
  }
89
89
  function cr(e) {
90
- return U(on, e);
90
+ return U(an, e);
91
91
  }
92
- const an = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;
92
+ const on = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;
93
93
  function ur(e) {
94
- return an.test(e);
94
+ return on.test(e);
95
95
  }
96
96
  function dr(e) {
97
- return U(an, e);
97
+ return U(on, e);
98
98
  }
99
99
  const cn = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;
100
100
  function un(e) {
@@ -126,7 +126,7 @@ const gr = /* @__PURE__ */ new Set(["indexed"]), De = /* @__PURE__ */ new Set([
126
126
  "memory",
127
127
  "storage"
128
128
  ]);
129
- class zo extends C {
129
+ class Oa extends C {
130
130
  constructor({ signature: t }) {
131
131
  super("Failed to parse ABI item.", {
132
132
  details: `parseAbiItem(${JSON.stringify(t, null, 2)})`,
@@ -306,10 +306,10 @@ function kr(e, t, n) {
306
306
  for (const s of Object.entries(n)) {
307
307
  if (!s)
308
308
  continue;
309
- let a = "";
310
- for (const o of s[1])
311
- a += `[${o.type}${o.name ? `:${o.name}` : ""}]`;
312
- r += `(${s[0]}{${a}})`;
309
+ let o = "";
310
+ for (const a of s[1])
311
+ o += `[${a.type}${a.name ? `:${a.name}` : ""}]`;
312
+ r += `(${s[0]}{${o}})`;
313
313
  }
314
314
  return t ? `${t}:${e}${r}` : e;
315
315
  }
@@ -372,7 +372,7 @@ function Tr(e, t = {}) {
372
372
  return Ir(e, t);
373
373
  if (ir(e))
374
374
  return Br(e, t);
375
- if (or(e))
375
+ if (ar(e))
376
376
  return Rr(e, t);
377
377
  if (fr(e))
378
378
  return jr(e, t);
@@ -389,18 +389,18 @@ function Ir(e, t = {}) {
389
389
  const n = dr(e);
390
390
  if (!n)
391
391
  throw new re({ signature: e, type: "function" });
392
- const r = G(n.parameters), s = [], a = r.length;
393
- for (let i = 0; i < a; i++)
392
+ const r = G(n.parameters), s = [], o = r.length;
393
+ for (let i = 0; i < o; i++)
394
394
  s.push(Y(r[i], {
395
395
  modifiers: De,
396
396
  structs: t,
397
397
  type: "function"
398
398
  }));
399
- const o = [];
399
+ const a = [];
400
400
  if (n.returns) {
401
401
  const i = G(n.returns), c = i.length;
402
402
  for (let u = 0; u < c; u++)
403
- o.push(Y(i[u], {
403
+ a.push(Y(i[u], {
404
404
  modifiers: De,
405
405
  structs: t,
406
406
  type: "function"
@@ -411,16 +411,16 @@ function Ir(e, t = {}) {
411
411
  type: "function",
412
412
  stateMutability: n.stateMutability ?? "nonpayable",
413
413
  inputs: s,
414
- outputs: o
414
+ outputs: a
415
415
  };
416
416
  }
417
417
  function Br(e, t = {}) {
418
418
  const n = cr(e);
419
419
  if (!n)
420
420
  throw new re({ signature: e, type: "event" });
421
- const r = G(n.parameters), s = [], a = r.length;
422
- for (let o = 0; o < a; o++)
423
- s.push(Y(r[o], {
421
+ const r = G(n.parameters), s = [], o = r.length;
422
+ for (let a = 0; a < o; a++)
423
+ s.push(Y(r[a], {
424
424
  modifiers: gr,
425
425
  structs: t,
426
426
  type: "event"
@@ -428,21 +428,21 @@ function Br(e, t = {}) {
428
428
  return { name: n.name, type: "event", inputs: s };
429
429
  }
430
430
  function Rr(e, t = {}) {
431
- const n = ar(e);
431
+ const n = or(e);
432
432
  if (!n)
433
433
  throw new re({ signature: e, type: "error" });
434
- const r = G(n.parameters), s = [], a = r.length;
435
- for (let o = 0; o < a; o++)
436
- s.push(Y(r[o], { structs: t, type: "error" }));
434
+ const r = G(n.parameters), s = [], o = r.length;
435
+ for (let a = 0; a < o; a++)
436
+ s.push(Y(r[a], { structs: t, type: "error" }));
437
437
  return { name: n.name, type: "error", inputs: s };
438
438
  }
439
439
  function jr(e, t = {}) {
440
440
  const n = pr(e);
441
441
  if (!n)
442
442
  throw new re({ signature: e, type: "constructor" });
443
- const r = G(n.parameters), s = [], a = r.length;
444
- for (let o = 0; o < a; o++)
445
- s.push(Y(r[o], { structs: t, type: "constructor" }));
443
+ const r = G(n.parameters), s = [], o = r.length;
444
+ for (let a = 0; a < o; a++)
445
+ s.push(Y(r[a], { structs: t, type: "constructor" }));
446
446
  return {
447
447
  type: "constructor",
448
448
  stateMutability: n.stateMutability ?? "nonpayable",
@@ -469,7 +469,7 @@ function Y(e, t) {
469
469
  throw new xr({ param: e });
470
470
  if (s.name && _r(s.name))
471
471
  throw new Pr({ param: e, name: s.name });
472
- const a = s.name ? { name: s.name } : {}, o = s.modifier === "indexed" ? { indexed: !0 } : {}, i = (t == null ? void 0 : t.structs) ?? {};
472
+ const o = s.name ? { name: s.name } : {}, a = s.modifier === "indexed" ? { indexed: !0 } : {}, i = (t == null ? void 0 : t.structs) ?? {};
473
473
  let c, u = {};
474
474
  if (r) {
475
475
  c = "tuple";
@@ -499,25 +499,25 @@ function Y(e, t) {
499
499
  }
500
500
  const d = {
501
501
  type: `${c}${s.array ?? ""}`,
502
- ...a,
503
502
  ...o,
503
+ ...a,
504
504
  ...u
505
505
  };
506
506
  return Se.set(n, d), d;
507
507
  }
508
508
  function G(e, t = [], n = "", r = 0) {
509
509
  const s = e.trim().length;
510
- for (let a = 0; a < s; a++) {
511
- const o = e[a], i = e.slice(a + 1);
512
- switch (o) {
510
+ for (let o = 0; o < s; o++) {
511
+ const a = e[o], i = e.slice(o + 1);
512
+ switch (a) {
513
513
  case ",":
514
- return r === 0 ? G(i, [...t, n.trim()]) : G(i, t, `${n}${o}`, r);
514
+ return r === 0 ? G(i, [...t, n.trim()]) : G(i, t, `${n}${a}`, r);
515
515
  case "(":
516
- return G(i, t, `${n}${o}`, r + 1);
516
+ return G(i, t, `${n}${a}`, r + 1);
517
517
  case ")":
518
- return G(i, t, `${n}${o}`, r - 1);
518
+ return G(i, t, `${n}${a}`, r - 1);
519
519
  default:
520
- return G(i, t, `${n}${o}`, r);
520
+ return G(i, t, `${n}${a}`, r);
521
521
  }
522
522
  }
523
523
  if (n === "")
@@ -538,8 +538,8 @@ function Lr(e, t) {
538
538
  }
539
539
  function Hr(e) {
540
540
  const t = {}, n = e.length;
541
- for (let o = 0; o < n; o++) {
542
- const i = e[o];
541
+ for (let a = 0; a < n; a++) {
542
+ const i = e[a];
543
543
  if (!un(i))
544
544
  continue;
545
545
  const c = lr(i);
@@ -559,9 +559,9 @@ function Hr(e) {
559
559
  throw new Mr({ signature: i });
560
560
  t[c.name] = d;
561
561
  }
562
- const r = {}, s = Object.entries(t), a = s.length;
563
- for (let o = 0; o < a; o++) {
564
- const [i, c] = s[o];
562
+ const r = {}, s = Object.entries(t), o = s.length;
563
+ for (let a = 0; a < o; a++) {
564
+ const [i, c] = s[a];
565
565
  r[i] = pn(c, t);
566
566
  }
567
567
  return r;
@@ -569,25 +569,25 @@ function Hr(e) {
569
569
  const qr = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;
570
570
  function pn(e, t, n = /* @__PURE__ */ new Set()) {
571
571
  const r = [], s = e.length;
572
- for (let a = 0; a < s; a++) {
573
- const o = e[a];
574
- if (rn.test(o.type))
575
- r.push(o);
572
+ for (let o = 0; o < s; o++) {
573
+ const a = e[o];
574
+ if (rn.test(a.type))
575
+ r.push(a);
576
576
  else {
577
- const c = U(qr, o.type);
577
+ const c = U(qr, a.type);
578
578
  if (!(c != null && c.type))
579
- throw new $r({ abiParameter: o });
579
+ throw new $r({ abiParameter: a });
580
580
  const { array: u, type: d } = c;
581
581
  if (d in t) {
582
582
  if (n.has(d))
583
583
  throw new Sr({ type: d });
584
584
  r.push({
585
- ...o,
585
+ ...a,
586
586
  type: `tuple${u ?? ""}`,
587
587
  components: pn(t[d] ?? [], t, /* @__PURE__ */ new Set([...n, d]))
588
588
  });
589
589
  } else if (fn(d))
590
- r.push(o);
590
+ r.push(a);
591
591
  else
592
592
  throw new wr({ type: d });
593
593
  }
@@ -597,8 +597,8 @@ function pn(e, t, n = /* @__PURE__ */ new Set()) {
597
597
  function bn(e) {
598
598
  const t = Hr(e), n = [], r = e.length;
599
599
  for (let s = 0; s < r; s++) {
600
- const a = e[s];
601
- un(a) || n.push(Tr(a, t));
600
+ const o = e[s];
601
+ un(o) || n.push(Tr(o, t));
602
602
  }
603
603
  return n;
604
604
  }
@@ -607,7 +607,7 @@ function $(e, t, n) {
607
607
  if (typeof r == "function")
608
608
  return r;
609
609
  const s = e[n];
610
- return typeof s == "function" ? s : (a) => t(e, a);
610
+ return typeof s == "function" ? s : (o) => t(e, o);
611
611
  }
612
612
  function q(e, { includeName: t = !1 } = {}) {
613
613
  if (e.type !== "function" && e.type !== "event" && e.type !== "error")
@@ -793,7 +793,7 @@ class Xr extends h {
793
793
  });
794
794
  }
795
795
  }
796
- class Go extends h {
796
+ class za extends h {
797
797
  constructor({ expectedSize: t, givenSize: n }) {
798
798
  super(`Expected bytes${t}, got bytes${n}.`, {
799
799
  name: "BytesSizeMismatchError"
@@ -890,42 +890,42 @@ class rs extends h {
890
890
  }
891
891
  }
892
892
  const ss = (e) => ie(qe(e));
893
- function os(e) {
893
+ function as(e) {
894
894
  return ss(e);
895
895
  }
896
- function as(e) {
897
- let t = !0, n = "", r = 0, s = "", a = !1;
898
- for (let o = 0; o < e.length; o++) {
899
- const i = e[o];
896
+ function os(e) {
897
+ let t = !0, n = "", r = 0, s = "", o = !1;
898
+ for (let a = 0; a < e.length; a++) {
899
+ const i = e[a];
900
900
  if (["(", ")", ","].includes(i) && (t = !0), i === "(" && r++, i === ")" && r--, !!t) {
901
901
  if (r === 0) {
902
902
  if (i === " " && ["event", "function", ""].includes(s))
903
903
  s = "";
904
904
  else if (s += i, i === ")") {
905
- a = !0;
905
+ o = !0;
906
906
  break;
907
907
  }
908
908
  continue;
909
909
  }
910
910
  if (i === " ") {
911
- e[o - 1] !== "," && n !== "," && n !== ",(" && (n = "", t = !1);
911
+ e[a - 1] !== "," && n !== "," && n !== ",(" && (n = "", t = !1);
912
912
  continue;
913
913
  }
914
914
  s += i, n += i;
915
915
  }
916
916
  }
917
- if (!a)
917
+ if (!o)
918
918
  throw new h("Unable to normalize signature.");
919
919
  return s;
920
920
  }
921
921
  const is = (e) => {
922
922
  const t = typeof e == "string" ? e : sr(e);
923
- return as(t);
923
+ return os(t);
924
924
  };
925
925
  function gn(e) {
926
- return os(is(e));
926
+ return as(is(e));
927
927
  }
928
- const xe = gn, Do = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, cs = /^(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)?$/;
928
+ const xe = gn, Ga = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, cs = /^(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)?$/;
929
929
  function Je(e, t) {
930
930
  if (e.length !== t.length)
931
931
  throw new Kr({
@@ -975,15 +975,15 @@ function Ye({ param: e, value: t }) {
975
975
  }
976
976
  function Xe(e) {
977
977
  let t = 0;
978
- for (let a = 0; a < e.length; a++) {
979
- const { dynamic: o, encoded: i } = e[a];
980
- o ? t += 32 : t += D(i);
978
+ for (let o = 0; o < e.length; o++) {
979
+ const { dynamic: a, encoded: i } = e[o];
980
+ a ? t += 32 : t += D(i);
981
981
  }
982
982
  const n = [], r = [];
983
983
  let s = 0;
984
- for (let a = 0; a < e.length; a++) {
985
- const { dynamic: o, encoded: i } = e[a];
986
- o ? (n.push(v(t + s, { size: 32 })), r.push(i), s += D(i)) : n.push(i);
984
+ for (let o = 0; o < e.length; o++) {
985
+ const { dynamic: a, encoded: i } = e[o];
986
+ a ? (n.push(v(t + s, { size: 32 })), r.push(i), s += D(i)) : n.push(i);
987
987
  }
988
988
  return ee([...n, ...r]);
989
989
  }
@@ -1003,26 +1003,26 @@ function ls(e, { length: t, param: n }) {
1003
1003
  type: `${n.type}[${t}]`
1004
1004
  });
1005
1005
  let s = !1;
1006
- const a = [];
1007
- for (let o = 0; o < e.length; o++) {
1008
- const i = Ye({ param: n, value: e[o] });
1009
- i.dynamic && (s = !0), a.push(i);
1006
+ const o = [];
1007
+ for (let a = 0; a < e.length; a++) {
1008
+ const i = Ye({ param: n, value: e[a] });
1009
+ i.dynamic && (s = !0), o.push(i);
1010
1010
  }
1011
1011
  if (r || s) {
1012
- const o = Xe(a);
1012
+ const a = Xe(o);
1013
1013
  if (r) {
1014
- const i = v(a.length, { size: 32 });
1014
+ const i = v(o.length, { size: 32 });
1015
1015
  return {
1016
1016
  dynamic: !0,
1017
- encoded: a.length > 0 ? ee([i, o]) : i
1017
+ encoded: o.length > 0 ? ee([i, a]) : i
1018
1018
  };
1019
1019
  }
1020
1020
  if (s)
1021
- return { dynamic: !0, encoded: o };
1021
+ return { dynamic: !0, encoded: a };
1022
1022
  }
1023
1023
  return {
1024
1024
  dynamic: !1,
1025
- encoded: ee(a.map(({ encoded: o }) => o))
1025
+ encoded: ee(o.map(({ encoded: a }) => a))
1026
1026
  };
1027
1027
  }
1028
1028
  function fs(e, { param: t }) {
@@ -1087,9 +1087,9 @@ function ms(e, { param: t }) {
1087
1087
  let n = !1;
1088
1088
  const r = [];
1089
1089
  for (let s = 0; s < t.components.length; s++) {
1090
- const a = t.components[s], o = Array.isArray(e) ? s : a.name, i = Ye({
1091
- param: a,
1092
- value: e[o]
1090
+ const o = t.components[s], a = Array.isArray(e) ? s : o.name, i = Ye({
1091
+ param: o,
1092
+ value: e[a]
1093
1093
  });
1094
1094
  r.push(i), i.dynamic && (n = !0);
1095
1095
  }
@@ -1107,13 +1107,13 @@ function Qe(e) {
1107
1107
  }
1108
1108
  const et = (e) => le(gn(e), 0, 4);
1109
1109
  function ce(e) {
1110
- const { abi: t, args: n = [], name: r } = e, s = je(r, { strict: !1 }), a = t.filter((i) => s ? i.type === "function" ? et(i) === r : i.type === "event" ? xe(i) === r : !1 : "name" in i && i.name === r);
1111
- if (a.length === 0)
1110
+ const { abi: t, args: n = [], name: r } = e, s = je(r, { strict: !1 }), o = t.filter((i) => s ? i.type === "function" ? et(i) === r : i.type === "event" ? xe(i) === r : !1 : "name" in i && i.name === r);
1111
+ if (o.length === 0)
1112
1112
  return;
1113
- if (a.length === 1)
1114
- return a[0];
1115
- let o;
1116
- for (const i of a) {
1113
+ if (o.length === 1)
1114
+ return o[0];
1115
+ let a;
1116
+ for (const i of o) {
1117
1117
  if (!("inputs" in i))
1118
1118
  continue;
1119
1119
  if (!n || n.length === 0) {
@@ -1127,21 +1127,21 @@ function ce(e) {
1127
1127
  const l = "inputs" in i && i.inputs[d];
1128
1128
  return l ? _e(u, l) : !1;
1129
1129
  })) {
1130
- if (o && "inputs" in o && o.inputs) {
1131
- const u = wn(i.inputs, o.inputs, n);
1130
+ if (a && "inputs" in a && a.inputs) {
1131
+ const u = wn(i.inputs, a.inputs, n);
1132
1132
  if (u)
1133
1133
  throw new Xr({
1134
1134
  abiItem: i,
1135
1135
  type: u[0]
1136
1136
  }, {
1137
- abiItem: o,
1137
+ abiItem: a,
1138
1138
  type: u[1]
1139
1139
  });
1140
1140
  }
1141
- o = i;
1141
+ a = i;
1142
1142
  }
1143
1143
  }
1144
- return o || a[0];
1144
+ return a || o[0];
1145
1145
  }
1146
1146
  function _e(e, t) {
1147
1147
  const n = typeof e, r = t.type;
@@ -1155,7 +1155,7 @@ function _e(e, t) {
1155
1155
  case "string":
1156
1156
  return n === "string";
1157
1157
  default:
1158
- return r === "tuple" && "components" in t ? Object.values(t.components).every((s, a) => _e(Object.values(e)[a], s)) : /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r) ? n === "number" || n === "bigint" : /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r) ? n === "string" || e instanceof Uint8Array : /[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r) ? Array.isArray(e) && e.every((s) => _e(s, {
1158
+ return r === "tuple" && "components" in t ? Object.values(t.components).every((s, o) => _e(Object.values(e)[o], s)) : /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r) ? n === "number" || n === "bigint" : /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r) ? n === "string" || e instanceof Uint8Array : /[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r) ? Array.isArray(e) && e.every((s) => _e(s, {
1159
1159
  ...t,
1160
1160
  // Pop off `[]` or `[M]` from end of type
1161
1161
  type: r.replace(/(\[[0-9]{0,}\])$/, "")
@@ -1164,12 +1164,12 @@ function _e(e, t) {
1164
1164
  }
1165
1165
  function wn(e, t, n) {
1166
1166
  for (const r in e) {
1167
- const s = e[r], a = t[r];
1168
- if (s.type === "tuple" && a.type === "tuple" && "components" in s && "components" in a)
1169
- return wn(s.components, a.components, n[r]);
1170
- const o = [s.type, a.type];
1171
- if (o.includes("address") && o.includes("bytes20") ? !0 : o.includes("address") && o.includes("string") ? H(n[r], { strict: !1 }) : o.includes("address") && o.includes("bytes") ? H(n[r], { strict: !1 }) : !1)
1172
- return o;
1167
+ const s = e[r], o = t[r];
1168
+ if (s.type === "tuple" && o.type === "tuple" && "components" in s && "components" in o)
1169
+ return wn(s.components, o.components, n[r]);
1170
+ const a = [s.type, o.type];
1171
+ if (a.includes("address") && a.includes("bytes20") ? !0 : a.includes("address") && a.includes("string") ? H(n[r], { strict: !1 }) : a.includes("address") && a.includes("bytes") ? H(n[r], { strict: !1 }) : !1)
1172
+ return a;
1173
1173
  }
1174
1174
  }
1175
1175
  const zt = "/docs/contract/encodeEventTopics";
@@ -1185,13 +1185,13 @@ function tt(e) {
1185
1185
  }
1186
1186
  if (s.type !== "event")
1187
1187
  throw new Ot(void 0, { docsPath: zt });
1188
- const a = q(s), o = xe(a);
1188
+ const o = q(s), a = xe(o);
1189
1189
  let i = [];
1190
1190
  if (r && "inputs" in s) {
1191
1191
  const u = (c = s.inputs) == null ? void 0 : c.filter((l) => "indexed" in l && l.indexed), d = Array.isArray(r) ? r : Object.values(r).length > 0 ? (u == null ? void 0 : u.map((l) => r[l.name])) ?? [] : [];
1192
1192
  d.length > 0 && (i = (u == null ? void 0 : u.map((l, f) => Array.isArray(d[f]) ? d[f].map((b, p) => Gt({ param: l, value: d[f][p] })) : typeof d[f] < "u" && d[f] !== null ? Gt({ param: l, value: d[f] }) : null)) ?? []);
1193
1193
  }
1194
- return [o, ...i];
1194
+ return [a, ...i];
1195
1195
  }
1196
1196
  function Gt({ param: e, value: t }) {
1197
1197
  if (e.type === "string" || e.type === "bytes")
@@ -1203,23 +1203,23 @@ function Gt({ param: e, value: t }) {
1203
1203
  function hs(e, { method: t }) {
1204
1204
  var r, s;
1205
1205
  const n = {};
1206
- return e.transport.type === "fallback" && ((s = (r = e.transport).onResponse) == null || s.call(r, ({ method: a, response: o, status: i, transport: c }) => {
1207
- i === "success" && t === a && (n[o] = c.request);
1208
- })), (a) => n[a] || e.request;
1206
+ return e.transport.type === "fallback" && ((s = (r = e.transport).onResponse) == null || s.call(r, ({ method: o, response: a, status: i, transport: c }) => {
1207
+ i === "success" && t === o && (n[a] = c.request);
1208
+ })), (o) => n[o] || e.request;
1209
1209
  }
1210
1210
  async function gs(e, t) {
1211
- const { address: n, abi: r, args: s, eventName: a, fromBlock: o, strict: i, toBlock: c } = t, u = hs(e, {
1211
+ const { address: n, abi: r, args: s, eventName: o, fromBlock: a, strict: i, toBlock: c } = t, u = hs(e, {
1212
1212
  method: "eth_newFilter"
1213
- }), d = a ? tt({
1213
+ }), d = o ? tt({
1214
1214
  abi: r,
1215
1215
  args: s,
1216
- eventName: a
1216
+ eventName: o
1217
1217
  }) : void 0, l = await e.request({
1218
1218
  method: "eth_newFilter",
1219
1219
  params: [
1220
1220
  {
1221
1221
  address: n,
1222
- fromBlock: typeof o == "bigint" ? v(o) : o,
1222
+ fromBlock: typeof a == "bigint" ? v(a) : a,
1223
1223
  toBlock: typeof c == "bigint" ? v(c) : c,
1224
1224
  topics: d
1225
1225
  }
@@ -1228,7 +1228,7 @@ async function gs(e, t) {
1228
1228
  return {
1229
1229
  abi: r,
1230
1230
  args: s,
1231
- eventName: a,
1231
+ eventName: o,
1232
1232
  id: l,
1233
1233
  request: u(l),
1234
1234
  strict: !!i,
@@ -1243,14 +1243,14 @@ function ws(e) {
1243
1243
  const { abi: t, args: n, functionName: r } = e;
1244
1244
  let s = t[0];
1245
1245
  if (r) {
1246
- const a = ce({
1246
+ const o = ce({
1247
1247
  abi: t,
1248
1248
  args: n,
1249
1249
  name: r
1250
1250
  });
1251
- if (!a)
1251
+ if (!o)
1252
1252
  throw new be(r, { docsPath: Dt });
1253
- s = a;
1253
+ s = o;
1254
1254
  }
1255
1255
  if (s.type !== "function")
1256
1256
  throw new be(void 0, { docsPath: Dt });
@@ -1263,8 +1263,8 @@ function ue(e) {
1263
1263
  const { args: t } = e, { abi: n, functionName: r } = (() => {
1264
1264
  var i;
1265
1265
  return e.abi.length === 1 && ((i = e.functionName) != null && i.startsWith("0x")) ? e : ws(e);
1266
- })(), s = n[0], a = r, o = "inputs" in s && s.inputs ? Je(s.inputs, t ?? []) : void 0;
1267
- return Ue([a, o ?? "0x"]);
1266
+ })(), s = n[0], o = r, a = "inputs" in s && s.inputs ? Je(s.inputs, t ?? []) : void 0;
1267
+ return Ue([o, a ?? "0x"]);
1268
1268
  }
1269
1269
  const vs = {
1270
1270
  1: "An `assert` condition failed.",
@@ -1326,22 +1326,22 @@ function Pe(e, t) {
1326
1326
  size: D(t)
1327
1327
  });
1328
1328
  let s = 0;
1329
- const a = [];
1330
- for (let o = 0; o < e.length; ++o) {
1331
- const i = e[o];
1329
+ const o = [];
1330
+ for (let a = 0; a < e.length; ++a) {
1331
+ const i = e[a];
1332
1332
  r.setPosition(s);
1333
1333
  const [c, u] = Q(r, i, {
1334
1334
  staticPosition: 0
1335
1335
  });
1336
- s += u, a.push(c);
1336
+ s += u, o.push(c);
1337
1337
  }
1338
- return a;
1338
+ return o;
1339
1339
  }
1340
1340
  function Q(e, t, { staticPosition: n }) {
1341
1341
  const r = Qe(t.type);
1342
1342
  if (r) {
1343
- const [s, a] = r;
1344
- return Ms(e, { ...t, type: a }, { length: s, staticPosition: n });
1343
+ const [s, o] = r;
1344
+ return Ms(e, { ...t, type: o }, { length: s, staticPosition: n });
1345
1345
  }
1346
1346
  if (t.type === "tuple")
1347
1347
  return Ts(e, t, { staticPosition: n });
@@ -1366,9 +1366,9 @@ function Fs(e) {
1366
1366
  }
1367
1367
  function Ms(e, t, { length: n, staticPosition: r }) {
1368
1368
  if (!n) {
1369
- const o = L(e.readBytes(Le)), i = r + o, c = i + _t;
1369
+ const a = L(e.readBytes(Le)), i = r + a, c = i + _t;
1370
1370
  e.setPosition(i);
1371
- const u = L(e.readBytes(_t)), d = ae(t);
1371
+ const u = L(e.readBytes(_t)), d = oe(t);
1372
1372
  let l = 0;
1373
1373
  const f = [];
1374
1374
  for (let b = 0; b < u; ++b) {
@@ -1380,8 +1380,8 @@ function Ms(e, t, { length: n, staticPosition: r }) {
1380
1380
  }
1381
1381
  return e.setPosition(r + 32), [f, 32];
1382
1382
  }
1383
- if (ae(t)) {
1384
- const o = L(e.readBytes(Le)), i = r + o, c = [];
1383
+ if (oe(t)) {
1384
+ const a = L(e.readBytes(Le)), i = r + a, c = [];
1385
1385
  for (let u = 0; u < n; ++u) {
1386
1386
  e.setPosition(i + u * 32);
1387
1387
  const [d] = Q(e, t, {
@@ -1392,14 +1392,14 @@ function Ms(e, t, { length: n, staticPosition: r }) {
1392
1392
  return e.setPosition(r + 32), [c, 32];
1393
1393
  }
1394
1394
  let s = 0;
1395
- const a = [];
1396
- for (let o = 0; o < n; ++o) {
1395
+ const o = [];
1396
+ for (let a = 0; a < n; ++a) {
1397
1397
  const [i, c] = Q(e, t, {
1398
1398
  staticPosition: r + s
1399
1399
  });
1400
- s += c, a.push(i);
1400
+ s += c, o.push(i);
1401
1401
  }
1402
- return [a, s];
1402
+ return [o, s];
1403
1403
  }
1404
1404
  function Ss(e) {
1405
1405
  return [As(e.readBytes(32), { size: 32 }), 32];
@@ -1407,8 +1407,8 @@ function Ss(e) {
1407
1407
  function Cs(e, t, { staticPosition: n }) {
1408
1408
  const [r, s] = t.type.split("bytes");
1409
1409
  if (!s) {
1410
- const o = L(e.readBytes(32));
1411
- e.setPosition(n + o);
1410
+ const a = L(e.readBytes(32));
1411
+ e.setPosition(n + a);
1412
1412
  const i = L(e.readBytes(32));
1413
1413
  if (i === 0)
1414
1414
  return e.setPosition(n + 32), ["0x", 32];
@@ -1425,27 +1425,27 @@ function ks(e, t) {
1425
1425
  ];
1426
1426
  }
1427
1427
  function Ts(e, t, { staticPosition: n }) {
1428
- const r = t.components.length === 0 || t.components.some(({ name: o }) => !o), s = r ? [] : {};
1429
- let a = 0;
1430
- if (ae(t)) {
1431
- const o = L(e.readBytes(Le)), i = n + o;
1428
+ const r = t.components.length === 0 || t.components.some(({ name: a }) => !a), s = r ? [] : {};
1429
+ let o = 0;
1430
+ if (oe(t)) {
1431
+ const a = L(e.readBytes(Le)), i = n + a;
1432
1432
  for (let c = 0; c < t.components.length; ++c) {
1433
1433
  const u = t.components[c];
1434
- e.setPosition(i + a);
1434
+ e.setPosition(i + o);
1435
1435
  const [d, l] = Q(e, u, {
1436
1436
  staticPosition: i
1437
1437
  });
1438
- a += l, s[r ? c : u == null ? void 0 : u.name] = d;
1438
+ o += l, s[r ? c : u == null ? void 0 : u.name] = d;
1439
1439
  }
1440
1440
  return e.setPosition(n + 32), [s, 32];
1441
1441
  }
1442
- for (let o = 0; o < t.components.length; ++o) {
1443
- const i = t.components[o], [c, u] = Q(e, i, {
1442
+ for (let a = 0; a < t.components.length; ++a) {
1443
+ const i = t.components[a], [c, u] = Q(e, i, {
1444
1444
  staticPosition: n
1445
1445
  });
1446
- s[r ? o : i == null ? void 0 : i.name] = c, a += u;
1446
+ s[r ? a : i == null ? void 0 : i.name] = c, o += u;
1447
1447
  }
1448
- return [s, a];
1448
+ return [s, o];
1449
1449
  }
1450
1450
  function Is(e, { staticPosition: t }) {
1451
1451
  const n = L(e.readBytes(32)), r = t + n;
@@ -1453,38 +1453,38 @@ function Is(e, { staticPosition: t }) {
1453
1453
  const s = L(e.readBytes(32));
1454
1454
  if (s === 0)
1455
1455
  return e.setPosition(t + 32), ["", 32];
1456
- const a = e.readBytes(s, 32), o = $s(Ve(a));
1457
- return e.setPosition(t + 32), [o, 32];
1456
+ const o = e.readBytes(s, 32), a = $s(Ve(o));
1457
+ return e.setPosition(t + 32), [a, 32];
1458
1458
  }
1459
- function ae(e) {
1459
+ function oe(e) {
1460
1460
  var r;
1461
1461
  const { type: t } = e;
1462
1462
  if (t === "string" || t === "bytes" || t.endsWith("[]"))
1463
1463
  return !0;
1464
1464
  if (t === "tuple")
1465
- return (r = e.components) == null ? void 0 : r.some(ae);
1465
+ return (r = e.components) == null ? void 0 : r.some(oe);
1466
1466
  const n = Qe(e.type);
1467
- return !!(n && ae({ ...e, type: n[1] }));
1467
+ return !!(n && oe({ ...e, type: n[1] }));
1468
1468
  }
1469
1469
  function Bs(e) {
1470
1470
  const { abi: t, data: n } = e, r = le(n, 0, 4);
1471
1471
  if (r === "0x")
1472
1472
  throw new We();
1473
- const a = [...t || [], xs, Ps].find((o) => o.type === "error" && r === et(q(o)));
1474
- if (!a)
1473
+ const o = [...t || [], xs, Ps].find((a) => a.type === "error" && r === et(q(a)));
1474
+ if (!o)
1475
1475
  throw new mn(r, {
1476
1476
  docsPath: "/docs/contract/decodeErrorResult"
1477
1477
  });
1478
1478
  return {
1479
- abiItem: a,
1480
- args: "inputs" in a && a.inputs && a.inputs.length > 0 ? Pe(a.inputs, le(n, 4)) : void 0,
1481
- errorName: a.name
1479
+ abiItem: o,
1480
+ args: "inputs" in o && o.inputs && o.inputs.length > 0 ? Pe(o.inputs, le(n, 4)) : void 0,
1481
+ errorName: o.name
1482
1482
  };
1483
1483
  }
1484
1484
  const ne = (e, t, n) => JSON.stringify(e, (r, s) => typeof s == "bigint" ? s.toString() : s, n);
1485
1485
  function vn({ abiItem: e, args: t, includeFunctionName: n = !0, includeName: r = !1 }) {
1486
1486
  if ("name" in e && "inputs" in e && e.inputs)
1487
- return `${n ? e.name : ""}(${e.inputs.map((s, a) => `${r && s.name ? `${s.name}: ` : ""}${typeof t[a] == "object" ? ne(t[a]) : t[a]}`).join(", ")})`;
1487
+ return `${n ? e.name : ""}(${e.inputs.map((s, o) => `${r && s.name ? `${s.name}: ` : ""}${typeof t[o] == "object" ? ne(t[o]) : t[o]}`).join(", ")})`;
1488
1488
  }
1489
1489
  class Rs extends h {
1490
1490
  constructor({ address: t }) {
@@ -1519,15 +1519,15 @@ function Ns(e) {
1519
1519
  }
1520
1520
  const Os = (e) => e, nt = (e) => e;
1521
1521
  class zs extends h {
1522
- constructor(t, { account: n, docsPath: r, chain: s, data: a, gas: o, gasPrice: i, maxFeePerGas: c, maxPriorityFeePerGas: u, nonce: d, to: l, value: f, stateOverride: b }) {
1522
+ constructor(t, { account: n, docsPath: r, chain: s, data: o, gas: a, gasPrice: i, maxFeePerGas: c, maxPriorityFeePerGas: u, nonce: d, to: l, value: f, stateOverride: b }) {
1523
1523
  var m;
1524
1524
  const p = n ? V(n) : void 0;
1525
1525
  let y = Ze({
1526
1526
  from: p == null ? void 0 : p.address,
1527
1527
  to: l,
1528
1528
  value: typeof f < "u" && `${Qt(f)} ${((m = s == null ? void 0 : s.nativeCurrency) == null ? void 0 : m.symbol) || "ETH"}`,
1529
- data: a,
1530
- gas: o,
1529
+ data: o,
1530
+ gas: a,
1531
1531
  gasPrice: typeof i < "u" && `${K(i)} gwei`,
1532
1532
  maxFeePerGas: typeof c < "u" && `${K(c)} gwei`,
1533
1533
  maxPriorityFeePerGas: typeof u < "u" && `${K(u)} gwei`,
@@ -1552,8 +1552,8 @@ ${Ns(b)}`), super(t.shortMessage, {
1552
1552
  }
1553
1553
  }
1554
1554
  class Gs extends h {
1555
- constructor(t, { abi: n, args: r, contractAddress: s, docsPath: a, functionName: o, sender: i }) {
1556
- const c = ce({ abi: n, args: r, name: o }), u = c ? vn({
1555
+ constructor(t, { abi: n, args: r, contractAddress: s, docsPath: o, functionName: a, sender: i }) {
1556
+ const c = ce({ abi: n, args: r, name: a }), u = c ? vn({
1557
1557
  abiItem: c,
1558
1558
  args: r,
1559
1559
  includeFunctionName: !1,
@@ -1561,12 +1561,12 @@ class Gs extends h {
1561
1561
  }) : void 0, d = c ? q(c, { includeName: !0 }) : void 0, l = Ze({
1562
1562
  address: s && Os(s),
1563
1563
  function: d,
1564
- args: u && u !== "()" && `${[...Array((o == null ? void 0 : o.length) ?? 0).keys()].map(() => " ").join("")}${u}`,
1564
+ args: u && u !== "()" && `${[...Array((a == null ? void 0 : a.length) ?? 0).keys()].map(() => " ").join("")}${u}`,
1565
1565
  sender: i
1566
1566
  });
1567
- super(t.shortMessage || `An unknown error occurred while executing the contract function "${o}".`, {
1567
+ super(t.shortMessage || `An unknown error occurred while executing the contract function "${a}".`, {
1568
1568
  cause: t,
1569
- docsPath: a,
1569
+ docsPath: o,
1570
1570
  metaMessages: [
1571
1571
  ...t.metaMessages ? [...t.metaMessages, " "] : [],
1572
1572
  l && "Contract Call:",
@@ -1608,16 +1608,16 @@ class Gs extends h {
1608
1608
  configurable: !0,
1609
1609
  writable: !0,
1610
1610
  value: void 0
1611
- }), this.abi = n, this.args = r, this.cause = t, this.contractAddress = s, this.functionName = o, this.sender = i;
1611
+ }), this.abi = n, this.args = r, this.cause = t, this.contractAddress = s, this.functionName = a, this.sender = i;
1612
1612
  }
1613
1613
  }
1614
1614
  class Ds extends h {
1615
1615
  constructor({ abi: t, data: n, functionName: r, message: s }) {
1616
- let a, o, i, c;
1616
+ let o, a, i, c;
1617
1617
  if (n && n !== "0x")
1618
1618
  try {
1619
- o = Bs({ abi: t, data: n });
1620
- const { abiItem: d, errorName: l, args: f } = o;
1619
+ a = Bs({ abi: t, data: n });
1620
+ const { abiItem: d, errorName: l, args: f } = a;
1621
1621
  if (l === "Error")
1622
1622
  c = f[0];
1623
1623
  else if (l === "Panic") {
@@ -1636,11 +1636,11 @@ class Ds extends h {
1636
1636
  ];
1637
1637
  }
1638
1638
  } catch (d) {
1639
- a = d;
1639
+ o = d;
1640
1640
  }
1641
1641
  else s && (c = s);
1642
1642
  let u;
1643
- a instanceof mn && (u = a.signature, i = [
1643
+ o instanceof mn && (u = o.signature, i = [
1644
1644
  `Unable to decode signature "${u}" as it was not found on the provided ABI.`,
1645
1645
  "Make sure you are using the correct ABI and that the error exists on it.",
1646
1646
  `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${u}.`
@@ -1649,7 +1649,7 @@ class Ds extends h {
1649
1649
  c || u
1650
1650
  ].join(`
1651
1651
  `) : `The contract function "${r}" reverted.`, {
1652
- cause: a,
1652
+ cause: o,
1653
1653
  metaMessages: i,
1654
1654
  name: "ContractFunctionRevertedError"
1655
1655
  }), Object.defineProperty(this, "data", {
@@ -1672,7 +1672,7 @@ class Ds extends h {
1672
1672
  configurable: !0,
1673
1673
  writable: !0,
1674
1674
  value: void 0
1675
- }), this.data = o, this.raw = n, this.reason = c, this.signature = u;
1675
+ }), this.data = a, this.raw = n, this.reason = c, this.signature = u;
1676
1676
  }
1677
1677
  }
1678
1678
  class _s extends h {
@@ -1715,14 +1715,14 @@ class xn extends h {
1715
1715
  }), this.data = t;
1716
1716
  }
1717
1717
  }
1718
- class _o extends h {
1719
- constructor({ body: t, cause: n, details: r, headers: s, status: a, url: o }) {
1718
+ class Da extends h {
1719
+ constructor({ body: t, cause: n, details: r, headers: s, status: o, url: a }) {
1720
1720
  super("HTTP request failed.", {
1721
1721
  cause: n,
1722
1722
  details: r,
1723
1723
  metaMessages: [
1724
- a && `Status: ${a}`,
1725
- `URL: ${nt(o)}`,
1724
+ o && `Status: ${o}`,
1725
+ `URL: ${nt(a)}`,
1726
1726
  t && `Request body: ${ne(t)}`
1727
1727
  ].filter(Boolean),
1728
1728
  name: "HttpRequestError"
@@ -1746,7 +1746,7 @@ class _o extends h {
1746
1746
  configurable: !0,
1747
1747
  writable: !0,
1748
1748
  value: void 0
1749
- }), this.body = t, this.headers = s, this.status = a, this.url = o;
1749
+ }), this.body = t, this.headers = s, this.status = o, this.url = a;
1750
1750
  }
1751
1751
  }
1752
1752
  class Pn extends h {
@@ -1769,7 +1769,7 @@ class Pn extends h {
1769
1769
  }), this.code = n.code, this.data = n.data;
1770
1770
  }
1771
1771
  }
1772
- class Lo extends h {
1772
+ class _a extends h {
1773
1773
  constructor({ body: t, url: n }) {
1774
1774
  super("The request took too long to respond.", {
1775
1775
  details: "The request timed out.",
@@ -1780,18 +1780,18 @@ class Lo extends h {
1780
1780
  }
1781
1781
  const Hs = -1;
1782
1782
  class I extends h {
1783
- constructor(t, { code: n, docsPath: r, metaMessages: s, name: a, shortMessage: o }) {
1784
- super(o, {
1783
+ constructor(t, { code: n, docsPath: r, metaMessages: s, name: o, shortMessage: a }) {
1784
+ super(a, {
1785
1785
  cause: t,
1786
1786
  docsPath: r,
1787
1787
  metaMessages: s || (t == null ? void 0 : t.metaMessages),
1788
- name: a || "RpcError"
1788
+ name: o || "RpcError"
1789
1789
  }), Object.defineProperty(this, "code", {
1790
1790
  enumerable: !0,
1791
1791
  configurable: !0,
1792
1792
  writable: !0,
1793
1793
  value: void 0
1794
- }), this.name = a || t.name, this.code = t instanceof Pn ? t.code : n ?? Hs;
1794
+ }), this.name = o || t.name, this.code = t instanceof Pn ? t.code : n ?? Hs;
1795
1795
  }
1796
1796
  }
1797
1797
  class se extends I {
@@ -1834,25 +1834,25 @@ Object.defineProperty(st, "code", {
1834
1834
  writable: !0,
1835
1835
  value: -32600
1836
1836
  });
1837
- class ot extends I {
1837
+ class at extends I {
1838
1838
  constructor(t, { method: n } = {}) {
1839
1839
  super(t, {
1840
- code: ot.code,
1840
+ code: at.code,
1841
1841
  name: "MethodNotFoundRpcError",
1842
1842
  shortMessage: `The method${n ? ` "${n}"` : ""} does not exist / is not available.`
1843
1843
  });
1844
1844
  }
1845
1845
  }
1846
- Object.defineProperty(ot, "code", {
1846
+ Object.defineProperty(at, "code", {
1847
1847
  enumerable: !0,
1848
1848
  configurable: !0,
1849
1849
  writable: !0,
1850
1850
  value: -32601
1851
1851
  });
1852
- class at extends I {
1852
+ class ot extends I {
1853
1853
  constructor(t) {
1854
1854
  super(t, {
1855
- code: at.code,
1855
+ code: ot.code,
1856
1856
  name: "InvalidParamsRpcError",
1857
1857
  shortMessage: [
1858
1858
  "Invalid parameters were provided to the RPC method.",
@@ -1862,7 +1862,7 @@ class at extends I {
1862
1862
  });
1863
1863
  }
1864
1864
  }
1865
- Object.defineProperty(at, "code", {
1865
+ Object.defineProperty(ot, "code", {
1866
1866
  enumerable: !0,
1867
1867
  configurable: !0,
1868
1868
  writable: !0,
@@ -2087,7 +2087,7 @@ Object.defineProperty(gt, "code", {
2087
2087
  writable: !0,
2088
2088
  value: 4902
2089
2089
  });
2090
- class Ho extends I {
2090
+ class La extends I {
2091
2091
  constructor(t) {
2092
2092
  super(t, {
2093
2093
  name: "UnknownRpcError",
@@ -2096,11 +2096,11 @@ class Ho extends I {
2096
2096
  }
2097
2097
  }
2098
2098
  const qs = 3;
2099
- function $e(e, { abi: t, address: n, args: r, docsPath: s, functionName: a, sender: o }) {
2100
- const i = e instanceof xn ? e : e instanceof h ? e.walk((p) => "data" in p) || e.walk() : {}, { code: c, data: u, details: d, message: l, shortMessage: f } = i, b = e instanceof We ? new _s({ functionName: a }) : [qs, Ee.code].includes(c) && (u || d || l || f) ? new Ds({
2099
+ function $e(e, { abi: t, address: n, args: r, docsPath: s, functionName: o, sender: a }) {
2100
+ const i = e instanceof xn ? e : e instanceof h ? e.walk((p) => "data" in p) || e.walk() : {}, { code: c, data: u, details: d, message: l, shortMessage: f } = i, b = e instanceof We ? new _s({ functionName: o }) : [qs, Ee.code].includes(c) && (u || d || l || f) ? new Ds({
2101
2101
  abi: t,
2102
2102
  data: typeof u == "object" ? u.data : u,
2103
- functionName: a,
2103
+ functionName: o,
2104
2104
  message: i instanceof Pn ? d : f ?? l
2105
2105
  }) : e;
2106
2106
  return new Gs(b, {
@@ -2108,8 +2108,8 @@ function $e(e, { abi: t, address: n, args: r, docsPath: s, functionName: a, send
2108
2108
  args: r,
2109
2109
  contractAddress: n,
2110
2110
  docsPath: s,
2111
- functionName: a,
2112
- sender: o
2111
+ functionName: o,
2112
+ sender: a
2113
2113
  });
2114
2114
  }
2115
2115
  function Us(e) {
@@ -2117,14 +2117,14 @@ function Us(e) {
2117
2117
  return Xt(`0x${t}`);
2118
2118
  }
2119
2119
  async function Vs({ hash: e, signature: t }) {
2120
- const n = je(e) ? e : $t(e), { secp256k1: r } = await import("./secp256k1-rB-jsNOU.js");
2120
+ const n = je(e) ? e : $t(e), { secp256k1: r } = await import("./secp256k1-B-LxKJrQ.js");
2121
2121
  return `0x${(() => {
2122
2122
  if (typeof t == "object" && "r" in t && "s" in t) {
2123
2123
  const { r: u, s: d, v: l, yParity: f } = t, b = Number(f ?? l), p = Ht(b);
2124
2124
  return new r.Signature(fe(u), fe(d)).addRecoveryBit(p);
2125
2125
  }
2126
- const o = je(t) ? t : $t(t), i = ge(`0x${o.slice(130)}`), c = Ht(i);
2127
- return r.Signature.fromCompact(o.substring(2, 130)).addRecoveryBit(c);
2126
+ const a = je(t) ? t : $t(t), i = ge(`0x${a.slice(130)}`), c = Ht(i);
2127
+ return r.Signature.fromCompact(a.substring(2, 130)).addRecoveryBit(c);
2128
2128
  })().recoverPublicKey(n.substring(2)).toHex(!1)}`;
2129
2129
  }
2130
2130
  function Ht(e) {
@@ -2140,7 +2140,7 @@ async function Zs({ hash: e, signature: t }) {
2140
2140
  return Us(await Vs({ hash: e, signature: t }));
2141
2141
  }
2142
2142
  function Ws(e) {
2143
- const { chainId: t, contractAddress: n, nonce: r, to: s } = e, a = ie(Ue([
2143
+ const { chainId: t, contractAddress: n, nonce: r, to: s } = e, o = ie(Ue([
2144
2144
  "0x05",
2145
2145
  Hn([
2146
2146
  t ? v(t) : "0x",
@@ -2148,7 +2148,7 @@ function Ws(e) {
2148
2148
  r ? v(r) : "0x"
2149
2149
  ])
2150
2150
  ]));
2151
- return s === "bytes" ? Yt(a) : a;
2151
+ return s === "bytes" ? Yt(o) : o;
2152
2152
  }
2153
2153
  async function En(e) {
2154
2154
  const { authorization: t, signature: n } = e;
@@ -2158,14 +2158,14 @@ async function En(e) {
2158
2158
  });
2159
2159
  }
2160
2160
  class Ks extends h {
2161
- constructor(t, { account: n, docsPath: r, chain: s, data: a, gas: o, gasPrice: i, maxFeePerGas: c, maxPriorityFeePerGas: u, nonce: d, to: l, value: f }) {
2161
+ constructor(t, { account: n, docsPath: r, chain: s, data: o, gas: a, gasPrice: i, maxFeePerGas: c, maxPriorityFeePerGas: u, nonce: d, to: l, value: f }) {
2162
2162
  var p;
2163
2163
  const b = Ze({
2164
2164
  from: n == null ? void 0 : n.address,
2165
2165
  to: l,
2166
2166
  value: typeof f < "u" && `${Qt(f)} ${((p = s == null ? void 0 : s.nativeCurrency) == null ? void 0 : p.symbol) || "ETH"}`,
2167
- data: a,
2168
- gas: o,
2167
+ data: o,
2168
+ gas: a,
2169
2169
  gasPrice: typeof i < "u" && `${K(i)} gwei`,
2170
2170
  maxFeePerGas: typeof c < "u" && `${K(c)} gwei`,
2171
2171
  maxPriorityFeePerGas: typeof u < "u" && `${K(u)} gwei`,
@@ -2224,10 +2224,10 @@ function vt(e, { format: t }) {
2224
2224
  if (!t)
2225
2225
  return {};
2226
2226
  const n = {};
2227
- function r(a) {
2228
- const o = Object.keys(a);
2229
- for (const i of o)
2230
- i in e && (n[i] = e[i]), a[i] && typeof a[i] == "object" && !Array.isArray(a[i]) && r(a[i]);
2227
+ function r(o) {
2228
+ const a = Object.keys(o);
2229
+ for (const i of a)
2230
+ i in e && (n[i] = e[i]), o[i] && typeof o[i] == "object" && !Array.isArray(o[i]) && r(o[i]);
2231
2231
  }
2232
2232
  const s = t(e || {});
2233
2233
  return r(s), n;
@@ -2273,13 +2273,13 @@ function qt(e) {
2273
2273
  }, {});
2274
2274
  }
2275
2275
  function Qs(e) {
2276
- const { balance: t, nonce: n, state: r, stateDiff: s, code: a } = e, o = {};
2277
- if (a !== void 0 && (o.code = a), t !== void 0 && (o.balance = v(t)), n !== void 0 && (o.nonce = v(n)), r !== void 0 && (o.state = qt(r)), s !== void 0) {
2278
- if (o.state)
2276
+ const { balance: t, nonce: n, state: r, stateDiff: s, code: o } = e, a = {};
2277
+ if (o !== void 0 && (a.code = o), t !== void 0 && (a.balance = v(t)), n !== void 0 && (a.nonce = v(n)), r !== void 0 && (a.state = qt(r)), s !== void 0) {
2278
+ if (a.state)
2279
2279
  throw new js();
2280
- o.stateDiff = qt(s);
2280
+ a.stateDiff = qt(s);
2281
2281
  }
2282
- return o;
2282
+ return a;
2283
2283
  }
2284
2284
  function An(e) {
2285
2285
  if (!e)
@@ -2295,11 +2295,11 @@ function An(e) {
2295
2295
  return t;
2296
2296
  }
2297
2297
  function Fe(e) {
2298
- const { account: t, gasPrice: n, maxFeePerGas: r, maxPriorityFeePerGas: s, to: a } = e, o = t ? V(t) : void 0;
2299
- if (o && !H(o.address))
2300
- throw new te({ address: o.address });
2301
- if (a && !H(a))
2302
- throw new te({ address: a });
2298
+ const { account: t, gasPrice: n, maxFeePerGas: r, maxPriorityFeePerGas: s, to: o } = e, a = t ? V(t) : void 0;
2299
+ if (a && !H(a.address))
2300
+ throw new te({ address: a.address });
2301
+ if (o && !H(o))
2302
+ throw new te({ address: o });
2303
2303
  if (typeof n < "u" && (typeof r < "u" || typeof s < "u"))
2304
2304
  throw new qn();
2305
2305
  if (r && r > Un)
@@ -2307,7 +2307,7 @@ function Fe(e) {
2307
2307
  if (s && r && s > r)
2308
2308
  throw new Oe({ maxFeePerGas: r, maxPriorityFeePerGas: s });
2309
2309
  }
2310
- class eo extends h {
2310
+ class ea extends h {
2311
2311
  constructor() {
2312
2312
  super("`baseFeeMultiplier` must be greater than 1.", {
2313
2313
  name: "BaseFeeScalarError"
@@ -2321,12 +2321,12 @@ class Pt extends h {
2321
2321
  });
2322
2322
  }
2323
2323
  }
2324
- class to extends h {
2324
+ class ta extends h {
2325
2325
  constructor({ maxPriorityFeePerGas: t }) {
2326
2326
  super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${K(t)} gwei).`, { name: "MaxFeePerGasTooLowError" });
2327
2327
  }
2328
2328
  }
2329
- class no extends h {
2329
+ class na extends h {
2330
2330
  constructor({ blockHash: t, blockNumber: n }) {
2331
2331
  let r = "Block";
2332
2332
  t && (r = `Block at hash "${t}"`), n && (r = `Block at number "${n}"`), super(`${r} could not be found.`, { name: "BlockNotFoundError" });
@@ -2334,16 +2334,16 @@ class no extends h {
2334
2334
  }
2335
2335
  async function me(e, { blockHash: t, blockNumber: n, blockTag: r, includeTransactions: s } = {}) {
2336
2336
  var d, l, f;
2337
- const a = r ?? "latest", o = s ?? !1, i = n !== void 0 ? v(n) : void 0;
2337
+ const o = r ?? "latest", a = s ?? !1, i = n !== void 0 ? v(n) : void 0;
2338
2338
  let c = null;
2339
2339
  if (t ? c = await e.request({
2340
2340
  method: "eth_getBlockByHash",
2341
- params: [t, o]
2341
+ params: [t, a]
2342
2342
  }, { dedupe: !0 }) : c = await e.request({
2343
2343
  method: "eth_getBlockByNumber",
2344
- params: [i || a, o]
2344
+ params: [i || o, a]
2345
2345
  }, { dedupe: !!i }), !c)
2346
- throw new no({ blockHash: t, blockNumber: n });
2346
+ throw new na({ blockHash: t, blockNumber: n });
2347
2347
  return (((f = (l = (d = e.chain) == null ? void 0 : d.formatters) == null ? void 0 : l.block) == null ? void 0 : f.format) || Vn)(c);
2348
2348
  }
2349
2349
  async function $n(e) {
@@ -2352,14 +2352,14 @@ async function $n(e) {
2352
2352
  });
2353
2353
  return BigInt(t);
2354
2354
  }
2355
- async function qo(e, t) {
2355
+ async function Ha(e, t) {
2356
2356
  return Fn(e, t);
2357
2357
  }
2358
2358
  async function Fn(e, t) {
2359
- var a, o;
2359
+ var o, a;
2360
2360
  const { block: n, chain: r = e.chain, request: s } = t || {};
2361
2361
  try {
2362
- const i = ((a = r == null ? void 0 : r.fees) == null ? void 0 : a.maxPriorityFeePerGas) ?? ((o = r == null ? void 0 : r.fees) == null ? void 0 : o.defaultPriorityFee);
2362
+ const i = ((o = r == null ? void 0 : r.fees) == null ? void 0 : o.maxPriorityFeePerGas) ?? ((a = r == null ? void 0 : r.fees) == null ? void 0 : a.defaultPriorityFee);
2363
2363
  if (typeof i == "function") {
2364
2364
  const u = n || await $(e, me, "getBlock")({}), d = await i({
2365
2365
  block: u,
@@ -2387,12 +2387,12 @@ async function Fn(e, t) {
2387
2387
  return u < 0n ? 0n : u;
2388
2388
  }
2389
2389
  }
2390
- async function Uo(e, t) {
2390
+ async function qa(e, t) {
2391
2391
  return He(e, t);
2392
2392
  }
2393
2393
  async function He(e, t) {
2394
2394
  var f, b;
2395
- const { block: n, chain: r = e.chain, request: s, type: a = "eip1559" } = t || {}, o = await (async () => {
2395
+ const { block: n, chain: r = e.chain, request: s, type: o = "eip1559" } = t || {}, a = await (async () => {
2396
2396
  var p, y;
2397
2397
  return typeof ((p = r == null ? void 0 : r.fees) == null ? void 0 : p.baseFeeMultiplier) == "function" ? r.fees.baseFeeMultiplier({
2398
2398
  block: n,
@@ -2400,21 +2400,21 @@ async function He(e, t) {
2400
2400
  request: s
2401
2401
  }) : ((y = r == null ? void 0 : r.fees) == null ? void 0 : y.baseFeeMultiplier) ?? 1.2;
2402
2402
  })();
2403
- if (o < 1)
2404
- throw new eo();
2405
- const c = 10 ** (((f = o.toString().split(".")[1]) == null ? void 0 : f.length) ?? 0), u = (p) => p * BigInt(Math.ceil(o * c)) / BigInt(c), d = n || await $(e, me, "getBlock")({});
2403
+ if (a < 1)
2404
+ throw new ea();
2405
+ const c = 10 ** (((f = a.toString().split(".")[1]) == null ? void 0 : f.length) ?? 0), u = (p) => p * BigInt(Math.ceil(a * c)) / BigInt(c), d = n || await $(e, me, "getBlock")({});
2406
2406
  if (typeof ((b = r == null ? void 0 : r.fees) == null ? void 0 : b.estimateFeesPerGas) == "function") {
2407
2407
  const p = await r.fees.estimateFeesPerGas({
2408
2408
  block: n,
2409
2409
  client: e,
2410
2410
  multiply: u,
2411
2411
  request: s,
2412
- type: a
2412
+ type: o
2413
2413
  });
2414
2414
  if (p !== null)
2415
2415
  return p;
2416
2416
  }
2417
- if (a === "eip1559") {
2417
+ if (o === "eip1559") {
2418
2418
  if (typeof d.baseFeePerGas != "bigint")
2419
2419
  throw new Pt();
2420
2420
  const p = typeof (s == null ? void 0 : s.maxPriorityFeePerGas) == "bigint" ? s.maxPriorityFeePerGas : await Fn(e, {
@@ -2431,7 +2431,7 @@ async function He(e, t) {
2431
2431
  gasPrice: (s == null ? void 0 : s.gasPrice) ?? u(await $(e, $n, "getGasPrice")({}))
2432
2432
  };
2433
2433
  }
2434
- async function ro(e, { address: t, blockTag: n = "latest", blockNumber: r }) {
2434
+ async function ra(e, { address: t, blockTag: n = "latest", blockNumber: r }) {
2435
2435
  const s = await e.request({
2436
2436
  method: "eth_getTransactionCount",
2437
2437
  params: [t, r ? v(r) : n]
@@ -2453,7 +2453,7 @@ const Sn = [
2453
2453
  "type"
2454
2454
  ], Ut = /* @__PURE__ */ new Map();
2455
2455
  async function Cn(e, t) {
2456
- const { account: n = e.account, blobs: r, chain: s, gas: a, kzg: o, nonce: i, nonceManager: c, parameters: u = Sn, type: d } = t, l = n && V(n), f = { ...t, ...l ? { from: l == null ? void 0 : l.address } : {} };
2456
+ const { account: n = e.account, blobs: r, chain: s, gas: o, kzg: a, nonce: i, nonceManager: c, parameters: u = Sn, type: d } = t, l = n && V(n), f = { ...t, ...l ? { from: l == null ? void 0 : l.address } : {} };
2457
2457
  let b;
2458
2458
  async function p() {
2459
2459
  return b || (b = await $(e, me, "getBlock")({ blockTag: "latest" }), b);
@@ -2471,12 +2471,12 @@ async function Cn(e, t) {
2471
2471
  client: e
2472
2472
  });
2473
2473
  } else
2474
- f.nonce = await $(e, ro, "getTransactionCount")({
2474
+ f.nonce = await $(e, ra, "getTransactionCount")({
2475
2475
  address: l.address,
2476
2476
  blockTag: "pending"
2477
2477
  });
2478
- if ((u.includes("blobVersionedHashes") || u.includes("sidecars")) && r && o) {
2479
- const w = Zn({ blobs: r, kzg: o });
2478
+ if ((u.includes("blobVersionedHashes") || u.includes("sidecars")) && r && a) {
2479
+ const w = Zn({ blobs: r, kzg: a });
2480
2480
  if (u.includes("blobVersionedHashes")) {
2481
2481
  const g = Wn({
2482
2482
  commitments: w,
@@ -2485,7 +2485,7 @@ async function Cn(e, t) {
2485
2485
  f.blobVersionedHashes = g;
2486
2486
  }
2487
2487
  if (u.includes("sidecars")) {
2488
- const g = Kn({ blobs: r, commitments: w, kzg: o }), x = Jn({
2488
+ const g = Kn({ blobs: r, commitments: w, kzg: a }), x = Jn({
2489
2489
  blobs: r,
2490
2490
  commitments: w,
2491
2491
  proofs: g,
@@ -2514,7 +2514,7 @@ async function Cn(e, t) {
2514
2514
  request: f
2515
2515
  });
2516
2516
  if (typeof t.maxPriorityFeePerGas > "u" && t.maxFeePerGas && t.maxFeePerGas < x)
2517
- throw new to({
2517
+ throw new ta({
2518
2518
  maxPriorityFeePerGas: x
2519
2519
  });
2520
2520
  f.maxPriorityFeePerGas = x, f.maxFeePerGas = g;
@@ -2532,20 +2532,20 @@ async function Cn(e, t) {
2532
2532
  f.gasPrice = g;
2533
2533
  }
2534
2534
  }
2535
- return u.includes("gas") && typeof a > "u" && (f.gas = await $(e, kn, "estimateGas")({
2535
+ return u.includes("gas") && typeof o > "u" && (f.gas = await $(e, kn, "estimateGas")({
2536
2536
  ...f,
2537
2537
  account: l && { address: l.address, type: "json-rpc" }
2538
2538
  })), Fe(f), delete f.parameters, f;
2539
2539
  }
2540
- async function so(e, { address: t, blockNumber: n, blockTag: r = "latest" }) {
2541
- const s = n ? v(n) : void 0, a = await e.request({
2540
+ async function sa(e, { address: t, blockNumber: n, blockTag: r = "latest" }) {
2541
+ const s = n ? v(n) : void 0, o = await e.request({
2542
2542
  method: "eth_getBalance",
2543
2543
  params: [t, s || r]
2544
2544
  });
2545
- return BigInt(a);
2545
+ return BigInt(o);
2546
2546
  }
2547
2547
  async function kn(e, t) {
2548
- var s, a, o;
2548
+ var s, o, a;
2549
2549
  const { account: n = e.account } = t, r = n ? V(n) : void 0;
2550
2550
  try {
2551
2551
  let O = function(T) {
@@ -2573,7 +2573,7 @@ async function kn(e, t) {
2573
2573
  });
2574
2574
  })();
2575
2575
  Fe(t);
2576
- const k = (o = (a = (s = e.chain) == null ? void 0 : s.formatters) == null ? void 0 : a.transactionRequest) == null ? void 0 : o.format, S = (k || xt)({
2576
+ const k = (a = (o = (s = e.chain) == null ? void 0 : s.formatters) == null ? void 0 : o.transactionRequest) == null ? void 0 : a.format, S = (k || xt)({
2577
2577
  // Pick out extra data that might exist on the chain's transaction request type.
2578
2578
  ...vt(M, { format: k }),
2579
2579
  from: r == null ? void 0 : r.address,
@@ -2593,7 +2593,7 @@ async function kn(e, t) {
2593
2593
  });
2594
2594
  let R = BigInt(await O({ block: P, request: S, rpcStateOverride: E }));
2595
2595
  if (c) {
2596
- const T = await so(e, { address: S.from }), z = await Promise.all(c.map(async (j) => {
2596
+ const T = await sa(e, { address: S.from }), z = await Promise.all(c.map(async (j) => {
2597
2597
  const { contractAddress: Z } = j, X = await O({
2598
2598
  block: P,
2599
2599
  request: {
@@ -2618,15 +2618,15 @@ async function kn(e, t) {
2618
2618
  });
2619
2619
  }
2620
2620
  }
2621
- async function Vo(e, t) {
2622
- const { abi: n, address: r, args: s, functionName: a, dataSuffix: o, ...i } = t, c = ue({
2621
+ async function Ua(e, t) {
2622
+ const { abi: n, address: r, args: s, functionName: o, dataSuffix: a, ...i } = t, c = ue({
2623
2623
  abi: n,
2624
2624
  args: s,
2625
- functionName: a
2625
+ functionName: o
2626
2626
  });
2627
2627
  try {
2628
2628
  return await $(e, kn, "estimateGas")({
2629
- data: `${c}${o ? o.replace("0x", "") : ""}`,
2629
+ data: `${c}${a ? a.replace("0x", "") : ""}`,
2630
2630
  to: r,
2631
2631
  ...i
2632
2632
  });
@@ -2637,12 +2637,12 @@ async function Vo(e, t) {
2637
2637
  address: r,
2638
2638
  args: s,
2639
2639
  docsPath: "/docs/contract/estimateContractGas",
2640
- functionName: a,
2640
+ functionName: o,
2641
2641
  sender: d == null ? void 0 : d.address
2642
2642
  });
2643
2643
  }
2644
2644
  }
2645
- function oo(e, t) {
2645
+ function aa(e, t) {
2646
2646
  if (!H(e, { strict: !1 }))
2647
2647
  throw new te({ address: e });
2648
2648
  if (!H(t, { strict: !1 }))
@@ -2651,12 +2651,12 @@ function oo(e, t) {
2651
2651
  }
2652
2652
  const Vt = "/docs/contract/decodeEventLog";
2653
2653
  function Tn(e) {
2654
- const { abi: t, data: n, strict: r, topics: s } = e, a = r ?? !0, [o, ...i] = s;
2655
- if (!o)
2654
+ const { abi: t, data: n, strict: r, topics: s } = e, o = r ?? !0, [a, ...i] = s;
2655
+ if (!a)
2656
2656
  throw new Jr({ docsPath: Vt });
2657
- const c = t.length === 1 ? t[0] : t.find((y) => y.type === "event" && o === xe(q(y)));
2657
+ const c = t.length === 1 ? t[0] : t.find((y) => y.type === "event" && a === xe(q(y)));
2658
2658
  if (!(c && "name" in c) || c.type !== "event")
2659
- throw new hn(o, { docsPath: Vt });
2659
+ throw new hn(a, { docsPath: Vt });
2660
2660
  const { name: u, inputs: d } = c, l = d == null ? void 0 : d.some((y) => !("name" in y && y.name));
2661
2661
  let f = l ? [] : {};
2662
2662
  const b = d.filter((y) => "indexed" in y && y.indexed);
@@ -2667,7 +2667,7 @@ function Tn(e) {
2667
2667
  abiItem: c,
2668
2668
  param: m
2669
2669
  });
2670
- f[l ? y : m.name || y] = ao({ param: m, value: w });
2670
+ f[l ? y : m.name || y] = oa({ param: m, value: w });
2671
2671
  }
2672
2672
  const p = d.filter((y) => !("indexed" in y && y.indexed));
2673
2673
  if (p.length > 0) {
@@ -2681,7 +2681,7 @@ function Tn(e) {
2681
2681
  for (let m = 0; m < p.length; m++)
2682
2682
  f[p[m].name] = y[m];
2683
2683
  } catch (y) {
2684
- if (a)
2684
+ if (o)
2685
2685
  throw y instanceof yn || y instanceof Xn ? new ye({
2686
2686
  abiItem: c,
2687
2687
  data: n,
@@ -2689,7 +2689,7 @@ function Tn(e) {
2689
2689
  size: D(n)
2690
2690
  }) : y;
2691
2691
  }
2692
- else if (a)
2692
+ else if (o)
2693
2693
  throw new ye({
2694
2694
  abiItem: c,
2695
2695
  data: "0x",
@@ -2702,30 +2702,30 @@ function Tn(e) {
2702
2702
  args: Object.values(f).length > 0 ? f : void 0
2703
2703
  };
2704
2704
  }
2705
- function ao({ param: e, value: t }) {
2705
+ function oa({ param: e, value: t }) {
2706
2706
  return e.type === "string" || e.type === "bytes" || e.type === "tuple" || e.type.match(/^(.*)\[(\d+)?\]$/) ? t : (Pe([e], t) || [])[0];
2707
2707
  }
2708
2708
  function In(e) {
2709
- const { abi: t, args: n, logs: r, strict: s = !0 } = e, a = (() => {
2709
+ const { abi: t, args: n, logs: r, strict: s = !0 } = e, o = (() => {
2710
2710
  if (e.eventName)
2711
2711
  return Array.isArray(e.eventName) ? e.eventName : [e.eventName];
2712
2712
  })();
2713
- return r.map((o) => {
2713
+ return r.map((a) => {
2714
2714
  var i;
2715
2715
  try {
2716
- const c = t.find((d) => d.type === "event" && o.topics[0] === xe(d));
2716
+ const c = t.find((d) => d.type === "event" && a.topics[0] === xe(d));
2717
2717
  if (!c)
2718
2718
  return null;
2719
2719
  const u = Tn({
2720
- ...o,
2720
+ ...a,
2721
2721
  abi: [c],
2722
2722
  strict: s
2723
2723
  });
2724
- return a && !a.includes(u.eventName) || !io({
2724
+ return o && !o.includes(u.eventName) || !ia({
2725
2725
  args: u.args,
2726
2726
  inputs: c.inputs,
2727
2727
  matchArgs: n
2728
- }) ? null : { ...u, ...o };
2728
+ }) ? null : { ...u, ...a };
2729
2729
  } catch (c) {
2730
2730
  let u, d;
2731
2731
  if (c instanceof hn)
@@ -2735,43 +2735,43 @@ function In(e) {
2735
2735
  return null;
2736
2736
  u = c.abiItem.name, d = (i = c.abiItem.inputs) == null ? void 0 : i.some((l) => !("name" in l && l.name));
2737
2737
  }
2738
- return { ...o, args: d ? [] : {}, eventName: u };
2738
+ return { ...a, args: d ? [] : {}, eventName: u };
2739
2739
  }
2740
2740
  }).filter(Boolean);
2741
2741
  }
2742
- function io(e) {
2742
+ function ia(e) {
2743
2743
  const { args: t, inputs: n, matchArgs: r } = e;
2744
2744
  if (!r)
2745
2745
  return !0;
2746
2746
  if (!t)
2747
2747
  return !1;
2748
- function s(a, o, i) {
2748
+ function s(o, a, i) {
2749
2749
  try {
2750
- return a.type === "address" ? oo(o, i) : a.type === "string" || a.type === "bytes" ? ie(qe(o)) === i : o === i;
2750
+ return o.type === "address" ? aa(a, i) : o.type === "string" || o.type === "bytes" ? ie(qe(a)) === i : a === i;
2751
2751
  } catch {
2752
2752
  return !1;
2753
2753
  }
2754
2754
  }
2755
- return Array.isArray(t) && Array.isArray(r) ? r.every((a, o) => {
2756
- if (a == null)
2757
- return !0;
2758
- const i = n[o];
2759
- return i ? (Array.isArray(a) ? a : [a]).some((u) => s(i, u, t[o])) : !1;
2760
- }) : typeof t == "object" && !Array.isArray(t) && typeof r == "object" && !Array.isArray(r) ? Object.entries(r).every(([a, o]) => {
2755
+ return Array.isArray(t) && Array.isArray(r) ? r.every((o, a) => {
2761
2756
  if (o == null)
2762
2757
  return !0;
2763
- const i = n.find((u) => u.name === a);
2758
+ const i = n[a];
2764
2759
  return i ? (Array.isArray(o) ? o : [o]).some((u) => s(i, u, t[a])) : !1;
2760
+ }) : typeof t == "object" && !Array.isArray(t) && typeof r == "object" && !Array.isArray(r) ? Object.entries(r).every(([o, a]) => {
2761
+ if (a == null)
2762
+ return !0;
2763
+ const i = n.find((u) => u.name === o);
2764
+ return i ? (Array.isArray(a) ? a : [a]).some((u) => s(i, u, t[o])) : !1;
2765
2765
  }) : !1;
2766
2766
  }
2767
- async function co(e, { address: t, blockHash: n, fromBlock: r, toBlock: s, event: a, events: o, args: i, strict: c } = {}) {
2768
- const u = c ?? !1, d = o ?? (a ? [a] : void 0);
2767
+ async function ca(e, { address: t, blockHash: n, fromBlock: r, toBlock: s, event: o, events: a, args: i, strict: c } = {}) {
2768
+ const u = c ?? !1, d = a ?? (o ? [o] : void 0);
2769
2769
  let l = [];
2770
2770
  d && (l = [d.flatMap((y) => tt({
2771
2771
  abi: [y],
2772
2772
  eventName: y.name,
2773
- args: o ? void 0 : i
2774
- }))], a && (l = l[0]));
2773
+ args: a ? void 0 : i
2774
+ }))], o && (l = l[0]));
2775
2775
  let f;
2776
2776
  n ? f = await e.request({
2777
2777
  method: "eth_getLogs",
@@ -2795,12 +2795,12 @@ async function co(e, { address: t, blockHash: n, fromBlock: r, toBlock: s, event
2795
2795
  strict: u
2796
2796
  }) : b;
2797
2797
  }
2798
- async function uo(e, t) {
2799
- const { abi: n, address: r, args: s, blockHash: a, eventName: o, fromBlock: i, toBlock: c, strict: u } = t, d = o ? ce({ abi: n, name: o }) : void 0, l = d ? void 0 : n.filter((f) => f.type === "event");
2800
- return $(e, co, "getLogs")({
2798
+ async function ua(e, t) {
2799
+ const { abi: n, address: r, args: s, blockHash: o, eventName: a, fromBlock: i, toBlock: c, strict: u } = t, d = a ? ce({ abi: n, name: a }) : void 0, l = d ? void 0 : n.filter((f) => f.type === "event");
2800
+ return $(e, ca, "getLogs")({
2801
2801
  address: r,
2802
2802
  args: s,
2803
- blockHash: a,
2803
+ blockHash: o,
2804
2804
  event: d,
2805
2805
  events: l,
2806
2806
  fromBlock: i,
@@ -2811,22 +2811,22 @@ async function uo(e, t) {
2811
2811
  const Ce = "/docs/contract/decodeFunctionResult";
2812
2812
  function Et(e) {
2813
2813
  const { abi: t, args: n, functionName: r, data: s } = e;
2814
- let a = t[0];
2814
+ let o = t[0];
2815
2815
  if (r) {
2816
2816
  const i = ce({ abi: t, args: n, name: r });
2817
2817
  if (!i)
2818
2818
  throw new be(r, { docsPath: Ce });
2819
- a = i;
2819
+ o = i;
2820
2820
  }
2821
- if (a.type !== "function")
2821
+ if (o.type !== "function")
2822
2822
  throw new be(void 0, { docsPath: Ce });
2823
- if (!a.outputs)
2824
- throw new Yr(a.name, { docsPath: Ce });
2825
- const o = Pe(a.outputs, s);
2826
- if (o && o.length > 1)
2827
- return o;
2828
- if (o && o.length === 1)
2829
- return o[0];
2823
+ if (!o.outputs)
2824
+ throw new Yr(o.name, { docsPath: Ce });
2825
+ const a = Pe(o.outputs, s);
2826
+ if (a && a.length > 1)
2827
+ return a;
2828
+ if (a && a.length === 1)
2829
+ return a[0];
2830
2830
  }
2831
2831
  const Zt = [
2832
2832
  {
@@ -2916,7 +2916,7 @@ const Zt = [
2916
2916
  name: "HttpError",
2917
2917
  type: "error"
2918
2918
  }
2919
- ], Zo = [
2919
+ ], Va = [
2920
2920
  ...Bn,
2921
2921
  {
2922
2922
  name: "resolve",
@@ -2945,7 +2945,7 @@ const Zt = [
2945
2945
  { name: "address", type: "address" }
2946
2946
  ]
2947
2947
  }
2948
- ], Wo = [
2948
+ ], Za = [
2949
2949
  ...Bn,
2950
2950
  {
2951
2951
  name: "reverse",
@@ -2974,7 +2974,7 @@ const Zt = [
2974
2974
  { type: "address", name: "resolver" }
2975
2975
  ]
2976
2976
  }
2977
- ], Ko = [
2977
+ ], Wa = [
2978
2978
  {
2979
2979
  name: "text",
2980
2980
  type: "function",
@@ -2985,7 +2985,7 @@ const Zt = [
2985
2985
  ],
2986
2986
  outputs: [{ name: "", type: "string" }]
2987
2987
  }
2988
- ], Jo = [
2988
+ ], Ka = [
2989
2989
  {
2990
2990
  name: "addr",
2991
2991
  type: "function",
@@ -3003,7 +3003,7 @@ const Zt = [
3003
3003
  ],
3004
3004
  outputs: [{ name: "", type: "bytes" }]
3005
3005
  }
3006
- ], Yo = [
3006
+ ], Ja = [
3007
3007
  {
3008
3008
  inputs: [
3009
3009
  {
@@ -3046,22 +3046,22 @@ const Zt = [
3046
3046
  type: "function",
3047
3047
  name: "isValidSig"
3048
3048
  }
3049
- ], lo = "0x82ad56cb", fo = "0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe", po = "0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe", Xo = "0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572", ke = "/docs/contract/encodeDeployData";
3049
+ ], da = "0x82ad56cb", la = "0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe", fa = "0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe", Ya = "0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572", ke = "/docs/contract/encodeDeployData";
3050
3050
  function Rn(e) {
3051
3051
  const { abi: t, args: n, bytecode: r } = e;
3052
3052
  if (!n || n.length === 0)
3053
3053
  return r;
3054
- const s = t.find((o) => "type" in o && o.type === "constructor");
3054
+ const s = t.find((a) => "type" in a && a.type === "constructor");
3055
3055
  if (!s)
3056
3056
  throw new Vr({ docsPath: ke });
3057
3057
  if (!("inputs" in s))
3058
3058
  throw new Nt({ docsPath: ke });
3059
3059
  if (!s.inputs || s.inputs.length === 0)
3060
3060
  throw new Nt({ docsPath: ke });
3061
- const a = Je(s.inputs, n);
3062
- return Ue([r, a]);
3061
+ const o = Je(s.inputs, n);
3062
+ return Ue([r, o]);
3063
3063
  }
3064
- function bo({ blockNumber: e, chain: t, contract: n }) {
3064
+ function pa({ blockNumber: e, chain: t, contract: n }) {
3065
3065
  var s;
3066
3066
  const r = (s = t == null ? void 0 : t.contracts) == null ? void 0 : s[n];
3067
3067
  if (!r)
@@ -3080,7 +3080,7 @@ function bo({ blockNumber: e, chain: t, contract: n }) {
3080
3080
  });
3081
3081
  return r.address;
3082
3082
  }
3083
- function yo(e, { docsPath: t, ...n }) {
3083
+ function ba(e, { docsPath: t, ...n }) {
3084
3084
  const r = (() => {
3085
3085
  const s = wt(e, n);
3086
3086
  return s instanceof we ? e : s;
@@ -3090,7 +3090,7 @@ function yo(e, { docsPath: t, ...n }) {
3090
3090
  ...n
3091
3091
  });
3092
3092
  }
3093
- function mo() {
3093
+ function ya() {
3094
3094
  let e = () => {
3095
3095
  }, t = () => {
3096
3096
  };
@@ -3099,10 +3099,10 @@ function mo() {
3099
3099
  }), resolve: e, reject: t };
3100
3100
  }
3101
3101
  const Te = /* @__PURE__ */ new Map();
3102
- function ho({ fn: e, id: t, shouldSplitBatch: n, wait: r = 0, sort: s }) {
3103
- const a = async () => {
3102
+ function ma({ fn: e, id: t, shouldSplitBatch: n, wait: r = 0, sort: s }) {
3103
+ const o = async () => {
3104
3104
  const d = c();
3105
- o();
3105
+ a();
3106
3106
  const l = d.map(({ args: f }) => f);
3107
3107
  l.length !== 0 && e(l).then((f) => {
3108
3108
  s && Array.isArray(f) && f.sort(s);
@@ -3116,26 +3116,26 @@ function ho({ fn: e, id: t, shouldSplitBatch: n, wait: r = 0, sort: s }) {
3116
3116
  p == null || p(f);
3117
3117
  }
3118
3118
  });
3119
- }, o = () => Te.delete(t), i = () => c().map(({ args: d }) => d), c = () => Te.get(t) || [], u = (d) => Te.set(t, [...c(), d]);
3119
+ }, a = () => Te.delete(t), i = () => c().map(({ args: d }) => d), c = () => Te.get(t) || [], u = (d) => Te.set(t, [...c(), d]);
3120
3120
  return {
3121
- flush: o,
3121
+ flush: a,
3122
3122
  async schedule(d) {
3123
- const { promise: l, resolve: f, reject: b } = mo();
3124
- return (n == null ? void 0 : n([...i(), d])) && a(), c().length > 0 ? (u({ args: d, resolve: f, reject: b }), l) : (u({ args: d, resolve: f, reject: b }), setTimeout(a, r), l);
3123
+ const { promise: l, resolve: f, reject: b } = ya();
3124
+ return (n == null ? void 0 : n([...i(), d])) && o(), c().length > 0 ? (u({ args: d, resolve: f, reject: b }), l) : (u({ args: d, resolve: f, reject: b }), setTimeout(o, r), l);
3125
3125
  }
3126
3126
  };
3127
3127
  }
3128
3128
  async function jn(e, t) {
3129
3129
  var k, N, S, O;
3130
- const { account: n = e.account, batch: r = !!((k = e.batch) != null && k.multicall), blockNumber: s, blockTag: a = "latest", accessList: o, blobs: i, code: c, data: u, factory: d, factoryData: l, gas: f, gasPrice: b, maxFeePerBlobGas: p, maxFeePerGas: y, maxPriorityFeePerGas: m, nonce: w, to: g, value: x, stateOverride: A, ...F } = t, M = n ? V(n) : void 0;
3130
+ const { account: n = e.account, batch: r = !!((k = e.batch) != null && k.multicall), blockNumber: s, blockTag: o = "latest", accessList: a, blobs: i, code: c, data: u, factory: d, factoryData: l, gas: f, gasPrice: b, maxFeePerBlobGas: p, maxFeePerGas: y, maxPriorityFeePerGas: m, nonce: w, to: g, value: x, stateOverride: A, ...F } = t, M = n ? V(n) : void 0;
3131
3131
  if (c && (d || l))
3132
3132
  throw new h("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
3133
3133
  if (c && g)
3134
3134
  throw new h("Cannot provide both `code` & `to` as parameters.");
3135
- const B = c && u, P = d && l && g && u, E = B || P, _ = B ? vo({
3135
+ const B = c && u, P = d && l && g && u, E = B || P, _ = B ? wa({
3136
3136
  code: c,
3137
3137
  data: u
3138
- }) : P ? xo({
3138
+ }) : P ? va({
3139
3139
  data: u,
3140
3140
  factory: d,
3141
3141
  factoryData: l,
@@ -3143,11 +3143,11 @@ async function jn(e, t) {
3143
3143
  }) : u;
3144
3144
  try {
3145
3145
  Fe(t);
3146
- const T = (s ? v(s) : void 0) || a, z = An(A), j = (O = (S = (N = e.chain) == null ? void 0 : N.formatters) == null ? void 0 : S.transactionRequest) == null ? void 0 : O.format, X = (j || xt)({
3146
+ const T = (s ? v(s) : void 0) || o, z = An(A), j = (O = (S = (N = e.chain) == null ? void 0 : N.formatters) == null ? void 0 : S.transactionRequest) == null ? void 0 : O.format, X = (j || xt)({
3147
3147
  // Pick out extra data that might exist on the chain's transaction request type.
3148
3148
  ...vt(F, { format: j }),
3149
3149
  from: M == null ? void 0 : M.address,
3150
- accessList: o,
3150
+ accessList: a,
3151
3151
  blobs: i,
3152
3152
  data: _,
3153
3153
  gas: f,
@@ -3159,12 +3159,12 @@ async function jn(e, t) {
3159
3159
  to: E ? void 0 : g,
3160
3160
  value: x
3161
3161
  });
3162
- if (r && go({ request: X }) && !z)
3162
+ if (r && ha({ request: X }) && !z)
3163
3163
  try {
3164
- return await wo(e, {
3164
+ return await ga(e, {
3165
3165
  ...X,
3166
3166
  blockNumber: s,
3167
- blockTag: a
3167
+ blockTag: o
3168
3168
  });
3169
3169
  } catch (Me) {
3170
3170
  if (!(Me instanceof en) && !(Me instanceof ze))
@@ -3180,34 +3180,34 @@ async function jn(e, t) {
3180
3180
  });
3181
3181
  return At === "0x" ? { data: void 0 } : { data: At };
3182
3182
  } catch (R) {
3183
- const T = Po(R), { offchainLookup: z, offchainLookupSignature: j } = await import("./ccip-ChHXXL5d.js");
3183
+ const T = xa(R), { offchainLookup: z, offchainLookupSignature: j } = await import("./ccip-CiQCCFUl.js");
3184
3184
  if (e.ccipRead !== !1 && (T == null ? void 0 : T.slice(0, 10)) === j && g)
3185
3185
  return { data: await z(e, { data: T, to: g }) };
3186
- throw E && (T == null ? void 0 : T.slice(0, 10)) === "0x101bb98d" ? new Ls({ factory: d }) : yo(R, {
3186
+ throw E && (T == null ? void 0 : T.slice(0, 10)) === "0x101bb98d" ? new Ls({ factory: d }) : ba(R, {
3187
3187
  ...t,
3188
3188
  account: M,
3189
3189
  chain: e.chain
3190
3190
  });
3191
3191
  }
3192
3192
  }
3193
- function go({ request: e }) {
3193
+ function ha({ request: e }) {
3194
3194
  const { data: t, to: n, ...r } = e;
3195
- return !(!t || t.startsWith(lo) || !n || Object.values(r).filter((s) => typeof s < "u").length > 0);
3195
+ return !(!t || t.startsWith(da) || !n || Object.values(r).filter((s) => typeof s < "u").length > 0);
3196
3196
  }
3197
- async function wo(e, t) {
3197
+ async function ga(e, t) {
3198
3198
  var y;
3199
- const { batchSize: n = 1024, wait: r = 0 } = typeof ((y = e.batch) == null ? void 0 : y.multicall) == "object" ? e.batch.multicall : {}, { blockNumber: s, blockTag: a = "latest", data: o, multicallAddress: i, to: c } = t;
3199
+ const { batchSize: n = 1024, wait: r = 0 } = typeof ((y = e.batch) == null ? void 0 : y.multicall) == "object" ? e.batch.multicall : {}, { blockNumber: s, blockTag: o = "latest", data: a, multicallAddress: i, to: c } = t;
3200
3200
  let u = i;
3201
3201
  if (!u) {
3202
3202
  if (!e.chain)
3203
3203
  throw new en();
3204
- u = bo({
3204
+ u = pa({
3205
3205
  blockNumber: s,
3206
3206
  chain: e.chain,
3207
3207
  contract: "multicall3"
3208
3208
  });
3209
3209
  }
3210
- const l = (s ? v(s) : void 0) || a, { schedule: f } = ho({
3210
+ const l = (s ? v(s) : void 0) || o, { schedule: f } = ma({
3211
3211
  id: `${e.uid}.${l}`,
3212
3212
  wait: r,
3213
3213
  shouldSplitBatch(m) {
@@ -3239,50 +3239,50 @@ async function wo(e, t) {
3239
3239
  data: x || "0x"
3240
3240
  });
3241
3241
  }
3242
- }), [{ returnData: b, success: p }] = await f({ data: o, to: c });
3242
+ }), [{ returnData: b, success: p }] = await f({ data: a, to: c });
3243
3243
  if (!p)
3244
3244
  throw new xn({ data: b });
3245
3245
  return b === "0x" ? { data: void 0 } : { data: b };
3246
3246
  }
3247
- function vo(e) {
3247
+ function wa(e) {
3248
3248
  const { code: t, data: n } = e;
3249
3249
  return Rn({
3250
3250
  abi: bn(["constructor(bytes, bytes)"]),
3251
- bytecode: fo,
3251
+ bytecode: la,
3252
3252
  args: [t, n]
3253
3253
  });
3254
3254
  }
3255
- function xo(e) {
3255
+ function va(e) {
3256
3256
  const { data: t, factory: n, factoryData: r, to: s } = e;
3257
3257
  return Rn({
3258
3258
  abi: bn(["constructor(address, bytes, address, bytes)"]),
3259
- bytecode: po,
3259
+ bytecode: fa,
3260
3260
  args: [s, t, n, r]
3261
3261
  });
3262
3262
  }
3263
- function Po(e) {
3263
+ function xa(e) {
3264
3264
  var n;
3265
3265
  if (!(e instanceof h))
3266
3266
  return;
3267
3267
  const t = e.walk();
3268
3268
  return typeof (t == null ? void 0 : t.data) == "object" ? (n = t.data) == null ? void 0 : n.data : t.data;
3269
3269
  }
3270
- async function Qo(e, t) {
3271
- const { abi: n, address: r, args: s, functionName: a, ...o } = t, i = ue({
3270
+ async function Xa(e, t) {
3271
+ const { abi: n, address: r, args: s, functionName: o, ...a } = t, i = ue({
3272
3272
  abi: n,
3273
3273
  args: s,
3274
- functionName: a
3274
+ functionName: o
3275
3275
  });
3276
3276
  try {
3277
3277
  const { data: c } = await $(e, jn, "call")({
3278
- ...o,
3278
+ ...a,
3279
3279
  data: i,
3280
3280
  to: r
3281
3281
  });
3282
3282
  return Et({
3283
3283
  abi: n,
3284
3284
  args: s,
3285
- functionName: a,
3285
+ functionName: o,
3286
3286
  data: c || "0x"
3287
3287
  });
3288
3288
  } catch (c) {
@@ -3291,23 +3291,23 @@ async function Qo(e, t) {
3291
3291
  address: r,
3292
3292
  args: s,
3293
3293
  docsPath: "/docs/contract/readContract",
3294
- functionName: a
3294
+ functionName: o
3295
3295
  });
3296
3296
  }
3297
3297
  }
3298
- async function ea(e, t) {
3299
- const { abi: n, address: r, args: s, dataSuffix: a, functionName: o, ...i } = t, c = i.account ? V(i.account) : e.account, u = ue({ abi: n, args: s, functionName: o });
3298
+ async function Qa(e, t) {
3299
+ const { abi: n, address: r, args: s, dataSuffix: o, functionName: a, ...i } = t, c = i.account ? V(i.account) : e.account, u = ue({ abi: n, args: s, functionName: a });
3300
3300
  try {
3301
3301
  const { data: d } = await $(e, jn, "call")({
3302
3302
  batch: !1,
3303
- data: `${u}${a ? a.replace("0x", "") : ""}`,
3303
+ data: `${u}${o ? o.replace("0x", "") : ""}`,
3304
3304
  to: r,
3305
3305
  ...i,
3306
3306
  account: c
3307
3307
  }), l = Et({
3308
3308
  abi: n,
3309
3309
  args: s,
3310
- functionName: o,
3310
+ functionName: a,
3311
3311
  data: d || "0x"
3312
3312
  }), f = n.filter((b) => "name" in b && b.name === t.functionName);
3313
3313
  return {
@@ -3316,8 +3316,8 @@ async function ea(e, t) {
3316
3316
  abi: f,
3317
3317
  address: r,
3318
3318
  args: s,
3319
- dataSuffix: a,
3320
- functionName: o,
3319
+ dataSuffix: o,
3320
+ functionName: a,
3321
3321
  ...i,
3322
3322
  account: c
3323
3323
  }
@@ -3328,29 +3328,29 @@ async function ea(e, t) {
3328
3328
  address: r,
3329
3329
  args: s,
3330
3330
  docsPath: "/docs/contract/simulateContract",
3331
- functionName: o,
3331
+ functionName: a,
3332
3332
  sender: c == null ? void 0 : c.address
3333
3333
  });
3334
3334
  }
3335
3335
  }
3336
3336
  const Ie = /* @__PURE__ */ new Map(), Wt = /* @__PURE__ */ new Map();
3337
- let Eo = 0;
3337
+ let Pa = 0;
3338
3338
  function Kt(e, t, n) {
3339
- const r = ++Eo, s = () => Ie.get(e) || [], a = () => {
3339
+ const r = ++Pa, s = () => Ie.get(e) || [], o = () => {
3340
3340
  const d = s();
3341
3341
  Ie.set(e, d.filter((l) => l.id !== r));
3342
- }, o = () => {
3342
+ }, a = () => {
3343
3343
  const d = s();
3344
3344
  if (!d.some((f) => f.id === r))
3345
3345
  return;
3346
3346
  const l = Wt.get(e);
3347
- d.length === 1 && l && l(), a();
3347
+ d.length === 1 && l && l(), o();
3348
3348
  }, i = s();
3349
3349
  if (Ie.set(e, [
3350
3350
  ...i,
3351
3351
  { id: r, fns: t }
3352
3352
  ]), i && i.length > 0)
3353
- return o;
3353
+ return a;
3354
3354
  const c = {};
3355
3355
  for (const d in t)
3356
3356
  c[d] = (...l) => {
@@ -3361,32 +3361,32 @@ function Kt(e, t, n) {
3361
3361
  (p = (b = y.fns)[d]) == null || p.call(b, ...l);
3362
3362
  };
3363
3363
  const u = n(c);
3364
- return typeof u == "function" && Wt.set(e, u), o;
3364
+ return typeof u == "function" && Wt.set(e, u), a;
3365
3365
  }
3366
3366
  async function Jt(e) {
3367
3367
  return new Promise((t) => setTimeout(t, e));
3368
3368
  }
3369
- function Ao(e, { emitOnBegin: t, initialWaitTime: n, interval: r }) {
3369
+ function Ea(e, { emitOnBegin: t, initialWaitTime: n, interval: r }) {
3370
3370
  let s = !0;
3371
- const a = () => s = !1;
3371
+ const o = () => s = !1;
3372
3372
  return (async () => {
3373
3373
  let i;
3374
- t && (i = await e({ unpoll: a }));
3374
+ t && (i = await e({ unpoll: o }));
3375
3375
  const c = await (n == null ? void 0 : n(i)) ?? r;
3376
3376
  await Jt(c);
3377
3377
  const u = async () => {
3378
- s && (await e({ unpoll: a }), await Jt(r), u());
3378
+ s && (await e({ unpoll: o }), await Jt(r), u());
3379
3379
  };
3380
3380
  u();
3381
- })(), a;
3382
- }
3383
- const $o = /* @__PURE__ */ new Map(), Fo = /* @__PURE__ */ new Map();
3384
- function Mo(e) {
3385
- const t = (s, a) => ({
3386
- clear: () => a.delete(s),
3387
- get: () => a.get(s),
3388
- set: (o) => a.set(s, o)
3389
- }), n = t(e, $o), r = t(e, Fo);
3381
+ })(), o;
3382
+ }
3383
+ const Aa = /* @__PURE__ */ new Map(), $a = /* @__PURE__ */ new Map();
3384
+ function Fa(e) {
3385
+ const t = (s, o) => ({
3386
+ clear: () => o.delete(s),
3387
+ get: () => o.get(s),
3388
+ set: (a) => o.set(s, a)
3389
+ }), n = t(e, Aa), r = t(e, $a);
3390
3390
  return {
3391
3391
  clear: () => {
3392
3392
  n.clear(), r.clear();
@@ -3395,56 +3395,56 @@ function Mo(e) {
3395
3395
  response: r
3396
3396
  };
3397
3397
  }
3398
- async function So(e, { cacheKey: t, cacheTime: n = Number.POSITIVE_INFINITY }) {
3399
- const r = Mo(t), s = r.response.get();
3398
+ async function Ma(e, { cacheKey: t, cacheTime: n = Number.POSITIVE_INFINITY }) {
3399
+ const r = Fa(t), s = r.response.get();
3400
3400
  if (s && n > 0 && (/* @__PURE__ */ new Date()).getTime() - s.created.getTime() < n)
3401
3401
  return s.data;
3402
- let a = r.promise.get();
3403
- a || (a = e(), r.promise.set(a));
3402
+ let o = r.promise.get();
3403
+ o || (o = e(), r.promise.set(o));
3404
3404
  try {
3405
- const o = await a;
3406
- return r.response.set({ created: /* @__PURE__ */ new Date(), data: o }), o;
3405
+ const a = await o;
3406
+ return r.response.set({ created: /* @__PURE__ */ new Date(), data: a }), a;
3407
3407
  } finally {
3408
3408
  r.promise.clear();
3409
3409
  }
3410
3410
  }
3411
- const Co = (e) => `blockNumber.${e}`;
3412
- async function ko(e, { cacheTime: t = e.cacheTime } = {}) {
3413
- const n = await So(() => e.request({
3411
+ const Sa = (e) => `blockNumber.${e}`;
3412
+ async function Ca(e, { cacheTime: t = e.cacheTime } = {}) {
3413
+ const n = await Ma(() => e.request({
3414
3414
  method: "eth_blockNumber"
3415
- }), { cacheKey: Co(e.uid), cacheTime: t });
3415
+ }), { cacheKey: Sa(e.uid), cacheTime: t });
3416
3416
  return BigInt(n);
3417
3417
  }
3418
- async function To(e, { filter: t }) {
3418
+ async function ka(e, { filter: t }) {
3419
3419
  const n = "strict" in t && t.strict, r = await t.request({
3420
3420
  method: "eth_getFilterChanges",
3421
3421
  params: [t.id]
3422
3422
  });
3423
3423
  if (typeof r[0] == "string")
3424
3424
  return r;
3425
- const s = r.map((a) => pe(a));
3425
+ const s = r.map((o) => pe(o));
3426
3426
  return !("abi" in t) || !t.abi ? s : In({
3427
3427
  abi: t.abi,
3428
3428
  logs: s,
3429
3429
  strict: n
3430
3430
  });
3431
3431
  }
3432
- async function Io(e, { filter: t }) {
3432
+ async function Ta(e, { filter: t }) {
3433
3433
  return t.request({
3434
3434
  method: "eth_uninstallFilter",
3435
3435
  params: [t.id]
3436
3436
  });
3437
3437
  }
3438
- function ta(e, t) {
3439
- const { abi: n, address: r, args: s, batch: a = !0, eventName: o, fromBlock: i, onError: c, onLogs: u, poll: d, pollingInterval: l = e.pollingInterval, strict: f } = t;
3438
+ function eo(e, t) {
3439
+ const { abi: n, address: r, args: s, batch: o = !0, eventName: a, fromBlock: i, onError: c, onLogs: u, poll: d, pollingInterval: l = e.pollingInterval, strict: f } = t;
3440
3440
  return (typeof d < "u" ? d : typeof i == "bigint" ? !0 : !(e.transport.type === "webSocket" || e.transport.type === "fallback" && e.transport.transports[0].config.type === "webSocket")) ? (() => {
3441
3441
  const m = f ?? !1, w = ne([
3442
3442
  "watchContractEvent",
3443
3443
  r,
3444
3444
  s,
3445
- a,
3446
- e.uid,
3447
3445
  o,
3446
+ e.uid,
3447
+ a,
3448
3448
  l,
3449
3449
  m,
3450
3450
  i
@@ -3453,7 +3453,7 @@ function ta(e, t) {
3453
3453
  let x;
3454
3454
  i !== void 0 && (x = i - 1n);
3455
3455
  let A, F = !1;
3456
- const M = Ao(async () => {
3456
+ const M = Ea(async () => {
3457
3457
  var B;
3458
3458
  if (!F) {
3459
3459
  try {
@@ -3461,7 +3461,7 @@ function ta(e, t) {
3461
3461
  abi: n,
3462
3462
  address: r,
3463
3463
  args: s,
3464
- eventName: o,
3464
+ eventName: a,
3465
3465
  strict: m,
3466
3466
  fromBlock: i
3467
3467
  });
@@ -3473,14 +3473,14 @@ function ta(e, t) {
3473
3473
  try {
3474
3474
  let P;
3475
3475
  if (A)
3476
- P = await $(e, To, "getFilterChanges")({ filter: A });
3476
+ P = await $(e, ka, "getFilterChanges")({ filter: A });
3477
3477
  else {
3478
- const E = await $(e, ko, "getBlockNumber")({});
3479
- x && x < E ? P = await $(e, uo, "getContractEvents")({
3478
+ const E = await $(e, Ca, "getBlockNumber")({});
3479
+ x && x < E ? P = await $(e, ua, "getContractEvents")({
3480
3480
  abi: n,
3481
3481
  address: r,
3482
3482
  args: s,
3483
- eventName: o,
3483
+ eventName: a,
3484
3484
  fromBlock: x + 1n,
3485
3485
  toBlock: E,
3486
3486
  strict: m
@@ -3488,7 +3488,7 @@ function ta(e, t) {
3488
3488
  }
3489
3489
  if (P.length === 0)
3490
3490
  return;
3491
- if (a)
3491
+ if (o)
3492
3492
  g.onLogs(P);
3493
3493
  else
3494
3494
  for (const E of P)
@@ -3501,7 +3501,7 @@ function ta(e, t) {
3501
3501
  interval: l
3502
3502
  });
3503
3503
  return async () => {
3504
- A && await $(e, Io, "uninstallFilter")({ filter: A }), M();
3504
+ A && await $(e, Ta, "uninstallFilter")({ filter: A }), M();
3505
3505
  };
3506
3506
  });
3507
3507
  })() : (() => {
@@ -3509,9 +3509,9 @@ function ta(e, t) {
3509
3509
  "watchContractEvent",
3510
3510
  r,
3511
3511
  s,
3512
- a,
3513
- e.uid,
3514
3512
  o,
3513
+ e.uid,
3514
+ a,
3515
3515
  l,
3516
3516
  m
3517
3517
  ]);
@@ -3524,9 +3524,9 @@ function ta(e, t) {
3524
3524
  return P ? P.value : e.transport;
3525
3525
  }
3526
3526
  return e.transport;
3527
- })(), M = o ? tt({
3527
+ })(), M = a ? tt({
3528
3528
  abi: n,
3529
- eventName: o,
3529
+ eventName: a,
3530
3530
  args: s
3531
3531
  }) : [], { unsubscribe: B } = await F.subscribe({
3532
3532
  params: ["logs", { address: r, topics: M }],
@@ -3594,13 +3594,13 @@ class Be extends h {
3594
3594
  });
3595
3595
  }
3596
3596
  }
3597
- function Bo({ chain: e, currentChainId: t }) {
3597
+ function Ia({ chain: e, currentChainId: t }) {
3598
3598
  if (!e)
3599
3599
  throw new Qn();
3600
3600
  if (t !== e.id)
3601
3601
  throw new er({ chain: e, currentChainId: t });
3602
3602
  }
3603
- function Ro(e, { docsPath: t, ...n }) {
3603
+ function Ba(e, { docsPath: t, ...n }) {
3604
3604
  const r = (() => {
3605
3605
  const s = wt(e, n);
3606
3606
  return s instanceof we ? e : s;
@@ -3610,16 +3610,16 @@ function Ro(e, { docsPath: t, ...n }) {
3610
3610
  ...n
3611
3611
  });
3612
3612
  }
3613
- async function jo(e, { serializedTransaction: t }) {
3613
+ async function Ra(e, { serializedTransaction: t }) {
3614
3614
  return e.request({
3615
3615
  method: "eth_sendRawTransaction",
3616
3616
  params: [t]
3617
3617
  }, { retryCount: 0 });
3618
3618
  }
3619
3619
  const Re = new nr(128);
3620
- async function No(e, t) {
3620
+ async function ja(e, t) {
3621
3621
  var w, g, x, A;
3622
- const { account: n = e.account, chain: r = e.chain, accessList: s, authorizationList: a, blobs: o, data: i, gas: c, gasPrice: u, maxFeePerBlobGas: d, maxFeePerGas: l, maxPriorityFeePerGas: f, nonce: b, value: p, ...y } = t;
3622
+ const { account: n = e.account, chain: r = e.chain, accessList: s, authorizationList: o, blobs: a, data: i, gas: c, gasPrice: u, maxFeePerBlobGas: d, maxFeePerGas: l, maxPriorityFeePerGas: f, nonce: b, value: p, ...y } = t;
3623
3623
  if (typeof n > "u")
3624
3624
  throw new Nn({
3625
3625
  docsPath: "/docs/actions/wallet/sendTransaction"
@@ -3630,16 +3630,16 @@ async function No(e, t) {
3630
3630
  const F = await (async () => {
3631
3631
  if (t.to)
3632
3632
  return t.to;
3633
- if (t.to !== null && a && a.length > 0)
3633
+ if (t.to !== null && o && o.length > 0)
3634
3634
  return await En({
3635
- authorization: a[0]
3635
+ authorization: o[0]
3636
3636
  }).catch(() => {
3637
3637
  throw new h("`to` is required. Could not infer from `authorizationList`.");
3638
3638
  });
3639
3639
  })();
3640
3640
  if ((m == null ? void 0 : m.type) === "json-rpc" || m === null) {
3641
3641
  let M;
3642
- r !== null && (M = await $(e, Mn, "getChainId")({}), Bo({
3642
+ r !== null && (M = await $(e, Mn, "getChainId")({}), Ia({
3643
3643
  currentChainId: M,
3644
3644
  chain: r
3645
3645
  }));
@@ -3647,8 +3647,8 @@ async function No(e, t) {
3647
3647
  // Pick out extra data that might exist on the chain's transaction request type.
3648
3648
  ...vt(y, { format: B }),
3649
3649
  accessList: s,
3650
- authorizationList: a,
3651
- blobs: o,
3650
+ authorizationList: o,
3651
+ blobs: a,
3652
3652
  chainId: M,
3653
3653
  data: i,
3654
3654
  from: m == null ? void 0 : m.address,
@@ -3685,8 +3685,8 @@ async function No(e, t) {
3685
3685
  const M = await $(e, Cn, "prepareTransactionRequest")({
3686
3686
  account: m,
3687
3687
  accessList: s,
3688
- authorizationList: a,
3689
- blobs: o,
3688
+ authorizationList: o,
3689
+ blobs: a,
3690
3690
  chain: r,
3691
3691
  data: i,
3692
3692
  gas: c,
@@ -3703,7 +3703,7 @@ async function No(e, t) {
3703
3703
  }), B = (A = r == null ? void 0 : r.serializers) == null ? void 0 : A.transaction, P = await m.signTransaction(M, {
3704
3704
  serializer: B
3705
3705
  });
3706
- return await $(e, jo, "sendRawTransaction")({
3706
+ return await $(e, Ra, "sendRawTransaction")({
3707
3707
  serializedTransaction: P
3708
3708
  });
3709
3709
  }
@@ -3718,27 +3718,27 @@ async function No(e, t) {
3718
3718
  type: m == null ? void 0 : m.type
3719
3719
  });
3720
3720
  } catch (F) {
3721
- throw F instanceof Be ? F : Ro(F, {
3721
+ throw F instanceof Be ? F : Ba(F, {
3722
3722
  ...t,
3723
3723
  account: m,
3724
3724
  chain: t.chain || void 0
3725
3725
  });
3726
3726
  }
3727
3727
  }
3728
- async function na(e, t) {
3729
- const { abi: n, account: r = e.account, address: s, args: a, dataSuffix: o, functionName: i, ...c } = t;
3728
+ async function to(e, t) {
3729
+ const { abi: n, account: r = e.account, address: s, args: o, dataSuffix: a, functionName: i, ...c } = t;
3730
3730
  if (typeof r > "u")
3731
3731
  throw new Nn({
3732
3732
  docsPath: "/docs/contract/writeContract"
3733
3733
  });
3734
3734
  const u = r ? V(r) : null, d = ue({
3735
3735
  abi: n,
3736
- args: a,
3736
+ args: o,
3737
3737
  functionName: i
3738
3738
  });
3739
3739
  try {
3740
- return await $(e, No, "sendTransaction")({
3741
- data: `${d}${o ? o.replace("0x", "") : ""}`,
3740
+ return await $(e, ja, "sendTransaction")({
3741
+ data: `${d}${a ? a.replace("0x", "") : ""}`,
3742
3742
  to: s,
3743
3743
  account: u,
3744
3744
  ...c
@@ -3747,7 +3747,7 @@ async function na(e, t) {
3747
3747
  throw $e(l, {
3748
3748
  abi: n,
3749
3749
  address: s,
3750
- args: a,
3750
+ args: o,
3751
3751
  docsPath: "/docs/contract/writeContract",
3752
3752
  functionName: i,
3753
3753
  sender: u == null ? void 0 : u.address
@@ -3755,104 +3755,105 @@ async function na(e, t) {
3755
3755
  }
3756
3756
  }
3757
3757
  export {
3758
- xt as $,
3758
+ Fe as $,
3759
3759
  ot as A,
3760
- st as B,
3760
+ at as B,
3761
3761
  ht as C,
3762
- rt as D,
3763
- Lo as E,
3764
- ho as F,
3765
- Pn as G,
3766
- _o as H,
3767
- zo as I,
3762
+ st as D,
3763
+ rt as E,
3764
+ _a as F,
3765
+ ma as G,
3766
+ Da as H,
3767
+ Oa as I,
3768
3768
  ft as J,
3769
- Ds as K,
3769
+ Pn as K,
3770
3770
  lt as L,
3771
3771
  dt as M,
3772
- vs as N,
3773
- bo as O,
3772
+ Ds as N,
3773
+ vs as O,
3774
3774
  mt as P,
3775
- ue as Q,
3775
+ pa as Q,
3776
3776
  ct as R,
3777
3777
  gt as S,
3778
3778
  ut as T,
3779
3779
  pt as U,
3780
- Jo as V,
3781
- Zo as W,
3782
- Et as X,
3783
- Ko as Y,
3784
- Wo as Z,
3785
- Fe as _,
3786
- uo as a,
3787
- vt as a0,
3788
- yo as a1,
3789
- hs as a2,
3790
- tt as a3,
3791
- In as a4,
3792
- cs as a5,
3793
- Do as a6,
3794
- Go as a7,
3795
- ko as a8,
3796
- $e as a9,
3797
- qo as aA,
3798
- $n as aB,
3799
- Uo as aC,
3800
- Mn as aD,
3801
- so as aE,
3802
- kn as aF,
3803
- No as aG,
3804
- Nn as aH,
3805
- Bo as aI,
3806
- Zt as aa,
3807
- We as ab,
3808
- xn as ac,
3809
- An as ad,
3810
- wt as ae,
3811
- sr as af,
3812
- fo as ag,
3813
- Yo as ah,
3814
- Rn as ai,
3815
- Xo as aj,
3816
- Zs as ak,
3817
- zs as al,
3818
- Kt as am,
3819
- Ao as an,
3820
- mo as ao,
3821
- me as ap,
3822
- no as aq,
3823
- Tn as ar,
3824
- ye as as,
3825
- Ke as at,
3826
- To as au,
3827
- co as av,
3828
- Io as aw,
3829
- jo as ax,
3830
- Cn as ay,
3831
- ro as az,
3832
- na as b,
3780
+ ue as V,
3781
+ Ka as W,
3782
+ Va as X,
3783
+ Et as Y,
3784
+ Wa as Z,
3785
+ Za as _,
3786
+ ua as a,
3787
+ xt as a0,
3788
+ vt as a1,
3789
+ ba as a2,
3790
+ hs as a3,
3791
+ tt as a4,
3792
+ In as a5,
3793
+ cs as a6,
3794
+ Ga as a7,
3795
+ za as a8,
3796
+ Ca as a9,
3797
+ ra as aA,
3798
+ Ha as aB,
3799
+ $n as aC,
3800
+ qa as aD,
3801
+ Mn as aE,
3802
+ sa as aF,
3803
+ kn as aG,
3804
+ ja as aH,
3805
+ Nn as aI,
3806
+ Ia as aJ,
3807
+ $e as aa,
3808
+ Zt as ab,
3809
+ We as ac,
3810
+ xn as ad,
3811
+ An as ae,
3812
+ wt as af,
3813
+ sr as ag,
3814
+ la as ah,
3815
+ Ja as ai,
3816
+ Rn as aj,
3817
+ Ya as ak,
3818
+ Zs as al,
3819
+ zs as am,
3820
+ Kt as an,
3821
+ Ea as ao,
3822
+ ya as ap,
3823
+ me as aq,
3824
+ na as ar,
3825
+ Tn as as,
3826
+ ye as at,
3827
+ Ke as au,
3828
+ ka as av,
3829
+ ca as aw,
3830
+ Ta as ax,
3831
+ Ra as ay,
3832
+ Cn as az,
3833
+ $s as b,
3833
3834
  gs as c,
3834
- nt as d,
3835
- Vo as e,
3836
- ne as f,
3835
+ to as d,
3836
+ Ua as e,
3837
+ nt as f,
3837
3838
  $ as g,
3838
- Bs as h,
3839
- oo as i,
3840
- jn as j,
3841
- Je as k,
3842
- Jt as l,
3843
- Hr as m,
3844
- un as n,
3845
- V as o,
3839
+ ne as h,
3840
+ Bs as i,
3841
+ aa as j,
3842
+ jn as k,
3843
+ Je as l,
3844
+ Jt as m,
3845
+ Hr as n,
3846
+ un as o,
3846
3847
  Tr as p,
3847
- Ho as q,
3848
- Qo as r,
3849
- ea as s,
3850
- yt as t,
3851
- bt as u,
3852
- it as v,
3853
- ta as w,
3854
- Ae as x,
3855
- Ee as y,
3856
- at as z
3848
+ V as q,
3849
+ Xa as r,
3850
+ Qa as s,
3851
+ La as t,
3852
+ yt as u,
3853
+ bt as v,
3854
+ eo as w,
3855
+ it as x,
3856
+ Ae as y,
3857
+ Ee as z
3857
3858
  };
3858
- //# sourceMappingURL=writeContract-DlZ0jYhZ.js.map
3859
+ //# sourceMappingURL=writeContract-BU3yK-Xj.js.map