@pufferfinance/puffer-sdk 1.12.2 → 1.13.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 (156) hide show
  1. package/dist/api/puffer-client-helpers.cjs +1 -1
  2. package/dist/api/puffer-client-helpers.cjs.map +1 -1
  3. package/dist/api/puffer-client-helpers.js +70 -65
  4. package/dist/api/puffer-client-helpers.js.map +1 -1
  5. package/dist/api/puffer-client.cjs +1 -1
  6. package/dist/api/puffer-client.cjs.map +1 -1
  7. package/dist/api/puffer-client.d.ts +3 -0
  8. package/dist/api/puffer-client.js +20 -13
  9. package/dist/api/puffer-client.js.map +1 -1
  10. package/dist/{ccip-BO_b9tFc.cjs → ccip-C0xwQhXU.cjs} +2 -2
  11. package/dist/ccip-C0xwQhXU.cjs.map +1 -0
  12. package/dist/{ccip-DLDO0_x2.js → ccip-K-z2PL4P.js} +3 -3
  13. package/dist/ccip-K-z2PL4P.js.map +1 -0
  14. package/dist/chains/constants.cjs +1 -1
  15. package/dist/chains/constants.js +1 -1
  16. package/dist/constants-BcPRVxdH.cjs +9 -0
  17. package/dist/constants-BcPRVxdH.cjs.map +1 -0
  18. package/dist/{constants-BjRNQpT2.js → constants-CH7Tz5jz.js} +745 -694
  19. package/dist/constants-CH7Tz5jz.js.map +1 -0
  20. package/dist/contracts/abis/l1-reward-manager-abis.cjs +1 -1
  21. package/dist/contracts/abis/l1-reward-manager-abis.d.ts +527 -1
  22. package/dist/contracts/abis/l1-reward-manager-abis.js +1 -1
  23. package/dist/contracts/abis/l2-reward-manager-abis.cjs +1 -1
  24. package/dist/contracts/abis/l2-reward-manager-abis.d.ts +1416 -1
  25. package/dist/contracts/abis/l2-reward-manager-abis.js +1 -1
  26. package/dist/contracts/abis/mainnet/Distributor.cjs +2 -0
  27. package/dist/contracts/abis/mainnet/Distributor.cjs.map +1 -0
  28. package/dist/contracts/abis/mainnet/Distributor.d.ts +618 -0
  29. package/dist/contracts/abis/mainnet/Distributor.js +492 -0
  30. package/dist/contracts/abis/mainnet/Distributor.js.map +1 -0
  31. package/dist/contracts/abis/nucleus-accountant-abis.cjs +1 -1
  32. package/dist/contracts/abis/nucleus-accountant-abis.d.ts +2 -1
  33. package/dist/contracts/abis/nucleus-accountant-abis.js +1 -1
  34. package/dist/contracts/abis/nucleus-atomic-queue-abis.cjs +1 -1
  35. package/dist/contracts/abis/nucleus-atomic-queue-abis.d.ts +2 -1
  36. package/dist/contracts/abis/nucleus-atomic-queue-abis.js +1 -1
  37. package/dist/contracts/abis/nucleus-boring-vault-abis.cjs +1 -1
  38. package/dist/contracts/abis/nucleus-boring-vault-abis.d.ts +2 -1
  39. package/dist/contracts/abis/nucleus-boring-vault-abis.js +1 -1
  40. package/dist/contracts/abis/nucleus-teller-abis.cjs +1 -1
  41. package/dist/contracts/abis/nucleus-teller-abis.d.ts +2 -1
  42. package/dist/contracts/abis/nucleus-teller-abis.js +1 -1
  43. package/dist/contracts/abis/puf-locker-abis.cjs +1 -1
  44. package/dist/contracts/abis/puf-locker-abis.d.ts +484 -1
  45. package/dist/contracts/abis/puf-locker-abis.js +1 -1
  46. package/dist/contracts/abis/puffer-depositor-abis.cjs +1 -1
  47. package/dist/contracts/abis/puffer-depositor-abis.d.ts +663 -2
  48. package/dist/contracts/abis/puffer-depositor-abis.js +1 -1
  49. package/dist/contracts/abis/puffer-vault-abis.cjs +1 -1
  50. package/dist/contracts/abis/puffer-vault-abis.d.ts +4 -2
  51. package/dist/contracts/abis/puffer-vault-abis.js +1 -1
  52. package/dist/contracts/abis/puffer-withdrawal-manager-abis.cjs +1 -1
  53. package/dist/contracts/abis/puffer-withdrawal-manager-abis.d.ts +514 -1
  54. package/dist/contracts/abis/puffer-withdrawal-manager-abis.js +1 -1
  55. package/dist/contracts/addresses.cjs +1 -1
  56. package/dist/contracts/addresses.cjs.map +1 -1
  57. package/dist/contracts/addresses.d.ts +7 -13
  58. package/dist/contracts/addresses.js +6 -5
  59. package/dist/contracts/addresses.js.map +1 -1
  60. package/dist/contracts/handlers/carrot-staking-handler.cjs +1 -1
  61. package/dist/contracts/handlers/carrot-staking-handler.js +2 -2
  62. package/dist/contracts/handlers/distributor-handler.cjs +2 -0
  63. package/dist/contracts/handlers/distributor-handler.cjs.map +1 -0
  64. package/dist/contracts/handlers/distributor-handler.js +318 -0
  65. package/dist/contracts/handlers/distributor-handler.js.map +1 -0
  66. package/dist/contracts/handlers/erc20-permit-handler.cjs +1 -1
  67. package/dist/contracts/handlers/erc20-permit-handler.cjs.map +1 -1
  68. package/dist/contracts/handlers/erc20-permit-handler.d.ts +17101 -14898
  69. package/dist/contracts/handlers/erc20-permit-handler.js +3 -3
  70. package/dist/contracts/handlers/erc20-permit-handler.js.map +1 -1
  71. package/dist/contracts/handlers/l1-reward-manager-handler.cjs +1 -1
  72. package/dist/contracts/handlers/l1-reward-manager-handler.js +2 -2
  73. package/dist/contracts/handlers/l2-reward-manager-handler.cjs +1 -1
  74. package/dist/contracts/handlers/l2-reward-manager-handler.js +2 -2
  75. package/dist/contracts/handlers/mtw-carrot-handler.cjs +1 -1
  76. package/dist/contracts/handlers/mtw-carrot-handler.js +2 -2
  77. package/dist/contracts/handlers/nucleus-accountant-handler.cjs +1 -1
  78. package/dist/contracts/handlers/nucleus-accountant-handler.js +1 -1
  79. package/dist/contracts/handlers/nucleus-atomic-queue-handler.cjs +1 -1
  80. package/dist/contracts/handlers/nucleus-atomic-queue-handler.cjs.map +1 -1
  81. package/dist/contracts/handlers/nucleus-atomic-queue-handler.d.ts +7619 -14812
  82. package/dist/contracts/handlers/nucleus-atomic-queue-handler.js +2 -2
  83. package/dist/contracts/handlers/nucleus-atomic-queue-handler.js.map +1 -1
  84. package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs +1 -1
  85. package/dist/contracts/handlers/nucleus-boring-vault-handler.js +2 -2
  86. package/dist/contracts/handlers/nucleus-teller-handler.cjs +1 -1
  87. package/dist/contracts/handlers/nucleus-teller-handler.js +2 -2
  88. package/dist/contracts/handlers/puf-locker-handler.cjs +1 -1
  89. package/dist/contracts/handlers/puf-locker-handler.cjs.map +1 -1
  90. package/dist/contracts/handlers/puf-locker-handler.js +2 -2
  91. package/dist/contracts/handlers/puf-locker-handler.js.map +1 -1
  92. package/dist/contracts/handlers/puffer-depositor-handler.cjs +1 -1
  93. package/dist/contracts/handlers/puffer-depositor-handler.d.ts +11215 -14794
  94. package/dist/contracts/handlers/puffer-depositor-handler.js +2 -2
  95. package/dist/contracts/handlers/puffer-l2-depositor-handler.cjs +1 -1
  96. package/dist/contracts/handlers/puffer-l2-depositor-handler.js +2 -2
  97. package/dist/contracts/handlers/puffer-vault-handler.cjs +1 -1
  98. package/dist/contracts/handlers/puffer-vault-handler.js +2 -2
  99. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.cjs +1 -1
  100. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.js +2 -2
  101. package/dist/contracts/tokens.cjs +1 -1
  102. package/dist/contracts/tokens.js +1 -1
  103. package/dist/contracts/vaults-addresses.cjs +1 -1
  104. package/dist/contracts/vaults-addresses.d.ts +5 -4
  105. package/dist/contracts/vaults-addresses.js +1 -1
  106. package/dist/createWalletClient-DNLhBkOd.js +3289 -0
  107. package/dist/createWalletClient-DNLhBkOd.js.map +1 -0
  108. package/dist/createWalletClient-Di5of07E.cjs +6 -0
  109. package/dist/createWalletClient-Di5of07E.cjs.map +1 -0
  110. package/dist/{getContract-CezEyDf-.js → getContract-6ajhFbP2.js} +2 -2
  111. package/dist/getContract-6ajhFbP2.js.map +1 -0
  112. package/dist/{getContract-3QbyfZBF.cjs → getContract-ChPFzc5y.cjs} +2 -2
  113. package/dist/{getContract-CezEyDf-.js.map → getContract-ChPFzc5y.cjs.map} +1 -1
  114. package/dist/main.cjs +1 -1
  115. package/dist/main.d.ts +1 -0
  116. package/dist/main.js +13 -11
  117. package/dist/main.js.map +1 -1
  118. package/dist/secp256k1-B8plqpXf.cjs +2 -0
  119. package/dist/secp256k1-B8plqpXf.cjs.map +1 -0
  120. package/dist/secp256k1-Ev0s9Yr6.js +1340 -0
  121. package/dist/secp256k1-Ev0s9Yr6.js.map +1 -0
  122. package/dist/utils/version.cjs +1 -1
  123. package/dist/utils/version.js +1 -1
  124. package/dist/writeContract-BatuNuTe.cjs +32 -0
  125. package/dist/writeContract-BatuNuTe.cjs.map +1 -0
  126. package/dist/{writeContract-ChuHpJLC.js → writeContract-CjcOEtWX.js} +822 -763
  127. package/dist/writeContract-CjcOEtWX.js.map +1 -0
  128. package/package.json +15 -15
  129. package/dist/ccip-BO_b9tFc.cjs.map +0 -1
  130. package/dist/ccip-DLDO0_x2.js.map +0 -1
  131. package/dist/constants-BjRNQpT2.js.map +0 -1
  132. package/dist/constants-DA2xUb9r.cjs +0 -9
  133. package/dist/constants-DA2xUb9r.cjs.map +0 -1
  134. package/dist/contracts/handlers/carrot-staking-handler.d.ts +0 -15063
  135. package/dist/contracts/handlers/l1-reward-manager-handler.d.ts +0 -15107
  136. package/dist/contracts/handlers/l2-reward-manager-handler.d.ts +0 -15353
  137. package/dist/contracts/handlers/mtw-carrot-handler.d.ts +0 -15293
  138. package/dist/contracts/handlers/nucleus-accountant-handler.d.ts +0 -15126
  139. package/dist/contracts/handlers/nucleus-boring-vault-handler.d.ts +0 -15284
  140. package/dist/contracts/handlers/nucleus-teller-handler.d.ts +0 -15201
  141. package/dist/contracts/handlers/puf-locker-handler.d.ts +0 -15116
  142. package/dist/contracts/handlers/puffer-l2-depositor-handler.d.ts +0 -14969
  143. package/dist/contracts/handlers/puffer-vault-handler.d.ts +0 -17452
  144. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.d.ts +0 -15111
  145. package/dist/createWalletClient-BuLYysrp.cjs +0 -4
  146. package/dist/createWalletClient-BuLYysrp.cjs.map +0 -1
  147. package/dist/createWalletClient-DNcW-ENe.js +0 -2028
  148. package/dist/createWalletClient-DNcW-ENe.js.map +0 -1
  149. package/dist/getContract-3QbyfZBF.cjs.map +0 -1
  150. package/dist/secp256k1-3OC5y4qp.js +0 -1579
  151. package/dist/secp256k1-3OC5y4qp.js.map +0 -1
  152. package/dist/secp256k1-bcahnPX9.cjs +0 -2
  153. package/dist/secp256k1-bcahnPX9.cjs.map +0 -1
  154. package/dist/writeContract-ChuHpJLC.js.map +0 -1
  155. package/dist/writeContract-D97dSJQe.cjs +0 -32
  156. package/dist/writeContract-D97dSJQe.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
- import { B as h, j as D, k as ie, t as qe, n as v, c as ee, g as H, I as te, p as K, z as In, A as jn, s as Nn, D as le, i as je, m as Ue, E as he, b as Y, v as fe, e as Ve, F as On, h as ge, o as Jt, G as zn, y as Yt, H as Gn, J as Ze, K as Xt, M as J, d as At, N as Dn, O as de, P as Ne, Q as Ft, R as Mt, S as St, U as Ct, X as Tt, Y as kt, Z as Bt, _ as Rt, $ as Oe, a0 as we, a1 as It, a2 as _n, a3 as Ln, a4 as Hn, a5 as qn, a6 as Un, a7 as Vn, a8 as Zn, a9 as Wn, aa as Kn, f as pe, ab as ze, ac as Qt, ad as Jn, ae as Yn, af as Xn, L as Qn } from "./constants-BjRNQpT2.js";
2
- const er = "1.0.7";
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-CH7Tz5jz.js";
2
+ const rr = "1.0.8";
3
3
  class C extends Error {
4
4
  constructor(t, n = {}) {
5
5
  var o;
@@ -9,7 +9,7 @@ class C extends Error {
9
9
  ...n.metaMessages ? [...n.metaMessages, ""] : [],
10
10
  ...s ? [`Docs: https://abitype.dev${s}`] : [],
11
11
  ...r ? [`Details: ${r}`] : [],
12
- `Version: abitype@${er}`
12
+ `Version: abitype@${rr}`
13
13
  ].join(`
14
14
  `);
15
15
  super(a), Object.defineProperty(this, "details", {
@@ -40,11 +40,11 @@ class C extends Error {
40
40
  }), n.cause && (this.cause = n.cause), this.details = r, this.docsPath = s, this.metaMessages = n.metaMessages, this.shortMessage = t;
41
41
  }
42
42
  }
43
- function V(e, t) {
43
+ function U(e, t) {
44
44
  const n = e.exec(t);
45
45
  return n == null ? void 0 : n.groups;
46
46
  }
47
- const en = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, tn = /^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)?$/, nn = /^\(.+?\).*?$/, jt = /^tuple(?<array>(\[(\d*)\])*)$/;
47
+ const tn = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, nn = /^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)?$/, rn = /^\(.+?\).*?$/, jt = /^tuple(?<array>(\[(\d*)\])*)$/;
48
48
  function Ge(e) {
49
49
  let t = e.type;
50
50
  if (jt.test(e.type) && "components" in e) {
@@ -54,7 +54,7 @@ function Ge(e) {
54
54
  const a = e.components[s];
55
55
  t += Ge(a), s < n - 1 && (t += ", ");
56
56
  }
57
- const r = V(jt, e.type);
57
+ const r = U(jt, e.type);
58
58
  return t += `)${(r == null ? void 0 : r.array) ?? ""}`, Ge({
59
59
  ...e,
60
60
  type: t
@@ -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 se(e) {
65
+ function oe(e) {
66
66
  let t = "";
67
67
  const n = e.length;
68
68
  for (let r = 0; r < n; r++) {
@@ -71,59 +71,75 @@ function se(e) {
71
71
  }
72
72
  return t;
73
73
  }
74
- function tr(e) {
75
- var t;
76
- return e.type === "function" ? `function ${e.name}(${se(e.inputs)})${e.stateMutability && e.stateMutability !== "nonpayable" ? ` ${e.stateMutability}` : ""}${(t = e.outputs) != null && t.length ? ` returns (${se(e.outputs)})` : ""}` : e.type === "event" ? `event ${e.name}(${se(e.inputs)})` : e.type === "error" ? `error ${e.name}(${se(e.inputs)})` : e.type === "constructor" ? `constructor(${se(e.inputs)})${e.stateMutability === "payable" ? " payable" : ""}` : e.type === "fallback" ? `fallback() external${e.stateMutability === "payable" ? " payable" : ""}` : "receive() external payable";
77
- }
78
- const rn = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
79
- function nr(e) {
80
- return rn.test(e);
81
- }
82
- function rr(e) {
83
- return V(rn, e);
84
- }
85
- const sn = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
86
74
  function sr(e) {
87
- return sn.test(e);
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";
88
77
  }
78
+ const sn = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
89
79
  function or(e) {
90
- return V(sn, e);
80
+ return sn.test(e);
91
81
  }
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
82
  function ar(e) {
94
- return on.test(e);
83
+ return U(sn, e);
95
84
  }
85
+ const on = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
96
86
  function ir(e) {
97
- return V(on, e);
98
- }
99
- const an = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;
100
- function cn(e) {
101
- return an.test(e);
87
+ return on.test(e);
102
88
  }
103
89
  function cr(e) {
104
- return V(an, e);
90
+ return U(on, e);
105
91
  }
106
- const un = /^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;
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>.*?)\))?$/;
107
93
  function ur(e) {
108
- return un.test(e);
94
+ return an.test(e);
109
95
  }
110
96
  function dr(e) {
111
- return V(un, e);
97
+ return U(an, e);
98
+ }
99
+ const cn = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;
100
+ function un(e) {
101
+ return cn.test(e);
102
+ }
103
+ function lr(e) {
104
+ return U(cn, e);
112
105
  }
113
- const lr = /^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;
106
+ const dn = /^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;
114
107
  function fr(e) {
115
- return lr.test(e);
108
+ return dn.test(e);
109
+ }
110
+ function pr(e) {
111
+ return U(dn, e);
112
+ }
113
+ const ln = /^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;
114
+ function br(e) {
115
+ return ln.test(e);
116
116
  }
117
- const pr = /^receive\(\) external payable$/;
118
117
  function yr(e) {
119
- return pr.test(e);
118
+ return U(ln, e);
119
+ }
120
+ const mr = /^receive\(\) external payable$/;
121
+ function hr(e) {
122
+ return mr.test(e);
120
123
  }
121
- const br = /* @__PURE__ */ new Set(["indexed"]), De = /* @__PURE__ */ new Set([
124
+ const gr = /* @__PURE__ */ new Set(["indexed"]), De = /* @__PURE__ */ new Set([
122
125
  "calldata",
123
126
  "memory",
124
127
  "storage"
125
128
  ]);
126
- class mr extends C {
129
+ class zo extends C {
130
+ constructor({ signature: t }) {
131
+ super("Failed to parse ABI item.", {
132
+ details: `parseAbiItem(${JSON.stringify(t, null, 2)})`,
133
+ docsPath: "/api/human#parseabiitem-1"
134
+ }), Object.defineProperty(this, "name", {
135
+ enumerable: !0,
136
+ configurable: !0,
137
+ writable: !0,
138
+ value: "InvalidAbiItemError"
139
+ });
140
+ }
141
+ }
142
+ class wr extends C {
127
143
  constructor({ type: t }) {
128
144
  super("Unknown type.", {
129
145
  metaMessages: [
@@ -137,7 +153,7 @@ class mr extends C {
137
153
  });
138
154
  }
139
155
  }
140
- class hr extends C {
156
+ class vr extends C {
141
157
  constructor({ type: t }) {
142
158
  super("Unknown type.", {
143
159
  metaMessages: [`Type "${t}" is not a valid ABI type.`]
@@ -149,7 +165,7 @@ class hr extends C {
149
165
  });
150
166
  }
151
167
  }
152
- class gr extends C {
168
+ class xr extends C {
153
169
  constructor({ param: t }) {
154
170
  super("Invalid ABI parameter.", {
155
171
  details: t
@@ -161,7 +177,7 @@ class gr extends C {
161
177
  });
162
178
  }
163
179
  }
164
- class wr extends C {
180
+ class Pr extends C {
165
181
  constructor({ param: t, name: n }) {
166
182
  super("Invalid ABI parameter.", {
167
183
  details: t,
@@ -176,7 +192,7 @@ class wr extends C {
176
192
  });
177
193
  }
178
194
  }
179
- class vr extends C {
195
+ class Er extends C {
180
196
  constructor({ param: t, type: n, modifier: r }) {
181
197
  super("Invalid ABI parameter.", {
182
198
  details: t,
@@ -191,7 +207,7 @@ class vr extends C {
191
207
  });
192
208
  }
193
209
  }
194
- class xr extends C {
210
+ class Ar extends C {
195
211
  constructor({ param: t, type: n, modifier: r }) {
196
212
  super("Invalid ABI parameter.", {
197
213
  details: t,
@@ -207,7 +223,7 @@ class xr extends C {
207
223
  });
208
224
  }
209
225
  }
210
- class Pr extends C {
226
+ class $r extends C {
211
227
  constructor({ abiParameter: t }) {
212
228
  super("Invalid ABI parameter.", {
213
229
  details: JSON.stringify(t, null, 2),
@@ -220,7 +236,7 @@ class Pr extends C {
220
236
  });
221
237
  }
222
238
  }
223
- class oe extends C {
239
+ class re extends C {
224
240
  constructor({ signature: t, type: n }) {
225
241
  super(`Invalid ${n} signature.`, {
226
242
  details: t
@@ -232,7 +248,7 @@ class oe extends C {
232
248
  });
233
249
  }
234
250
  }
235
- class Er extends C {
251
+ class Fr extends C {
236
252
  constructor({ signature: t }) {
237
253
  super("Unknown signature.", {
238
254
  details: t
@@ -244,7 +260,7 @@ class Er extends C {
244
260
  });
245
261
  }
246
262
  }
247
- class $r extends C {
263
+ class Mr extends C {
248
264
  constructor({ signature: t }) {
249
265
  super("Invalid struct signature.", {
250
266
  details: t,
@@ -257,7 +273,7 @@ class $r extends C {
257
273
  });
258
274
  }
259
275
  }
260
- class Ar extends C {
276
+ class Sr extends C {
261
277
  constructor({ type: t }) {
262
278
  super("Circular reference detected.", {
263
279
  metaMessages: [`Struct "${t}" is a circular reference.`]
@@ -269,7 +285,7 @@ class Ar extends C {
269
285
  });
270
286
  }
271
287
  }
272
- class Fr extends C {
288
+ class Cr extends C {
273
289
  constructor({ current: t, depth: n }) {
274
290
  super("Unbalanced parentheses.", {
275
291
  metaMessages: [
@@ -284,7 +300,7 @@ class Fr extends C {
284
300
  });
285
301
  }
286
302
  }
287
- function Mr(e, t, n) {
303
+ function kr(e, t, n) {
288
304
  let r = "";
289
305
  if (n)
290
306
  for (const s of Object.entries(n)) {
@@ -351,114 +367,131 @@ const Se = /* @__PURE__ */ new Map([
351
367
  { type: "uint256", name: "tokenId", indexed: !0 }
352
368
  ]
353
369
  ]);
354
- function Sr(e, t = {}) {
355
- if (ar(e)) {
356
- const n = ir(e);
357
- if (!n)
358
- throw new oe({ signature: e, type: "function" });
359
- const r = G(n.parameters), s = [], a = r.length;
360
- for (let i = 0; i < a; i++)
361
- s.push(W(r[i], {
362
- modifiers: De,
363
- structs: t,
364
- type: "function"
365
- }));
366
- const o = [];
367
- if (n.returns) {
368
- const i = G(n.returns), c = i.length;
369
- for (let u = 0; u < c; u++)
370
- o.push(W(i[u], {
371
- modifiers: De,
372
- structs: t,
373
- type: "function"
374
- }));
375
- }
376
- return {
377
- name: n.name,
378
- type: "function",
379
- stateMutability: n.stateMutability ?? "nonpayable",
380
- inputs: s,
381
- outputs: o
382
- };
383
- }
384
- if (sr(e)) {
385
- const n = or(e);
386
- if (!n)
387
- throw new oe({ signature: e, type: "event" });
388
- const r = G(n.parameters), s = [], a = r.length;
389
- for (let o = 0; o < a; o++)
390
- s.push(W(r[o], {
391
- modifiers: br,
392
- structs: t,
393
- type: "event"
394
- }));
395
- return { name: n.name, type: "event", inputs: s };
396
- }
397
- if (nr(e)) {
398
- const n = rr(e);
399
- if (!n)
400
- throw new oe({ signature: e, type: "error" });
401
- const r = G(n.parameters), s = [], a = r.length;
402
- for (let o = 0; o < a; o++)
403
- s.push(W(r[o], { structs: t, type: "error" }));
404
- return { name: n.name, type: "error", inputs: s };
405
- }
406
- if (ur(e)) {
407
- const n = dr(e);
408
- if (!n)
409
- throw new oe({ signature: e, type: "constructor" });
410
- const r = G(n.parameters), s = [], a = r.length;
411
- for (let o = 0; o < a; o++)
412
- s.push(W(r[o], { structs: t, type: "constructor" }));
413
- return {
414
- type: "constructor",
415
- stateMutability: n.stateMutability ?? "nonpayable",
416
- inputs: s
417
- };
418
- }
370
+ function Tr(e, t = {}) {
371
+ if (ur(e))
372
+ return Ir(e, t);
373
+ if (ir(e))
374
+ return Br(e, t);
375
+ if (or(e))
376
+ return Rr(e, t);
419
377
  if (fr(e))
420
- return { type: "fallback" };
421
- if (yr(e))
378
+ return jr(e, t);
379
+ if (br(e))
380
+ return Nr(e);
381
+ if (hr(e))
422
382
  return {
423
383
  type: "receive",
424
384
  stateMutability: "payable"
425
385
  };
426
- throw new Er({ signature: e });
386
+ throw new Fr({ signature: e });
387
+ }
388
+ function Ir(e, t = {}) {
389
+ const n = dr(e);
390
+ if (!n)
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++)
394
+ s.push(Y(r[i], {
395
+ modifiers: De,
396
+ structs: t,
397
+ type: "function"
398
+ }));
399
+ const o = [];
400
+ if (n.returns) {
401
+ const i = G(n.returns), c = i.length;
402
+ for (let u = 0; u < c; u++)
403
+ o.push(Y(i[u], {
404
+ modifiers: De,
405
+ structs: t,
406
+ type: "function"
407
+ }));
408
+ }
409
+ return {
410
+ name: n.name,
411
+ type: "function",
412
+ stateMutability: n.stateMutability ?? "nonpayable",
413
+ inputs: s,
414
+ outputs: o
415
+ };
416
+ }
417
+ function Br(e, t = {}) {
418
+ const n = cr(e);
419
+ if (!n)
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], {
424
+ modifiers: gr,
425
+ structs: t,
426
+ type: "event"
427
+ }));
428
+ return { name: n.name, type: "event", inputs: s };
429
+ }
430
+ function Rr(e, t = {}) {
431
+ const n = ar(e);
432
+ if (!n)
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" }));
437
+ return { name: n.name, type: "error", inputs: s };
438
+ }
439
+ function jr(e, t = {}) {
440
+ const n = pr(e);
441
+ if (!n)
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" }));
446
+ return {
447
+ type: "constructor",
448
+ stateMutability: n.stateMutability ?? "nonpayable",
449
+ inputs: s
450
+ };
427
451
  }
428
- const Cr = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, Tr = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, kr = /^u?int$/;
429
- function W(e, t) {
452
+ function Nr(e) {
453
+ const t = yr(e);
454
+ if (!t)
455
+ throw new re({ signature: e, type: "fallback" });
456
+ return {
457
+ type: "fallback",
458
+ stateMutability: t.stateMutability ?? "nonpayable"
459
+ };
460
+ }
461
+ const Or = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, zr = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/, Gr = /^u?int$/;
462
+ function Y(e, t) {
430
463
  var l, f;
431
- const n = Mr(e, t == null ? void 0 : t.type, t == null ? void 0 : t.structs);
464
+ const n = kr(e, t == null ? void 0 : t.type, t == null ? void 0 : t.structs);
432
465
  if (Se.has(n))
433
466
  return Se.get(n);
434
- const r = nn.test(e), s = V(r ? Tr : Cr, e);
467
+ const r = rn.test(e), s = U(r ? zr : Or, e);
435
468
  if (!s)
436
- throw new gr({ param: e });
437
- if (s.name && Rr(s.name))
438
- throw new wr({ param: e, name: s.name });
469
+ throw new xr({ param: e });
470
+ if (s.name && _r(s.name))
471
+ throw new Pr({ param: e, name: s.name });
439
472
  const a = s.name ? { name: s.name } : {}, o = s.modifier === "indexed" ? { indexed: !0 } : {}, i = (t == null ? void 0 : t.structs) ?? {};
440
473
  let c, u = {};
441
474
  if (r) {
442
475
  c = "tuple";
443
- const y = G(s.type), p = [], b = y.length;
444
- for (let m = 0; m < b; m++)
445
- p.push(W(y[m], { structs: i }));
476
+ const b = G(s.type), p = [], y = b.length;
477
+ for (let m = 0; m < y; m++)
478
+ p.push(Y(b[m], { structs: i }));
446
479
  u = { components: p };
447
480
  } else if (s.type in i)
448
481
  c = "tuple", u = { components: i[s.type] };
449
- else if (kr.test(s.type))
482
+ else if (Gr.test(s.type))
450
483
  c = `${s.type}256`;
451
- else if (c = s.type, (t == null ? void 0 : t.type) !== "struct" && !dn(c))
452
- throw new hr({ type: c });
484
+ else if (c = s.type, (t == null ? void 0 : t.type) !== "struct" && !fn(c))
485
+ throw new vr({ type: c });
453
486
  if (s.modifier) {
454
487
  if (!((f = (l = t == null ? void 0 : t.modifiers) == null ? void 0 : l.has) != null && f.call(l, s.modifier)))
455
- throw new vr({
488
+ throw new Er({
456
489
  param: e,
457
490
  type: t == null ? void 0 : t.type,
458
491
  modifier: s.modifier
459
492
  });
460
- if (De.has(s.modifier) && !Ir(c, !!s.array))
461
- throw new xr({
493
+ if (De.has(s.modifier) && !Lr(c, !!s.array))
494
+ throw new Ar({
462
495
  param: e,
463
496
  type: t == null ? void 0 : t.type,
464
497
  modifier: s.modifier
@@ -490,86 +523,86 @@ function G(e, t = [], n = "", r = 0) {
490
523
  if (n === "")
491
524
  return t;
492
525
  if (r !== 0)
493
- throw new Fr({ current: n, depth: r });
526
+ throw new Cr({ current: n, depth: r });
494
527
  return t.push(n.trim()), t;
495
528
  }
496
- function dn(e) {
497
- return e === "address" || e === "bool" || e === "function" || e === "string" || en.test(e) || tn.test(e);
529
+ function fn(e) {
530
+ return e === "address" || e === "bool" || e === "function" || e === "string" || tn.test(e) || nn.test(e);
498
531
  }
499
- const Br = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;
500
- function Rr(e) {
501
- return e === "address" || e === "bool" || e === "function" || e === "string" || e === "tuple" || en.test(e) || tn.test(e) || Br.test(e);
532
+ const Dr = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;
533
+ function _r(e) {
534
+ return e === "address" || e === "bool" || e === "function" || e === "string" || e === "tuple" || tn.test(e) || nn.test(e) || Dr.test(e);
502
535
  }
503
- function Ir(e, t) {
536
+ function Lr(e, t) {
504
537
  return t || e === "bytes" || e === "string" || e === "tuple";
505
538
  }
506
- function jr(e) {
539
+ function Hr(e) {
507
540
  const t = {}, n = e.length;
508
541
  for (let o = 0; o < n; o++) {
509
542
  const i = e[o];
510
- if (!cn(i))
543
+ if (!un(i))
511
544
  continue;
512
- const c = cr(i);
545
+ const c = lr(i);
513
546
  if (!c)
514
- throw new oe({ signature: i, type: "struct" });
547
+ throw new re({ signature: i, type: "struct" });
515
548
  const u = c.properties.split(";"), d = [], l = u.length;
516
549
  for (let f = 0; f < l; f++) {
517
550
  const p = u[f].trim();
518
551
  if (!p)
519
552
  continue;
520
- const b = W(p, {
553
+ const y = Y(p, {
521
554
  type: "struct"
522
555
  });
523
- d.push(b);
556
+ d.push(y);
524
557
  }
525
558
  if (!d.length)
526
- throw new $r({ signature: i });
559
+ throw new Mr({ signature: i });
527
560
  t[c.name] = d;
528
561
  }
529
562
  const r = {}, s = Object.entries(t), a = s.length;
530
563
  for (let o = 0; o < a; o++) {
531
564
  const [i, c] = s[o];
532
- r[i] = ln(c, t);
565
+ r[i] = pn(c, t);
533
566
  }
534
567
  return r;
535
568
  }
536
- const Nr = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;
537
- function ln(e, t, n = /* @__PURE__ */ new Set()) {
569
+ const qr = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;
570
+ function pn(e, t, n = /* @__PURE__ */ new Set()) {
538
571
  const r = [], s = e.length;
539
572
  for (let a = 0; a < s; a++) {
540
573
  const o = e[a];
541
- if (nn.test(o.type))
574
+ if (rn.test(o.type))
542
575
  r.push(o);
543
576
  else {
544
- const c = V(Nr, o.type);
577
+ const c = U(qr, o.type);
545
578
  if (!(c != null && c.type))
546
- throw new Pr({ abiParameter: o });
579
+ throw new $r({ abiParameter: o });
547
580
  const { array: u, type: d } = c;
548
581
  if (d in t) {
549
582
  if (n.has(d))
550
- throw new Ar({ type: d });
583
+ throw new Sr({ type: d });
551
584
  r.push({
552
585
  ...o,
553
586
  type: `tuple${u ?? ""}`,
554
- components: ln(t[d] ?? [], t, /* @__PURE__ */ new Set([...n, d]))
587
+ components: pn(t[d] ?? [], t, /* @__PURE__ */ new Set([...n, d]))
555
588
  });
556
- } else if (dn(d))
589
+ } else if (fn(d))
557
590
  r.push(o);
558
591
  else
559
- throw new mr({ type: d });
592
+ throw new wr({ type: d });
560
593
  }
561
594
  }
562
595
  return r;
563
596
  }
564
- function fn(e) {
565
- const t = jr(e), n = [], r = e.length;
597
+ function bn(e) {
598
+ const t = Hr(e), n = [], r = e.length;
566
599
  for (let s = 0; s < r; s++) {
567
600
  const a = e[s];
568
- cn(a) || n.push(Sr(a, t));
601
+ un(a) || n.push(Tr(a, t));
569
602
  }
570
603
  return n;
571
604
  }
572
- function A(e, t, n) {
605
+ function $(e, t, n) {
573
606
  const r = e[t.name];
574
607
  if (typeof r == "function")
575
608
  return r;
@@ -578,16 +611,16 @@ function A(e, t, n) {
578
611
  }
579
612
  function q(e, { includeName: t = !1 } = {}) {
580
613
  if (e.type !== "function" && e.type !== "event" && e.type !== "error")
581
- throw new Wr(e.type);
614
+ throw new ns(e.type);
582
615
  return `${e.name}(${ve(e.inputs, { includeName: t })})`;
583
616
  }
584
617
  function ve(e, { includeName: t = !1 } = {}) {
585
- return e ? e.map((n) => Or(n, { includeName: t })).join(t ? ", " : ",") : "";
618
+ return e ? e.map((n) => Ur(n, { includeName: t })).join(t ? ", " : ",") : "";
586
619
  }
587
- function Or(e, { includeName: t }) {
620
+ function Ur(e, { includeName: t }) {
588
621
  return e.type.startsWith("tuple") ? `(${ve(e.components, { includeName: t })})${e.type.slice(5)}` : e.type + (t && e.name ? ` ${e.name}` : "");
589
622
  }
590
- class zr extends h {
623
+ class Vr extends h {
591
624
  constructor({ docsPath: t }) {
592
625
  super([
593
626
  "A constructor was not found on the ABI.",
@@ -611,7 +644,7 @@ class Nt extends h {
611
644
  });
612
645
  }
613
646
  }
614
- class pn extends h {
647
+ class yn extends h {
615
648
  constructor({ data: t, params: n, size: r }) {
616
649
  super([`Data size of ${r} bytes is too small for given parameters.`].join(`
617
650
  `), {
@@ -645,7 +678,7 @@ class We extends h {
645
678
  });
646
679
  }
647
680
  }
648
- class Gr extends h {
681
+ class Zr extends h {
649
682
  constructor({ expectedLength: t, givenLength: n, type: r }) {
650
683
  super([
651
684
  `ABI encoding array length mismatch for type ${r}.`,
@@ -655,12 +688,12 @@ class Gr extends h {
655
688
  `), { name: "AbiEncodingArrayLengthMismatchError" });
656
689
  }
657
690
  }
658
- class Dr extends h {
691
+ class Wr extends h {
659
692
  constructor({ expectedSize: t, value: n }) {
660
693
  super(`Size of bytes "${n}" (bytes${D(n)}) does not match expected size (bytes${t}).`, { name: "AbiEncodingBytesSizeMismatchError" });
661
694
  }
662
695
  }
663
- class _r extends h {
696
+ class Kr extends h {
664
697
  constructor({ expectedLength: t, givenLength: n }) {
665
698
  super([
666
699
  "ABI encoding params/values length mismatch.",
@@ -670,7 +703,7 @@ class _r extends h {
670
703
  `), { name: "AbiEncodingLengthMismatchError" });
671
704
  }
672
705
  }
673
- class yn extends h {
706
+ class mn extends h {
674
707
  constructor(t, { docsPath: n }) {
675
708
  super([
676
709
  `Encoded error signature "${t}" not found on ABI.`,
@@ -688,7 +721,7 @@ class yn extends h {
688
721
  }), this.signature = t;
689
722
  }
690
723
  }
691
- class Lr extends h {
724
+ class Jr extends h {
692
725
  constructor({ docsPath: t }) {
693
726
  super("Cannot extract event signature from empty topics.", {
694
727
  docsPath: t,
@@ -696,7 +729,7 @@ class Lr extends h {
696
729
  });
697
730
  }
698
731
  }
699
- class bn extends h {
732
+ class hn extends h {
700
733
  constructor(t, { docsPath: n }) {
701
734
  super([
702
735
  `Encoded event signature "${t}" not found on ABI.`,
@@ -721,7 +754,7 @@ class Ot extends h {
721
754
  });
722
755
  }
723
756
  }
724
- class ye extends h {
757
+ class be extends h {
725
758
  constructor(t, { docsPath: n } = {}) {
726
759
  super([
727
760
  `Function ${t ? `"${t}" ` : ""}not found on ABI.`,
@@ -733,7 +766,7 @@ class ye extends h {
733
766
  });
734
767
  }
735
768
  }
736
- class Hr extends h {
769
+ class Yr extends h {
737
770
  constructor(t, { docsPath: n }) {
738
771
  super([
739
772
  `Function "${t}" does not contain any \`outputs\` on ABI.`,
@@ -746,7 +779,7 @@ class Hr extends h {
746
779
  });
747
780
  }
748
781
  }
749
- class qr extends h {
782
+ class Xr extends h {
750
783
  constructor(t, n) {
751
784
  super("Found ambiguous types in overloaded ABI items.", {
752
785
  metaMessages: [
@@ -760,14 +793,14 @@ class qr extends h {
760
793
  });
761
794
  }
762
795
  }
763
- class ko extends h {
796
+ class Go extends h {
764
797
  constructor({ expectedSize: t, givenSize: n }) {
765
798
  super(`Expected bytes${t}, got bytes${n}.`, {
766
799
  name: "BytesSizeMismatchError"
767
800
  });
768
801
  }
769
802
  }
770
- class be extends h {
803
+ class ye extends h {
771
804
  constructor({ abiItem: t, data: n, params: r, size: s }) {
772
805
  super([
773
806
  `Data size of ${s} bytes is too small for non-indexed event parameters.`
@@ -814,7 +847,7 @@ class Ke extends h {
814
847
  }), this.abiItem = t;
815
848
  }
816
849
  }
817
- class Ur extends h {
850
+ class Qr extends h {
818
851
  constructor(t, { docsPath: n }) {
819
852
  super([
820
853
  `Type "${t}" is not a valid encoding type.`,
@@ -823,7 +856,7 @@ class Ur extends h {
823
856
  `), { docsPath: n, name: "InvalidAbiEncodingType" });
824
857
  }
825
858
  }
826
- class Vr extends h {
859
+ class es extends h {
827
860
  constructor(t, { docsPath: n }) {
828
861
  super([
829
862
  `Type "${t}" is not a valid decoding type.`,
@@ -832,7 +865,7 @@ class Vr extends h {
832
865
  `), { docsPath: n, name: "InvalidAbiDecodingType" });
833
866
  }
834
867
  }
835
- class Zr extends h {
868
+ class ts extends h {
836
869
  constructor(t) {
837
870
  super([`Value "${t}" is not a valid array.`].join(`
838
871
  `), {
@@ -840,7 +873,7 @@ class Zr extends h {
840
873
  });
841
874
  }
842
875
  }
843
- class Wr extends h {
876
+ class ns extends h {
844
877
  constructor(t) {
845
878
  super([
846
879
  `"${t}" is not a valid definition type.`,
@@ -849,18 +882,18 @@ class Wr extends h {
849
882
  `), { name: "InvalidDefinitionTypeError" });
850
883
  }
851
884
  }
852
- class Kr extends h {
885
+ class rs extends h {
853
886
  constructor(t) {
854
887
  super(`Filter type "${t}" is not supported.`, {
855
888
  name: "FilterTypeNotSupportedError"
856
889
  });
857
890
  }
858
891
  }
859
- const Jr = (e) => ie(qe(e));
860
- function Yr(e) {
861
- return Jr(e);
892
+ const ss = (e) => ie(qe(e));
893
+ function os(e) {
894
+ return ss(e);
862
895
  }
863
- function Xr(e) {
896
+ function as(e) {
864
897
  let t = !0, n = "", r = 0, s = "", a = !1;
865
898
  for (let o = 0; o < e.length; o++) {
866
899
  const i = e[o];
@@ -885,27 +918,27 @@ function Xr(e) {
885
918
  throw new h("Unable to normalize signature.");
886
919
  return s;
887
920
  }
888
- const Qr = (e) => {
889
- const t = typeof e == "string" ? e : tr(e);
890
- return Xr(t);
921
+ const is = (e) => {
922
+ const t = typeof e == "string" ? e : sr(e);
923
+ return as(t);
891
924
  };
892
- function mn(e) {
893
- return Yr(Qr(e));
925
+ function gn(e) {
926
+ return os(is(e));
894
927
  }
895
- const xe = mn, Bo = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, es = /^(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, 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)?$/;
896
929
  function Je(e, t) {
897
930
  if (e.length !== t.length)
898
- throw new _r({
931
+ throw new Kr({
899
932
  expectedLength: e.length,
900
933
  givenLength: t.length
901
934
  });
902
- const n = ts({
935
+ const n = us({
903
936
  params: e,
904
937
  values: t
905
938
  }), r = Xe(n);
906
939
  return r.length === 0 ? "0x" : r;
907
940
  }
908
- function ts({ params: e, values: t }) {
941
+ function us({ params: e, values: t }) {
909
942
  const n = [];
910
943
  for (let r = 0; r < e.length; r++)
911
944
  n.push(Ye({ param: e[r], value: t[r] }));
@@ -915,28 +948,28 @@ function Ye({ param: e, value: t }) {
915
948
  const n = Qe(e.type);
916
949
  if (n) {
917
950
  const [r, s] = n;
918
- return rs(t, { length: r, param: { ...e, type: s } });
951
+ return ls(t, { length: r, param: { ...e, type: s } });
919
952
  }
920
953
  if (e.type === "tuple")
921
- return cs(t, {
954
+ return ms(t, {
922
955
  param: e
923
956
  });
924
957
  if (e.type === "address")
925
- return ns(t);
958
+ return ds(t);
926
959
  if (e.type === "bool")
927
- return os(t);
960
+ return ps(t);
928
961
  if (e.type.startsWith("uint") || e.type.startsWith("int")) {
929
- const r = e.type.startsWith("int"), [, , s = "256"] = es.exec(e.type) ?? [];
930
- return as(t, {
962
+ const r = e.type.startsWith("int"), [, , s = "256"] = cs.exec(e.type) ?? [];
963
+ return bs(t, {
931
964
  signed: r,
932
965
  size: Number(s)
933
966
  });
934
967
  }
935
968
  if (e.type.startsWith("bytes"))
936
- return ss(t, { param: e });
969
+ return fs(t, { param: e });
937
970
  if (e.type === "string")
938
- return is(t);
939
- throw new Ur(e.type, {
971
+ return ys(t);
972
+ throw new Qr(e.type, {
940
973
  docsPath: "/docs/contract/encodeAbiParameters"
941
974
  });
942
975
  }
@@ -954,17 +987,17 @@ function Xe(e) {
954
987
  }
955
988
  return ee([...n, ...r]);
956
989
  }
957
- function ns(e) {
990
+ function ds(e) {
958
991
  if (!H(e))
959
992
  throw new te({ address: e });
960
- return { dynamic: !1, encoded: K(e.toLowerCase()) };
993
+ return { dynamic: !1, encoded: W(e.toLowerCase()) };
961
994
  }
962
- function rs(e, { length: t, param: n }) {
995
+ function ls(e, { length: t, param: n }) {
963
996
  const r = t === null;
964
997
  if (!Array.isArray(e))
965
- throw new Zr(e);
998
+ throw new ts(e);
966
999
  if (!r && e.length !== t)
967
- throw new Gr({
1000
+ throw new Zr({
968
1001
  expectedLength: t,
969
1002
  givenLength: e.length,
970
1003
  type: `${n.type}[${t}]`
@@ -992,35 +1025,35 @@ function rs(e, { length: t, param: n }) {
992
1025
  encoded: ee(a.map(({ encoded: o }) => o))
993
1026
  };
994
1027
  }
995
- function ss(e, { param: t }) {
1028
+ function fs(e, { param: t }) {
996
1029
  const [, n] = t.type.split("bytes"), r = D(e);
997
1030
  if (!n) {
998
1031
  let s = e;
999
- return r % 32 !== 0 && (s = K(s, {
1032
+ return r % 32 !== 0 && (s = W(s, {
1000
1033
  dir: "right",
1001
1034
  size: Math.ceil((e.length - 2) / 2 / 32) * 32
1002
1035
  })), {
1003
1036
  dynamic: !0,
1004
- encoded: ee([K(v(r, { size: 32 })), s])
1037
+ encoded: ee([W(v(r, { size: 32 })), s])
1005
1038
  };
1006
1039
  }
1007
1040
  if (r !== Number.parseInt(n))
1008
- throw new Dr({
1041
+ throw new Wr({
1009
1042
  expectedSize: Number.parseInt(n),
1010
1043
  value: e
1011
1044
  });
1012
- return { dynamic: !1, encoded: K(e, { dir: "right" }) };
1045
+ return { dynamic: !1, encoded: W(e, { dir: "right" }) };
1013
1046
  }
1014
- function os(e) {
1047
+ function ps(e) {
1015
1048
  if (typeof e != "boolean")
1016
1049
  throw new h(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);
1017
- return { dynamic: !1, encoded: K(In(e)) };
1050
+ return { dynamic: !1, encoded: W(On(e)) };
1018
1051
  }
1019
- function as(e, { signed: t, size: n = 256 }) {
1052
+ function bs(e, { signed: t, size: n = 256 }) {
1020
1053
  if (typeof n == "number") {
1021
1054
  const r = 2n ** (BigInt(n) - (t ? 1n : 0n)) - 1n, s = t ? -r - 1n : 0n;
1022
1055
  if (e > r || e < s)
1023
- throw new jn({
1056
+ throw new zn({
1024
1057
  max: r.toString(),
1025
1058
  min: s.toString(),
1026
1059
  signed: t,
@@ -1036,21 +1069,21 @@ function as(e, { signed: t, size: n = 256 }) {
1036
1069
  })
1037
1070
  };
1038
1071
  }
1039
- function is(e) {
1040
- const t = Nn(e), n = Math.ceil(D(t) / 32), r = [];
1072
+ function ys(e) {
1073
+ const t = Gn(e), n = Math.ceil(D(t) / 32), r = [];
1041
1074
  for (let s = 0; s < n; s++)
1042
- r.push(K(le(t, s * 32, (s + 1) * 32), {
1075
+ r.push(W(le(t, s * 32, (s + 1) * 32), {
1043
1076
  dir: "right"
1044
1077
  }));
1045
1078
  return {
1046
1079
  dynamic: !0,
1047
1080
  encoded: ee([
1048
- K(v(D(t), { size: 32 })),
1081
+ W(v(D(t), { size: 32 })),
1049
1082
  ...r
1050
1083
  ])
1051
1084
  };
1052
1085
  }
1053
- function cs(e, { param: t }) {
1086
+ function ms(e, { param: t }) {
1054
1087
  let n = !1;
1055
1088
  const r = [];
1056
1089
  for (let s = 0; s < t.components.length; s++) {
@@ -1072,7 +1105,7 @@ function Qe(e) {
1072
1105
  [t[2] ? Number(t[2]) : null, t[1]]
1073
1106
  ) : void 0;
1074
1107
  }
1075
- const et = (e) => le(mn(e), 0, 4);
1108
+ const et = (e) => le(gn(e), 0, 4);
1076
1109
  function ce(e) {
1077
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);
1078
1111
  if (a.length === 0)
@@ -1095,9 +1128,9 @@ function ce(e) {
1095
1128
  return l ? _e(u, l) : !1;
1096
1129
  })) {
1097
1130
  if (o && "inputs" in o && o.inputs) {
1098
- const u = hn(i.inputs, o.inputs, n);
1131
+ const u = wn(i.inputs, o.inputs, n);
1099
1132
  if (u)
1100
- throw new qr({
1133
+ throw new Xr({
1101
1134
  abiItem: i,
1102
1135
  type: u[0]
1103
1136
  }, {
@@ -1129,11 +1162,11 @@ function _e(e, t) {
1129
1162
  })) : !1;
1130
1163
  }
1131
1164
  }
1132
- function hn(e, t, n) {
1165
+ function wn(e, t, n) {
1133
1166
  for (const r in e) {
1134
1167
  const s = e[r], a = t[r];
1135
1168
  if (s.type === "tuple" && a.type === "tuple" && "components" in s && "components" in a)
1136
- return hn(s.components, a.components, n[r]);
1169
+ return wn(s.components, a.components, n[r]);
1137
1170
  const o = [s.type, a.type];
1138
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)
1139
1172
  return o;
@@ -1156,7 +1189,7 @@ function tt(e) {
1156
1189
  let i = [];
1157
1190
  if (r && "inputs" in s) {
1158
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])) ?? [] : [];
1159
- d.length > 0 && (i = (u == null ? void 0 : u.map((l, f) => Array.isArray(d[f]) ? d[f].map((y, p) => Gt({ param: l, value: d[f][p] })) : d[f] ? Gt({ param: l, value: d[f] }) : null)) ?? []);
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)) ?? []);
1160
1193
  }
1161
1194
  return [o, ...i];
1162
1195
  }
@@ -1164,18 +1197,18 @@ function Gt({ param: e, value: t }) {
1164
1197
  if (e.type === "string" || e.type === "bytes")
1165
1198
  return ie(qe(t));
1166
1199
  if (e.type === "tuple" || e.type.match(/^(.*)\[(\d+)?\]$/))
1167
- throw new Kr(e.type);
1200
+ throw new rs(e.type);
1168
1201
  return Je([e], [t]);
1169
1202
  }
1170
- function us(e, { method: t }) {
1203
+ function hs(e, { method: t }) {
1171
1204
  var r, s;
1172
1205
  const n = {};
1173
1206
  return e.transport.type === "fallback" && ((s = (r = e.transport).onResponse) == null || s.call(r, ({ method: a, response: o, status: i, transport: c }) => {
1174
1207
  i === "success" && t === a && (n[o] = c.request);
1175
1208
  })), (a) => n[a] || e.request;
1176
1209
  }
1177
- async function ds(e, t) {
1178
- const { address: n, abi: r, args: s, eventName: a, fromBlock: o, strict: i, toBlock: c } = t, u = us(e, {
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, {
1179
1212
  method: "eth_newFilter"
1180
1213
  }), d = a ? tt({
1181
1214
  abi: r,
@@ -1202,11 +1235,11 @@ async function ds(e, t) {
1202
1235
  type: "event"
1203
1236
  };
1204
1237
  }
1205
- function U(e) {
1238
+ function V(e) {
1206
1239
  return typeof e == "string" ? { address: e, type: "json-rpc" } : e;
1207
1240
  }
1208
1241
  const Dt = "/docs/contract/encodeFunctionData";
1209
- function ls(e) {
1242
+ function ws(e) {
1210
1243
  const { abi: t, args: n, functionName: r } = e;
1211
1244
  let s = t[0];
1212
1245
  if (r) {
@@ -1216,11 +1249,11 @@ function ls(e) {
1216
1249
  name: r
1217
1250
  });
1218
1251
  if (!a)
1219
- throw new ye(r, { docsPath: Dt });
1252
+ throw new be(r, { docsPath: Dt });
1220
1253
  s = a;
1221
1254
  }
1222
1255
  if (s.type !== "function")
1223
- throw new ye(void 0, { docsPath: Dt });
1256
+ throw new be(void 0, { docsPath: Dt });
1224
1257
  return {
1225
1258
  abi: [s],
1226
1259
  functionName: et(q(s))
@@ -1229,11 +1262,11 @@ function ls(e) {
1229
1262
  function ue(e) {
1230
1263
  const { args: t } = e, { abi: n, functionName: r } = (() => {
1231
1264
  var i;
1232
- return e.abi.length === 1 && ((i = e.functionName) != null && i.startsWith("0x")) ? e : ls(e);
1265
+ return e.abi.length === 1 && ((i = e.functionName) != null && i.startsWith("0x")) ? e : ws(e);
1233
1266
  })(), s = n[0], a = r, o = "inputs" in s && s.inputs ? Je(s.inputs, t ?? []) : void 0;
1234
1267
  return Ue([a, o ?? "0x"]);
1235
1268
  }
1236
- const fs = {
1269
+ const vs = {
1237
1270
  1: "An `assert` condition failed.",
1238
1271
  17: "Arithmetic operation resulted in underflow or overflow.",
1239
1272
  18: "Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",
@@ -1243,7 +1276,7 @@ const fs = {
1243
1276
  50: "Array index is out of bounds.",
1244
1277
  65: "Allocated too much memory or created an array which is too large.",
1245
1278
  81: "Attempted to call a zero-initialized variable of internal function type."
1246
- }, ps = {
1279
+ }, xs = {
1247
1280
  inputs: [
1248
1281
  {
1249
1282
  name: "message",
@@ -1252,7 +1285,7 @@ const fs = {
1252
1285
  ],
1253
1286
  name: "Error",
1254
1287
  type: "error"
1255
- }, ys = {
1288
+ }, Ps = {
1256
1289
  inputs: [
1257
1290
  {
1258
1291
  name: "reason",
@@ -1262,33 +1295,33 @@ const fs = {
1262
1295
  name: "Panic",
1263
1296
  type: "error"
1264
1297
  };
1265
- function bs(e, t = {}) {
1298
+ function Es(e, t = {}) {
1266
1299
  typeof t.size < "u" && he(e, { size: t.size });
1267
- const n = Y(e, t);
1300
+ const n = J(e, t);
1268
1301
  return fe(n, t);
1269
1302
  }
1270
- function ms(e, t = {}) {
1303
+ function As(e, t = {}) {
1271
1304
  let n = e;
1272
1305
  if (typeof t.size < "u" && (he(n, { size: t.size }), n = Ve(n)), n.length > 1 || n[0] > 1)
1273
- throw new On(n);
1306
+ throw new Dn(n);
1274
1307
  return !!n[0];
1275
1308
  }
1276
1309
  function L(e, t = {}) {
1277
1310
  typeof t.size < "u" && he(e, { size: t.size });
1278
- const n = Y(e, t);
1311
+ const n = J(e, t);
1279
1312
  return ge(n, t);
1280
1313
  }
1281
- function hs(e, t = {}) {
1314
+ function $s(e, t = {}) {
1282
1315
  let n = e;
1283
1316
  return typeof t.size < "u" && (he(n, { size: t.size }), n = Ve(n, { dir: "right" })), new TextDecoder().decode(n);
1284
1317
  }
1285
1318
  function Pe(e, t) {
1286
- const n = typeof t == "string" ? Jt(t) : t, r = zn(n);
1319
+ const n = typeof t == "string" ? Yt(t) : t, r = _n(n);
1287
1320
  if (D(n) === 0 && e.length > 0)
1288
1321
  throw new We();
1289
1322
  if (D(t) && D(t) < 32)
1290
- throw new pn({
1291
- data: typeof t == "string" ? t : Y(t),
1323
+ throw new yn({
1324
+ data: typeof t == "string" ? t : J(t),
1292
1325
  params: e,
1293
1326
  size: D(t)
1294
1327
  });
@@ -1308,42 +1341,42 @@ function Q(e, t, { staticPosition: n }) {
1308
1341
  const r = Qe(t.type);
1309
1342
  if (r) {
1310
1343
  const [s, a] = r;
1311
- return ws(e, { ...t, type: a }, { length: s, staticPosition: n });
1344
+ return Ms(e, { ...t, type: a }, { length: s, staticPosition: n });
1312
1345
  }
1313
1346
  if (t.type === "tuple")
1314
- return Es(e, t, { staticPosition: n });
1347
+ return Ts(e, t, { staticPosition: n });
1315
1348
  if (t.type === "address")
1316
- return gs(e);
1349
+ return Fs(e);
1317
1350
  if (t.type === "bool")
1318
- return vs(e);
1351
+ return Ss(e);
1319
1352
  if (t.type.startsWith("bytes"))
1320
- return xs(e, t, { staticPosition: n });
1353
+ return Cs(e, t, { staticPosition: n });
1321
1354
  if (t.type.startsWith("uint") || t.type.startsWith("int"))
1322
- return Ps(e, t);
1355
+ return ks(e, t);
1323
1356
  if (t.type === "string")
1324
- return $s(e, { staticPosition: n });
1325
- throw new Vr(t.type, {
1357
+ return Is(e, { staticPosition: n });
1358
+ throw new es(t.type, {
1326
1359
  docsPath: "/docs/contract/decodeAbiParameters"
1327
1360
  });
1328
1361
  }
1329
1362
  const _t = 32, Le = 32;
1330
- function gs(e) {
1363
+ function Fs(e) {
1331
1364
  const t = e.readBytes(32);
1332
- return [Yt(Y(Gn(t, -20))), 32];
1365
+ return [Xt(J(Ln(t, -20))), 32];
1333
1366
  }
1334
- function ws(e, t, { length: n, staticPosition: r }) {
1367
+ function Ms(e, t, { length: n, staticPosition: r }) {
1335
1368
  if (!n) {
1336
1369
  const o = L(e.readBytes(Le)), i = r + o, c = i + _t;
1337
1370
  e.setPosition(i);
1338
1371
  const u = L(e.readBytes(_t)), d = ae(t);
1339
1372
  let l = 0;
1340
1373
  const f = [];
1341
- for (let y = 0; y < u; ++y) {
1342
- e.setPosition(c + (d ? y * 32 : l));
1343
- const [p, b] = Q(e, t, {
1374
+ for (let b = 0; b < u; ++b) {
1375
+ e.setPosition(c + (d ? b * 32 : l));
1376
+ const [p, y] = Q(e, t, {
1344
1377
  staticPosition: c
1345
1378
  });
1346
- l += b, f.push(p);
1379
+ l += y, f.push(p);
1347
1380
  }
1348
1381
  return e.setPosition(r + 32), [f, 32];
1349
1382
  }
@@ -1368,10 +1401,10 @@ function ws(e, t, { length: n, staticPosition: r }) {
1368
1401
  }
1369
1402
  return [a, s];
1370
1403
  }
1371
- function vs(e) {
1372
- return [ms(e.readBytes(32), { size: 32 }), 32];
1404
+ function Ss(e) {
1405
+ return [As(e.readBytes(32), { size: 32 }), 32];
1373
1406
  }
1374
- function xs(e, t, { staticPosition: n }) {
1407
+ function Cs(e, t, { staticPosition: n }) {
1375
1408
  const [r, s] = t.type.split("bytes");
1376
1409
  if (!s) {
1377
1410
  const o = L(e.readBytes(32));
@@ -1380,18 +1413,18 @@ function xs(e, t, { staticPosition: n }) {
1380
1413
  if (i === 0)
1381
1414
  return e.setPosition(n + 32), ["0x", 32];
1382
1415
  const c = e.readBytes(i);
1383
- return e.setPosition(n + 32), [Y(c), 32];
1416
+ return e.setPosition(n + 32), [J(c), 32];
1384
1417
  }
1385
- return [Y(e.readBytes(Number.parseInt(s), 32)), 32];
1418
+ return [J(e.readBytes(Number.parseInt(s), 32)), 32];
1386
1419
  }
1387
- function Ps(e, t) {
1420
+ function ks(e, t) {
1388
1421
  const n = t.type.startsWith("int"), r = Number.parseInt(t.type.split("int")[1] || "256"), s = e.readBytes(32);
1389
1422
  return [
1390
- r > 48 ? bs(s, { signed: n }) : L(s, { signed: n }),
1423
+ r > 48 ? Es(s, { signed: n }) : L(s, { signed: n }),
1391
1424
  32
1392
1425
  ];
1393
1426
  }
1394
- function Es(e, t, { staticPosition: n }) {
1427
+ function Ts(e, t, { staticPosition: n }) {
1395
1428
  const r = t.components.length === 0 || t.components.some(({ name: o }) => !o), s = r ? [] : {};
1396
1429
  let a = 0;
1397
1430
  if (ae(t)) {
@@ -1414,13 +1447,13 @@ function Es(e, t, { staticPosition: n }) {
1414
1447
  }
1415
1448
  return [s, a];
1416
1449
  }
1417
- function $s(e, { staticPosition: t }) {
1450
+ function Is(e, { staticPosition: t }) {
1418
1451
  const n = L(e.readBytes(32)), r = t + n;
1419
1452
  e.setPosition(r);
1420
1453
  const s = L(e.readBytes(32));
1421
1454
  if (s === 0)
1422
1455
  return e.setPosition(t + 32), ["", 32];
1423
- const a = e.readBytes(s, 32), o = hs(Ve(a));
1456
+ const a = e.readBytes(s, 32), o = $s(Ve(a));
1424
1457
  return e.setPosition(t + 32), [o, 32];
1425
1458
  }
1426
1459
  function ae(e) {
@@ -1433,13 +1466,13 @@ function ae(e) {
1433
1466
  const n = Qe(e.type);
1434
1467
  return !!(n && ae({ ...e, type: n[1] }));
1435
1468
  }
1436
- function As(e) {
1469
+ function Bs(e) {
1437
1470
  const { abi: t, data: n } = e, r = le(n, 0, 4);
1438
1471
  if (r === "0x")
1439
1472
  throw new We();
1440
- const a = [...t || [], ps, ys].find((o) => o.type === "error" && r === et(q(o)));
1473
+ const a = [...t || [], xs, Ps].find((o) => o.type === "error" && r === et(q(o)));
1441
1474
  if (!a)
1442
- throw new yn(r, {
1475
+ throw new mn(r, {
1443
1476
  docsPath: "/docs/contract/decodeErrorResult"
1444
1477
  });
1445
1478
  return {
@@ -1449,18 +1482,18 @@ function As(e) {
1449
1482
  };
1450
1483
  }
1451
1484
  const ne = (e, t, n) => JSON.stringify(e, (r, s) => typeof s == "bigint" ? s.toString() : s, n);
1452
- function gn({ abiItem: e, args: t, includeFunctionName: n = !0, includeName: r = !1 }) {
1485
+ function vn({ abiItem: e, args: t, includeFunctionName: n = !0, includeName: r = !1 }) {
1453
1486
  if ("name" in e && "inputs" in e && e.inputs)
1454
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(", ")})`;
1455
1488
  }
1456
- class Fs extends h {
1489
+ class Rs extends h {
1457
1490
  constructor({ address: t }) {
1458
1491
  super(`State for account "${t}" is set multiple times.`, {
1459
1492
  name: "AccountStateConflictError"
1460
1493
  });
1461
1494
  }
1462
1495
  }
1463
- class Ms extends h {
1496
+ class js extends h {
1464
1497
  constructor() {
1465
1498
  super("state and stateDiff are set on the same account.", {
1466
1499
  name: "StateAssignmentConflictError"
@@ -1471,7 +1504,7 @@ function Lt(e) {
1471
1504
  return e.reduce((t, { slot: n, value: r }) => `${t} ${n}: ${r}
1472
1505
  `, "");
1473
1506
  }
1474
- function Ss(e) {
1507
+ function Ns(e) {
1475
1508
  return e.reduce((t, { address: n, ...r }) => {
1476
1509
  let s = `${t} ${n}:
1477
1510
  `;
@@ -1484,30 +1517,30 @@ function Ss(e) {
1484
1517
  }, ` State Override:
1485
1518
  `).slice(0, -1);
1486
1519
  }
1487
- const Cs = (e) => e, nt = (e) => e;
1488
- class Ts extends h {
1489
- 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: y }) {
1520
+ const Os = (e) => e, nt = (e) => e;
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 }) {
1490
1523
  var m;
1491
- const p = n ? U(n) : void 0;
1492
- let b = Ze({
1524
+ const p = n ? V(n) : void 0;
1525
+ let y = Ze({
1493
1526
  from: p == null ? void 0 : p.address,
1494
1527
  to: l,
1495
- value: typeof f < "u" && `${Xt(f)} ${((m = s == null ? void 0 : s.nativeCurrency) == null ? void 0 : m.symbol) || "ETH"}`,
1528
+ value: typeof f < "u" && `${Qt(f)} ${((m = s == null ? void 0 : s.nativeCurrency) == null ? void 0 : m.symbol) || "ETH"}`,
1496
1529
  data: a,
1497
1530
  gas: o,
1498
- gasPrice: typeof i < "u" && `${J(i)} gwei`,
1499
- maxFeePerGas: typeof c < "u" && `${J(c)} gwei`,
1500
- maxPriorityFeePerGas: typeof u < "u" && `${J(u)} gwei`,
1531
+ gasPrice: typeof i < "u" && `${K(i)} gwei`,
1532
+ maxFeePerGas: typeof c < "u" && `${K(c)} gwei`,
1533
+ maxPriorityFeePerGas: typeof u < "u" && `${K(u)} gwei`,
1501
1534
  nonce: d
1502
1535
  });
1503
- y && (b += `
1504
- ${Ss(y)}`), super(t.shortMessage, {
1536
+ b && (y += `
1537
+ ${Ns(b)}`), super(t.shortMessage, {
1505
1538
  cause: t,
1506
1539
  docsPath: r,
1507
1540
  metaMessages: [
1508
1541
  ...t.metaMessages ? [...t.metaMessages, " "] : [],
1509
1542
  "Raw Call Arguments:",
1510
- b
1543
+ y
1511
1544
  ].filter(Boolean),
1512
1545
  name: "CallExecutionError"
1513
1546
  }), Object.defineProperty(this, "cause", {
@@ -1518,15 +1551,15 @@ ${Ss(y)}`), super(t.shortMessage, {
1518
1551
  }), this.cause = t;
1519
1552
  }
1520
1553
  }
1521
- class ks extends h {
1554
+ class Gs extends h {
1522
1555
  constructor(t, { abi: n, args: r, contractAddress: s, docsPath: a, functionName: o, sender: i }) {
1523
- const c = ce({ abi: n, args: r, name: o }), u = c ? gn({
1556
+ const c = ce({ abi: n, args: r, name: o }), u = c ? vn({
1524
1557
  abiItem: c,
1525
1558
  args: r,
1526
1559
  includeFunctionName: !1,
1527
1560
  includeName: !1
1528
1561
  }) : void 0, d = c ? q(c, { includeName: !0 }) : void 0, l = Ze({
1529
- address: s && Cs(s),
1562
+ address: s && Os(s),
1530
1563
  function: d,
1531
1564
  args: u && u !== "()" && `${[...Array((o == null ? void 0 : o.length) ?? 0).keys()].map(() => " ").join("")}${u}`,
1532
1565
  sender: i
@@ -1578,27 +1611,27 @@ class ks extends h {
1578
1611
  }), this.abi = n, this.args = r, this.cause = t, this.contractAddress = s, this.functionName = o, this.sender = i;
1579
1612
  }
1580
1613
  }
1581
- class Bs extends h {
1614
+ class Ds extends h {
1582
1615
  constructor({ abi: t, data: n, functionName: r, message: s }) {
1583
1616
  let a, o, i, c;
1584
1617
  if (n && n !== "0x")
1585
1618
  try {
1586
- o = As({ abi: t, data: n });
1619
+ o = Bs({ abi: t, data: n });
1587
1620
  const { abiItem: d, errorName: l, args: f } = o;
1588
1621
  if (l === "Error")
1589
1622
  c = f[0];
1590
1623
  else if (l === "Panic") {
1591
- const [y] = f;
1592
- c = fs[y];
1624
+ const [b] = f;
1625
+ c = vs[b];
1593
1626
  } else {
1594
- const y = d ? q(d, { includeName: !0 }) : void 0, p = d && f ? gn({
1627
+ const b = d ? q(d, { includeName: !0 }) : void 0, p = d && f ? vn({
1595
1628
  abiItem: d,
1596
1629
  args: f,
1597
1630
  includeFunctionName: !1,
1598
1631
  includeName: !1
1599
1632
  }) : void 0;
1600
1633
  i = [
1601
- y ? `Error: ${y}` : "",
1634
+ b ? `Error: ${b}` : "",
1602
1635
  p && p !== "()" ? ` ${[...Array((l == null ? void 0 : l.length) ?? 0).keys()].map(() => " ").join("")}${p}` : ""
1603
1636
  ];
1604
1637
  }
@@ -1607,7 +1640,7 @@ class Bs extends h {
1607
1640
  }
1608
1641
  else s && (c = s);
1609
1642
  let u;
1610
- a instanceof yn && (u = a.signature, i = [
1643
+ a instanceof mn && (u = a.signature, i = [
1611
1644
  `Unable to decode signature "${u}" as it was not found on the provided ABI.`,
1612
1645
  "Make sure you are using the correct ABI and that the error exists on it.",
1613
1646
  `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${u}.`
@@ -1624,6 +1657,11 @@ class Bs extends h {
1624
1657
  configurable: !0,
1625
1658
  writable: !0,
1626
1659
  value: void 0
1660
+ }), Object.defineProperty(this, "raw", {
1661
+ enumerable: !0,
1662
+ configurable: !0,
1663
+ writable: !0,
1664
+ value: void 0
1627
1665
  }), Object.defineProperty(this, "reason", {
1628
1666
  enumerable: !0,
1629
1667
  configurable: !0,
@@ -1634,10 +1672,10 @@ class Bs extends h {
1634
1672
  configurable: !0,
1635
1673
  writable: !0,
1636
1674
  value: void 0
1637
- }), this.data = o, this.reason = c, this.signature = u;
1675
+ }), this.data = o, this.raw = n, this.reason = c, this.signature = u;
1638
1676
  }
1639
1677
  }
1640
- class Rs extends h {
1678
+ class _s extends h {
1641
1679
  constructor({ functionName: t }) {
1642
1680
  super(`The contract function "${t}" returned no data ("0x").`, {
1643
1681
  metaMessages: [
@@ -1650,7 +1688,7 @@ class Rs extends h {
1650
1688
  });
1651
1689
  }
1652
1690
  }
1653
- class Is extends h {
1691
+ class Ls extends h {
1654
1692
  constructor({ factory: t }) {
1655
1693
  super(`Deployment for counterfactual contract call failed${t ? ` for factory "${t}".` : ""}`, {
1656
1694
  metaMessages: [
@@ -1662,7 +1700,7 @@ class Is extends h {
1662
1700
  });
1663
1701
  }
1664
1702
  }
1665
- class wn extends h {
1703
+ class xn extends h {
1666
1704
  constructor({ data: t, message: n }) {
1667
1705
  super(n || "", { name: "RawContractError" }), Object.defineProperty(this, "code", {
1668
1706
  enumerable: !0,
@@ -1677,7 +1715,7 @@ class wn extends h {
1677
1715
  }), this.data = t;
1678
1716
  }
1679
1717
  }
1680
- class Ro extends h {
1718
+ class _o extends h {
1681
1719
  constructor({ body: t, cause: n, details: r, headers: s, status: a, url: o }) {
1682
1720
  super("HTTP request failed.", {
1683
1721
  cause: n,
@@ -1711,7 +1749,7 @@ class Ro extends h {
1711
1749
  }), this.body = t, this.headers = s, this.status = a, this.url = o;
1712
1750
  }
1713
1751
  }
1714
- class js extends h {
1752
+ class Pn extends h {
1715
1753
  constructor({ body: t, error: n, url: r }) {
1716
1754
  super("RPC Request failed.", {
1717
1755
  cause: n,
@@ -1723,10 +1761,15 @@ class js extends h {
1723
1761
  configurable: !0,
1724
1762
  writable: !0,
1725
1763
  value: void 0
1726
- }), this.code = n.code;
1764
+ }), Object.defineProperty(this, "data", {
1765
+ enumerable: !0,
1766
+ configurable: !0,
1767
+ writable: !0,
1768
+ value: void 0
1769
+ }), this.code = n.code, this.data = n.data;
1727
1770
  }
1728
1771
  }
1729
- class Io extends h {
1772
+ class Lo extends h {
1730
1773
  constructor({ body: t, url: n }) {
1731
1774
  super("The request took too long to respond.", {
1732
1775
  details: "The request timed out.",
@@ -1735,8 +1778,8 @@ class Io extends h {
1735
1778
  });
1736
1779
  }
1737
1780
  }
1738
- const Ns = -1;
1739
- class B extends h {
1781
+ const Hs = -1;
1782
+ class I extends h {
1740
1783
  constructor(t, { code: n, docsPath: r, metaMessages: s, name: a, shortMessage: o }) {
1741
1784
  super(o, {
1742
1785
  cause: t,
@@ -1748,10 +1791,10 @@ class B extends h {
1748
1791
  configurable: !0,
1749
1792
  writable: !0,
1750
1793
  value: void 0
1751
- }), this.name = a || t.name, this.code = t instanceof js ? t.code : n ?? Ns;
1794
+ }), this.name = a || t.name, this.code = t instanceof Pn ? t.code : n ?? Hs;
1752
1795
  }
1753
1796
  }
1754
- class re extends B {
1797
+ class se extends I {
1755
1798
  constructor(t, n) {
1756
1799
  super(t, n), Object.defineProperty(this, "data", {
1757
1800
  enumerable: !0,
@@ -1761,7 +1804,7 @@ class re extends B {
1761
1804
  }), this.data = n.data;
1762
1805
  }
1763
1806
  }
1764
- class rt extends B {
1807
+ class rt extends I {
1765
1808
  constructor(t) {
1766
1809
  super(t, {
1767
1810
  code: rt.code,
@@ -1776,7 +1819,7 @@ Object.defineProperty(rt, "code", {
1776
1819
  writable: !0,
1777
1820
  value: -32700
1778
1821
  });
1779
- class st extends B {
1822
+ class st extends I {
1780
1823
  constructor(t) {
1781
1824
  super(t, {
1782
1825
  code: st.code,
@@ -1791,7 +1834,7 @@ Object.defineProperty(st, "code", {
1791
1834
  writable: !0,
1792
1835
  value: -32600
1793
1836
  });
1794
- class ot extends B {
1837
+ class ot extends I {
1795
1838
  constructor(t, { method: n } = {}) {
1796
1839
  super(t, {
1797
1840
  code: ot.code,
@@ -1806,7 +1849,7 @@ Object.defineProperty(ot, "code", {
1806
1849
  writable: !0,
1807
1850
  value: -32601
1808
1851
  });
1809
- class at extends B {
1852
+ class at extends I {
1810
1853
  constructor(t) {
1811
1854
  super(t, {
1812
1855
  code: at.code,
@@ -1825,7 +1868,7 @@ Object.defineProperty(at, "code", {
1825
1868
  writable: !0,
1826
1869
  value: -32602
1827
1870
  });
1828
- class Ee extends B {
1871
+ class Ee extends I {
1829
1872
  constructor(t) {
1830
1873
  super(t, {
1831
1874
  code: Ee.code,
@@ -1840,10 +1883,10 @@ Object.defineProperty(Ee, "code", {
1840
1883
  writable: !0,
1841
1884
  value: -32603
1842
1885
  });
1843
- class $e extends B {
1886
+ class Ae extends I {
1844
1887
  constructor(t) {
1845
1888
  super(t, {
1846
- code: $e.code,
1889
+ code: Ae.code,
1847
1890
  name: "InvalidInputRpcError",
1848
1891
  shortMessage: [
1849
1892
  "Missing or invalid parameters.",
@@ -1853,13 +1896,13 @@ class $e extends B {
1853
1896
  });
1854
1897
  }
1855
1898
  }
1856
- Object.defineProperty($e, "code", {
1899
+ Object.defineProperty(Ae, "code", {
1857
1900
  enumerable: !0,
1858
1901
  configurable: !0,
1859
1902
  writable: !0,
1860
1903
  value: -32e3
1861
1904
  });
1862
- class it extends B {
1905
+ class it extends I {
1863
1906
  constructor(t) {
1864
1907
  super(t, {
1865
1908
  code: it.code,
@@ -1879,7 +1922,7 @@ Object.defineProperty(it, "code", {
1879
1922
  writable: !0,
1880
1923
  value: -32001
1881
1924
  });
1882
- class ct extends B {
1925
+ class ct extends I {
1883
1926
  constructor(t) {
1884
1927
  super(t, {
1885
1928
  code: ct.code,
@@ -1894,7 +1937,7 @@ Object.defineProperty(ct, "code", {
1894
1937
  writable: !0,
1895
1938
  value: -32002
1896
1939
  });
1897
- class ut extends B {
1940
+ class ut extends I {
1898
1941
  constructor(t) {
1899
1942
  super(t, {
1900
1943
  code: ut.code,
@@ -1909,12 +1952,12 @@ Object.defineProperty(ut, "code", {
1909
1952
  writable: !0,
1910
1953
  value: -32003
1911
1954
  });
1912
- class dt extends B {
1955
+ class dt extends I {
1913
1956
  constructor(t, { method: n } = {}) {
1914
1957
  super(t, {
1915
1958
  code: dt.code,
1916
1959
  name: "MethodNotSupportedRpcError",
1917
- shortMessage: `Method${n ? ` "${n}"` : ""} is not implemented.`
1960
+ shortMessage: `Method${n ? ` "${n}"` : ""} is not supported.`
1918
1961
  });
1919
1962
  }
1920
1963
  }
@@ -1924,7 +1967,7 @@ Object.defineProperty(dt, "code", {
1924
1967
  writable: !0,
1925
1968
  value: -32004
1926
1969
  });
1927
- class lt extends B {
1970
+ class lt extends I {
1928
1971
  constructor(t) {
1929
1972
  super(t, {
1930
1973
  code: lt.code,
@@ -1939,7 +1982,7 @@ Object.defineProperty(lt, "code", {
1939
1982
  writable: !0,
1940
1983
  value: -32005
1941
1984
  });
1942
- class ft extends B {
1985
+ class ft extends I {
1943
1986
  constructor(t) {
1944
1987
  super(t, {
1945
1988
  code: ft.code,
@@ -1954,7 +1997,7 @@ Object.defineProperty(ft, "code", {
1954
1997
  writable: !0,
1955
1998
  value: -32006
1956
1999
  });
1957
- class pt extends re {
2000
+ class pt extends se {
1958
2001
  constructor(t) {
1959
2002
  super(t, {
1960
2003
  code: pt.code,
@@ -1969,37 +2012,37 @@ Object.defineProperty(pt, "code", {
1969
2012
  writable: !0,
1970
2013
  value: 4001
1971
2014
  });
1972
- class yt extends re {
2015
+ class bt extends se {
1973
2016
  constructor(t) {
1974
2017
  super(t, {
1975
- code: yt.code,
2018
+ code: bt.code,
1976
2019
  name: "UnauthorizedProviderError",
1977
2020
  shortMessage: "The requested method and/or account has not been authorized by the user."
1978
2021
  });
1979
2022
  }
1980
2023
  }
1981
- Object.defineProperty(yt, "code", {
2024
+ Object.defineProperty(bt, "code", {
1982
2025
  enumerable: !0,
1983
2026
  configurable: !0,
1984
2027
  writable: !0,
1985
2028
  value: 4100
1986
2029
  });
1987
- class bt extends re {
2030
+ class yt extends se {
1988
2031
  constructor(t, { method: n } = {}) {
1989
2032
  super(t, {
1990
- code: bt.code,
2033
+ code: yt.code,
1991
2034
  name: "UnsupportedProviderMethodError",
1992
2035
  shortMessage: `The Provider does not support the requested method${n ? ` " ${n}"` : ""}.`
1993
2036
  });
1994
2037
  }
1995
2038
  }
1996
- Object.defineProperty(bt, "code", {
2039
+ Object.defineProperty(yt, "code", {
1997
2040
  enumerable: !0,
1998
2041
  configurable: !0,
1999
2042
  writable: !0,
2000
2043
  value: 4200
2001
2044
  });
2002
- class mt extends re {
2045
+ class mt extends se {
2003
2046
  constructor(t) {
2004
2047
  super(t, {
2005
2048
  code: mt.code,
@@ -2014,7 +2057,7 @@ Object.defineProperty(mt, "code", {
2014
2057
  writable: !0,
2015
2058
  value: 4900
2016
2059
  });
2017
- class ht extends re {
2060
+ class ht extends se {
2018
2061
  constructor(t) {
2019
2062
  super(t, {
2020
2063
  code: ht.code,
@@ -2029,7 +2072,7 @@ Object.defineProperty(ht, "code", {
2029
2072
  writable: !0,
2030
2073
  value: 4901
2031
2074
  });
2032
- class gt extends re {
2075
+ class gt extends se {
2033
2076
  constructor(t) {
2034
2077
  super(t, {
2035
2078
  code: gt.code,
@@ -2044,7 +2087,7 @@ Object.defineProperty(gt, "code", {
2044
2087
  writable: !0,
2045
2088
  value: 4902
2046
2089
  });
2047
- class jo extends B {
2090
+ class Ho extends I {
2048
2091
  constructor(t) {
2049
2092
  super(t, {
2050
2093
  name: "UnknownRpcError",
@@ -2052,15 +2095,15 @@ class jo extends B {
2052
2095
  });
2053
2096
  }
2054
2097
  }
2055
- const Os = 3;
2056
- function Ae(e, { abi: t, address: n, args: r, docsPath: s, functionName: a, sender: o }) {
2057
- const { code: i, data: c, message: u, shortMessage: d } = e instanceof wn ? e : e instanceof h ? e.walk((f) => "data" in f) || e.walk() : {}, l = e instanceof We ? new Rs({ functionName: a }) : [Os, Ee.code].includes(i) && (c || u || d) ? new Bs({
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({
2058
2101
  abi: t,
2059
- data: typeof c == "object" ? c.data : c,
2102
+ data: typeof u == "object" ? u.data : u,
2060
2103
  functionName: a,
2061
- message: d ?? u
2104
+ message: i instanceof Pn ? d : f ?? l
2062
2105
  }) : e;
2063
- return new ks(l, {
2106
+ return new Gs(b, {
2064
2107
  abi: t,
2065
2108
  args: r,
2066
2109
  contractAddress: n,
@@ -2069,18 +2112,18 @@ function Ae(e, { abi: t, address: n, args: r, docsPath: s, functionName: a, send
2069
2112
  sender: o
2070
2113
  });
2071
2114
  }
2072
- function zs(e) {
2115
+ function Us(e) {
2073
2116
  const t = ie(`0x${e.substring(4)}`).substring(26);
2074
- return Yt(`0x${t}`);
2117
+ return Xt(`0x${t}`);
2075
2118
  }
2076
- async function Gs({ hash: e, signature: t }) {
2077
- const n = je(e) ? e : At(e), { secp256k1: r } = await import("./secp256k1-3OC5y4qp.js");
2119
+ async function Vs({ hash: e, signature: t }) {
2120
+ const n = je(e) ? e : $t(e), { secp256k1: r } = await import("./secp256k1-Ev0s9Yr6.js");
2078
2121
  return `0x${(() => {
2079
2122
  if (typeof t == "object" && "r" in t && "s" in t) {
2080
- const { r: u, s: d, v: l, yParity: f } = t, y = Number(f ?? l), p = Ht(y);
2123
+ const { r: u, s: d, v: l, yParity: f } = t, b = Number(f ?? l), p = Ht(b);
2081
2124
  return new r.Signature(fe(u), fe(d)).addRecoveryBit(p);
2082
2125
  }
2083
- const o = je(t) ? t : At(t), i = ge(`0x${o.slice(130)}`), c = Ht(i);
2126
+ const o = je(t) ? t : $t(t), i = ge(`0x${o.slice(130)}`), c = Ht(i);
2084
2127
  return r.Signature.fromCompact(o.substring(2, 130)).addRecoveryBit(c);
2085
2128
  })().recoverPublicKey(n.substring(2)).toHex(!1)}`;
2086
2129
  }
@@ -2093,39 +2136,39 @@ function Ht(e) {
2093
2136
  return 1;
2094
2137
  throw new Error("Invalid yParityOrV value");
2095
2138
  }
2096
- async function Ds({ hash: e, signature: t }) {
2097
- return zs(await Gs({ hash: e, signature: t }));
2139
+ async function Zs({ hash: e, signature: t }) {
2140
+ return Us(await Vs({ hash: e, signature: t }));
2098
2141
  }
2099
- function _s(e) {
2142
+ function Ws(e) {
2100
2143
  const { chainId: t, contractAddress: n, nonce: r, to: s } = e, a = ie(Ue([
2101
2144
  "0x05",
2102
- Dn([
2145
+ Hn([
2103
2146
  t ? v(t) : "0x",
2104
2147
  n,
2105
2148
  r ? v(r) : "0x"
2106
2149
  ])
2107
2150
  ]));
2108
- return s === "bytes" ? Jt(a) : a;
2151
+ return s === "bytes" ? Yt(a) : a;
2109
2152
  }
2110
- async function vn(e) {
2153
+ async function En(e) {
2111
2154
  const { authorization: t, signature: n } = e;
2112
- return Ds({
2113
- hash: _s(t),
2155
+ return Zs({
2156
+ hash: Ws(t),
2114
2157
  signature: n ?? t
2115
2158
  });
2116
2159
  }
2117
- class Ls extends h {
2160
+ class Ks extends h {
2118
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 }) {
2119
2162
  var p;
2120
- const y = Ze({
2163
+ const b = Ze({
2121
2164
  from: n == null ? void 0 : n.address,
2122
2165
  to: l,
2123
- value: typeof f < "u" && `${Xt(f)} ${((p = s == null ? void 0 : s.nativeCurrency) == null ? void 0 : p.symbol) || "ETH"}`,
2166
+ value: typeof f < "u" && `${Qt(f)} ${((p = s == null ? void 0 : s.nativeCurrency) == null ? void 0 : p.symbol) || "ETH"}`,
2124
2167
  data: a,
2125
2168
  gas: o,
2126
- gasPrice: typeof i < "u" && `${J(i)} gwei`,
2127
- maxFeePerGas: typeof c < "u" && `${J(c)} gwei`,
2128
- maxPriorityFeePerGas: typeof u < "u" && `${J(u)} gwei`,
2169
+ gasPrice: typeof i < "u" && `${K(i)} gwei`,
2170
+ maxFeePerGas: typeof c < "u" && `${K(c)} gwei`,
2171
+ maxPriorityFeePerGas: typeof u < "u" && `${K(u)} gwei`,
2129
2172
  nonce: d
2130
2173
  });
2131
2174
  super(t.shortMessage, {
@@ -2134,7 +2177,7 @@ class Ls extends h {
2134
2177
  metaMessages: [
2135
2178
  ...t.metaMessages ? [...t.metaMessages, " "] : [],
2136
2179
  "Estimate Gas Arguments:",
2137
- y
2180
+ b
2138
2181
  ].filter(Boolean),
2139
2182
  name: "EstimateGasExecutionError"
2140
2183
  }), Object.defineProperty(this, "cause", {
@@ -2159,7 +2202,7 @@ function wt(e, t) {
2159
2202
  }) : Ft.nodeMessage.test(n) ? new Ft({
2160
2203
  cause: e,
2161
2204
  maxFeePerGas: t == null ? void 0 : t.maxFeePerGas
2162
- }) : Mt.nodeMessage.test(n) ? new Mt({ cause: e, nonce: t == null ? void 0 : t.nonce }) : St.nodeMessage.test(n) ? new St({ cause: e, nonce: t == null ? void 0 : t.nonce }) : Ct.nodeMessage.test(n) ? new Ct({ cause: e, nonce: t == null ? void 0 : t.nonce }) : Tt.nodeMessage.test(n) ? new Tt({ cause: e }) : kt.nodeMessage.test(n) ? new kt({ cause: e, gas: t == null ? void 0 : t.gas }) : Bt.nodeMessage.test(n) ? new Bt({ cause: e, gas: t == null ? void 0 : t.gas }) : Rt.nodeMessage.test(n) ? new Rt({ cause: e }) : Oe.nodeMessage.test(n) ? new Oe({
2205
+ }) : Mt.nodeMessage.test(n) ? new Mt({ cause: e, nonce: t == null ? void 0 : t.nonce }) : St.nodeMessage.test(n) ? new St({ cause: e, nonce: t == null ? void 0 : t.nonce }) : Ct.nodeMessage.test(n) ? new Ct({ cause: e, nonce: t == null ? void 0 : t.nonce }) : kt.nodeMessage.test(n) ? new kt({ cause: e }) : Tt.nodeMessage.test(n) ? new Tt({ cause: e, gas: t == null ? void 0 : t.gas }) : It.nodeMessage.test(n) ? new It({ cause: e, gas: t == null ? void 0 : t.gas }) : Bt.nodeMessage.test(n) ? new Bt({ cause: e }) : Oe.nodeMessage.test(n) ? new Oe({
2163
2206
  cause: e,
2164
2207
  maxFeePerGas: t == null ? void 0 : t.maxFeePerGas,
2165
2208
  maxPriorityFeePerGas: t == null ? void 0 : t.maxPriorityFeePerGas
@@ -2167,12 +2210,12 @@ function wt(e, t) {
2167
2210
  cause: e
2168
2211
  });
2169
2212
  }
2170
- function Hs(e, { docsPath: t, ...n }) {
2213
+ function Js(e, { docsPath: t, ...n }) {
2171
2214
  const r = (() => {
2172
2215
  const s = wt(e, n);
2173
2216
  return s instanceof we ? e : s;
2174
2217
  })();
2175
- return new Ls(r, {
2218
+ return new Ks(r, {
2176
2219
  docsPath: t,
2177
2220
  ...n
2178
2221
  });
@@ -2189,7 +2232,7 @@ function vt(e, { format: t }) {
2189
2232
  const s = t(e || {});
2190
2233
  return r(s), n;
2191
2234
  }
2192
- const qs = {
2235
+ const Ys = {
2193
2236
  legacy: "0x0",
2194
2237
  eip2930: "0x1",
2195
2238
  eip1559: "0x2",
@@ -2198,9 +2241,9 @@ const qs = {
2198
2241
  };
2199
2242
  function xt(e) {
2200
2243
  const t = {};
2201
- return typeof e.authorizationList < "u" && (t.authorizationList = Us(e.authorizationList)), typeof e.accessList < "u" && (t.accessList = e.accessList), typeof e.blobVersionedHashes < "u" && (t.blobVersionedHashes = e.blobVersionedHashes), typeof e.blobs < "u" && (typeof e.blobs[0] != "string" ? t.blobs = e.blobs.map((n) => Y(n)) : t.blobs = e.blobs), typeof e.data < "u" && (t.data = e.data), typeof e.from < "u" && (t.from = e.from), typeof e.gas < "u" && (t.gas = v(e.gas)), typeof e.gasPrice < "u" && (t.gasPrice = v(e.gasPrice)), typeof e.maxFeePerBlobGas < "u" && (t.maxFeePerBlobGas = v(e.maxFeePerBlobGas)), typeof e.maxFeePerGas < "u" && (t.maxFeePerGas = v(e.maxFeePerGas)), typeof e.maxPriorityFeePerGas < "u" && (t.maxPriorityFeePerGas = v(e.maxPriorityFeePerGas)), typeof e.nonce < "u" && (t.nonce = v(e.nonce)), typeof e.to < "u" && (t.to = e.to), typeof e.type < "u" && (t.type = qs[e.type]), typeof e.value < "u" && (t.value = v(e.value)), t;
2244
+ return typeof e.authorizationList < "u" && (t.authorizationList = Xs(e.authorizationList)), typeof e.accessList < "u" && (t.accessList = e.accessList), typeof e.blobVersionedHashes < "u" && (t.blobVersionedHashes = e.blobVersionedHashes), typeof e.blobs < "u" && (typeof e.blobs[0] != "string" ? t.blobs = e.blobs.map((n) => J(n)) : t.blobs = e.blobs), typeof e.data < "u" && (t.data = e.data), typeof e.from < "u" && (t.from = e.from), typeof e.gas < "u" && (t.gas = v(e.gas)), typeof e.gasPrice < "u" && (t.gasPrice = v(e.gasPrice)), typeof e.maxFeePerBlobGas < "u" && (t.maxFeePerBlobGas = v(e.maxFeePerBlobGas)), typeof e.maxFeePerGas < "u" && (t.maxFeePerGas = v(e.maxFeePerGas)), typeof e.maxPriorityFeePerGas < "u" && (t.maxPriorityFeePerGas = v(e.maxPriorityFeePerGas)), typeof e.nonce < "u" && (t.nonce = v(e.nonce)), typeof e.to < "u" && (t.to = e.to), typeof e.type < "u" && (t.type = Ys[e.type]), typeof e.value < "u" && (t.value = v(e.value)), t;
2202
2245
  }
2203
- function Us(e) {
2246
+ function Xs(e) {
2204
2247
  return e.map((t) => ({
2205
2248
  address: t.contractAddress,
2206
2249
  r: t.r,
@@ -2215,13 +2258,13 @@ function qt(e) {
2215
2258
  if (!(!e || e.length === 0))
2216
2259
  return e.reduce((t, { slot: n, value: r }) => {
2217
2260
  if (n.length !== 66)
2218
- throw new It({
2261
+ throw new Rt({
2219
2262
  size: n.length,
2220
2263
  targetSize: 66,
2221
2264
  type: "hex"
2222
2265
  });
2223
2266
  if (r.length !== 66)
2224
- throw new It({
2267
+ throw new Rt({
2225
2268
  size: r.length,
2226
2269
  targetSize: 66,
2227
2270
  type: "hex"
@@ -2229,16 +2272,16 @@ function qt(e) {
2229
2272
  return t[n] = r, t;
2230
2273
  }, {});
2231
2274
  }
2232
- function Vs(e) {
2275
+ function Qs(e) {
2233
2276
  const { balance: t, nonce: n, state: r, stateDiff: s, code: a } = e, o = {};
2234
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) {
2235
2278
  if (o.state)
2236
- throw new Ms();
2279
+ throw new js();
2237
2280
  o.stateDiff = qt(s);
2238
2281
  }
2239
2282
  return o;
2240
2283
  }
2241
- function xn(e) {
2284
+ function An(e) {
2242
2285
  if (!e)
2243
2286
  return;
2244
2287
  const t = {};
@@ -2246,25 +2289,25 @@ function xn(e) {
2246
2289
  if (!H(n, { strict: !1 }))
2247
2290
  throw new te({ address: n });
2248
2291
  if (t[n])
2249
- throw new Fs({ address: n });
2250
- t[n] = Vs(r);
2292
+ throw new Rs({ address: n });
2293
+ t[n] = Qs(r);
2251
2294
  }
2252
2295
  return t;
2253
2296
  }
2254
2297
  function Fe(e) {
2255
- const { account: t, gasPrice: n, maxFeePerGas: r, maxPriorityFeePerGas: s, to: a } = e, o = t ? U(t) : void 0;
2298
+ const { account: t, gasPrice: n, maxFeePerGas: r, maxPriorityFeePerGas: s, to: a } = e, o = t ? V(t) : void 0;
2256
2299
  if (o && !H(o.address))
2257
2300
  throw new te({ address: o.address });
2258
2301
  if (a && !H(a))
2259
2302
  throw new te({ address: a });
2260
2303
  if (typeof n < "u" && (typeof r < "u" || typeof s < "u"))
2261
- throw new _n();
2262
- if (r && r > Ln)
2304
+ throw new qn();
2305
+ if (r && r > Un)
2263
2306
  throw new Ne({ maxFeePerGas: r });
2264
2307
  if (s && r && s > r)
2265
2308
  throw new Oe({ maxFeePerGas: r, maxPriorityFeePerGas: s });
2266
2309
  }
2267
- class Zs extends h {
2310
+ class eo extends h {
2268
2311
  constructor() {
2269
2312
  super("`baseFeeMultiplier` must be greater than 1.", {
2270
2313
  name: "BaseFeeScalarError"
@@ -2278,12 +2321,12 @@ class Pt extends h {
2278
2321
  });
2279
2322
  }
2280
2323
  }
2281
- class Ws extends h {
2324
+ class to extends h {
2282
2325
  constructor({ maxPriorityFeePerGas: t }) {
2283
- super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${J(t)} gwei).`, { name: "MaxFeePerGasTooLowError" });
2326
+ super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${K(t)} gwei).`, { name: "MaxFeePerGasTooLowError" });
2284
2327
  }
2285
2328
  }
2286
- class Ks extends h {
2329
+ class no extends h {
2287
2330
  constructor({ blockHash: t, blockNumber: n }) {
2288
2331
  let r = "Block";
2289
2332
  t && (r = `Block at hash "${t}"`), n && (r = `Block at number "${n}"`), super(`${r} could not be found.`, { name: "BlockNotFoundError" });
@@ -2300,25 +2343,25 @@ async function me(e, { blockHash: t, blockNumber: n, blockTag: r, includeTransac
2300
2343
  method: "eth_getBlockByNumber",
2301
2344
  params: [i || a, o]
2302
2345
  }, { dedupe: !!i }), !c)
2303
- throw new Ks({ blockHash: t, blockNumber: n });
2304
- return (((f = (l = (d = e.chain) == null ? void 0 : d.formatters) == null ? void 0 : l.block) == null ? void 0 : f.format) || Hn)(c);
2346
+ throw new no({ blockHash: t, blockNumber: n });
2347
+ return (((f = (l = (d = e.chain) == null ? void 0 : d.formatters) == null ? void 0 : l.block) == null ? void 0 : f.format) || Vn)(c);
2305
2348
  }
2306
- async function Pn(e) {
2349
+ async function $n(e) {
2307
2350
  const t = await e.request({
2308
2351
  method: "eth_gasPrice"
2309
2352
  });
2310
2353
  return BigInt(t);
2311
2354
  }
2312
- async function No(e, t) {
2313
- return En(e, t);
2355
+ async function qo(e, t) {
2356
+ return Fn(e, t);
2314
2357
  }
2315
- async function En(e, t) {
2358
+ async function Fn(e, t) {
2316
2359
  var a, o;
2317
2360
  const { block: n, chain: r = e.chain, request: s } = t || {};
2318
2361
  try {
2319
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);
2320
2363
  if (typeof i == "function") {
2321
- const u = n || await A(e, me, "getBlock")({}), d = await i({
2364
+ const u = n || await $(e, me, "getBlock")({}), d = await i({
2322
2365
  block: u,
2323
2366
  client: e,
2324
2367
  request: s
@@ -2335,8 +2378,8 @@ async function En(e, t) {
2335
2378
  return fe(c);
2336
2379
  } catch {
2337
2380
  const [i, c] = await Promise.all([
2338
- n ? Promise.resolve(n) : A(e, me, "getBlock")({}),
2339
- A(e, Pn, "getGasPrice")({})
2381
+ n ? Promise.resolve(n) : $(e, me, "getBlock")({}),
2382
+ $(e, $n, "getGasPrice")({})
2340
2383
  ]);
2341
2384
  if (typeof i.baseFeePerGas != "bigint")
2342
2385
  throw new Pt();
@@ -2344,23 +2387,23 @@ async function En(e, t) {
2344
2387
  return u < 0n ? 0n : u;
2345
2388
  }
2346
2389
  }
2347
- async function Oo(e, t) {
2390
+ async function Uo(e, t) {
2348
2391
  return He(e, t);
2349
2392
  }
2350
2393
  async function He(e, t) {
2351
- var f, y;
2394
+ var f, b;
2352
2395
  const { block: n, chain: r = e.chain, request: s, type: a = "eip1559" } = t || {}, o = await (async () => {
2353
- var p, b;
2396
+ var p, y;
2354
2397
  return typeof ((p = r == null ? void 0 : r.fees) == null ? void 0 : p.baseFeeMultiplier) == "function" ? r.fees.baseFeeMultiplier({
2355
2398
  block: n,
2356
2399
  client: e,
2357
2400
  request: s
2358
- }) : ((b = r == null ? void 0 : r.fees) == null ? void 0 : b.baseFeeMultiplier) ?? 1.2;
2401
+ }) : ((y = r == null ? void 0 : r.fees) == null ? void 0 : y.baseFeeMultiplier) ?? 1.2;
2359
2402
  })();
2360
2403
  if (o < 1)
2361
- throw new Zs();
2362
- 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 A(e, me, "getBlock")({});
2363
- if (typeof ((y = r == null ? void 0 : r.fees) == null ? void 0 : y.estimateFeesPerGas) == "function") {
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")({});
2406
+ if (typeof ((b = r == null ? void 0 : r.fees) == null ? void 0 : b.estimateFeesPerGas) == "function") {
2364
2407
  const p = await r.fees.estimateFeesPerGas({
2365
2408
  block: n,
2366
2409
  client: e,
@@ -2374,62 +2417,75 @@ async function He(e, t) {
2374
2417
  if (a === "eip1559") {
2375
2418
  if (typeof d.baseFeePerGas != "bigint")
2376
2419
  throw new Pt();
2377
- const p = typeof (s == null ? void 0 : s.maxPriorityFeePerGas) == "bigint" ? s.maxPriorityFeePerGas : await En(e, {
2420
+ const p = typeof (s == null ? void 0 : s.maxPriorityFeePerGas) == "bigint" ? s.maxPriorityFeePerGas : await Fn(e, {
2378
2421
  block: d,
2379
2422
  chain: r,
2380
2423
  request: s
2381
- }), b = u(d.baseFeePerGas);
2424
+ }), y = u(d.baseFeePerGas);
2382
2425
  return {
2383
- maxFeePerGas: (s == null ? void 0 : s.maxFeePerGas) ?? b + p,
2426
+ maxFeePerGas: (s == null ? void 0 : s.maxFeePerGas) ?? y + p,
2384
2427
  maxPriorityFeePerGas: p
2385
2428
  };
2386
2429
  }
2387
2430
  return {
2388
- gasPrice: (s == null ? void 0 : s.gasPrice) ?? u(await A(e, Pn, "getGasPrice")({}))
2431
+ gasPrice: (s == null ? void 0 : s.gasPrice) ?? u(await $(e, $n, "getGasPrice")({}))
2389
2432
  };
2390
2433
  }
2391
- async function Js(e, { address: t, blockTag: n = "latest", blockNumber: r }) {
2434
+ async function ro(e, { address: t, blockTag: n = "latest", blockNumber: r }) {
2392
2435
  const s = await e.request({
2393
2436
  method: "eth_getTransactionCount",
2394
2437
  params: [t, r ? v(r) : n]
2395
2438
  }, { dedupe: !!r });
2396
2439
  return ge(s);
2397
2440
  }
2398
- async function $n(e) {
2441
+ async function Mn(e) {
2399
2442
  const t = await e.request({
2400
2443
  method: "eth_chainId"
2401
2444
  }, { dedupe: !0 });
2402
2445
  return ge(t);
2403
2446
  }
2404
- const An = [
2447
+ const Sn = [
2405
2448
  "blobVersionedHashes",
2406
2449
  "chainId",
2407
2450
  "fees",
2408
2451
  "gas",
2409
2452
  "nonce",
2410
2453
  "type"
2411
- ];
2412
- async function Fn(e, t) {
2413
- const { account: n = e.account, blobs: r, chain: s, gas: a, kzg: o, nonce: i, nonceManager: c, parameters: u = An, type: d } = t, l = n && U(n), f = { ...t, ...l ? { from: l == null ? void 0 : l.address } : {} };
2414
- let y;
2454
+ ], Ut = /* @__PURE__ */ new Map();
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 } : {} };
2457
+ let b;
2415
2458
  async function p() {
2416
- return y || (y = await A(e, me, "getBlock")({ blockTag: "latest" }), y);
2459
+ return b || (b = await $(e, me, "getBlock")({ blockTag: "latest" }), b);
2417
2460
  }
2418
- let b;
2461
+ let y;
2419
2462
  async function m() {
2420
- return b || (s ? s.id : typeof t.chainId < "u" ? t.chainId : (b = await A(e, $n, "getChainId")({}), b));
2463
+ return y || (s ? s.id : typeof t.chainId < "u" ? t.chainId : (y = await $(e, Mn, "getChainId")({}), y));
2421
2464
  }
2465
+ if (u.includes("nonce") && typeof i > "u" && l)
2466
+ if (c) {
2467
+ const w = await m();
2468
+ f.nonce = await c.consume({
2469
+ address: l.address,
2470
+ chainId: w,
2471
+ client: e
2472
+ });
2473
+ } else
2474
+ f.nonce = await $(e, ro, "getTransactionCount")({
2475
+ address: l.address,
2476
+ blockTag: "pending"
2477
+ });
2422
2478
  if ((u.includes("blobVersionedHashes") || u.includes("sidecars")) && r && o) {
2423
- const w = qn({ blobs: r, kzg: o });
2479
+ const w = Zn({ blobs: r, kzg: o });
2424
2480
  if (u.includes("blobVersionedHashes")) {
2425
- const g = Un({
2481
+ const g = Wn({
2426
2482
  commitments: w,
2427
2483
  to: "hex"
2428
2484
  });
2429
2485
  f.blobVersionedHashes = g;
2430
2486
  }
2431
2487
  if (u.includes("sidecars")) {
2432
- const g = Vn({ blobs: r, commitments: w, kzg: o }), x = Zn({
2488
+ const g = Kn({ blobs: r, commitments: w, kzg: o }), x = Jn({
2433
2489
  blobs: r,
2434
2490
  commitments: w,
2435
2491
  proofs: g,
@@ -2438,25 +2494,16 @@ async function Fn(e, t) {
2438
2494
  f.sidecars = x;
2439
2495
  }
2440
2496
  }
2441
- if (u.includes("chainId") && (f.chainId = await m()), u.includes("nonce") && typeof i > "u" && l)
2442
- if (c) {
2443
- const w = await m();
2444
- f.nonce = await c.consume({
2445
- address: l.address,
2446
- chainId: w,
2447
- client: e
2448
- });
2449
- } else
2450
- f.nonce = await A(e, Js, "getTransactionCount")({
2451
- address: l.address,
2452
- blockTag: "pending"
2453
- });
2454
- if ((u.includes("fees") || u.includes("type")) && typeof d > "u")
2497
+ if (u.includes("chainId") && (f.chainId = await m()), (u.includes("fees") || u.includes("type")) && typeof d > "u")
2455
2498
  try {
2456
- f.type = Wn(f);
2499
+ f.type = Yn(f);
2457
2500
  } catch {
2458
- const w = await p();
2459
- f.type = typeof (w == null ? void 0 : w.baseFeePerGas) == "bigint" ? "eip1559" : "legacy";
2501
+ let w = Ut.get(e.uid);
2502
+ if (typeof w > "u") {
2503
+ const g = await p();
2504
+ w = typeof (g == null ? void 0 : g.baseFeePerGas) == "bigint", Ut.set(e.uid, w);
2505
+ }
2506
+ f.type = w ? "eip1559" : "legacy";
2460
2507
  }
2461
2508
  if (u.includes("fees"))
2462
2509
  if (f.type !== "legacy" && f.type !== "eip2930") {
@@ -2467,7 +2514,7 @@ async function Fn(e, t) {
2467
2514
  request: f
2468
2515
  });
2469
2516
  if (typeof t.maxPriorityFeePerGas > "u" && t.maxFeePerGas && t.maxFeePerGas < x)
2470
- throw new Ws({
2517
+ throw new to({
2471
2518
  maxPriorityFeePerGas: x
2472
2519
  });
2473
2520
  f.maxPriorityFeePerGas = x, f.maxFeePerGas = g;
@@ -2475,115 +2522,117 @@ async function Fn(e, t) {
2475
2522
  } else {
2476
2523
  if (typeof t.maxFeePerGas < "u" || typeof t.maxPriorityFeePerGas < "u")
2477
2524
  throw new Pt();
2478
- const w = await p(), { gasPrice: g } = await He(e, {
2479
- block: w,
2480
- chain: s,
2481
- request: f,
2482
- type: "legacy"
2483
- });
2484
- f.gasPrice = g;
2525
+ if (typeof t.gasPrice > "u") {
2526
+ const w = await p(), { gasPrice: g } = await He(e, {
2527
+ block: w,
2528
+ chain: s,
2529
+ request: f,
2530
+ type: "legacy"
2531
+ });
2532
+ f.gasPrice = g;
2533
+ }
2485
2534
  }
2486
- return u.includes("gas") && typeof a > "u" && (f.gas = await A(e, Mn, "estimateGas")({
2535
+ return u.includes("gas") && typeof a > "u" && (f.gas = await $(e, kn, "estimateGas")({
2487
2536
  ...f,
2488
2537
  account: l && { address: l.address, type: "json-rpc" }
2489
2538
  })), Fe(f), delete f.parameters, f;
2490
2539
  }
2491
- async function Ys(e, { address: t, blockNumber: n, blockTag: r = "latest" }) {
2540
+ async function so(e, { address: t, blockNumber: n, blockTag: r = "latest" }) {
2492
2541
  const s = n ? v(n) : void 0, a = await e.request({
2493
2542
  method: "eth_getBalance",
2494
2543
  params: [t, s || r]
2495
2544
  });
2496
2545
  return BigInt(a);
2497
2546
  }
2498
- async function Mn(e, t) {
2547
+ async function kn(e, t) {
2499
2548
  var s, a, o;
2500
- const { account: n = e.account } = t, r = n ? U(n) : void 0;
2549
+ const { account: n = e.account } = t, r = n ? V(n) : void 0;
2501
2550
  try {
2502
- let O = function(k) {
2503
- const { block: z, request: j, rpcStateOverride: Z } = k;
2551
+ let O = function(T) {
2552
+ const { block: z, request: j, rpcStateOverride: Z } = T;
2504
2553
  return e.request({
2505
2554
  method: "eth_estimateGas",
2506
2555
  params: Z ? [j, z ?? "latest", Z] : z ? [j, z] : [j]
2507
2556
  });
2508
2557
  };
2509
- const { accessList: i, authorizationList: c, blobs: u, blobVersionedHashes: d, blockNumber: l, blockTag: f, data: y, gas: p, gasPrice: b, maxFeePerBlobGas: m, maxFeePerGas: w, maxPriorityFeePerGas: g, nonce: x, value: $, stateOverride: F, ...M } = await Fn(e, {
2558
+ const { accessList: i, authorizationList: c, blobs: u, blobVersionedHashes: d, blockNumber: l, blockTag: f, data: b, gas: p, gasPrice: y, maxFeePerBlobGas: m, maxFeePerGas: w, maxPriorityFeePerGas: g, nonce: x, value: A, stateOverride: F, ...M } = await Cn(e, {
2510
2559
  ...t,
2511
2560
  parameters: (
2512
2561
  // Some RPC Providers do not compute versioned hashes from blobs. We will need
2513
2562
  // to compute them.
2514
2563
  (r == null ? void 0 : r.type) === "local" ? void 0 : ["blobVersionedHashes"]
2515
2564
  )
2516
- }), P = (l ? v(l) : void 0) || f, E = xn(F), _ = await (async () => {
2565
+ }), P = (l ? v(l) : void 0) || f, E = An(F), _ = await (async () => {
2517
2566
  if (M.to)
2518
2567
  return M.to;
2519
2568
  if (c && c.length > 0)
2520
- return await vn({
2569
+ return await En({
2521
2570
  authorization: c[0]
2522
2571
  }).catch(() => {
2523
2572
  throw new h("`to` is required. Could not infer from `authorizationList`");
2524
2573
  });
2525
2574
  })();
2526
2575
  Fe(t);
2527
- const T = (o = (a = (s = e.chain) == null ? void 0 : s.formatters) == null ? void 0 : a.transactionRequest) == null ? void 0 : o.format, S = (T || xt)({
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)({
2528
2577
  // Pick out extra data that might exist on the chain's transaction request type.
2529
- ...vt(M, { format: T }),
2578
+ ...vt(M, { format: k }),
2530
2579
  from: r == null ? void 0 : r.address,
2531
2580
  accessList: i,
2532
2581
  authorizationList: c,
2533
2582
  blobs: u,
2534
2583
  blobVersionedHashes: d,
2535
- data: y,
2584
+ data: b,
2536
2585
  gas: p,
2537
- gasPrice: b,
2586
+ gasPrice: y,
2538
2587
  maxFeePerBlobGas: m,
2539
2588
  maxFeePerGas: w,
2540
2589
  maxPriorityFeePerGas: g,
2541
2590
  nonce: x,
2542
2591
  to: _,
2543
- value: $
2592
+ value: A
2544
2593
  });
2545
- let I = BigInt(await O({ block: P, request: S, rpcStateOverride: E }));
2594
+ let R = BigInt(await O({ block: P, request: S, rpcStateOverride: E }));
2546
2595
  if (c) {
2547
- const k = await Ys(e, { address: S.from }), z = await Promise.all(c.map(async (j) => {
2596
+ const T = await so(e, { address: S.from }), z = await Promise.all(c.map(async (j) => {
2548
2597
  const { contractAddress: Z } = j, X = await O({
2549
2598
  block: P,
2550
2599
  request: {
2551
2600
  authorizationList: void 0,
2552
- data: y,
2601
+ data: b,
2553
2602
  from: r == null ? void 0 : r.address,
2554
2603
  to: Z,
2555
- value: v(k)
2604
+ value: v(T)
2556
2605
  },
2557
2606
  rpcStateOverride: E
2558
2607
  }).catch(() => 100000n);
2559
2608
  return 2n * BigInt(X);
2560
2609
  }));
2561
- I += z.reduce((j, Z) => j + Z, 0n);
2610
+ R += z.reduce((j, Z) => j + Z, 0n);
2562
2611
  }
2563
- return I;
2612
+ return R;
2564
2613
  } catch (i) {
2565
- throw Hs(i, {
2614
+ throw Js(i, {
2566
2615
  ...t,
2567
2616
  account: r,
2568
2617
  chain: e.chain
2569
2618
  });
2570
2619
  }
2571
2620
  }
2572
- async function zo(e, t) {
2621
+ async function Vo(e, t) {
2573
2622
  const { abi: n, address: r, args: s, functionName: a, dataSuffix: o, ...i } = t, c = ue({
2574
2623
  abi: n,
2575
2624
  args: s,
2576
2625
  functionName: a
2577
2626
  });
2578
2627
  try {
2579
- return await A(e, Mn, "estimateGas")({
2628
+ return await $(e, kn, "estimateGas")({
2580
2629
  data: `${c}${o ? o.replace("0x", "") : ""}`,
2581
2630
  to: r,
2582
2631
  ...i
2583
2632
  });
2584
2633
  } catch (u) {
2585
- const d = i.account ? U(i.account) : void 0;
2586
- throw Ae(u, {
2634
+ const d = i.account ? V(i.account) : void 0;
2635
+ throw $e(u, {
2587
2636
  abi: n,
2588
2637
  address: r,
2589
2638
  args: s,
@@ -2593,55 +2642,55 @@ async function zo(e, t) {
2593
2642
  });
2594
2643
  }
2595
2644
  }
2596
- function Xs(e, t) {
2645
+ function oo(e, t) {
2597
2646
  if (!H(e, { strict: !1 }))
2598
2647
  throw new te({ address: e });
2599
2648
  if (!H(t, { strict: !1 }))
2600
2649
  throw new te({ address: t });
2601
2650
  return e.toLowerCase() === t.toLowerCase();
2602
2651
  }
2603
- const Ut = "/docs/contract/decodeEventLog";
2604
- function Sn(e) {
2652
+ const Vt = "/docs/contract/decodeEventLog";
2653
+ function Tn(e) {
2605
2654
  const { abi: t, data: n, strict: r, topics: s } = e, a = r ?? !0, [o, ...i] = s;
2606
2655
  if (!o)
2607
- throw new Lr({ docsPath: Ut });
2608
- const c = t.length === 1 ? t[0] : t.find((b) => b.type === "event" && o === xe(q(b)));
2656
+ throw new Jr({ docsPath: Vt });
2657
+ const c = t.length === 1 ? t[0] : t.find((y) => y.type === "event" && o === xe(q(y)));
2609
2658
  if (!(c && "name" in c) || c.type !== "event")
2610
- throw new bn(o, { docsPath: Ut });
2611
- const { name: u, inputs: d } = c, l = d == null ? void 0 : d.some((b) => !("name" in b && b.name));
2659
+ throw new hn(o, { docsPath: Vt });
2660
+ const { name: u, inputs: d } = c, l = d == null ? void 0 : d.some((y) => !("name" in y && y.name));
2612
2661
  let f = l ? [] : {};
2613
- const y = d.filter((b) => "indexed" in b && b.indexed);
2614
- for (let b = 0; b < y.length; b++) {
2615
- const m = y[b], w = i[b];
2662
+ const b = d.filter((y) => "indexed" in y && y.indexed);
2663
+ for (let y = 0; y < b.length; y++) {
2664
+ const m = b[y], w = i[y];
2616
2665
  if (!w)
2617
2666
  throw new Ke({
2618
2667
  abiItem: c,
2619
2668
  param: m
2620
2669
  });
2621
- f[l ? b : m.name || b] = Qs({ param: m, value: w });
2670
+ f[l ? y : m.name || y] = ao({ param: m, value: w });
2622
2671
  }
2623
- const p = d.filter((b) => !("indexed" in b && b.indexed));
2672
+ const p = d.filter((y) => !("indexed" in y && y.indexed));
2624
2673
  if (p.length > 0) {
2625
2674
  if (n && n !== "0x")
2626
2675
  try {
2627
- const b = Pe(p, n);
2628
- if (b)
2676
+ const y = Pe(p, n);
2677
+ if (y)
2629
2678
  if (l)
2630
- f = [...f, ...b];
2679
+ f = [...f, ...y];
2631
2680
  else
2632
2681
  for (let m = 0; m < p.length; m++)
2633
- f[p[m].name] = b[m];
2634
- } catch (b) {
2682
+ f[p[m].name] = y[m];
2683
+ } catch (y) {
2635
2684
  if (a)
2636
- throw b instanceof pn || b instanceof Kn ? new be({
2685
+ throw y instanceof yn || y instanceof Xn ? new ye({
2637
2686
  abiItem: c,
2638
2687
  data: n,
2639
2688
  params: p,
2640
2689
  size: D(n)
2641
- }) : b;
2690
+ }) : y;
2642
2691
  }
2643
2692
  else if (a)
2644
- throw new be({
2693
+ throw new ye({
2645
2694
  abiItem: c,
2646
2695
  data: "0x",
2647
2696
  params: p,
@@ -2653,10 +2702,10 @@ function Sn(e) {
2653
2702
  args: Object.values(f).length > 0 ? f : void 0
2654
2703
  };
2655
2704
  }
2656
- function Qs({ param: e, value: t }) {
2705
+ function ao({ param: e, value: t }) {
2657
2706
  return e.type === "string" || e.type === "bytes" || e.type === "tuple" || e.type.match(/^(.*)\[(\d+)?\]$/) ? t : (Pe([e], t) || [])[0];
2658
2707
  }
2659
- function Cn(e) {
2708
+ function In(e) {
2660
2709
  const { abi: t, args: n, logs: r, strict: s = !0 } = e, a = (() => {
2661
2710
  if (e.eventName)
2662
2711
  return Array.isArray(e.eventName) ? e.eventName : [e.eventName];
@@ -2667,21 +2716,21 @@ function Cn(e) {
2667
2716
  const c = t.find((d) => d.type === "event" && o.topics[0] === xe(d));
2668
2717
  if (!c)
2669
2718
  return null;
2670
- const u = Sn({
2719
+ const u = Tn({
2671
2720
  ...o,
2672
2721
  abi: [c],
2673
2722
  strict: s
2674
2723
  });
2675
- return a && !a.includes(u.eventName) || !eo({
2724
+ return a && !a.includes(u.eventName) || !io({
2676
2725
  args: u.args,
2677
2726
  inputs: c.inputs,
2678
2727
  matchArgs: n
2679
2728
  }) ? null : { ...u, ...o };
2680
2729
  } catch (c) {
2681
2730
  let u, d;
2682
- if (c instanceof bn)
2731
+ if (c instanceof hn)
2683
2732
  return null;
2684
- if (c instanceof be || c instanceof Ke) {
2733
+ if (c instanceof ye || c instanceof Ke) {
2685
2734
  if (s)
2686
2735
  return null;
2687
2736
  u = c.abiItem.name, d = (i = c.abiItem.inputs) == null ? void 0 : i.some((l) => !("name" in l && l.name));
@@ -2690,7 +2739,7 @@ function Cn(e) {
2690
2739
  }
2691
2740
  }).filter(Boolean);
2692
2741
  }
2693
- function eo(e) {
2742
+ function io(e) {
2694
2743
  const { args: t, inputs: n, matchArgs: r } = e;
2695
2744
  if (!r)
2696
2745
  return !0;
@@ -2698,7 +2747,7 @@ function eo(e) {
2698
2747
  return !1;
2699
2748
  function s(a, o, i) {
2700
2749
  try {
2701
- return a.type === "address" ? Xs(o, i) : a.type === "string" || a.type === "bytes" ? ie(qe(o)) === i : o === i;
2750
+ return a.type === "address" ? oo(o, i) : a.type === "string" || a.type === "bytes" ? ie(qe(o)) === i : o === i;
2702
2751
  } catch {
2703
2752
  return !1;
2704
2753
  }
@@ -2715,12 +2764,12 @@ function eo(e) {
2715
2764
  return i ? (Array.isArray(o) ? o : [o]).some((u) => s(i, u, t[a])) : !1;
2716
2765
  }) : !1;
2717
2766
  }
2718
- async function to(e, { address: t, blockHash: n, fromBlock: r, toBlock: s, event: a, events: o, args: i, strict: c } = {}) {
2767
+ async function co(e, { address: t, blockHash: n, fromBlock: r, toBlock: s, event: a, events: o, args: i, strict: c } = {}) {
2719
2768
  const u = c ?? !1, d = o ?? (a ? [a] : void 0);
2720
2769
  let l = [];
2721
- d && (l = [d.flatMap((b) => tt({
2722
- abi: [b],
2723
- eventName: b.name,
2770
+ d && (l = [d.flatMap((y) => tt({
2771
+ abi: [y],
2772
+ eventName: y.name,
2724
2773
  args: o ? void 0 : i
2725
2774
  }))], a && (l = l[0]));
2726
2775
  let f;
@@ -2738,17 +2787,17 @@ async function to(e, { address: t, blockHash: n, fromBlock: r, toBlock: s, event
2738
2787
  }
2739
2788
  ]
2740
2789
  });
2741
- const y = f.map((p) => pe(p));
2742
- return d ? Cn({
2790
+ const b = f.map((p) => pe(p));
2791
+ return d ? In({
2743
2792
  abi: d,
2744
2793
  args: i,
2745
- logs: y,
2794
+ logs: b,
2746
2795
  strict: u
2747
- }) : y;
2796
+ }) : b;
2748
2797
  }
2749
- async function no(e, t) {
2798
+ async function uo(e, t) {
2750
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");
2751
- return A(e, to, "getLogs")({
2800
+ return $(e, co, "getLogs")({
2752
2801
  address: r,
2753
2802
  args: s,
2754
2803
  blockHash: a,
@@ -2766,20 +2815,20 @@ function Et(e) {
2766
2815
  if (r) {
2767
2816
  const i = ce({ abi: t, args: n, name: r });
2768
2817
  if (!i)
2769
- throw new ye(r, { docsPath: Ce });
2818
+ throw new be(r, { docsPath: Ce });
2770
2819
  a = i;
2771
2820
  }
2772
2821
  if (a.type !== "function")
2773
- throw new ye(void 0, { docsPath: Ce });
2822
+ throw new be(void 0, { docsPath: Ce });
2774
2823
  if (!a.outputs)
2775
- throw new Hr(a.name, { docsPath: Ce });
2824
+ throw new Yr(a.name, { docsPath: Ce });
2776
2825
  const o = Pe(a.outputs, s);
2777
2826
  if (o && o.length > 1)
2778
2827
  return o;
2779
2828
  if (o && o.length === 1)
2780
2829
  return o[0];
2781
2830
  }
2782
- const Vt = [
2831
+ const Zt = [
2783
2832
  {
2784
2833
  inputs: [
2785
2834
  {
@@ -2821,7 +2870,7 @@ const Vt = [
2821
2870
  stateMutability: "view",
2822
2871
  type: "function"
2823
2872
  }
2824
- ], Tn = [
2873
+ ], Bn = [
2825
2874
  {
2826
2875
  inputs: [],
2827
2876
  name: "ResolverNotFound",
@@ -2867,8 +2916,8 @@ const Vt = [
2867
2916
  name: "HttpError",
2868
2917
  type: "error"
2869
2918
  }
2870
- ], Go = [
2871
- ...Tn,
2919
+ ], Zo = [
2920
+ ...Bn,
2872
2921
  {
2873
2922
  name: "resolve",
2874
2923
  type: "function",
@@ -2896,8 +2945,8 @@ const Vt = [
2896
2945
  { name: "address", type: "address" }
2897
2946
  ]
2898
2947
  }
2899
- ], Do = [
2900
- ...Tn,
2948
+ ], Wo = [
2949
+ ...Bn,
2901
2950
  {
2902
2951
  name: "reverse",
2903
2952
  type: "function",
@@ -2925,7 +2974,7 @@ const Vt = [
2925
2974
  { type: "address", name: "resolver" }
2926
2975
  ]
2927
2976
  }
2928
- ], _o = [
2977
+ ], Ko = [
2929
2978
  {
2930
2979
  name: "text",
2931
2980
  type: "function",
@@ -2936,7 +2985,7 @@ const Vt = [
2936
2985
  ],
2937
2986
  outputs: [{ name: "", type: "string" }]
2938
2987
  }
2939
- ], Lo = [
2988
+ ], Jo = [
2940
2989
  {
2941
2990
  name: "addr",
2942
2991
  type: "function",
@@ -2954,7 +3003,7 @@ const Vt = [
2954
3003
  ],
2955
3004
  outputs: [{ name: "", type: "bytes" }]
2956
3005
  }
2957
- ], Ho = [
3006
+ ], Yo = [
2958
3007
  {
2959
3008
  inputs: [
2960
3009
  {
@@ -2997,22 +3046,22 @@ const Vt = [
2997
3046
  type: "function",
2998
3047
  name: "isValidSig"
2999
3048
  }
3000
- ], ro = "0x82ad56cb", so = "0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe", oo = "0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe", qo = "0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572", Te = "/docs/contract/encodeDeployData";
3001
- function kn(e) {
3049
+ ], lo = "0x82ad56cb", fo = "0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe", po = "0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe", Xo = "0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572", ke = "/docs/contract/encodeDeployData";
3050
+ function Rn(e) {
3002
3051
  const { abi: t, args: n, bytecode: r } = e;
3003
3052
  if (!n || n.length === 0)
3004
3053
  return r;
3005
3054
  const s = t.find((o) => "type" in o && o.type === "constructor");
3006
3055
  if (!s)
3007
- throw new zr({ docsPath: Te });
3056
+ throw new Vr({ docsPath: ke });
3008
3057
  if (!("inputs" in s))
3009
- throw new Nt({ docsPath: Te });
3058
+ throw new Nt({ docsPath: ke });
3010
3059
  if (!s.inputs || s.inputs.length === 0)
3011
- throw new Nt({ docsPath: Te });
3060
+ throw new Nt({ docsPath: ke });
3012
3061
  const a = Je(s.inputs, n);
3013
3062
  return Ue([r, a]);
3014
3063
  }
3015
- function ao({ blockNumber: e, chain: t, contract: n }) {
3064
+ function bo({ blockNumber: e, chain: t, contract: n }) {
3016
3065
  var s;
3017
3066
  const r = (s = t == null ? void 0 : t.contracts) == null ? void 0 : s[n];
3018
3067
  if (!r)
@@ -3031,17 +3080,17 @@ function ao({ blockNumber: e, chain: t, contract: n }) {
3031
3080
  });
3032
3081
  return r.address;
3033
3082
  }
3034
- function io(e, { docsPath: t, ...n }) {
3083
+ function yo(e, { docsPath: t, ...n }) {
3035
3084
  const r = (() => {
3036
3085
  const s = wt(e, n);
3037
3086
  return s instanceof we ? e : s;
3038
3087
  })();
3039
- return new Ts(r, {
3088
+ return new zs(r, {
3040
3089
  docsPath: t,
3041
3090
  ...n
3042
3091
  });
3043
3092
  }
3044
- function co() {
3093
+ function mo() {
3045
3094
  let e = () => {
3046
3095
  }, t = () => {
3047
3096
  };
@@ -3049,44 +3098,44 @@ function co() {
3049
3098
  e = r, t = s;
3050
3099
  }), resolve: e, reject: t };
3051
3100
  }
3052
- const ke = /* @__PURE__ */ new Map();
3053
- function uo({ fn: e, id: t, shouldSplitBatch: n, wait: r = 0, sort: s }) {
3101
+ const Te = /* @__PURE__ */ new Map();
3102
+ function ho({ fn: e, id: t, shouldSplitBatch: n, wait: r = 0, sort: s }) {
3054
3103
  const a = async () => {
3055
3104
  const d = c();
3056
3105
  o();
3057
3106
  const l = d.map(({ args: f }) => f);
3058
3107
  l.length !== 0 && e(l).then((f) => {
3059
3108
  s && Array.isArray(f) && f.sort(s);
3060
- for (let y = 0; y < d.length; y++) {
3061
- const { resolve: p } = d[y];
3062
- p == null || p([f[y], f]);
3109
+ for (let b = 0; b < d.length; b++) {
3110
+ const { resolve: p } = d[b];
3111
+ p == null || p([f[b], f]);
3063
3112
  }
3064
3113
  }).catch((f) => {
3065
- for (let y = 0; y < d.length; y++) {
3066
- const { reject: p } = d[y];
3114
+ for (let b = 0; b < d.length; b++) {
3115
+ const { reject: p } = d[b];
3067
3116
  p == null || p(f);
3068
3117
  }
3069
3118
  });
3070
- }, o = () => ke.delete(t), i = () => c().map(({ args: d }) => d), c = () => ke.get(t) || [], u = (d) => ke.set(t, [...c(), d]);
3119
+ }, o = () => Te.delete(t), i = () => c().map(({ args: d }) => d), c = () => Te.get(t) || [], u = (d) => Te.set(t, [...c(), d]);
3071
3120
  return {
3072
3121
  flush: o,
3073
3122
  async schedule(d) {
3074
- const { promise: l, resolve: f, reject: y } = co();
3075
- return (n == null ? void 0 : n([...i(), d])) && a(), c().length > 0 ? (u({ args: d, resolve: f, reject: y }), l) : (u({ args: d, resolve: f, reject: y }), setTimeout(a, r), l);
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);
3076
3125
  }
3077
3126
  };
3078
3127
  }
3079
- async function Bn(e, t) {
3080
- var T, N, S, O;
3081
- const { account: n = e.account, batch: r = !!((T = e.batch) != null && T.multicall), blockNumber: s, blockTag: a = "latest", accessList: o, blobs: i, code: c, data: u, factory: d, factoryData: l, gas: f, gasPrice: y, maxFeePerBlobGas: p, maxFeePerGas: b, maxPriorityFeePerGas: m, nonce: w, to: g, value: x, stateOverride: $, ...F } = t, M = n ? U(n) : void 0;
3128
+ async function jn(e, t) {
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;
3082
3131
  if (c && (d || l))
3083
3132
  throw new h("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
3084
3133
  if (c && g)
3085
3134
  throw new h("Cannot provide both `code` & `to` as parameters.");
3086
- const R = c && u, P = d && l && g && u, E = R || P, _ = R ? po({
3135
+ const B = c && u, P = d && l && g && u, E = B || P, _ = B ? vo({
3087
3136
  code: c,
3088
3137
  data: u
3089
- }) : P ? yo({
3138
+ }) : P ? xo({
3090
3139
  data: u,
3091
3140
  factory: d,
3092
3141
  factoryData: l,
@@ -3094,7 +3143,7 @@ async function Bn(e, t) {
3094
3143
  }) : u;
3095
3144
  try {
3096
3145
  Fe(t);
3097
- const k = (s ? v(s) : void 0) || a, z = xn($), 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) || 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)({
3098
3147
  // Pick out extra data that might exist on the chain's transaction request type.
3099
3148
  ...vt(F, { format: j }),
3100
3149
  from: M == null ? void 0 : M.address,
@@ -3102,75 +3151,75 @@ async function Bn(e, t) {
3102
3151
  blobs: i,
3103
3152
  data: _,
3104
3153
  gas: f,
3105
- gasPrice: y,
3154
+ gasPrice: b,
3106
3155
  maxFeePerBlobGas: p,
3107
- maxFeePerGas: b,
3156
+ maxFeePerGas: y,
3108
3157
  maxPriorityFeePerGas: m,
3109
3158
  nonce: w,
3110
3159
  to: E ? void 0 : g,
3111
3160
  value: x
3112
3161
  });
3113
- if (r && lo({ request: X }) && !z)
3162
+ if (r && go({ request: X }) && !z)
3114
3163
  try {
3115
- return await fo(e, {
3164
+ return await wo(e, {
3116
3165
  ...X,
3117
3166
  blockNumber: s,
3118
3167
  blockTag: a
3119
3168
  });
3120
3169
  } catch (Me) {
3121
- if (!(Me instanceof Qt) && !(Me instanceof ze))
3170
+ if (!(Me instanceof en) && !(Me instanceof ze))
3122
3171
  throw Me;
3123
3172
  }
3124
- const $t = await e.request({
3173
+ const At = await e.request({
3125
3174
  method: "eth_call",
3126
3175
  params: z ? [
3127
3176
  X,
3128
- k,
3177
+ T,
3129
3178
  z
3130
- ] : [X, k]
3131
- });
3132
- return $t === "0x" ? { data: void 0 } : { data: $t };
3133
- } catch (I) {
3134
- const k = bo(I), { offchainLookup: z, offchainLookupSignature: j } = await import("./ccip-DLDO0_x2.js");
3135
- if (e.ccipRead !== !1 && (k == null ? void 0 : k.slice(0, 10)) === j && g)
3136
- return { data: await z(e, { data: k, to: g }) };
3137
- throw E && (k == null ? void 0 : k.slice(0, 10)) === "0x101bb98d" ? new Is({ factory: d }) : io(I, {
3179
+ ] : [X, T]
3180
+ });
3181
+ return At === "0x" ? { data: void 0 } : { data: At };
3182
+ } catch (R) {
3183
+ const T = Po(R), { offchainLookup: z, offchainLookupSignature: j } = await import("./ccip-K-z2PL4P.js");
3184
+ if (e.ccipRead !== !1 && (T == null ? void 0 : T.slice(0, 10)) === j && g)
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, {
3138
3187
  ...t,
3139
3188
  account: M,
3140
3189
  chain: e.chain
3141
3190
  });
3142
3191
  }
3143
3192
  }
3144
- function lo({ request: e }) {
3193
+ function go({ request: e }) {
3145
3194
  const { data: t, to: n, ...r } = e;
3146
- return !(!t || t.startsWith(ro) || !n || Object.values(r).filter((s) => typeof s < "u").length > 0);
3195
+ return !(!t || t.startsWith(lo) || !n || Object.values(r).filter((s) => typeof s < "u").length > 0);
3147
3196
  }
3148
- async function fo(e, t) {
3149
- var b;
3150
- const { batchSize: n = 1024, wait: r = 0 } = typeof ((b = e.batch) == null ? void 0 : b.multicall) == "object" ? e.batch.multicall : {}, { blockNumber: s, blockTag: a = "latest", data: o, multicallAddress: i, to: c } = t;
3197
+ async function wo(e, t) {
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;
3151
3200
  let u = i;
3152
3201
  if (!u) {
3153
3202
  if (!e.chain)
3154
- throw new Qt();
3155
- u = ao({
3203
+ throw new en();
3204
+ u = bo({
3156
3205
  blockNumber: s,
3157
3206
  chain: e.chain,
3158
3207
  contract: "multicall3"
3159
3208
  });
3160
3209
  }
3161
- const l = (s ? v(s) : void 0) || a, { schedule: f } = uo({
3210
+ const l = (s ? v(s) : void 0) || a, { schedule: f } = ho({
3162
3211
  id: `${e.uid}.${l}`,
3163
3212
  wait: r,
3164
3213
  shouldSplitBatch(m) {
3165
3214
  return m.reduce((g, { data: x }) => g + (x.length - 2), 0) > n * 2;
3166
3215
  },
3167
3216
  fn: async (m) => {
3168
- const w = m.map(($) => ({
3217
+ const w = m.map((A) => ({
3169
3218
  allowFailure: !0,
3170
- callData: $.data,
3171
- target: $.to
3219
+ callData: A.data,
3220
+ target: A.to
3172
3221
  })), g = ue({
3173
- abi: Vt,
3222
+ abi: Zt,
3174
3223
  args: [w],
3175
3224
  functionName: "aggregate3"
3176
3225
  }), x = await e.request({
@@ -3184,48 +3233,48 @@ async function fo(e, t) {
3184
3233
  ]
3185
3234
  });
3186
3235
  return Et({
3187
- abi: Vt,
3236
+ abi: Zt,
3188
3237
  args: [w],
3189
3238
  functionName: "aggregate3",
3190
3239
  data: x || "0x"
3191
3240
  });
3192
3241
  }
3193
- }), [{ returnData: y, success: p }] = await f({ data: o, to: c });
3242
+ }), [{ returnData: b, success: p }] = await f({ data: o, to: c });
3194
3243
  if (!p)
3195
- throw new wn({ data: y });
3196
- return y === "0x" ? { data: void 0 } : { data: y };
3244
+ throw new xn({ data: b });
3245
+ return b === "0x" ? { data: void 0 } : { data: b };
3197
3246
  }
3198
- function po(e) {
3247
+ function vo(e) {
3199
3248
  const { code: t, data: n } = e;
3200
- return kn({
3201
- abi: fn(["constructor(bytes, bytes)"]),
3202
- bytecode: so,
3249
+ return Rn({
3250
+ abi: bn(["constructor(bytes, bytes)"]),
3251
+ bytecode: fo,
3203
3252
  args: [t, n]
3204
3253
  });
3205
3254
  }
3206
- function yo(e) {
3255
+ function xo(e) {
3207
3256
  const { data: t, factory: n, factoryData: r, to: s } = e;
3208
- return kn({
3209
- abi: fn(["constructor(address, bytes, address, bytes)"]),
3210
- bytecode: oo,
3257
+ return Rn({
3258
+ abi: bn(["constructor(address, bytes, address, bytes)"]),
3259
+ bytecode: po,
3211
3260
  args: [s, t, n, r]
3212
3261
  });
3213
3262
  }
3214
- function bo(e) {
3263
+ function Po(e) {
3215
3264
  var n;
3216
3265
  if (!(e instanceof h))
3217
3266
  return;
3218
3267
  const t = e.walk();
3219
3268
  return typeof (t == null ? void 0 : t.data) == "object" ? (n = t.data) == null ? void 0 : n.data : t.data;
3220
3269
  }
3221
- async function Uo(e, t) {
3270
+ async function Qo(e, t) {
3222
3271
  const { abi: n, address: r, args: s, functionName: a, ...o } = t, i = ue({
3223
3272
  abi: n,
3224
3273
  args: s,
3225
3274
  functionName: a
3226
3275
  });
3227
3276
  try {
3228
- const { data: c } = await A(e, Bn, "call")({
3277
+ const { data: c } = await $(e, jn, "call")({
3229
3278
  ...o,
3230
3279
  data: i,
3231
3280
  to: r
@@ -3237,7 +3286,7 @@ async function Uo(e, t) {
3237
3286
  data: c || "0x"
3238
3287
  });
3239
3288
  } catch (c) {
3240
- throw Ae(c, {
3289
+ throw $e(c, {
3241
3290
  abi: n,
3242
3291
  address: r,
3243
3292
  args: s,
@@ -3246,10 +3295,10 @@ async function Uo(e, t) {
3246
3295
  });
3247
3296
  }
3248
3297
  }
3249
- async function Vo(e, t) {
3250
- const { abi: n, address: r, args: s, dataSuffix: a, functionName: o, ...i } = t, c = i.account ? U(i.account) : e.account, u = ue({ abi: n, args: s, functionName: o });
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 });
3251
3300
  try {
3252
- const { data: d } = await A(e, Bn, "call")({
3301
+ const { data: d } = await $(e, jn, "call")({
3253
3302
  batch: !1,
3254
3303
  data: `${u}${a ? a.replace("0x", "") : ""}`,
3255
3304
  to: r,
@@ -3260,7 +3309,7 @@ async function Vo(e, t) {
3260
3309
  args: s,
3261
3310
  functionName: o,
3262
3311
  data: d || "0x"
3263
- }), f = n.filter((y) => "name" in y && y.name === t.functionName);
3312
+ }), f = n.filter((b) => "name" in b && b.name === t.functionName);
3264
3313
  return {
3265
3314
  result: l,
3266
3315
  request: {
@@ -3274,7 +3323,7 @@ async function Vo(e, t) {
3274
3323
  }
3275
3324
  };
3276
3325
  } catch (d) {
3277
- throw Ae(d, {
3326
+ throw $e(d, {
3278
3327
  abi: n,
3279
3328
  address: r,
3280
3329
  args: s,
@@ -3284,20 +3333,20 @@ async function Vo(e, t) {
3284
3333
  });
3285
3334
  }
3286
3335
  }
3287
- const Be = /* @__PURE__ */ new Map(), Zt = /* @__PURE__ */ new Map();
3288
- let mo = 0;
3289
- function Wt(e, t, n) {
3290
- const r = ++mo, s = () => Be.get(e) || [], a = () => {
3336
+ const Ie = /* @__PURE__ */ new Map(), Wt = /* @__PURE__ */ new Map();
3337
+ let Eo = 0;
3338
+ function Kt(e, t, n) {
3339
+ const r = ++Eo, s = () => Ie.get(e) || [], a = () => {
3291
3340
  const d = s();
3292
- Be.set(e, d.filter((l) => l.id !== r));
3341
+ Ie.set(e, d.filter((l) => l.id !== r));
3293
3342
  }, o = () => {
3294
3343
  const d = s();
3295
3344
  if (!d.some((f) => f.id === r))
3296
3345
  return;
3297
- const l = Zt.get(e);
3346
+ const l = Wt.get(e);
3298
3347
  d.length === 1 && l && l(), a();
3299
3348
  }, i = s();
3300
- if (Be.set(e, [
3349
+ if (Ie.set(e, [
3301
3350
  ...i,
3302
3351
  { id: r, fns: t }
3303
3352
  ]), i && i.length > 0)
@@ -3305,39 +3354,39 @@ function Wt(e, t, n) {
3305
3354
  const c = {};
3306
3355
  for (const d in t)
3307
3356
  c[d] = (...l) => {
3308
- var y, p;
3357
+ var b, p;
3309
3358
  const f = s();
3310
3359
  if (f.length !== 0)
3311
- for (const b of f)
3312
- (p = (y = b.fns)[d]) == null || p.call(y, ...l);
3360
+ for (const y of f)
3361
+ (p = (b = y.fns)[d]) == null || p.call(b, ...l);
3313
3362
  };
3314
3363
  const u = n(c);
3315
- return typeof u == "function" && Zt.set(e, u), o;
3364
+ return typeof u == "function" && Wt.set(e, u), o;
3316
3365
  }
3317
- async function Kt(e) {
3366
+ async function Jt(e) {
3318
3367
  return new Promise((t) => setTimeout(t, e));
3319
3368
  }
3320
- function ho(e, { emitOnBegin: t, initialWaitTime: n, interval: r }) {
3369
+ function Ao(e, { emitOnBegin: t, initialWaitTime: n, interval: r }) {
3321
3370
  let s = !0;
3322
3371
  const a = () => s = !1;
3323
3372
  return (async () => {
3324
3373
  let i;
3325
3374
  t && (i = await e({ unpoll: a }));
3326
3375
  const c = await (n == null ? void 0 : n(i)) ?? r;
3327
- await Kt(c);
3376
+ await Jt(c);
3328
3377
  const u = async () => {
3329
- s && (await e({ unpoll: a }), await Kt(r), u());
3378
+ s && (await e({ unpoll: a }), await Jt(r), u());
3330
3379
  };
3331
3380
  u();
3332
3381
  })(), a;
3333
3382
  }
3334
- const go = /* @__PURE__ */ new Map(), wo = /* @__PURE__ */ new Map();
3335
- function vo(e) {
3383
+ const $o = /* @__PURE__ */ new Map(), Fo = /* @__PURE__ */ new Map();
3384
+ function Mo(e) {
3336
3385
  const t = (s, a) => ({
3337
3386
  clear: () => a.delete(s),
3338
3387
  get: () => a.get(s),
3339
3388
  set: (o) => a.set(s, o)
3340
- }), n = t(e, go), r = t(e, wo);
3389
+ }), n = t(e, $o), r = t(e, Fo);
3341
3390
  return {
3342
3391
  clear: () => {
3343
3392
  n.clear(), r.clear();
@@ -3346,8 +3395,8 @@ function vo(e) {
3346
3395
  response: r
3347
3396
  };
3348
3397
  }
3349
- async function xo(e, { cacheKey: t, cacheTime: n = Number.POSITIVE_INFINITY }) {
3350
- const r = vo(t), s = r.response.get();
3398
+ async function So(e, { cacheKey: t, cacheTime: n = Number.POSITIVE_INFINITY }) {
3399
+ const r = Mo(t), s = r.response.get();
3351
3400
  if (s && n > 0 && (/* @__PURE__ */ new Date()).getTime() - s.created.getTime() < n)
3352
3401
  return s.data;
3353
3402
  let a = r.promise.get();
@@ -3359,14 +3408,14 @@ async function xo(e, { cacheKey: t, cacheTime: n = Number.POSITIVE_INFINITY }) {
3359
3408
  r.promise.clear();
3360
3409
  }
3361
3410
  }
3362
- const Po = (e) => `blockNumber.${e}`;
3363
- async function Eo(e, { cacheTime: t = e.cacheTime } = {}) {
3364
- const n = await xo(() => e.request({
3411
+ const Co = (e) => `blockNumber.${e}`;
3412
+ async function ko(e, { cacheTime: t = e.cacheTime } = {}) {
3413
+ const n = await So(() => e.request({
3365
3414
  method: "eth_blockNumber"
3366
- }), { cacheKey: Po(e.uid), cacheTime: t });
3415
+ }), { cacheKey: Co(e.uid), cacheTime: t });
3367
3416
  return BigInt(n);
3368
3417
  }
3369
- async function $o(e, { filter: t }) {
3418
+ async function To(e, { filter: t }) {
3370
3419
  const n = "strict" in t && t.strict, r = await t.request({
3371
3420
  method: "eth_getFilterChanges",
3372
3421
  params: [t.id]
@@ -3374,19 +3423,19 @@ async function $o(e, { filter: t }) {
3374
3423
  if (typeof r[0] == "string")
3375
3424
  return r;
3376
3425
  const s = r.map((a) => pe(a));
3377
- return !("abi" in t) || !t.abi ? s : Cn({
3426
+ return !("abi" in t) || !t.abi ? s : In({
3378
3427
  abi: t.abi,
3379
3428
  logs: s,
3380
3429
  strict: n
3381
3430
  });
3382
3431
  }
3383
- async function Ao(e, { filter: t }) {
3432
+ async function Io(e, { filter: t }) {
3384
3433
  return t.request({
3385
3434
  method: "eth_uninstallFilter",
3386
3435
  params: [t.id]
3387
3436
  });
3388
3437
  }
3389
- function Zo(e, t) {
3438
+ function ta(e, t) {
3390
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;
3391
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")) ? (() => {
3392
3441
  const m = f ?? !1, w = ne([
@@ -3400,15 +3449,15 @@ function Zo(e, t) {
3400
3449
  m,
3401
3450
  i
3402
3451
  ]);
3403
- return Wt(w, { onLogs: u, onError: c }, (g) => {
3452
+ return Kt(w, { onLogs: u, onError: c }, (g) => {
3404
3453
  let x;
3405
3454
  i !== void 0 && (x = i - 1n);
3406
- let $, F = !1;
3407
- const M = ho(async () => {
3408
- var R;
3455
+ let A, F = !1;
3456
+ const M = Ao(async () => {
3457
+ var B;
3409
3458
  if (!F) {
3410
3459
  try {
3411
- $ = await A(e, ds, "createContractEventFilter")({
3460
+ A = await $(e, gs, "createContractEventFilter")({
3412
3461
  abi: n,
3413
3462
  address: r,
3414
3463
  args: s,
@@ -3423,11 +3472,11 @@ function Zo(e, t) {
3423
3472
  }
3424
3473
  try {
3425
3474
  let P;
3426
- if ($)
3427
- P = await A(e, $o, "getFilterChanges")({ filter: $ });
3475
+ if (A)
3476
+ P = await $(e, To, "getFilterChanges")({ filter: A });
3428
3477
  else {
3429
- const E = await A(e, Eo, "getBlockNumber")({});
3430
- x && x < E ? P = await A(e, no, "getContractEvents")({
3478
+ const E = await $(e, ko, "getBlockNumber")({});
3479
+ x && x < E ? P = await $(e, uo, "getContractEvents")({
3431
3480
  abi: n,
3432
3481
  address: r,
3433
3482
  args: s,
@@ -3445,14 +3494,14 @@ function Zo(e, t) {
3445
3494
  for (const E of P)
3446
3495
  g.onLogs([E]);
3447
3496
  } catch (P) {
3448
- $ && P instanceof $e && (F = !1), (R = g.onError) == null || R.call(g, P);
3497
+ A && P instanceof Ae && (F = !1), (B = g.onError) == null || B.call(g, P);
3449
3498
  }
3450
3499
  }, {
3451
3500
  emitOnBegin: !0,
3452
3501
  interval: l
3453
3502
  });
3454
3503
  return async () => {
3455
- $ && await A(e, Ao, "uninstallFilter")({ filter: $ }), M();
3504
+ A && await $(e, Io, "uninstallFilter")({ filter: A }), M();
3456
3505
  };
3457
3506
  });
3458
3507
  })() : (() => {
@@ -3467,7 +3516,7 @@ function Zo(e, t) {
3467
3516
  m
3468
3517
  ]);
3469
3518
  let g = !0, x = () => g = !1;
3470
- return Wt(w, { onLogs: u, onError: c }, ($) => ((async () => {
3519
+ return Kt(w, { onLogs: u, onError: c }, (A) => ((async () => {
3471
3520
  try {
3472
3521
  const F = (() => {
3473
3522
  if (e.transport.type === "fallback") {
@@ -3479,7 +3528,7 @@ function Zo(e, t) {
3479
3528
  abi: n,
3480
3529
  eventName: o,
3481
3530
  args: s
3482
- }) : [], { unsubscribe: R } = await F.subscribe({
3531
+ }) : [], { unsubscribe: B } = await F.subscribe({
3483
3532
  params: ["logs", { address: r, topics: M }],
3484
3533
  onData(P) {
3485
3534
  var _;
@@ -3487,43 +3536,43 @@ function Zo(e, t) {
3487
3536
  return;
3488
3537
  const E = P.result;
3489
3538
  try {
3490
- const { eventName: T, args: N } = Sn({
3539
+ const { eventName: k, args: N } = Tn({
3491
3540
  abi: n,
3492
3541
  data: E.data,
3493
3542
  topics: E.topics,
3494
3543
  strict: f
3495
3544
  }), S = pe(E, {
3496
3545
  args: N,
3497
- eventName: T
3546
+ eventName: k
3498
3547
  });
3499
- $.onLogs([S]);
3500
- } catch (T) {
3548
+ A.onLogs([S]);
3549
+ } catch (k) {
3501
3550
  let N, S;
3502
- if (T instanceof be || T instanceof Ke) {
3551
+ if (k instanceof ye || k instanceof Ke) {
3503
3552
  if (f)
3504
3553
  return;
3505
- N = T.abiItem.name, S = (_ = T.abiItem.inputs) == null ? void 0 : _.some((I) => !("name" in I && I.name));
3554
+ N = k.abiItem.name, S = (_ = k.abiItem.inputs) == null ? void 0 : _.some((R) => !("name" in R && R.name));
3506
3555
  }
3507
3556
  const O = pe(E, {
3508
3557
  args: S ? [] : {},
3509
3558
  eventName: N
3510
3559
  });
3511
- $.onLogs([O]);
3560
+ A.onLogs([O]);
3512
3561
  }
3513
3562
  },
3514
3563
  onError(P) {
3515
3564
  var E;
3516
- (E = $.onError) == null || E.call($, P);
3565
+ (E = A.onError) == null || E.call(A, P);
3517
3566
  }
3518
3567
  });
3519
- x = R, g || x();
3568
+ x = B, g || x();
3520
3569
  } catch (F) {
3521
3570
  c == null || c(F);
3522
3571
  }
3523
3572
  })(), () => x()));
3524
3573
  })();
3525
3574
  }
3526
- class Rn extends h {
3575
+ class Nn extends h {
3527
3576
  constructor({ docsPath: t } = {}) {
3528
3577
  super([
3529
3578
  "Could not find an Account to execute with this Action.",
@@ -3536,7 +3585,7 @@ class Rn extends h {
3536
3585
  });
3537
3586
  }
3538
3587
  }
3539
- class Re extends h {
3588
+ class Be extends h {
3540
3589
  constructor({ docsPath: t, metaMessages: n, type: r }) {
3541
3590
  super(`Account type "${r}" is not supported.`, {
3542
3591
  docsPath: t,
@@ -3545,44 +3594,44 @@ class Re extends h {
3545
3594
  });
3546
3595
  }
3547
3596
  }
3548
- function Fo({ chain: e, currentChainId: t }) {
3597
+ function Bo({ chain: e, currentChainId: t }) {
3549
3598
  if (!e)
3550
- throw new Jn();
3599
+ throw new Qn();
3551
3600
  if (t !== e.id)
3552
- throw new Yn({ chain: e, currentChainId: t });
3601
+ throw new er({ chain: e, currentChainId: t });
3553
3602
  }
3554
- function Mo(e, { docsPath: t, ...n }) {
3603
+ function Ro(e, { docsPath: t, ...n }) {
3555
3604
  const r = (() => {
3556
3605
  const s = wt(e, n);
3557
3606
  return s instanceof we ? e : s;
3558
3607
  })();
3559
- return new Xn(r, {
3608
+ return new tr(r, {
3560
3609
  docsPath: t,
3561
3610
  ...n
3562
3611
  });
3563
3612
  }
3564
- async function So(e, { serializedTransaction: t }) {
3613
+ async function jo(e, { serializedTransaction: t }) {
3565
3614
  return e.request({
3566
3615
  method: "eth_sendRawTransaction",
3567
3616
  params: [t]
3568
3617
  }, { retryCount: 0 });
3569
3618
  }
3570
- const Ie = new Qn(128);
3571
- async function Co(e, t) {
3572
- var w, g, x, $;
3573
- 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: y, value: p, ...b } = t;
3619
+ const Re = new nr(128);
3620
+ async function No(e, t) {
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;
3574
3623
  if (typeof n > "u")
3575
- throw new Rn({
3624
+ throw new Nn({
3576
3625
  docsPath: "/docs/actions/wallet/sendTransaction"
3577
3626
  });
3578
- const m = n ? U(n) : null;
3627
+ const m = n ? V(n) : null;
3579
3628
  try {
3580
3629
  Fe(t);
3581
3630
  const F = await (async () => {
3582
3631
  if (t.to)
3583
3632
  return t.to;
3584
3633
  if (a && a.length > 0)
3585
- return await vn({
3634
+ return await En({
3586
3635
  authorization: a[0]
3587
3636
  }).catch(() => {
3588
3637
  throw new h("`to` is required. Could not infer from `authorizationList`.");
@@ -3590,13 +3639,13 @@ async function Co(e, t) {
3590
3639
  })();
3591
3640
  if ((m == null ? void 0 : m.type) === "json-rpc" || m === null) {
3592
3641
  let M;
3593
- r !== null && (M = await A(e, $n, "getChainId")({}), Fo({
3642
+ r !== null && (M = await $(e, Mn, "getChainId")({}), Bo({
3594
3643
  currentChainId: M,
3595
3644
  chain: r
3596
3645
  }));
3597
- const R = (x = (g = (w = e.chain) == null ? void 0 : w.formatters) == null ? void 0 : g.transactionRequest) == null ? void 0 : x.format, E = (R || xt)({
3646
+ const B = (x = (g = (w = e.chain) == null ? void 0 : w.formatters) == null ? void 0 : g.transactionRequest) == null ? void 0 : x.format, E = (B || xt)({
3598
3647
  // Pick out extra data that might exist on the chain's transaction request type.
3599
- ...vt(b, { format: R }),
3648
+ ...vt(y, { format: B }),
3600
3649
  accessList: s,
3601
3650
  authorizationList: a,
3602
3651
  blobs: o,
@@ -3608,13 +3657,13 @@ async function Co(e, t) {
3608
3657
  maxFeePerBlobGas: d,
3609
3658
  maxFeePerGas: l,
3610
3659
  maxPriorityFeePerGas: f,
3611
- nonce: y,
3660
+ nonce: b,
3612
3661
  to: F,
3613
3662
  value: p
3614
- }), _ = Ie.get(e.uid), T = _ ? "wallet_sendTransaction" : "eth_sendTransaction";
3663
+ }), _ = Re.get(e.uid), k = _ ? "wallet_sendTransaction" : "eth_sendTransaction";
3615
3664
  try {
3616
3665
  return await e.request({
3617
- method: T,
3666
+ method: k,
3618
3667
  params: [E]
3619
3668
  }, { retryCount: 0 });
3620
3669
  } catch (N) {
@@ -3625,15 +3674,15 @@ async function Co(e, t) {
3625
3674
  return await e.request({
3626
3675
  method: "wallet_sendTransaction",
3627
3676
  params: [E]
3628
- }, { retryCount: 0 }).then((O) => (Ie.set(e.uid, !0), O)).catch((O) => {
3629
- const I = O;
3630
- throw I.name === "MethodNotFoundRpcError" || I.name === "MethodNotSupportedRpcError" ? (Ie.set(e.uid, !1), S) : I;
3677
+ }, { retryCount: 0 }).then((O) => (Re.set(e.uid, !0), O)).catch((O) => {
3678
+ const R = O;
3679
+ throw R.name === "MethodNotFoundRpcError" || R.name === "MethodNotSupportedRpcError" ? (Re.set(e.uid, !1), S) : R;
3631
3680
  });
3632
3681
  throw S;
3633
3682
  }
3634
3683
  }
3635
3684
  if ((m == null ? void 0 : m.type) === "local") {
3636
- const M = await A(e, Fn, "prepareTransactionRequest")({
3685
+ const M = await $(e, Cn, "prepareTransactionRequest")({
3637
3686
  account: m,
3638
3687
  accessList: s,
3639
3688
  authorizationList: a,
@@ -3645,57 +3694,57 @@ async function Co(e, t) {
3645
3694
  maxFeePerBlobGas: d,
3646
3695
  maxFeePerGas: l,
3647
3696
  maxPriorityFeePerGas: f,
3648
- nonce: y,
3697
+ nonce: b,
3649
3698
  nonceManager: m.nonceManager,
3650
- parameters: [...An, "sidecars"],
3699
+ parameters: [...Sn, "sidecars"],
3651
3700
  value: p,
3652
- ...b,
3701
+ ...y,
3653
3702
  to: F
3654
- }), R = ($ = r == null ? void 0 : r.serializers) == null ? void 0 : $.transaction, P = await m.signTransaction(M, {
3655
- serializer: R
3703
+ }), B = (A = r == null ? void 0 : r.serializers) == null ? void 0 : A.transaction, P = await m.signTransaction(M, {
3704
+ serializer: B
3656
3705
  });
3657
- return await A(e, So, "sendRawTransaction")({
3706
+ return await $(e, jo, "sendRawTransaction")({
3658
3707
  serializedTransaction: P
3659
3708
  });
3660
3709
  }
3661
- throw (m == null ? void 0 : m.type) === "smart" ? new Re({
3710
+ throw (m == null ? void 0 : m.type) === "smart" ? new Be({
3662
3711
  metaMessages: [
3663
3712
  "Consider using the `sendUserOperation` Action instead."
3664
3713
  ],
3665
3714
  docsPath: "/docs/actions/bundler/sendUserOperation",
3666
3715
  type: "smart"
3667
- }) : new Re({
3716
+ }) : new Be({
3668
3717
  docsPath: "/docs/actions/wallet/sendTransaction",
3669
3718
  type: m == null ? void 0 : m.type
3670
3719
  });
3671
3720
  } catch (F) {
3672
- throw F instanceof Re ? F : Mo(F, {
3721
+ throw F instanceof Be ? F : Ro(F, {
3673
3722
  ...t,
3674
3723
  account: m,
3675
3724
  chain: t.chain || void 0
3676
3725
  });
3677
3726
  }
3678
3727
  }
3679
- async function Wo(e, t) {
3728
+ async function na(e, t) {
3680
3729
  const { abi: n, account: r = e.account, address: s, args: a, dataSuffix: o, functionName: i, ...c } = t;
3681
3730
  if (typeof r > "u")
3682
- throw new Rn({
3731
+ throw new Nn({
3683
3732
  docsPath: "/docs/contract/writeContract"
3684
3733
  });
3685
- const u = r ? U(r) : null, d = ue({
3734
+ const u = r ? V(r) : null, d = ue({
3686
3735
  abi: n,
3687
3736
  args: a,
3688
3737
  functionName: i
3689
3738
  });
3690
3739
  try {
3691
- return await A(e, Co, "sendTransaction")({
3740
+ return await $(e, No, "sendTransaction")({
3692
3741
  data: `${d}${o ? o.replace("0x", "") : ""}`,
3693
3742
  to: s,
3694
3743
  account: u,
3695
3744
  ...c
3696
3745
  });
3697
3746
  } catch (l) {
3698
- throw Ae(l, {
3747
+ throw $e(l, {
3699
3748
  abi: n,
3700
3749
  address: s,
3701
3750
  args: a,
@@ -3706,94 +3755,104 @@ async function Wo(e, t) {
3706
3755
  }
3707
3756
  }
3708
3757
  export {
3709
- ko as $,
3710
- js as A,
3711
- uo as B,
3758
+ xt as $,
3759
+ ot as A,
3760
+ st as B,
3712
3761
  ht as C,
3713
- Bs as D,
3714
- fs as E,
3715
- ao as F,
3716
- ue as G,
3717
- Ro as H,
3718
- $e as I,
3762
+ rt as D,
3763
+ Lo as E,
3764
+ ho as F,
3765
+ Pn as G,
3766
+ _o as H,
3767
+ zo as I,
3719
3768
  ft as J,
3720
- Lo as K,
3769
+ Ds as K,
3721
3770
  lt as L,
3722
3771
  dt as M,
3723
- Go as N,
3724
- Et as O,
3772
+ vs as N,
3773
+ bo as O,
3725
3774
  mt as P,
3726
- _o as Q,
3775
+ ue as Q,
3727
3776
  ct as R,
3728
3777
  gt as S,
3729
3778
  ut as T,
3730
3779
  pt as U,
3731
- Do as V,
3732
- us as W,
3733
- tt as X,
3734
- Cn as Y,
3735
- es as Z,
3736
- Bo as _,
3737
- no as a,
3738
- Eo as a0,
3739
- Ae as a1,
3740
- Vt as a2,
3741
- We as a3,
3742
- wn as a4,
3743
- Ho as a5,
3744
- kn as a6,
3745
- qo as a7,
3746
- Ds as a8,
3747
- Ts as a9,
3748
- Wt as aa,
3749
- ho as ab,
3750
- co as ac,
3751
- me as ad,
3752
- Ks as ae,
3753
- Sn as af,
3754
- be as ag,
3755
- Ke as ah,
3756
- Ao as ai,
3757
- $o as aj,
3758
- to as ak,
3759
- Mn as al,
3760
- Ys as am,
3761
- $n as an,
3762
- Oo as ao,
3763
- Pn as ap,
3764
- No as aq,
3765
- Js as ar,
3766
- Fn as as,
3767
- So as at,
3768
- Co as au,
3769
- Rn as av,
3770
- Fe as aw,
3771
- Fo as ax,
3772
- xt as ay,
3773
- Wo as b,
3774
- ds as c,
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,
3833
+ gs as c,
3775
3834
  nt as d,
3776
- zo as e,
3835
+ Vo as e,
3777
3836
  ne as f,
3778
- A as g,
3779
- As as h,
3780
- Xs as i,
3781
- Bn as j,
3837
+ $ as g,
3838
+ Bs as h,
3839
+ oo as i,
3840
+ jn as j,
3782
3841
  Je as k,
3783
- Kt as l,
3784
- jo as m,
3785
- bt as n,
3786
- yt as o,
3787
- U as p,
3788
- it as q,
3789
- Uo as r,
3790
- Vo as s,
3791
- Ee as t,
3792
- at as u,
3793
- ot as v,
3794
- Zo as w,
3795
- st as x,
3796
- rt as y,
3797
- Io as z
3842
+ Jt as l,
3843
+ Hr as m,
3844
+ un as n,
3845
+ V as o,
3846
+ 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
3798
3857
  };
3799
- //# sourceMappingURL=writeContract-ChuHpJLC.js.map
3858
+ //# sourceMappingURL=writeContract-CjcOEtWX.js.map