@pufferfinance/puffer-sdk 1.31.0 → 1.31.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 (148) 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 +42 -42
  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.js +2 -2
  7. package/dist/ccip-DLz1DupU.cjs +2 -0
  8. package/dist/ccip-DLz1DupU.cjs.map +1 -0
  9. package/dist/ccip-oHxlHOaH.js +158 -0
  10. package/dist/ccip-oHxlHOaH.js.map +1 -0
  11. package/dist/chains/constants.cjs +1 -1
  12. package/dist/chains/constants.d.ts +2 -1
  13. package/dist/chains/constants.js +1 -1
  14. package/dist/constants-C-rrOSfg.js +3837 -0
  15. package/dist/constants-C-rrOSfg.js.map +1 -0
  16. package/dist/constants-PXB3A4Yl.cjs +38 -0
  17. package/dist/constants-PXB3A4Yl.cjs.map +1 -0
  18. package/dist/contracts/addresses.cjs +1 -1
  19. package/dist/contracts/addresses.js +1 -1
  20. package/dist/contracts/handlers/carrot-staking-handler.cjs +1 -1
  21. package/dist/contracts/handlers/carrot-staking-handler.d.ts +1549 -5281
  22. package/dist/contracts/handlers/carrot-staking-handler.js +2 -2
  23. package/dist/contracts/handlers/carrot-vesting-handler.cjs +1 -1
  24. package/dist/contracts/handlers/carrot-vesting-handler.d.ts +1549 -5281
  25. package/dist/contracts/handlers/carrot-vesting-handler.js +2 -2
  26. package/dist/contracts/handlers/concrete-vault-handler.cjs +1 -1
  27. package/dist/contracts/handlers/concrete-vault-handler.d.ts +1549 -5281
  28. package/dist/contracts/handlers/concrete-vault-handler.js +2 -2
  29. package/dist/contracts/handlers/distributor-handler.cjs +1 -1
  30. package/dist/contracts/handlers/distributor-handler.d.ts +1549 -5281
  31. package/dist/contracts/handlers/distributor-handler.js +2 -2
  32. package/dist/contracts/handlers/erc20-permit-handler.cjs +1 -1
  33. package/dist/contracts/handlers/erc20-permit-handler.cjs.map +1 -1
  34. package/dist/contracts/handlers/erc20-permit-handler.d.ts +1549 -5281
  35. package/dist/contracts/handlers/erc20-permit-handler.js +3 -3
  36. package/dist/contracts/handlers/erc20-permit-handler.js.map +1 -1
  37. package/dist/contracts/handlers/gauge-registry-handler.cjs +1 -1
  38. package/dist/contracts/handlers/gauge-registry-handler.d.ts +1549 -5281
  39. package/dist/contracts/handlers/gauge-registry-handler.js +2 -2
  40. package/dist/contracts/handlers/guardian-module-handler.cjs +1 -1
  41. package/dist/contracts/handlers/guardian-module-handler.d.ts +1549 -5281
  42. package/dist/contracts/handlers/guardian-module-handler.js +2 -2
  43. package/dist/contracts/handlers/institutional-access-manager-handler.cjs +1 -1
  44. package/dist/contracts/handlers/institutional-access-manager-handler.cjs.map +1 -1
  45. package/dist/contracts/handlers/institutional-access-manager-handler.d.ts +1549 -5281
  46. package/dist/contracts/handlers/institutional-access-manager-handler.js +48 -49
  47. package/dist/contracts/handlers/institutional-access-manager-handler.js.map +1 -1
  48. package/dist/contracts/handlers/institutional-vault-handler.cjs +1 -1
  49. package/dist/contracts/handlers/institutional-vault-handler.d.ts +1549 -5281
  50. package/dist/contracts/handlers/institutional-vault-handler.js +2 -2
  51. package/dist/contracts/handlers/l1-reward-manager-handler.cjs +1 -1
  52. package/dist/contracts/handlers/l1-reward-manager-handler.d.ts +1549 -5281
  53. package/dist/contracts/handlers/l1-reward-manager-handler.js +2 -2
  54. package/dist/contracts/handlers/l2-reward-manager-handler.cjs +1 -1
  55. package/dist/contracts/handlers/l2-reward-manager-handler.d.ts +1549 -5281
  56. package/dist/contracts/handlers/l2-reward-manager-handler.js +2 -2
  57. package/dist/contracts/handlers/lagoon-vault-handler.cjs +1 -1
  58. package/dist/contracts/handlers/lagoon-vault-handler.d.ts +1549 -5281
  59. package/dist/contracts/handlers/lagoon-vault-handler.js +2 -2
  60. package/dist/contracts/handlers/mtw-carrot-handler.cjs +1 -1
  61. package/dist/contracts/handlers/mtw-carrot-handler.d.ts +1549 -5281
  62. package/dist/contracts/handlers/mtw-carrot-handler.js +2 -2
  63. package/dist/contracts/handlers/non-restaking-withdrawal-credentials-handler.cjs +1 -1
  64. package/dist/contracts/handlers/non-restaking-withdrawal-credentials-handler.d.ts +1549 -5281
  65. package/dist/contracts/handlers/non-restaking-withdrawal-credentials-handler.js +2 -2
  66. package/dist/contracts/handlers/nucleus-accountant-handler.cjs +1 -1
  67. package/dist/contracts/handlers/nucleus-accountant-handler.d.ts +1549 -5281
  68. package/dist/contracts/handlers/nucleus-accountant-handler.js +1 -1
  69. package/dist/contracts/handlers/nucleus-atomic-queue-handler.cjs +1 -1
  70. package/dist/contracts/handlers/nucleus-atomic-queue-handler.d.ts +1549 -5281
  71. package/dist/contracts/handlers/nucleus-atomic-queue-handler.js +2 -2
  72. package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs +1 -1
  73. package/dist/contracts/handlers/nucleus-boring-vault-handler.d.ts +1549 -5281
  74. package/dist/contracts/handlers/nucleus-boring-vault-handler.js +2 -2
  75. package/dist/contracts/handlers/nucleus-teller-handler.cjs +1 -1
  76. package/dist/contracts/handlers/nucleus-teller-handler.d.ts +1549 -5281
  77. package/dist/contracts/handlers/nucleus-teller-handler.js +2 -2
  78. package/dist/contracts/handlers/puf-locker-handler.cjs +1 -1
  79. package/dist/contracts/handlers/puf-locker-handler.d.ts +1549 -5281
  80. package/dist/contracts/handlers/puf-locker-handler.js +2 -2
  81. package/dist/contracts/handlers/puffer-depositor-handler.cjs +1 -1
  82. package/dist/contracts/handlers/puffer-depositor-handler.d.ts +1549 -5281
  83. package/dist/contracts/handlers/puffer-depositor-handler.js +2 -2
  84. package/dist/contracts/handlers/puffer-l2-depositor-handler.cjs +1 -1
  85. package/dist/contracts/handlers/puffer-l2-depositor-handler.d.ts +1549 -5281
  86. package/dist/contracts/handlers/puffer-l2-depositor-handler.js +2 -2
  87. package/dist/contracts/handlers/puffer-oracle-v2-handler.cjs +1 -1
  88. package/dist/contracts/handlers/puffer-oracle-v2-handler.d.ts +1549 -5281
  89. package/dist/contracts/handlers/puffer-oracle-v2-handler.js +2 -2
  90. package/dist/contracts/handlers/puffer-protocol-handler.cjs +1 -1
  91. package/dist/contracts/handlers/puffer-protocol-handler.d.ts +1549 -5281
  92. package/dist/contracts/handlers/puffer-protocol-handler.js +2 -2
  93. package/dist/contracts/handlers/puffer-vault-handler.cjs +1 -1
  94. package/dist/contracts/handlers/puffer-vault-handler.d.ts +1549 -5281
  95. package/dist/contracts/handlers/puffer-vault-handler.js +2 -2
  96. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.cjs +1 -1
  97. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.d.ts +1549 -5281
  98. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.js +2 -2
  99. package/dist/contracts/handlers/validator-ticket-handler.cjs +1 -1
  100. package/dist/contracts/handlers/validator-ticket-handler.d.ts +1549 -5281
  101. package/dist/contracts/handlers/validator-ticket-handler.js +2 -2
  102. package/dist/contracts/handlers/vl-puffer-handler.cjs +1 -1
  103. package/dist/contracts/handlers/vl-puffer-handler.d.ts +1549 -5281
  104. package/dist/contracts/handlers/vl-puffer-handler.js +2 -2
  105. package/dist/contracts/tokens.cjs +1 -1
  106. package/dist/contracts/tokens.js +1 -1
  107. package/dist/contracts/vaults-addresses.cjs +1 -1
  108. package/dist/contracts/vaults-addresses.js +1 -1
  109. package/dist/{getContract-Cgkj3G1g.cjs → getContract-BL-M-dQc.cjs} +2 -2
  110. package/dist/{getContract-Cgkj3G1g.cjs.map → getContract-BL-M-dQc.cjs.map} +1 -1
  111. package/dist/{getContract-Dxh0At3n.js → getContract-BVdsHXdp.js} +11 -11
  112. package/dist/{getContract-Dxh0At3n.js.map → getContract-BVdsHXdp.js.map} +1 -1
  113. package/dist/http-BtVgpo6v.cjs +5 -0
  114. package/dist/http-BtVgpo6v.cjs.map +1 -0
  115. package/dist/{http-Clq2Hoy9.js → http-CJGQ2e7o.js} +1687 -1533
  116. package/dist/http-CJGQ2e7o.js.map +1 -0
  117. package/dist/{localBatchGatewayRequest-Dm7yXllz.js → localBatchGatewayRequest-BchhbxQ2.js} +18 -18
  118. package/dist/{localBatchGatewayRequest-Dm7yXllz.js.map → localBatchGatewayRequest-BchhbxQ2.js.map} +1 -1
  119. package/dist/{localBatchGatewayRequest-CuvkLo7E.cjs → localBatchGatewayRequest-Bz0YuhIJ.cjs} +2 -2
  120. package/dist/{localBatchGatewayRequest-CuvkLo7E.cjs.map → localBatchGatewayRequest-Bz0YuhIJ.cjs.map} +1 -1
  121. package/dist/main.cjs +1 -1
  122. package/dist/main.js +1 -1
  123. package/dist/{secp256k1-BbMQ_WWG.js → secp256k1-Bm3EstvG.js} +62 -62
  124. package/dist/{secp256k1-BbMQ_WWG.js.map → secp256k1-Bm3EstvG.js.map} +1 -1
  125. package/dist/{secp256k1-DrUar53F.cjs → secp256k1-cRXUqGNw.cjs} +2 -2
  126. package/dist/{secp256k1-DrUar53F.cjs.map → secp256k1-cRXUqGNw.cjs.map} +1 -1
  127. package/dist/utils/version.cjs +1 -1
  128. package/dist/utils/version.js +1 -1
  129. package/dist/writeContract-D9xqoPDa.js +3527 -0
  130. package/dist/writeContract-D9xqoPDa.js.map +1 -0
  131. package/dist/writeContract-Gli_t0c1.cjs +6 -0
  132. package/dist/writeContract-Gli_t0c1.cjs.map +1 -0
  133. package/package.json +13 -13
  134. package/dist/ccip-BTVr5-VZ.js +0 -150
  135. package/dist/ccip-BTVr5-VZ.js.map +0 -1
  136. package/dist/ccip-DNgt9tzv.cjs +0 -2
  137. package/dist/ccip-DNgt9tzv.cjs.map +0 -1
  138. package/dist/constants-CUYeD71n.js +0 -2491
  139. package/dist/constants-CUYeD71n.js.map +0 -1
  140. package/dist/constants-Dhpa19or.cjs +0 -8
  141. package/dist/constants-Dhpa19or.cjs.map +0 -1
  142. package/dist/http-C-TIpf-V.cjs +0 -5
  143. package/dist/http-C-TIpf-V.cjs.map +0 -1
  144. package/dist/http-Clq2Hoy9.js.map +0 -1
  145. package/dist/writeContract-Bq8HaVjW.js +0 -4618
  146. package/dist/writeContract-Bq8HaVjW.js.map +0 -1
  147. package/dist/writeContract-PoCaxmyT.cjs +0 -36
  148. package/dist/writeContract-PoCaxmyT.cjs.map +0 -1
@@ -0,0 +1,3837 @@
1
+ function ln(e, t) {
2
+ return e.exec(t)?.groups;
3
+ }
4
+ const Kr = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, Yr = /^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)?$/, Zr = /^\(.+?\).*?$/, qe = /^tuple(?<array>(\[(\d*)\])*)$/;
5
+ function Be(e) {
6
+ let t = e.type;
7
+ if (qe.test(e.type) && "components" in e) {
8
+ t = "(";
9
+ const n = e.components.length;
10
+ for (let r = 0; r < n; r++) {
11
+ const o = e.components[r];
12
+ t += Be(o), r < n - 1 && (t += ", ");
13
+ }
14
+ const s = ln(qe, e.type);
15
+ return t += `)${s?.array || ""}`, Be({
16
+ ...e,
17
+ type: t
18
+ });
19
+ }
20
+ return "indexed" in e && e.indexed && (t = `${t} indexed`), e.name ? `${t} ${e.name}` : t;
21
+ }
22
+ function ee(e) {
23
+ let t = "";
24
+ const n = e.length;
25
+ for (let s = 0; s < n; s++) {
26
+ const r = e[s];
27
+ t += Be(r), s !== n - 1 && (t += ", ");
28
+ }
29
+ return t;
30
+ }
31
+ function fn(e) {
32
+ return e.type === "function" ? `function ${e.name}(${ee(e.inputs)})${e.stateMutability && e.stateMutability !== "nonpayable" ? ` ${e.stateMutability}` : ""}${e.outputs?.length ? ` returns (${ee(e.outputs)})` : ""}` : e.type === "event" ? `event ${e.name}(${ee(e.inputs)})` : e.type === "error" ? `error ${e.name}(${ee(e.inputs)})` : e.type === "constructor" ? `constructor(${ee(e.inputs)})${e.stateMutability === "payable" ? " payable" : ""}` : e.type === "fallback" ? `fallback() external${e.stateMutability === "payable" ? " payable" : ""}` : "receive() external payable";
33
+ }
34
+ function W(e, { includeName: t = !1 } = {}) {
35
+ if (e.type !== "function" && e.type !== "event" && e.type !== "error")
36
+ throw new vn(e.type);
37
+ return `${e.name}(${be(e.inputs, { includeName: t })})`;
38
+ }
39
+ function be(e, { includeName: t = !1 } = {}) {
40
+ return e ? e.map((n) => hn(n, { includeName: t })).join(t ? ", " : ",") : "";
41
+ }
42
+ function hn(e, { includeName: t }) {
43
+ return e.type.startsWith("tuple") ? `(${be(e.components, { includeName: t })})${e.type.slice(5)}` : e.type + (t && e.name ? ` ${e.name}` : "");
44
+ }
45
+ function Z(e, { strict: t = !0 } = {}) {
46
+ return !e || typeof e != "string" ? !1 : t ? /^0x[0-9a-fA-F]*$/.test(e) : e.startsWith("0x");
47
+ }
48
+ function g(e) {
49
+ return Z(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
50
+ }
51
+ const lt = "2.53.1";
52
+ let Ee = {
53
+ getDocsUrl: ({ docsBaseUrl: e, docsPath: t = "", docsSlug: n }) => t ? `${e ?? "https://viem.sh"}${t}${n ? `#${n}` : ""}` : void 0,
54
+ version: `viem@${lt}`
55
+ };
56
+ class u extends Error {
57
+ constructor(t, n = {}) {
58
+ const s = n.cause instanceof u ? n.cause.details : n.cause?.message ? n.cause.message : n.details, r = n.cause instanceof u && n.cause.docsPath || n.docsPath, o = Ee.getDocsUrl?.({ ...n, docsPath: r }), i = [
59
+ t || "An error occurred.",
60
+ "",
61
+ ...n.metaMessages ? [...n.metaMessages, ""] : [],
62
+ ...o ? [`Docs: ${o}`] : [],
63
+ ...s ? [`Details: ${s}`] : [],
64
+ ...Ee.version ? [`Version: ${Ee.version}`] : []
65
+ ].join(`
66
+ `);
67
+ super(i, n.cause ? { cause: n.cause } : void 0), Object.defineProperty(this, "details", {
68
+ enumerable: !0,
69
+ configurable: !0,
70
+ writable: !0,
71
+ value: void 0
72
+ }), Object.defineProperty(this, "docsPath", {
73
+ enumerable: !0,
74
+ configurable: !0,
75
+ writable: !0,
76
+ value: void 0
77
+ }), Object.defineProperty(this, "metaMessages", {
78
+ enumerable: !0,
79
+ configurable: !0,
80
+ writable: !0,
81
+ value: void 0
82
+ }), Object.defineProperty(this, "shortMessage", {
83
+ enumerable: !0,
84
+ configurable: !0,
85
+ writable: !0,
86
+ value: void 0
87
+ }), Object.defineProperty(this, "version", {
88
+ enumerable: !0,
89
+ configurable: !0,
90
+ writable: !0,
91
+ value: void 0
92
+ }), Object.defineProperty(this, "name", {
93
+ enumerable: !0,
94
+ configurable: !0,
95
+ writable: !0,
96
+ value: "BaseError"
97
+ }), this.details = s, this.docsPath = r, this.metaMessages = n.metaMessages, this.name = n.name ?? this.name, this.shortMessage = t, this.version = lt;
98
+ }
99
+ walk(t) {
100
+ return ft(this, t);
101
+ }
102
+ }
103
+ function ft(e, t) {
104
+ return t?.(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ? ft(e.cause, t) : t ? null : e;
105
+ }
106
+ class Xr extends u {
107
+ constructor({ docsPath: t }) {
108
+ super([
109
+ "A constructor was not found on the ABI.",
110
+ "Make sure you are using the correct ABI and that the constructor exists on it."
111
+ ].join(`
112
+ `), {
113
+ docsPath: t,
114
+ name: "AbiConstructorNotFoundError"
115
+ });
116
+ }
117
+ }
118
+ class Jr extends u {
119
+ constructor({ docsPath: t }) {
120
+ super([
121
+ "Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.",
122
+ "Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."
123
+ ].join(`
124
+ `), {
125
+ docsPath: t,
126
+ name: "AbiConstructorParamsNotFoundError"
127
+ });
128
+ }
129
+ }
130
+ class pn extends u {
131
+ constructor({ data: t, params: n, size: s }) {
132
+ super([`Data size of ${s} bytes is too small for given parameters.`].join(`
133
+ `), {
134
+ metaMessages: [
135
+ `Params: (${be(n, { includeName: !0 })})`,
136
+ `Data: ${t} (${s} bytes)`
137
+ ],
138
+ name: "AbiDecodingDataSizeTooSmallError"
139
+ }), Object.defineProperty(this, "data", {
140
+ enumerable: !0,
141
+ configurable: !0,
142
+ writable: !0,
143
+ value: void 0
144
+ }), Object.defineProperty(this, "params", {
145
+ enumerable: !0,
146
+ configurable: !0,
147
+ writable: !0,
148
+ value: void 0
149
+ }), Object.defineProperty(this, "size", {
150
+ enumerable: !0,
151
+ configurable: !0,
152
+ writable: !0,
153
+ value: void 0
154
+ }), this.data = t, this.params = n, this.size = s;
155
+ }
156
+ }
157
+ class ht extends u {
158
+ constructor({ cause: t } = {}) {
159
+ super('Cannot decode zero data ("0x") with ABI parameters.', {
160
+ name: "AbiDecodingZeroDataError",
161
+ cause: t
162
+ });
163
+ }
164
+ }
165
+ class bn extends u {
166
+ constructor({ expectedLength: t, givenLength: n, type: s }) {
167
+ super([
168
+ `ABI encoding array length mismatch for type ${s}.`,
169
+ `Expected length: ${t}`,
170
+ `Given length: ${n}`
171
+ ].join(`
172
+ `), { name: "AbiEncodingArrayLengthMismatchError" });
173
+ }
174
+ }
175
+ class mn extends u {
176
+ constructor({ expectedSize: t, value: n }) {
177
+ super(`Size of bytes "${n}" (bytes${g(n)}) does not match expected size (bytes${t}).`, { name: "AbiEncodingBytesSizeMismatchError" });
178
+ }
179
+ }
180
+ class yn extends u {
181
+ constructor({ expectedLength: t, givenLength: n }) {
182
+ super([
183
+ "ABI encoding params/values length mismatch.",
184
+ `Expected length (params): ${t}`,
185
+ `Given length (values): ${n}`
186
+ ].join(`
187
+ `), { name: "AbiEncodingLengthMismatchError" });
188
+ }
189
+ }
190
+ class Qr extends u {
191
+ constructor(t, { docsPath: n }) {
192
+ super([
193
+ `Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,
194
+ "Cannot encode error result without knowing what the parameter types are.",
195
+ "Make sure you are using the correct ABI and that the inputs exist on it."
196
+ ].join(`
197
+ `), {
198
+ docsPath: n,
199
+ name: "AbiErrorInputsNotFoundError"
200
+ });
201
+ }
202
+ }
203
+ class qr extends u {
204
+ constructor(t, { docsPath: n } = {}) {
205
+ super([
206
+ `Error ${t ? `"${t}" ` : ""}not found on ABI.`,
207
+ "Make sure you are using the correct ABI and that the error exists on it."
208
+ ].join(`
209
+ `), {
210
+ docsPath: n,
211
+ name: "AbiErrorNotFoundError"
212
+ });
213
+ }
214
+ }
215
+ class pt extends u {
216
+ constructor(t, { docsPath: n, cause: s }) {
217
+ super([
218
+ `Encoded error signature "${t}" not found on ABI.`,
219
+ "Make sure you are using the correct ABI and that the error exists on it.",
220
+ `You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${t}.`
221
+ ].join(`
222
+ `), {
223
+ docsPath: n,
224
+ name: "AbiErrorSignatureNotFoundError",
225
+ cause: s
226
+ }), Object.defineProperty(this, "signature", {
227
+ enumerable: !0,
228
+ configurable: !0,
229
+ writable: !0,
230
+ value: void 0
231
+ }), this.signature = t;
232
+ }
233
+ }
234
+ class eo extends u {
235
+ constructor({ docsPath: t }) {
236
+ super("Cannot extract event signature from empty topics.", {
237
+ docsPath: t,
238
+ name: "AbiEventSignatureEmptyTopicsError"
239
+ });
240
+ }
241
+ }
242
+ class to extends u {
243
+ constructor(t, { docsPath: n }) {
244
+ super([
245
+ `Encoded event signature "${t}" not found on ABI.`,
246
+ "Make sure you are using the correct ABI and that the event exists on it.",
247
+ `You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`
248
+ ].join(`
249
+ `), {
250
+ docsPath: n,
251
+ name: "AbiEventSignatureNotFoundError"
252
+ });
253
+ }
254
+ }
255
+ class no extends u {
256
+ constructor(t, { docsPath: n } = {}) {
257
+ super([
258
+ `Event ${t ? `"${t}" ` : ""}not found on ABI.`,
259
+ "Make sure you are using the correct ABI and that the event exists on it."
260
+ ].join(`
261
+ `), {
262
+ docsPath: n,
263
+ name: "AbiEventNotFoundError"
264
+ });
265
+ }
266
+ }
267
+ class so extends u {
268
+ constructor(t, { docsPath: n } = {}) {
269
+ super([
270
+ `Function ${t ? `"${t}" ` : ""}not found on ABI.`,
271
+ "Make sure you are using the correct ABI and that the function exists on it."
272
+ ].join(`
273
+ `), {
274
+ docsPath: n,
275
+ name: "AbiFunctionNotFoundError"
276
+ });
277
+ }
278
+ }
279
+ class ro extends u {
280
+ constructor(t, { docsPath: n }) {
281
+ super([
282
+ `Function "${t}" does not contain any \`outputs\` on ABI.`,
283
+ "Cannot decode function result without knowing what the parameter types are.",
284
+ "Make sure you are using the correct ABI and that the function exists on it."
285
+ ].join(`
286
+ `), {
287
+ docsPath: n,
288
+ name: "AbiFunctionOutputsNotFoundError"
289
+ });
290
+ }
291
+ }
292
+ class oo extends u {
293
+ constructor(t, { docsPath: n }) {
294
+ super([
295
+ `Encoded function signature "${t}" not found on ABI.`,
296
+ "Make sure you are using the correct ABI and that the function exists on it.",
297
+ `You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`
298
+ ].join(`
299
+ `), {
300
+ docsPath: n,
301
+ name: "AbiFunctionSignatureNotFoundError"
302
+ });
303
+ }
304
+ }
305
+ class gn extends u {
306
+ constructor(t, n) {
307
+ super("Found ambiguous types in overloaded ABI items.", {
308
+ metaMessages: [
309
+ `\`${t.type}\` in \`${W(t.abiItem)}\`, and`,
310
+ `\`${n.type}\` in \`${W(n.abiItem)}\``,
311
+ "",
312
+ "These types encode differently and cannot be distinguished at runtime.",
313
+ "Remove one of the ambiguous items in the ABI."
314
+ ],
315
+ name: "AbiItemAmbiguityError"
316
+ });
317
+ }
318
+ }
319
+ class io extends u {
320
+ constructor({ expectedSize: t, givenSize: n }) {
321
+ super(`Expected bytes${t}, got bytes${n}.`, {
322
+ name: "BytesSizeMismatchError"
323
+ });
324
+ }
325
+ }
326
+ class ao extends u {
327
+ constructor({ abiItem: t, data: n, params: s, size: r }) {
328
+ super([
329
+ `Data size of ${r} bytes is too small for non-indexed event parameters.`
330
+ ].join(`
331
+ `), {
332
+ metaMessages: [
333
+ `Params: (${be(s, { includeName: !0 })})`,
334
+ `Data: ${n} (${r} bytes)`
335
+ ],
336
+ name: "DecodeLogDataMismatch"
337
+ }), Object.defineProperty(this, "abiItem", {
338
+ enumerable: !0,
339
+ configurable: !0,
340
+ writable: !0,
341
+ value: void 0
342
+ }), Object.defineProperty(this, "data", {
343
+ enumerable: !0,
344
+ configurable: !0,
345
+ writable: !0,
346
+ value: void 0
347
+ }), Object.defineProperty(this, "params", {
348
+ enumerable: !0,
349
+ configurable: !0,
350
+ writable: !0,
351
+ value: void 0
352
+ }), Object.defineProperty(this, "size", {
353
+ enumerable: !0,
354
+ configurable: !0,
355
+ writable: !0,
356
+ value: void 0
357
+ }), this.abiItem = t, this.data = n, this.params = s, this.size = r;
358
+ }
359
+ }
360
+ class co extends u {
361
+ constructor({ abiItem: t, param: n }) {
362
+ super([
363
+ `Expected a topic for indexed event parameter${n.name ? ` "${n.name}"` : ""} on event "${W(t, { includeName: !0 })}".`
364
+ ].join(`
365
+ `), { name: "DecodeLogTopicsMismatch" }), Object.defineProperty(this, "abiItem", {
366
+ enumerable: !0,
367
+ configurable: !0,
368
+ writable: !0,
369
+ value: void 0
370
+ }), this.abiItem = t;
371
+ }
372
+ }
373
+ class xn extends u {
374
+ constructor(t, { docsPath: n }) {
375
+ super([
376
+ `Type "${t}" is not a valid encoding type.`,
377
+ "Please provide a valid ABI type."
378
+ ].join(`
379
+ `), { docsPath: n, name: "InvalidAbiEncodingType" });
380
+ }
381
+ }
382
+ class wn extends u {
383
+ constructor(t, { docsPath: n }) {
384
+ super([
385
+ `Type "${t}" is not a valid decoding type.`,
386
+ "Please provide a valid ABI type."
387
+ ].join(`
388
+ `), { docsPath: n, name: "InvalidAbiDecodingType" });
389
+ }
390
+ }
391
+ class En extends u {
392
+ constructor(t) {
393
+ super([`Value "${t}" is not a valid array.`].join(`
394
+ `), {
395
+ name: "InvalidArrayError"
396
+ });
397
+ }
398
+ }
399
+ class vn extends u {
400
+ constructor(t) {
401
+ super([
402
+ `"${t}" is not a valid definition type.`,
403
+ 'Valid types: "function", "event", "error"'
404
+ ].join(`
405
+ `), { name: "InvalidDefinitionTypeError" });
406
+ }
407
+ }
408
+ class bt extends u {
409
+ constructor({ offset: t, position: n, size: s }) {
410
+ super(`Slice ${n === "start" ? "starting" : "ending"} at offset "${t}" is out-of-bounds (size: ${s}).`, { name: "SliceOffsetOutOfBoundsError" });
411
+ }
412
+ }
413
+ class mt extends u {
414
+ constructor({ size: t, targetSize: n, type: s }) {
415
+ super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`, { name: "SizeExceedsPaddingSizeError" });
416
+ }
417
+ }
418
+ class uo extends u {
419
+ constructor({ size: t, targetSize: n, type: s }) {
420
+ super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} is expected to be ${n} ${s} long, but is ${t} ${s} long.`, { name: "InvalidBytesLengthError" });
421
+ }
422
+ }
423
+ function X(e, { dir: t, size: n = 32 } = {}) {
424
+ return typeof e == "string" ? U(e, { dir: t, size: n }) : An(e, { dir: t, size: n });
425
+ }
426
+ function U(e, { dir: t, size: n = 32 } = {}) {
427
+ if (n === null)
428
+ return e;
429
+ const s = e.replace("0x", "");
430
+ if (s.length > n * 2)
431
+ throw new mt({
432
+ size: Math.ceil(s.length / 2),
433
+ targetSize: n,
434
+ type: "hex"
435
+ });
436
+ return `0x${s[t === "right" ? "padEnd" : "padStart"](n * 2, "0")}`;
437
+ }
438
+ function An(e, { dir: t, size: n = 32 } = {}) {
439
+ if (n === null)
440
+ return e;
441
+ if (e.length > n)
442
+ throw new mt({
443
+ size: e.length,
444
+ targetSize: n,
445
+ type: "bytes"
446
+ });
447
+ const s = new Uint8Array(n);
448
+ for (let r = 0; r < n; r++) {
449
+ const o = t === "right";
450
+ s[o ? r : n - r - 1] = e[o ? r : e.length - r - 1];
451
+ }
452
+ return s;
453
+ }
454
+ class Ge extends u {
455
+ constructor({ max: t, min: n, signed: s, size: r, value: o }) {
456
+ super(`Number "${o}" is not in safe ${r ? `${r * 8}-bit ${s ? "signed" : "unsigned"} ` : ""}integer range ${t ? `(${n} to ${t})` : `(above ${n})`}`, { name: "IntegerOutOfRangeError" });
457
+ }
458
+ }
459
+ class Pn extends u {
460
+ constructor(t) {
461
+ super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
462
+ name: "InvalidBytesBooleanError"
463
+ });
464
+ }
465
+ }
466
+ class $n extends u {
467
+ constructor(t) {
468
+ super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`, { name: "InvalidHexBooleanError" });
469
+ }
470
+ }
471
+ class Bn extends u {
472
+ constructor({ givenSize: t, maxSize: n }) {
473
+ super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`, { name: "SizeOverflowError" });
474
+ }
475
+ }
476
+ function B(e, { dir: t = "left" } = {}) {
477
+ let n = typeof e == "string" ? e.replace("0x", "") : e, s = 0;
478
+ for (let r = 0; r < n.length - 1 && n[t === "left" ? r : n.length - r - 1].toString() === "0"; r++)
479
+ s++;
480
+ return n = t === "left" ? n.slice(s) : n.slice(0, n.length - s), typeof e == "string" ? (n.length === 1 && t === "right" && (n = `${n}0`), `0x${n.length % 2 === 1 ? `0${n}` : n}`) : n;
481
+ }
482
+ function P(e, { size: t }) {
483
+ if (g(e) > t)
484
+ throw new Bn({
485
+ givenSize: g(e),
486
+ maxSize: t
487
+ });
488
+ }
489
+ function N(e, t = {}) {
490
+ const { signed: n } = t;
491
+ t.size && P(e, { size: t.size });
492
+ const s = BigInt(e);
493
+ if (!n)
494
+ return s;
495
+ const r = (e.length - 2) / 2, o = (1n << BigInt(r) * 8n - 1n) - 1n;
496
+ return s <= o ? s : s - BigInt(`0x${"f".padStart(r * 2, "f")}`) - 1n;
497
+ }
498
+ function lo(e, t = {}) {
499
+ let n = e;
500
+ if (t.size && (P(n, { size: t.size }), n = B(n)), B(n) === "0x00")
501
+ return !1;
502
+ if (B(n) === "0x01")
503
+ return !0;
504
+ throw new $n(n);
505
+ }
506
+ function ie(e, t = {}) {
507
+ const n = N(e, t), s = Number(n);
508
+ if (!Number.isSafeInteger(s))
509
+ throw new Ge({
510
+ max: `${Number.MAX_SAFE_INTEGER}`,
511
+ min: `${Number.MIN_SAFE_INTEGER}`,
512
+ signed: t.signed,
513
+ size: t.size,
514
+ value: `${n}n`
515
+ });
516
+ return s;
517
+ }
518
+ const Tn = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
519
+ function R(e, t = {}) {
520
+ return typeof e == "number" || typeof e == "bigint" ? f(e, t) : typeof e == "string" ? gt(e, t) : typeof e == "boolean" ? yt(e, t) : E(e, t);
521
+ }
522
+ function yt(e, t = {}) {
523
+ const n = `0x${Number(e)}`;
524
+ return typeof t.size == "number" ? (P(n, { size: t.size }), X(n, { size: t.size })) : n;
525
+ }
526
+ function E(e, t = {}) {
527
+ let n = "";
528
+ for (let r = 0; r < e.length; r++)
529
+ n += Tn[e[r]];
530
+ const s = `0x${n}`;
531
+ return typeof t.size == "number" ? (P(s, { size: t.size }), X(s, { dir: "right", size: t.size })) : s;
532
+ }
533
+ function f(e, t = {}) {
534
+ const { signed: n, size: s } = t, r = BigInt(e);
535
+ let o;
536
+ s ? n ? o = (1n << BigInt(s) * 8n - 1n) - 1n : o = 2n ** (BigInt(s) * 8n) - 1n : typeof e == "number" && (o = BigInt(Number.MAX_SAFE_INTEGER));
537
+ const i = typeof o == "bigint" && n ? -o - 1n : 0;
538
+ if (o && r > o || r < i) {
539
+ const c = typeof e == "bigint" ? "n" : "";
540
+ throw new Ge({
541
+ max: o ? `${o}${c}` : void 0,
542
+ min: `${i}${c}`,
543
+ signed: n,
544
+ size: s,
545
+ value: `${e}${c}`
546
+ });
547
+ }
548
+ const a = `0x${(n && r < 0 ? (1n << BigInt(s * 8)) + BigInt(r) : r).toString(16)}`;
549
+ return s ? X(a, { size: s }) : a;
550
+ }
551
+ const In = /* @__PURE__ */ new TextEncoder();
552
+ function gt(e, t = {}) {
553
+ const n = In.encode(e);
554
+ return E(n, t);
555
+ }
556
+ const Fn = /* @__PURE__ */ new TextEncoder();
557
+ function Oe(e, t = {}) {
558
+ return typeof e == "number" || typeof e == "bigint" ? kn(e, t) : typeof e == "boolean" ? Cn(e, t) : Z(e) ? M(e, t) : xt(e, t);
559
+ }
560
+ function Cn(e, t = {}) {
561
+ const n = new Uint8Array(1);
562
+ return n[0] = Number(e), typeof t.size == "number" ? (P(n, { size: t.size }), X(n, { size: t.size })) : n;
563
+ }
564
+ const F = {
565
+ zero: 48,
566
+ nine: 57,
567
+ A: 65,
568
+ F: 70,
569
+ a: 97,
570
+ f: 102
571
+ };
572
+ function et(e) {
573
+ if (e >= F.zero && e <= F.nine)
574
+ return e - F.zero;
575
+ if (e >= F.A && e <= F.F)
576
+ return e - (F.A - 10);
577
+ if (e >= F.a && e <= F.f)
578
+ return e - (F.a - 10);
579
+ }
580
+ function M(e, t = {}) {
581
+ let n = e;
582
+ t.size && (P(n, { size: t.size }), n = X(n, { dir: "right", size: t.size }));
583
+ let s = n.slice(2);
584
+ s.length % 2 && (s = `0${s}`);
585
+ const r = s.length / 2, o = new Uint8Array(r);
586
+ for (let i = 0, a = 0; i < r; i++) {
587
+ const c = et(s.charCodeAt(a++)), d = et(s.charCodeAt(a++));
588
+ if (c === void 0 || d === void 0)
589
+ throw new u(`Invalid byte sequence ("${s[a - 2]}${s[a - 1]}" in "${s}").`);
590
+ o[i] = c * 16 + d;
591
+ }
592
+ return o;
593
+ }
594
+ function kn(e, t) {
595
+ const n = f(e, t);
596
+ return M(n);
597
+ }
598
+ function xt(e, t = {}) {
599
+ const n = Fn.encode(e);
600
+ return typeof t.size == "number" ? (P(n, { size: t.size }), X(n, { dir: "right", size: t.size })) : n;
601
+ }
602
+ const fe = /* @__PURE__ */ BigInt(2 ** 32 - 1), tt = /* @__PURE__ */ BigInt(32);
603
+ function zn(e, t = !1) {
604
+ return t ? { h: Number(e & fe), l: Number(e >> tt & fe) } : { h: Number(e >> tt & fe) | 0, l: Number(e & fe) | 0 };
605
+ }
606
+ function Sn(e, t = !1) {
607
+ const n = e.length;
608
+ let s = new Uint32Array(n), r = new Uint32Array(n);
609
+ for (let o = 0; o < n; o++) {
610
+ const { h: i, l: a } = zn(e[o], t);
611
+ [s[o], r[o]] = [i, a];
612
+ }
613
+ return [s, r];
614
+ }
615
+ const Un = (e, t, n) => e << n | t >>> 32 - n, Mn = (e, t, n) => t << n | e >>> 32 - n, Ln = (e, t, n) => t << n - 32 | e >>> 64 - n, Gn = (e, t, n) => e << n - 32 | t >>> 64 - n, D = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
616
+ function On(e) {
617
+ return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
618
+ }
619
+ function he(e) {
620
+ if (!Number.isSafeInteger(e) || e < 0)
621
+ throw new Error("positive integer expected, got " + e);
622
+ }
623
+ function K(e, ...t) {
624
+ if (!On(e))
625
+ throw new Error("Uint8Array expected");
626
+ if (t.length > 0 && !t.includes(e.length))
627
+ throw new Error("Uint8Array expected of length " + t + ", got length=" + e.length);
628
+ }
629
+ function fo(e) {
630
+ if (typeof e != "function" || typeof e.create != "function")
631
+ throw new Error("Hash should be wrapped by utils.createHasher");
632
+ he(e.outputLen), he(e.blockLen);
633
+ }
634
+ function pe(e, t = !0) {
635
+ if (e.destroyed)
636
+ throw new Error("Hash instance has been destroyed");
637
+ if (t && e.finished)
638
+ throw new Error("Hash#digest() has already been called");
639
+ }
640
+ function wt(e, t) {
641
+ K(e);
642
+ const n = t.outputLen;
643
+ if (e.length < n)
644
+ throw new Error("digestInto() expects output buffer of length at least " + n);
645
+ }
646
+ function Nn(e) {
647
+ return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
648
+ }
649
+ function ae(...e) {
650
+ for (let t = 0; t < e.length; t++)
651
+ e[t].fill(0);
652
+ }
653
+ function ve(e) {
654
+ return new DataView(e.buffer, e.byteOffset, e.byteLength);
655
+ }
656
+ function $(e, t) {
657
+ return e << 32 - t | e >>> t;
658
+ }
659
+ const Hn = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
660
+ function jn(e) {
661
+ return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
662
+ }
663
+ function Dn(e) {
664
+ for (let t = 0; t < e.length; t++)
665
+ e[t] = jn(e[t]);
666
+ return e;
667
+ }
668
+ const nt = Hn ? (e) => e : Dn;
669
+ function _n(e) {
670
+ if (typeof e != "string")
671
+ throw new Error("string expected");
672
+ return new Uint8Array(new TextEncoder().encode(e));
673
+ }
674
+ function Ne(e) {
675
+ return typeof e == "string" && (e = _n(e)), K(e), e;
676
+ }
677
+ function ho(...e) {
678
+ let t = 0;
679
+ for (let s = 0; s < e.length; s++) {
680
+ const r = e[s];
681
+ K(r), t += r.length;
682
+ }
683
+ const n = new Uint8Array(t);
684
+ for (let s = 0, r = 0; s < e.length; s++) {
685
+ const o = e[s];
686
+ n.set(o, r), r += o.length;
687
+ }
688
+ return n;
689
+ }
690
+ class Et {
691
+ }
692
+ function vt(e) {
693
+ const t = (s) => e().update(Ne(s)).digest(), n = e();
694
+ return t.outputLen = n.outputLen, t.blockLen = n.blockLen, t.create = () => e(), t;
695
+ }
696
+ function po(e = 32) {
697
+ if (D && typeof D.getRandomValues == "function")
698
+ return D.getRandomValues(new Uint8Array(e));
699
+ if (D && typeof D.randomBytes == "function")
700
+ return Uint8Array.from(D.randomBytes(e));
701
+ throw new Error("crypto.getRandomValues must be defined");
702
+ }
703
+ const Rn = BigInt(0), te = BigInt(1), Vn = BigInt(2), Wn = BigInt(7), Kn = BigInt(256), Yn = BigInt(113), At = [], Pt = [], $t = [];
704
+ for (let e = 0, t = te, n = 1, s = 0; e < 24; e++) {
705
+ [n, s] = [s, (2 * n + 3 * s) % 5], At.push(2 * (5 * s + n)), Pt.push((e + 1) * (e + 2) / 2 % 64);
706
+ let r = Rn;
707
+ for (let o = 0; o < 7; o++)
708
+ t = (t << te ^ (t >> Wn) * Yn) % Kn, t & Vn && (r ^= te << (te << /* @__PURE__ */ BigInt(o)) - te);
709
+ $t.push(r);
710
+ }
711
+ const Bt = Sn($t, !0), Zn = Bt[0], Xn = Bt[1], st = (e, t, n) => n > 32 ? Ln(e, t, n) : Un(e, t, n), rt = (e, t, n) => n > 32 ? Gn(e, t, n) : Mn(e, t, n);
712
+ function Jn(e, t = 24) {
713
+ const n = new Uint32Array(10);
714
+ for (let s = 24 - t; s < 24; s++) {
715
+ for (let i = 0; i < 10; i++)
716
+ n[i] = e[i] ^ e[i + 10] ^ e[i + 20] ^ e[i + 30] ^ e[i + 40];
717
+ for (let i = 0; i < 10; i += 2) {
718
+ const a = (i + 8) % 10, c = (i + 2) % 10, d = n[c], h = n[c + 1], l = st(d, h, 1) ^ n[a], b = rt(d, h, 1) ^ n[a + 1];
719
+ for (let p = 0; p < 50; p += 10)
720
+ e[i + p] ^= l, e[i + p + 1] ^= b;
721
+ }
722
+ let r = e[2], o = e[3];
723
+ for (let i = 0; i < 24; i++) {
724
+ const a = Pt[i], c = st(r, o, a), d = rt(r, o, a), h = At[i];
725
+ r = e[h], o = e[h + 1], e[h] = c, e[h + 1] = d;
726
+ }
727
+ for (let i = 0; i < 50; i += 10) {
728
+ for (let a = 0; a < 10; a++)
729
+ n[a] = e[i + a];
730
+ for (let a = 0; a < 10; a++)
731
+ e[i + a] ^= ~n[(a + 2) % 10] & n[(a + 4) % 10];
732
+ }
733
+ e[0] ^= Zn[s], e[1] ^= Xn[s];
734
+ }
735
+ ae(n);
736
+ }
737
+ class He extends Et {
738
+ // NOTE: we accept arguments in bytes instead of bits here.
739
+ constructor(t, n, s, r = !1, o = 24) {
740
+ if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = t, this.suffix = n, this.outputLen = s, this.enableXOF = r, this.rounds = o, he(s), !(0 < t && t < 200))
741
+ throw new Error("only keccak-f1600 function is supported");
742
+ this.state = new Uint8Array(200), this.state32 = Nn(this.state);
743
+ }
744
+ clone() {
745
+ return this._cloneInto();
746
+ }
747
+ keccak() {
748
+ nt(this.state32), Jn(this.state32, this.rounds), nt(this.state32), this.posOut = 0, this.pos = 0;
749
+ }
750
+ update(t) {
751
+ pe(this), t = Ne(t), K(t);
752
+ const { blockLen: n, state: s } = this, r = t.length;
753
+ for (let o = 0; o < r; ) {
754
+ const i = Math.min(n - this.pos, r - o);
755
+ for (let a = 0; a < i; a++)
756
+ s[this.pos++] ^= t[o++];
757
+ this.pos === n && this.keccak();
758
+ }
759
+ return this;
760
+ }
761
+ finish() {
762
+ if (this.finished)
763
+ return;
764
+ this.finished = !0;
765
+ const { state: t, suffix: n, pos: s, blockLen: r } = this;
766
+ t[s] ^= n, (n & 128) !== 0 && s === r - 1 && this.keccak(), t[r - 1] ^= 128, this.keccak();
767
+ }
768
+ writeInto(t) {
769
+ pe(this, !1), K(t), this.finish();
770
+ const n = this.state, { blockLen: s } = this;
771
+ for (let r = 0, o = t.length; r < o; ) {
772
+ this.posOut >= s && this.keccak();
773
+ const i = Math.min(s - this.posOut, o - r);
774
+ t.set(n.subarray(this.posOut, this.posOut + i), r), this.posOut += i, r += i;
775
+ }
776
+ return t;
777
+ }
778
+ xofInto(t) {
779
+ if (!this.enableXOF)
780
+ throw new Error("XOF is not possible for this instance");
781
+ return this.writeInto(t);
782
+ }
783
+ xof(t) {
784
+ return he(t), this.xofInto(new Uint8Array(t));
785
+ }
786
+ digestInto(t) {
787
+ if (wt(t, this), this.finished)
788
+ throw new Error("digest() was already called");
789
+ return this.writeInto(t), this.destroy(), t;
790
+ }
791
+ digest() {
792
+ return this.digestInto(new Uint8Array(this.outputLen));
793
+ }
794
+ destroy() {
795
+ this.destroyed = !0, ae(this.state);
796
+ }
797
+ _cloneInto(t) {
798
+ const { blockLen: n, suffix: s, outputLen: r, rounds: o, enableXOF: i } = this;
799
+ return t || (t = new He(n, s, r, i, o)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = o, t.suffix = s, t.outputLen = r, t.enableXOF = i, t.destroyed = this.destroyed, t;
800
+ }
801
+ }
802
+ const Qn = (e, t, n) => vt(() => new He(t, e, n)), qn = Qn(1, 136, 256 / 8);
803
+ function Tt(e, t) {
804
+ const n = t || "hex", s = qn(Z(e, { strict: !1 }) ? Oe(e) : e);
805
+ return n === "bytes" ? s : R(s);
806
+ }
807
+ const es = (e) => Tt(Oe(e));
808
+ function ts(e) {
809
+ return es(e);
810
+ }
811
+ function ns(e) {
812
+ let t = !0, n = "", s = 0, r = "", o = !1;
813
+ for (let i = 0; i < e.length; i++) {
814
+ const a = e[i];
815
+ if (["(", ")", ","].includes(a) && (t = !0), a === "(" && s++, a === ")" && s--, !!t) {
816
+ if (s === 0) {
817
+ if (a === " " && ["event", "function", ""].includes(r))
818
+ r = "";
819
+ else if (r += a, a === ")") {
820
+ o = !0;
821
+ break;
822
+ }
823
+ continue;
824
+ }
825
+ if (a === " ") {
826
+ e[i - 1] !== "," && n !== "," && n !== ",(" && (n = "", t = !1);
827
+ continue;
828
+ }
829
+ r += a, n += a;
830
+ }
831
+ }
832
+ if (!o)
833
+ throw new u("Unable to normalize signature.");
834
+ return r;
835
+ }
836
+ const ss = (e) => {
837
+ const t = typeof e == "string" ? e : fn(e);
838
+ return ns(t);
839
+ };
840
+ function It(e) {
841
+ return ts(ss(e));
842
+ }
843
+ const rs = It;
844
+ class A extends u {
845
+ constructor({ address: t }) {
846
+ super(`Address "${t}" is invalid.`, {
847
+ metaMessages: [
848
+ "- Address must be a hex value of 20 bytes (40 hex characters).",
849
+ "- Address must match its checksum counterpart."
850
+ ],
851
+ name: "InvalidAddressError"
852
+ });
853
+ }
854
+ }
855
+ class Ft extends Map {
856
+ constructor(t) {
857
+ super(), Object.defineProperty(this, "maxSize", {
858
+ enumerable: !0,
859
+ configurable: !0,
860
+ writable: !0,
861
+ value: void 0
862
+ }), this.maxSize = t;
863
+ }
864
+ get(t) {
865
+ const n = super.get(t);
866
+ return super.has(t) && (super.delete(t), super.set(t, n)), n;
867
+ }
868
+ set(t, n) {
869
+ if (super.has(t) && super.delete(t), super.set(t, n), this.maxSize && this.size > this.maxSize) {
870
+ const s = super.keys().next().value;
871
+ s !== void 0 && super.delete(s);
872
+ }
873
+ return this;
874
+ }
875
+ }
876
+ const Ae = /* @__PURE__ */ new Ft(8192);
877
+ function je(e, t) {
878
+ if (Ae.has(`${e}.${t}`))
879
+ return Ae.get(`${e}.${t}`);
880
+ const n = e.substring(2).toLowerCase(), s = Tt(xt(n), "bytes"), r = n.split("");
881
+ for (let i = 0; i < 40; i += 2)
882
+ s[i >> 1] >> 4 >= 8 && r[i] && (r[i] = r[i].toUpperCase()), (s[i >> 1] & 15) >= 8 && r[i + 1] && (r[i + 1] = r[i + 1].toUpperCase());
883
+ const o = `0x${r.join("")}`;
884
+ return Ae.set(`${e}.${t}`, o), o;
885
+ }
886
+ function bo(e, t) {
887
+ if (!v(e, { strict: !1 }))
888
+ throw new A({ address: e });
889
+ return je(e, t);
890
+ }
891
+ const os = /^0x[a-fA-F0-9]{40}$/, Pe = /* @__PURE__ */ new Ft(8192);
892
+ function v(e, t) {
893
+ const { strict: n = !0 } = t ?? {}, s = `${e}.${n}`;
894
+ if (Pe.has(s))
895
+ return Pe.get(s);
896
+ const r = os.test(e) ? e.toLowerCase() === e ? !0 : n ? je(e) === e : !0 : !1;
897
+ return Pe.set(s, r), r;
898
+ }
899
+ function Y(e) {
900
+ return typeof e[0] == "string" ? J(e) : is(e);
901
+ }
902
+ function is(e) {
903
+ let t = 0;
904
+ for (const r of e)
905
+ t += r.length;
906
+ const n = new Uint8Array(t);
907
+ let s = 0;
908
+ for (const r of e)
909
+ n.set(r, s), s += r.length;
910
+ return n;
911
+ }
912
+ function J(e) {
913
+ return `0x${e.reduce((t, n) => t + n.replace("0x", ""), "")}`;
914
+ }
915
+ function ce(e, t, n, { strict: s } = {}) {
916
+ return Z(e, { strict: !1 }) ? as(e, t, n, {
917
+ strict: s
918
+ }) : zt(e, t, n, {
919
+ strict: s
920
+ });
921
+ }
922
+ function Ct(e, t) {
923
+ if (typeof t == "number" && t > 0 && t > g(e) - 1)
924
+ throw new bt({
925
+ offset: t,
926
+ position: "start",
927
+ size: g(e)
928
+ });
929
+ }
930
+ function kt(e, t, n) {
931
+ if (typeof t == "number" && typeof n == "number" && g(e) !== n - t)
932
+ throw new bt({
933
+ offset: n,
934
+ position: "end",
935
+ size: g(e)
936
+ });
937
+ }
938
+ function zt(e, t, n, { strict: s } = {}) {
939
+ Ct(e, t);
940
+ const r = e.slice(t, n);
941
+ return s && kt(r, t, n), r;
942
+ }
943
+ function as(e, t, n, { strict: s } = {}) {
944
+ Ct(e, t);
945
+ const r = `0x${e.replace("0x", "").slice((t ?? 0) * 2, (n ?? e.length) * 2)}`;
946
+ return s && kt(r, t, n), r;
947
+ }
948
+ const mo = /^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)?$/;
949
+ function yo(e, t) {
950
+ if (e.length !== t.length)
951
+ throw new yn({
952
+ expectedLength: e.length,
953
+ givenLength: t.length
954
+ });
955
+ const n = us({
956
+ params: e,
957
+ values: t
958
+ }), s = _e(n);
959
+ return s.length === 0 ? "0x" : s;
960
+ }
961
+ function us({ params: e, values: t }) {
962
+ const n = [];
963
+ for (let s = 0; s < e.length; s++)
964
+ n.push(De({ param: e[s], value: t[s] }));
965
+ return n;
966
+ }
967
+ function De({ param: e, value: t }) {
968
+ const n = Re(e.type);
969
+ if (n) {
970
+ const [s, r] = n;
971
+ return ls(t, { length: s, param: { ...e, type: r } });
972
+ }
973
+ if (e.type === "tuple")
974
+ return ms(t, {
975
+ param: e
976
+ });
977
+ if (e.type === "address")
978
+ return ds(t);
979
+ if (e.type === "bool")
980
+ return hs(t);
981
+ if (e.type.startsWith("uint") || e.type.startsWith("int")) {
982
+ const s = e.type.startsWith("int"), [, , r = "256"] = cs.exec(e.type) ?? [];
983
+ return ps(t, {
984
+ signed: s,
985
+ size: Number(r)
986
+ });
987
+ }
988
+ if (e.type.startsWith("bytes"))
989
+ return fs(t, { param: e });
990
+ if (e.type === "string")
991
+ return bs(t);
992
+ throw new xn(e.type, {
993
+ docsPath: "/docs/contract/encodeAbiParameters"
994
+ });
995
+ }
996
+ function _e(e) {
997
+ let t = 0;
998
+ for (let o = 0; o < e.length; o++) {
999
+ const { dynamic: i, encoded: a } = e[o];
1000
+ i ? t += 32 : t += g(a);
1001
+ }
1002
+ const n = [], s = [];
1003
+ let r = 0;
1004
+ for (let o = 0; o < e.length; o++) {
1005
+ const { dynamic: i, encoded: a } = e[o];
1006
+ i ? (n.push(f(t + r, { size: 32 })), s.push(a), r += g(a)) : n.push(a);
1007
+ }
1008
+ return Y([...n, ...s]);
1009
+ }
1010
+ function ds(e) {
1011
+ if (!v(e))
1012
+ throw new A({ address: e });
1013
+ return { dynamic: !1, encoded: U(e.toLowerCase()) };
1014
+ }
1015
+ function ls(e, { length: t, param: n }) {
1016
+ const s = t === null;
1017
+ if (!Array.isArray(e))
1018
+ throw new En(e);
1019
+ if (!s && e.length !== t)
1020
+ throw new bn({
1021
+ expectedLength: t,
1022
+ givenLength: e.length,
1023
+ type: `${n.type}[${t}]`
1024
+ });
1025
+ let r = !1;
1026
+ const o = [];
1027
+ for (let i = 0; i < e.length; i++) {
1028
+ const a = De({ param: n, value: e[i] });
1029
+ a.dynamic && (r = !0), o.push(a);
1030
+ }
1031
+ if (s || r) {
1032
+ const i = _e(o);
1033
+ if (s) {
1034
+ const a = f(o.length, { size: 32 });
1035
+ return {
1036
+ dynamic: !0,
1037
+ encoded: o.length > 0 ? Y([a, i]) : a
1038
+ };
1039
+ }
1040
+ if (r)
1041
+ return { dynamic: !0, encoded: i };
1042
+ }
1043
+ return {
1044
+ dynamic: !1,
1045
+ encoded: Y(o.map(({ encoded: i }) => i))
1046
+ };
1047
+ }
1048
+ function fs(e, { param: t }) {
1049
+ const [, n] = t.type.split("bytes"), s = g(e);
1050
+ if (!n) {
1051
+ let r = e;
1052
+ return s % 32 !== 0 && (r = U(r, {
1053
+ dir: "right",
1054
+ size: Math.ceil((e.length - 2) / 2 / 32) * 32
1055
+ })), {
1056
+ dynamic: !0,
1057
+ encoded: Y([U(f(s, { size: 32 })), r])
1058
+ };
1059
+ }
1060
+ if (s !== Number.parseInt(n, 10))
1061
+ throw new mn({
1062
+ expectedSize: Number.parseInt(n, 10),
1063
+ value: e
1064
+ });
1065
+ return { dynamic: !1, encoded: U(e, { dir: "right" }) };
1066
+ }
1067
+ function hs(e) {
1068
+ if (typeof e != "boolean")
1069
+ throw new u(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);
1070
+ return { dynamic: !1, encoded: U(yt(e)) };
1071
+ }
1072
+ function ps(e, { signed: t, size: n = 256 }) {
1073
+ if (typeof n == "number") {
1074
+ const s = 2n ** (BigInt(n) - (t ? 1n : 0n)) - 1n, r = t ? -s - 1n : 0n;
1075
+ if (e > s || e < r)
1076
+ throw new Ge({
1077
+ max: s.toString(),
1078
+ min: r.toString(),
1079
+ signed: t,
1080
+ size: n / 8,
1081
+ value: e.toString()
1082
+ });
1083
+ }
1084
+ return {
1085
+ dynamic: !1,
1086
+ encoded: f(e, {
1087
+ size: 32,
1088
+ signed: t
1089
+ })
1090
+ };
1091
+ }
1092
+ function bs(e) {
1093
+ const t = gt(e), n = Math.ceil(g(t) / 32), s = [];
1094
+ for (let r = 0; r < n; r++)
1095
+ s.push(U(ce(t, r * 32, (r + 1) * 32), {
1096
+ dir: "right"
1097
+ }));
1098
+ return {
1099
+ dynamic: !0,
1100
+ encoded: Y([
1101
+ U(f(g(t), { size: 32 })),
1102
+ ...s
1103
+ ])
1104
+ };
1105
+ }
1106
+ function ms(e, { param: t }) {
1107
+ let n = !1;
1108
+ const s = [];
1109
+ for (let r = 0; r < t.components.length; r++) {
1110
+ const o = t.components[r], i = Array.isArray(e) ? r : o.name, a = De({
1111
+ param: o,
1112
+ value: e[i]
1113
+ });
1114
+ s.push(a), a.dynamic && (n = !0);
1115
+ }
1116
+ return {
1117
+ dynamic: n,
1118
+ encoded: n ? _e(s) : Y(s.map(({ encoded: r }) => r))
1119
+ };
1120
+ }
1121
+ function Re(e) {
1122
+ const t = e.match(/^(.*)\[(\d+)?\]$/);
1123
+ return t ? (
1124
+ // Return `null` if the array is dynamic.
1125
+ [t[2] ? Number(t[2]) : null, t[1]]
1126
+ ) : void 0;
1127
+ }
1128
+ const St = (e) => ce(It(e), 0, 4);
1129
+ function ys(e) {
1130
+ const { abi: t, args: n = [], name: s } = e, r = Z(s, { strict: !1 }), o = t.filter((a) => r ? a.type === "function" ? St(a) === s : a.type === "event" ? rs(a) === s : !1 : "name" in a && a.name === s);
1131
+ if (o.length === 0)
1132
+ return;
1133
+ if (o.length === 1)
1134
+ return o[0];
1135
+ let i;
1136
+ for (const a of o) {
1137
+ if (!("inputs" in a))
1138
+ continue;
1139
+ if (!n || n.length === 0) {
1140
+ if (!a.inputs || a.inputs.length === 0)
1141
+ return a;
1142
+ continue;
1143
+ }
1144
+ if (!a.inputs || a.inputs.length === 0 || a.inputs.length !== n.length)
1145
+ continue;
1146
+ if (n.every((d, h) => {
1147
+ const l = "inputs" in a && a.inputs[h];
1148
+ return l ? Te(d, l) : !1;
1149
+ })) {
1150
+ if (i && "inputs" in i && i.inputs) {
1151
+ const d = Ut(a.inputs, i.inputs, n);
1152
+ if (d)
1153
+ throw new gn({
1154
+ abiItem: a,
1155
+ type: d[0]
1156
+ }, {
1157
+ abiItem: i,
1158
+ type: d[1]
1159
+ });
1160
+ }
1161
+ i = a;
1162
+ }
1163
+ }
1164
+ return i || o[0];
1165
+ }
1166
+ function Te(e, t) {
1167
+ const n = typeof e, s = t.type;
1168
+ switch (s) {
1169
+ case "address":
1170
+ return v(e, { strict: !1 });
1171
+ case "bool":
1172
+ return n === "boolean";
1173
+ case "function":
1174
+ return n === "string";
1175
+ case "string":
1176
+ return n === "string";
1177
+ default:
1178
+ return s === "tuple" && "components" in t ? Object.values(t.components).every((r, o) => n === "object" && Te(Object.values(e)[o], r)) : /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(s) ? n === "number" || n === "bigint" : /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(s) ? n === "string" || e instanceof Uint8Array : /[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(s) ? Array.isArray(e) && e.every((r) => Te(r, {
1179
+ ...t,
1180
+ // Pop off `[]` or `[M]` from end of type
1181
+ type: s.replace(/(\[[0-9]{0,}\])$/, "")
1182
+ })) : !1;
1183
+ }
1184
+ }
1185
+ function Ut(e, t, n) {
1186
+ for (const s in e) {
1187
+ const r = e[s], o = t[s];
1188
+ if (r.type === "tuple" && o.type === "tuple" && "components" in r && "components" in o)
1189
+ return Ut(r.components, o.components, n[s]);
1190
+ const i = [r.type, o.type];
1191
+ if (i.includes("address") && i.includes("bytes20") ? !0 : i.includes("address") && i.includes("string") ? v(n[s], { strict: !1 }) : i.includes("address") && i.includes("bytes") ? v(n[s], { strict: !1 }) : !1)
1192
+ return i;
1193
+ }
1194
+ }
1195
+ function Ve(e) {
1196
+ return typeof e == "string" ? { address: e, type: "json-rpc" } : e;
1197
+ }
1198
+ const gs = {
1199
+ 1: "An `assert` condition failed.",
1200
+ 17: "Arithmetic operation resulted in underflow or overflow.",
1201
+ 18: "Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",
1202
+ 33: "Attempted to convert to an invalid type.",
1203
+ 34: "Attempted to access a storage byte array that is incorrectly encoded.",
1204
+ 49: "Performed `.pop()` on an empty array",
1205
+ 50: "Array index is out of bounds.",
1206
+ 65: "Allocated too much memory or created an array which is too large.",
1207
+ 81: "Attempted to call a zero-initialized variable of internal function type."
1208
+ }, xs = {
1209
+ inputs: [
1210
+ {
1211
+ name: "message",
1212
+ type: "string"
1213
+ }
1214
+ ],
1215
+ name: "Error",
1216
+ type: "error"
1217
+ }, ws = {
1218
+ inputs: [
1219
+ {
1220
+ name: "reason",
1221
+ type: "uint256"
1222
+ }
1223
+ ],
1224
+ name: "Panic",
1225
+ type: "error"
1226
+ };
1227
+ class ot extends u {
1228
+ constructor({ offset: t }) {
1229
+ super(`Offset \`${t}\` cannot be negative.`, {
1230
+ name: "NegativeOffsetError"
1231
+ });
1232
+ }
1233
+ }
1234
+ class Es extends u {
1235
+ constructor({ length: t, position: n }) {
1236
+ super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`, { name: "PositionOutOfBoundsError" });
1237
+ }
1238
+ }
1239
+ class vs extends u {
1240
+ constructor({ count: t, limit: n }) {
1241
+ super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`, { name: "RecursiveReadLimitExceededError" });
1242
+ }
1243
+ }
1244
+ const As = {
1245
+ bytes: new Uint8Array(),
1246
+ dataView: new DataView(new ArrayBuffer(0)),
1247
+ position: 0,
1248
+ positionReadCount: /* @__PURE__ */ new Map(),
1249
+ recursiveReadCount: 0,
1250
+ recursiveReadLimit: Number.POSITIVE_INFINITY,
1251
+ assertReadLimit() {
1252
+ if (this.recursiveReadCount >= this.recursiveReadLimit)
1253
+ throw new vs({
1254
+ count: this.recursiveReadCount + 1,
1255
+ limit: this.recursiveReadLimit
1256
+ });
1257
+ },
1258
+ assertPosition(e) {
1259
+ if (e < 0 || e > this.bytes.length - 1)
1260
+ throw new Es({
1261
+ length: this.bytes.length,
1262
+ position: e
1263
+ });
1264
+ },
1265
+ decrementPosition(e) {
1266
+ if (e < 0)
1267
+ throw new ot({ offset: e });
1268
+ const t = this.position - e;
1269
+ this.assertPosition(t), this.position = t;
1270
+ },
1271
+ getReadCount(e) {
1272
+ return this.positionReadCount.get(e || this.position) || 0;
1273
+ },
1274
+ incrementPosition(e) {
1275
+ if (e < 0)
1276
+ throw new ot({ offset: e });
1277
+ const t = this.position + e;
1278
+ this.assertPosition(t), this.position = t;
1279
+ },
1280
+ inspectByte(e) {
1281
+ const t = e ?? this.position;
1282
+ return this.assertPosition(t), this.bytes[t];
1283
+ },
1284
+ inspectBytes(e, t) {
1285
+ const n = t ?? this.position;
1286
+ return this.assertPosition(n + e - 1), this.bytes.subarray(n, n + e);
1287
+ },
1288
+ inspectUint8(e) {
1289
+ const t = e ?? this.position;
1290
+ return this.assertPosition(t), this.bytes[t];
1291
+ },
1292
+ inspectUint16(e) {
1293
+ const t = e ?? this.position;
1294
+ return this.assertPosition(t + 1), this.dataView.getUint16(t);
1295
+ },
1296
+ inspectUint24(e) {
1297
+ const t = e ?? this.position;
1298
+ return this.assertPosition(t + 2), (this.dataView.getUint16(t) << 8) + this.dataView.getUint8(t + 2);
1299
+ },
1300
+ inspectUint32(e) {
1301
+ const t = e ?? this.position;
1302
+ return this.assertPosition(t + 3), this.dataView.getUint32(t);
1303
+ },
1304
+ pushByte(e) {
1305
+ this.assertPosition(this.position), this.bytes[this.position] = e, this.position++;
1306
+ },
1307
+ pushBytes(e) {
1308
+ this.assertPosition(this.position + e.length - 1), this.bytes.set(e, this.position), this.position += e.length;
1309
+ },
1310
+ pushUint8(e) {
1311
+ this.assertPosition(this.position), this.bytes[this.position] = e, this.position++;
1312
+ },
1313
+ pushUint16(e) {
1314
+ this.assertPosition(this.position + 1), this.dataView.setUint16(this.position, e), this.position += 2;
1315
+ },
1316
+ pushUint24(e) {
1317
+ this.assertPosition(this.position + 2), this.dataView.setUint16(this.position, e >> 8), this.dataView.setUint8(this.position + 2, e & 255), this.position += 3;
1318
+ },
1319
+ pushUint32(e) {
1320
+ this.assertPosition(this.position + 3), this.dataView.setUint32(this.position, e), this.position += 4;
1321
+ },
1322
+ readByte() {
1323
+ this.assertReadLimit(), this._touch();
1324
+ const e = this.inspectByte();
1325
+ return this.position++, e;
1326
+ },
1327
+ readBytes(e, t) {
1328
+ this.assertReadLimit(), this._touch();
1329
+ const n = this.inspectBytes(e);
1330
+ return this.position += t ?? e, n;
1331
+ },
1332
+ readUint8() {
1333
+ this.assertReadLimit(), this._touch();
1334
+ const e = this.inspectUint8();
1335
+ return this.position += 1, e;
1336
+ },
1337
+ readUint16() {
1338
+ this.assertReadLimit(), this._touch();
1339
+ const e = this.inspectUint16();
1340
+ return this.position += 2, e;
1341
+ },
1342
+ readUint24() {
1343
+ this.assertReadLimit(), this._touch();
1344
+ const e = this.inspectUint24();
1345
+ return this.position += 3, e;
1346
+ },
1347
+ readUint32() {
1348
+ this.assertReadLimit(), this._touch();
1349
+ const e = this.inspectUint32();
1350
+ return this.position += 4, e;
1351
+ },
1352
+ get remaining() {
1353
+ return this.bytes.length - this.position;
1354
+ },
1355
+ setPosition(e) {
1356
+ const t = this.position;
1357
+ return this.assertPosition(e), this.position = e, () => this.position = t;
1358
+ },
1359
+ _touch() {
1360
+ if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)
1361
+ return;
1362
+ const e = this.getReadCount();
1363
+ this.positionReadCount.set(this.position, e + 1), e > 0 && this.recursiveReadCount++;
1364
+ }
1365
+ };
1366
+ function We(e, { recursiveReadLimit: t = 8192 } = {}) {
1367
+ const n = Object.create(As);
1368
+ return n.bytes = e, n.dataView = new DataView(e.buffer ?? e, e.byteOffset, e.byteLength), n.positionReadCount = /* @__PURE__ */ new Map(), n.recursiveReadLimit = t, n;
1369
+ }
1370
+ function Ps(e, t = {}) {
1371
+ typeof t.size < "u" && P(e, { size: t.size });
1372
+ const n = E(e, t);
1373
+ return N(n, t);
1374
+ }
1375
+ function $s(e, t = {}) {
1376
+ let n = e;
1377
+ if (typeof t.size < "u" && (P(n, { size: t.size }), n = B(n)), n.length > 1 || n[0] > 1)
1378
+ throw new Pn(n);
1379
+ return !!n[0];
1380
+ }
1381
+ function C(e, t = {}) {
1382
+ typeof t.size < "u" && P(e, { size: t.size });
1383
+ const n = E(e, t);
1384
+ return ie(n, t);
1385
+ }
1386
+ function Bs(e, t = {}) {
1387
+ let n = e;
1388
+ return typeof t.size < "u" && (P(n, { size: t.size }), n = B(n, { dir: "right" })), new TextDecoder().decode(n);
1389
+ }
1390
+ function Ts(e, t) {
1391
+ const n = typeof t == "string" ? M(t) : t, s = We(n);
1392
+ if (g(n) === 0 && e.length > 0)
1393
+ throw new ht();
1394
+ if (g(t) && g(t) < 32)
1395
+ throw new pn({
1396
+ data: typeof t == "string" ? t : E(t),
1397
+ params: e,
1398
+ size: g(t)
1399
+ });
1400
+ let r = 0;
1401
+ const o = [];
1402
+ for (let i = 0; i < e.length; ++i) {
1403
+ const a = e[i];
1404
+ s.setPosition(r);
1405
+ const [c, d] = V(s, a, {
1406
+ staticPosition: 0
1407
+ });
1408
+ r += d, o.push(c);
1409
+ }
1410
+ return o;
1411
+ }
1412
+ function V(e, t, { staticPosition: n }) {
1413
+ const s = Re(t.type);
1414
+ if (s) {
1415
+ const [r, o] = s;
1416
+ return Fs(e, { ...t, type: o }, { length: r, staticPosition: n });
1417
+ }
1418
+ if (t.type === "tuple")
1419
+ return Ss(e, t, { staticPosition: n });
1420
+ if (t.type === "address")
1421
+ return Is(e);
1422
+ if (t.type === "bool")
1423
+ return Cs(e);
1424
+ if (t.type.startsWith("bytes"))
1425
+ return ks(e, t, { staticPosition: n });
1426
+ if (t.type.startsWith("uint") || t.type.startsWith("int"))
1427
+ return zs(e, t);
1428
+ if (t.type === "string")
1429
+ return Us(e, { staticPosition: n });
1430
+ throw new wn(t.type, {
1431
+ docsPath: "/docs/contract/decodeAbiParameters"
1432
+ });
1433
+ }
1434
+ const it = 32, Ie = 32;
1435
+ function Is(e) {
1436
+ const t = e.readBytes(32);
1437
+ return [je(E(zt(t, -20))), 32];
1438
+ }
1439
+ function Fs(e, t, { length: n, staticPosition: s }) {
1440
+ if (!n) {
1441
+ const i = C(e.readBytes(Ie)), a = s + i, c = a + it;
1442
+ e.setPosition(a);
1443
+ const d = C(e.readBytes(it)), h = ue(t);
1444
+ let l = 0;
1445
+ const b = [];
1446
+ for (let p = 0; p < d; ++p) {
1447
+ e.setPosition(c + (h ? p * 32 : l));
1448
+ const [w, x] = V(e, t, {
1449
+ staticPosition: c
1450
+ });
1451
+ l += x, b.push(w);
1452
+ }
1453
+ return e.setPosition(s + 32), [b, 32];
1454
+ }
1455
+ if (ue(t)) {
1456
+ const i = C(e.readBytes(Ie)), a = s + i, c = [];
1457
+ for (let d = 0; d < n; ++d) {
1458
+ e.setPosition(a + d * 32);
1459
+ const [h] = V(e, t, {
1460
+ staticPosition: a
1461
+ });
1462
+ c.push(h);
1463
+ }
1464
+ return e.setPosition(s + 32), [c, 32];
1465
+ }
1466
+ let r = 0;
1467
+ const o = [];
1468
+ for (let i = 0; i < n; ++i) {
1469
+ const [a, c] = V(e, t, {
1470
+ staticPosition: s + r
1471
+ });
1472
+ r += c, o.push(a);
1473
+ }
1474
+ return [o, r];
1475
+ }
1476
+ function Cs(e) {
1477
+ return [$s(e.readBytes(32), { size: 32 }), 32];
1478
+ }
1479
+ function ks(e, t, { staticPosition: n }) {
1480
+ const [s, r] = t.type.split("bytes");
1481
+ if (!r) {
1482
+ const i = C(e.readBytes(32));
1483
+ e.setPosition(n + i);
1484
+ const a = C(e.readBytes(32));
1485
+ if (a === 0)
1486
+ return e.setPosition(n + 32), ["0x", 32];
1487
+ const c = e.readBytes(a);
1488
+ return e.setPosition(n + 32), [E(c), 32];
1489
+ }
1490
+ return [E(e.readBytes(Number.parseInt(r, 10), 32)), 32];
1491
+ }
1492
+ function zs(e, t) {
1493
+ const n = t.type.startsWith("int"), s = Number.parseInt(t.type.split("int")[1] || "256", 10), r = e.readBytes(32);
1494
+ return [
1495
+ s > 48 ? Ps(r, { signed: n }) : C(r, { signed: n }),
1496
+ 32
1497
+ ];
1498
+ }
1499
+ function Ss(e, t, { staticPosition: n }) {
1500
+ const s = t.components.length === 0 || t.components.some(({ name: i }) => !i), r = s ? [] : {};
1501
+ let o = 0;
1502
+ if (ue(t)) {
1503
+ const i = C(e.readBytes(Ie)), a = n + i;
1504
+ for (let c = 0; c < t.components.length; ++c) {
1505
+ const d = t.components[c];
1506
+ e.setPosition(a + o);
1507
+ const [h, l] = V(e, d, {
1508
+ staticPosition: a
1509
+ });
1510
+ o += l, r[s ? c : d?.name] = h;
1511
+ }
1512
+ return e.setPosition(n + 32), [r, 32];
1513
+ }
1514
+ for (let i = 0; i < t.components.length; ++i) {
1515
+ const a = t.components[i], [c, d] = V(e, a, {
1516
+ staticPosition: n
1517
+ });
1518
+ r[s ? i : a?.name] = c, o += d;
1519
+ }
1520
+ return [r, o];
1521
+ }
1522
+ function Us(e, { staticPosition: t }) {
1523
+ const n = C(e.readBytes(32)), s = t + n;
1524
+ e.setPosition(s);
1525
+ const r = C(e.readBytes(32));
1526
+ if (r === 0)
1527
+ return e.setPosition(t + 32), ["", 32];
1528
+ const o = e.readBytes(r, 32), i = Bs(B(o));
1529
+ return e.setPosition(t + 32), [i, 32];
1530
+ }
1531
+ function ue(e) {
1532
+ const { type: t } = e;
1533
+ if (t === "string" || t === "bytes" || t.endsWith("[]"))
1534
+ return !0;
1535
+ if (t === "tuple")
1536
+ return e.components?.some(ue);
1537
+ const n = Re(e.type);
1538
+ return !!(n && ue({ ...e, type: n[1] }));
1539
+ }
1540
+ function Ms(e) {
1541
+ const { abi: t, data: n, cause: s } = e, r = ce(n, 0, 4);
1542
+ if (r === "0x")
1543
+ throw new ht({ cause: s });
1544
+ const i = [...t || [], xs, ws].find((a) => a.type === "error" && r === St(W(a)));
1545
+ if (!i)
1546
+ throw new pt(r, {
1547
+ docsPath: "/docs/contract/decodeErrorResult",
1548
+ cause: s
1549
+ });
1550
+ return {
1551
+ abiItem: i,
1552
+ args: "inputs" in i && i.inputs && i.inputs.length > 0 ? Ts(i.inputs, ce(n, 4)) : void 0,
1553
+ errorName: i.name
1554
+ };
1555
+ }
1556
+ const Ls = (e, t, n) => JSON.stringify(e, (s, r) => typeof r == "bigint" ? r.toString() : r, n);
1557
+ function Mt({ abiItem: e, args: t, includeFunctionName: n = !0, includeName: s = !1 }) {
1558
+ if ("name" in e && "inputs" in e && e.inputs)
1559
+ return `${n ? e.name : ""}(${e.inputs.map((r, o) => `${s && r.name ? `${r.name}: ` : ""}${typeof t[o] == "object" ? Ls(t[o]) : t[o]}`).join(", ")})`;
1560
+ }
1561
+ const Gs = {
1562
+ gwei: 9,
1563
+ wei: 18
1564
+ }, Os = {
1565
+ ether: -9,
1566
+ wei: 9
1567
+ };
1568
+ function Lt(e, t) {
1569
+ let n = e.toString();
1570
+ const s = n.startsWith("-");
1571
+ s && (n = n.slice(1)), n = n.padStart(t, "0");
1572
+ let [r, o] = [
1573
+ n.slice(0, n.length - t),
1574
+ n.slice(n.length - t)
1575
+ ];
1576
+ return o = o.replace(/(0+)$/, ""), `${s ? "-" : ""}${r || "0"}${o ? `.${o}` : ""}`;
1577
+ }
1578
+ function Gt(e, t = "wei") {
1579
+ return Lt(e, Gs[t]);
1580
+ }
1581
+ function T(e, t = "wei") {
1582
+ return Lt(e, Os[t]);
1583
+ }
1584
+ class go extends u {
1585
+ constructor({ address: t }) {
1586
+ super(`State for account "${t}" is set multiple times.`, {
1587
+ name: "AccountStateConflictError"
1588
+ });
1589
+ }
1590
+ }
1591
+ class xo extends u {
1592
+ constructor() {
1593
+ super("state and stateDiff are set on the same account.", {
1594
+ name: "StateAssignmentConflictError"
1595
+ });
1596
+ }
1597
+ }
1598
+ function at(e) {
1599
+ return e.reduce((t, { slot: n, value: s }) => `${t} ${n}: ${s}
1600
+ `, "");
1601
+ }
1602
+ function Ns(e) {
1603
+ return e.reduce((t, { address: n, ...s }) => {
1604
+ let r = `${t} ${n}:
1605
+ `;
1606
+ return s.nonce && (r += ` nonce: ${s.nonce}
1607
+ `), s.balance && (r += ` balance: ${s.balance}
1608
+ `), s.code && (r += ` code: ${s.code}
1609
+ `), s.state && (r += ` state:
1610
+ `, r += at(s.state)), s.stateDiff && (r += ` stateDiff:
1611
+ `, r += at(s.stateDiff)), r;
1612
+ }, ` State Override:
1613
+ `).slice(0, -1);
1614
+ }
1615
+ function me(e) {
1616
+ const t = Object.entries(e).map(([s, r]) => r === void 0 || r === !1 ? null : [s, r]).filter(Boolean), n = t.reduce((s, [r]) => Math.max(s, r.length), 0);
1617
+ return t.map(([s, r]) => ` ${`${s}:`.padEnd(n + 1)} ${r}`).join(`
1618
+ `);
1619
+ }
1620
+ class Hs extends u {
1621
+ constructor({ v: t }) {
1622
+ super(`Invalid \`v\` value "${t}". Expected 27 or 28.`, {
1623
+ name: "InvalidLegacyVError"
1624
+ });
1625
+ }
1626
+ }
1627
+ class js extends u {
1628
+ constructor({ transaction: t }) {
1629
+ super("Cannot infer a transaction type from provided transaction.", {
1630
+ metaMessages: [
1631
+ "Provided Transaction:",
1632
+ "{",
1633
+ me(t),
1634
+ "}",
1635
+ "",
1636
+ "To infer the type, either provide:",
1637
+ "- a `type` to the Transaction, or",
1638
+ "- an EIP-1559 Transaction with `maxFeePerGas`, or",
1639
+ "- an EIP-2930 Transaction with `gasPrice` & `accessList`, or",
1640
+ "- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or",
1641
+ "- an EIP-7702 Transaction with `authorizationList`, or",
1642
+ "- a Legacy Transaction with `gasPrice`"
1643
+ ],
1644
+ name: "InvalidSerializableTransactionError"
1645
+ });
1646
+ }
1647
+ }
1648
+ class Ds extends u {
1649
+ constructor({ storageKey: t }) {
1650
+ super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
1651
+ }
1652
+ }
1653
+ class wo extends u {
1654
+ constructor(t, { account: n, docsPath: s, chain: r, data: o, gas: i, gasPrice: a, maxFeePerGas: c, maxPriorityFeePerGas: d, nonce: h, to: l, value: b }) {
1655
+ const p = me({
1656
+ chain: r && `${r?.name} (id: ${r?.id})`,
1657
+ from: n?.address,
1658
+ to: l,
1659
+ value: typeof b < "u" && `${Gt(b)} ${r?.nativeCurrency?.symbol || "ETH"}`,
1660
+ data: o,
1661
+ gas: i,
1662
+ gasPrice: typeof a < "u" && `${T(a)} gwei`,
1663
+ maxFeePerGas: typeof c < "u" && `${T(c)} gwei`,
1664
+ maxPriorityFeePerGas: typeof d < "u" && `${T(d)} gwei`,
1665
+ nonce: h
1666
+ });
1667
+ super(t.shortMessage, {
1668
+ cause: t,
1669
+ docsPath: s,
1670
+ metaMessages: [
1671
+ ...t.metaMessages ? [...t.metaMessages, " "] : [],
1672
+ "Request Arguments:",
1673
+ p
1674
+ ].filter(Boolean),
1675
+ name: "TransactionExecutionError"
1676
+ }), Object.defineProperty(this, "cause", {
1677
+ enumerable: !0,
1678
+ configurable: !0,
1679
+ writable: !0,
1680
+ value: void 0
1681
+ }), this.cause = t;
1682
+ }
1683
+ }
1684
+ class Eo extends u {
1685
+ constructor({ blockHash: t, blockNumber: n, blockTag: s, hash: r, index: o }) {
1686
+ let i = "Transaction";
1687
+ s && o !== void 0 && (i = `Transaction at block time "${s}" at index "${o}"`), t && o !== void 0 && (i = `Transaction at block hash "${t}" at index "${o}"`), n && o !== void 0 && (i = `Transaction at block number "${n}" at index "${o}"`), r && (i = `Transaction with hash "${r}"`), super(`${i} could not be found.`, {
1688
+ name: "TransactionNotFoundError"
1689
+ });
1690
+ }
1691
+ }
1692
+ class vo extends u {
1693
+ constructor({ hash: t }) {
1694
+ super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`, {
1695
+ name: "TransactionReceiptNotFoundError"
1696
+ });
1697
+ }
1698
+ }
1699
+ class Ao extends u {
1700
+ constructor({ receipt: t }) {
1701
+ super(`Transaction with hash "${t.transactionHash}" reverted.`, {
1702
+ metaMessages: [
1703
+ 'The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.',
1704
+ " ",
1705
+ "You can attempt to extract the revert reason by:",
1706
+ "- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract",
1707
+ "- using the `call` Action with raw `data`"
1708
+ ],
1709
+ name: "TransactionReceiptRevertedError"
1710
+ }), Object.defineProperty(this, "receipt", {
1711
+ enumerable: !0,
1712
+ configurable: !0,
1713
+ writable: !0,
1714
+ value: void 0
1715
+ }), this.receipt = t;
1716
+ }
1717
+ }
1718
+ class Po extends u {
1719
+ constructor({ hash: t }) {
1720
+ super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`, { name: "WaitForTransactionReceiptTimeoutError" });
1721
+ }
1722
+ }
1723
+ const _s = (e) => e;
1724
+ function $o(e) {
1725
+ if (e?.reason)
1726
+ return e.reason;
1727
+ if (typeof DOMException == "function")
1728
+ return new DOMException("This operation was aborted", "AbortError");
1729
+ const t = new Error("This operation was aborted");
1730
+ return t.name = "AbortError", t;
1731
+ }
1732
+ function Bo(e) {
1733
+ return typeof e == "object" && e !== null && "name" in e && e.name === "AbortError";
1734
+ }
1735
+ const To = (e) => {
1736
+ try {
1737
+ const t = new URL(e);
1738
+ return !t.username && !t.password ? e : (t.username = "", t.password = "", t.toString());
1739
+ } catch {
1740
+ return e;
1741
+ }
1742
+ };
1743
+ class Rs extends u {
1744
+ constructor(t, { account: n, docsPath: s, chain: r, data: o, gas: i, gasPrice: a, maxFeePerGas: c, maxPriorityFeePerGas: d, nonce: h, to: l, value: b, stateOverride: p }) {
1745
+ const w = n ? Ve(n) : void 0;
1746
+ let x = me({
1747
+ from: w?.address,
1748
+ to: l,
1749
+ value: typeof b < "u" && `${Gt(b)} ${r?.nativeCurrency?.symbol || "ETH"}`,
1750
+ data: o,
1751
+ gas: i,
1752
+ gasPrice: typeof a < "u" && `${T(a)} gwei`,
1753
+ maxFeePerGas: typeof c < "u" && `${T(c)} gwei`,
1754
+ maxPriorityFeePerGas: typeof d < "u" && `${T(d)} gwei`,
1755
+ nonce: h
1756
+ });
1757
+ p && (x += `
1758
+ ${Ns(p)}`), super(t.shortMessage, {
1759
+ cause: t,
1760
+ docsPath: s,
1761
+ metaMessages: [
1762
+ ...t.metaMessages ? [...t.metaMessages, " "] : [],
1763
+ "Raw Call Arguments:",
1764
+ x
1765
+ ].filter(Boolean),
1766
+ name: "CallExecutionError"
1767
+ }), Object.defineProperty(this, "cause", {
1768
+ enumerable: !0,
1769
+ configurable: !0,
1770
+ writable: !0,
1771
+ value: void 0
1772
+ }), this.cause = t;
1773
+ }
1774
+ }
1775
+ class Io extends u {
1776
+ constructor(t, { abi: n, args: s, contractAddress: r, docsPath: o, functionName: i, sender: a }) {
1777
+ const c = ys({ abi: n, args: s, name: i }), d = c ? Mt({
1778
+ abiItem: c,
1779
+ args: s,
1780
+ includeFunctionName: !1,
1781
+ includeName: !1
1782
+ }) : void 0, h = c ? W(c, { includeName: !0 }) : void 0, l = me({
1783
+ address: r && _s(r),
1784
+ function: h,
1785
+ args: d && d !== "()" && `${[...Array(i?.length ?? 0).keys()].map(() => " ").join("")}${d}`,
1786
+ sender: a
1787
+ });
1788
+ super(t.shortMessage || `An unknown error occurred while executing the contract function "${i}".`, {
1789
+ cause: t,
1790
+ docsPath: o,
1791
+ metaMessages: [
1792
+ ...t.metaMessages ? [...t.metaMessages, " "] : [],
1793
+ l && "Contract Call:",
1794
+ l
1795
+ ].filter(Boolean),
1796
+ name: "ContractFunctionExecutionError"
1797
+ }), Object.defineProperty(this, "abi", {
1798
+ enumerable: !0,
1799
+ configurable: !0,
1800
+ writable: !0,
1801
+ value: void 0
1802
+ }), Object.defineProperty(this, "args", {
1803
+ enumerable: !0,
1804
+ configurable: !0,
1805
+ writable: !0,
1806
+ value: void 0
1807
+ }), Object.defineProperty(this, "cause", {
1808
+ enumerable: !0,
1809
+ configurable: !0,
1810
+ writable: !0,
1811
+ value: void 0
1812
+ }), Object.defineProperty(this, "contractAddress", {
1813
+ enumerable: !0,
1814
+ configurable: !0,
1815
+ writable: !0,
1816
+ value: void 0
1817
+ }), Object.defineProperty(this, "formattedArgs", {
1818
+ enumerable: !0,
1819
+ configurable: !0,
1820
+ writable: !0,
1821
+ value: void 0
1822
+ }), Object.defineProperty(this, "functionName", {
1823
+ enumerable: !0,
1824
+ configurable: !0,
1825
+ writable: !0,
1826
+ value: void 0
1827
+ }), Object.defineProperty(this, "sender", {
1828
+ enumerable: !0,
1829
+ configurable: !0,
1830
+ writable: !0,
1831
+ value: void 0
1832
+ }), this.abi = n, this.args = s, this.cause = t, this.contractAddress = r, this.functionName = i, this.sender = a;
1833
+ }
1834
+ }
1835
+ class Fo extends u {
1836
+ constructor({ abi: t, data: n, functionName: s, message: r, cause: o }) {
1837
+ let i, a, c, d;
1838
+ if (n && n !== "0x")
1839
+ try {
1840
+ a = Ms({ abi: t, data: n, cause: o });
1841
+ const { abiItem: l, errorName: b, args: p } = a;
1842
+ if (b === "Error")
1843
+ d = p[0];
1844
+ else if (b === "Panic") {
1845
+ const [w] = p;
1846
+ d = gs[w];
1847
+ } else {
1848
+ const w = l ? W(l, { includeName: !0 }) : void 0, x = l && p ? Mt({
1849
+ abiItem: l,
1850
+ args: p,
1851
+ includeFunctionName: !1,
1852
+ includeName: !1
1853
+ }) : void 0;
1854
+ c = [
1855
+ w ? `Error: ${w}` : "",
1856
+ x && x !== "()" ? ` ${[...Array(b?.length ?? 0).keys()].map(() => " ").join("")}${x}` : ""
1857
+ ];
1858
+ }
1859
+ } catch (l) {
1860
+ i = l;
1861
+ }
1862
+ else r && (d = r);
1863
+ let h;
1864
+ i instanceof pt && (h = i.signature, c = [
1865
+ `Unable to decode signature "${h}" as it was not found on the provided ABI.`,
1866
+ "Make sure you are using the correct ABI and that the error exists on it.",
1867
+ `You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${h}.`
1868
+ ]), super(d && d !== "execution reverted" || h ? [
1869
+ `The contract function "${s}" reverted with the following ${h ? "signature" : "reason"}:`,
1870
+ d || h
1871
+ ].join(`
1872
+ `) : `The contract function "${s}" reverted.`, {
1873
+ cause: i ?? o,
1874
+ metaMessages: c,
1875
+ name: "ContractFunctionRevertedError"
1876
+ }), Object.defineProperty(this, "data", {
1877
+ enumerable: !0,
1878
+ configurable: !0,
1879
+ writable: !0,
1880
+ value: void 0
1881
+ }), Object.defineProperty(this, "raw", {
1882
+ enumerable: !0,
1883
+ configurable: !0,
1884
+ writable: !0,
1885
+ value: void 0
1886
+ }), Object.defineProperty(this, "reason", {
1887
+ enumerable: !0,
1888
+ configurable: !0,
1889
+ writable: !0,
1890
+ value: void 0
1891
+ }), Object.defineProperty(this, "signature", {
1892
+ enumerable: !0,
1893
+ configurable: !0,
1894
+ writable: !0,
1895
+ value: void 0
1896
+ }), this.data = a, this.raw = n, this.reason = d, this.signature = h;
1897
+ }
1898
+ }
1899
+ class Co extends u {
1900
+ constructor({ functionName: t, cause: n }) {
1901
+ super(`The contract function "${t}" returned no data ("0x").`, {
1902
+ metaMessages: [
1903
+ "This could be due to any of the following:",
1904
+ ` - The contract does not have the function "${t}",`,
1905
+ " - The parameters passed to the contract function may be invalid, or",
1906
+ " - The address is not a contract."
1907
+ ],
1908
+ name: "ContractFunctionZeroDataError",
1909
+ cause: n
1910
+ });
1911
+ }
1912
+ }
1913
+ class ko extends u {
1914
+ constructor({ factory: t }) {
1915
+ super(`Deployment for counterfactual contract call failed${t ? ` for factory "${t}".` : ""}`, {
1916
+ metaMessages: [
1917
+ "Please ensure:",
1918
+ "- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).",
1919
+ "- The `factoryData` is a valid encoded function call for contract deployment function on the factory."
1920
+ ],
1921
+ name: "CounterfactualDeploymentFailedError"
1922
+ });
1923
+ }
1924
+ }
1925
+ class zo extends u {
1926
+ constructor({ data: t, message: n }) {
1927
+ super(n || "", { name: "RawContractError" }), Object.defineProperty(this, "code", {
1928
+ enumerable: !0,
1929
+ configurable: !0,
1930
+ writable: !0,
1931
+ value: 3
1932
+ }), Object.defineProperty(this, "data", {
1933
+ enumerable: !0,
1934
+ configurable: !0,
1935
+ writable: !0,
1936
+ value: void 0
1937
+ }), this.data = t;
1938
+ }
1939
+ }
1940
+ function H(e, t = "hex") {
1941
+ const n = Ot(e), s = We(new Uint8Array(n.length));
1942
+ return n.encode(s), t === "hex" ? E(s.bytes) : s.bytes;
1943
+ }
1944
+ function Ot(e) {
1945
+ return Array.isArray(e) ? Vs(e.map((t) => Ot(t))) : Ws(e);
1946
+ }
1947
+ function Vs(e) {
1948
+ const t = e.reduce((r, o) => r + o.length, 0), n = Nt(t);
1949
+ return {
1950
+ length: t <= 55 ? 1 + t : 1 + n + t,
1951
+ encode(r) {
1952
+ t <= 55 ? r.pushByte(192 + t) : (r.pushByte(247 + n), n === 1 ? r.pushUint8(t) : n === 2 ? r.pushUint16(t) : n === 3 ? r.pushUint24(t) : r.pushUint32(t));
1953
+ for (const { encode: o } of e)
1954
+ o(r);
1955
+ }
1956
+ };
1957
+ }
1958
+ function Ws(e) {
1959
+ const t = typeof e == "string" ? M(e) : e, n = Nt(t.length);
1960
+ return {
1961
+ length: t.length === 1 && t[0] < 128 ? 1 : t.length <= 55 ? 1 + t.length : 1 + n + t.length,
1962
+ encode(r) {
1963
+ t.length === 1 && t[0] < 128 ? r.pushBytes(t) : t.length <= 55 ? (r.pushByte(128 + t.length), r.pushBytes(t)) : (r.pushByte(183 + n), n === 1 ? r.pushUint8(t.length) : n === 2 ? r.pushUint16(t.length) : n === 3 ? r.pushUint24(t.length) : r.pushUint32(t.length), r.pushBytes(t));
1964
+ }
1965
+ };
1966
+ }
1967
+ function Nt(e) {
1968
+ if (e < 2 ** 8)
1969
+ return 1;
1970
+ if (e < 2 ** 16)
1971
+ return 2;
1972
+ if (e < 2 ** 24)
1973
+ return 3;
1974
+ if (e < 2 ** 32)
1975
+ return 4;
1976
+ throw new u("Length is too large.");
1977
+ }
1978
+ class _ extends u {
1979
+ constructor({ cause: t, message: n } = {}) {
1980
+ const s = n?.replace("execution reverted: ", "")?.replace("execution reverted", "");
1981
+ super(`Execution reverted ${s ? `with reason: ${s}` : "for an unknown reason"}.`, {
1982
+ cause: t,
1983
+ name: "ExecutionRevertedError"
1984
+ });
1985
+ }
1986
+ }
1987
+ Object.defineProperty(_, "code", {
1988
+ enumerable: !0,
1989
+ configurable: !0,
1990
+ writable: !0,
1991
+ value: 3
1992
+ });
1993
+ Object.defineProperty(_, "nodeMessage", {
1994
+ enumerable: !0,
1995
+ configurable: !0,
1996
+ writable: !0,
1997
+ value: /execution reverted|gas required exceeds allowance/
1998
+ });
1999
+ class j extends u {
2000
+ constructor({ cause: t, maxFeePerGas: n } = {}) {
2001
+ super(`The fee cap (\`maxFeePerGas\`${n ? ` = ${T(n)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
2002
+ cause: t,
2003
+ name: "FeeCapTooHighError"
2004
+ });
2005
+ }
2006
+ }
2007
+ Object.defineProperty(j, "nodeMessage", {
2008
+ enumerable: !0,
2009
+ configurable: !0,
2010
+ writable: !0,
2011
+ value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
2012
+ });
2013
+ class Fe extends u {
2014
+ constructor({ cause: t, maxFeePerGas: n } = {}) {
2015
+ super(`The fee cap (\`maxFeePerGas\`${n ? ` = ${T(n)}` : ""} gwei) cannot be lower than the block base fee.`, {
2016
+ cause: t,
2017
+ name: "FeeCapTooLowError"
2018
+ });
2019
+ }
2020
+ }
2021
+ Object.defineProperty(Fe, "nodeMessage", {
2022
+ enumerable: !0,
2023
+ configurable: !0,
2024
+ writable: !0,
2025
+ value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
2026
+ });
2027
+ class Ce extends u {
2028
+ constructor({ cause: t, nonce: n } = {}) {
2029
+ super(`Nonce provided for the transaction ${n ? `(${n}) ` : ""}is higher than the next one expected.`, { cause: t, name: "NonceTooHighError" });
2030
+ }
2031
+ }
2032
+ Object.defineProperty(Ce, "nodeMessage", {
2033
+ enumerable: !0,
2034
+ configurable: !0,
2035
+ writable: !0,
2036
+ value: /nonce too high/
2037
+ });
2038
+ class ke extends u {
2039
+ constructor({ cause: t, nonce: n } = {}) {
2040
+ super([
2041
+ `Nonce provided for the transaction ${n ? `(${n}) ` : ""}is lower than the current nonce of the account.`,
2042
+ "Try increasing the nonce or find the latest nonce with `getTransactionCount`."
2043
+ ].join(`
2044
+ `), { cause: t, name: "NonceTooLowError" });
2045
+ }
2046
+ }
2047
+ Object.defineProperty(ke, "nodeMessage", {
2048
+ enumerable: !0,
2049
+ configurable: !0,
2050
+ writable: !0,
2051
+ value: /nonce too low|transaction already imported|already known/
2052
+ });
2053
+ class ze extends u {
2054
+ constructor({ cause: t, nonce: n } = {}) {
2055
+ super(`Nonce provided for the transaction ${n ? `(${n}) ` : ""}exceeds the maximum allowed nonce.`, { cause: t, name: "NonceMaxValueError" });
2056
+ }
2057
+ }
2058
+ Object.defineProperty(ze, "nodeMessage", {
2059
+ enumerable: !0,
2060
+ configurable: !0,
2061
+ writable: !0,
2062
+ value: /nonce has max value/
2063
+ });
2064
+ class Se extends u {
2065
+ constructor({ cause: t } = {}) {
2066
+ super([
2067
+ "The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."
2068
+ ].join(`
2069
+ `), {
2070
+ cause: t,
2071
+ metaMessages: [
2072
+ "This error could arise when the account does not have enough funds to:",
2073
+ " - pay for the total gas fee,",
2074
+ " - pay for the value to send.",
2075
+ " ",
2076
+ "The cost of the transaction is calculated as `gas * gas fee + value`, where:",
2077
+ " - `gas` is the amount of gas needed for transaction to execute,",
2078
+ " - `gas fee` is the gas fee,",
2079
+ " - `value` is the amount of ether to send to the recipient."
2080
+ ],
2081
+ name: "InsufficientFundsError"
2082
+ });
2083
+ }
2084
+ }
2085
+ Object.defineProperty(Se, "nodeMessage", {
2086
+ enumerable: !0,
2087
+ configurable: !0,
2088
+ writable: !0,
2089
+ value: /insufficient funds|exceeds transaction sender account balance/
2090
+ });
2091
+ class Ue extends u {
2092
+ constructor({ cause: t, gas: n } = {}) {
2093
+ super(`The amount of gas ${n ? `(${n}) ` : ""}provided for the transaction exceeds the limit allowed for the block.`, {
2094
+ cause: t,
2095
+ name: "IntrinsicGasTooHighError"
2096
+ });
2097
+ }
2098
+ }
2099
+ Object.defineProperty(Ue, "nodeMessage", {
2100
+ enumerable: !0,
2101
+ configurable: !0,
2102
+ writable: !0,
2103
+ value: /intrinsic gas too high|gas limit reached/
2104
+ });
2105
+ class Me extends u {
2106
+ constructor({ cause: t, gas: n } = {}) {
2107
+ super(`The amount of gas ${n ? `(${n}) ` : ""}provided for the transaction is too low.`, {
2108
+ cause: t,
2109
+ name: "IntrinsicGasTooLowError"
2110
+ });
2111
+ }
2112
+ }
2113
+ Object.defineProperty(Me, "nodeMessage", {
2114
+ enumerable: !0,
2115
+ configurable: !0,
2116
+ writable: !0,
2117
+ value: /intrinsic gas too low/
2118
+ });
2119
+ class Le extends u {
2120
+ constructor({ cause: t }) {
2121
+ super("The transaction type is not supported for this chain.", {
2122
+ cause: t,
2123
+ name: "TransactionTypeNotSupportedError"
2124
+ });
2125
+ }
2126
+ }
2127
+ Object.defineProperty(Le, "nodeMessage", {
2128
+ enumerable: !0,
2129
+ configurable: !0,
2130
+ writable: !0,
2131
+ value: /transaction type not valid/
2132
+ });
2133
+ class de extends u {
2134
+ constructor({ cause: t, maxPriorityFeePerGas: n, maxFeePerGas: s } = {}) {
2135
+ super([
2136
+ `The provided tip (\`maxPriorityFeePerGas\`${n ? ` = ${T(n)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${s ? ` = ${T(s)} gwei` : ""}).`
2137
+ ].join(`
2138
+ `), {
2139
+ cause: t,
2140
+ name: "TipAboveFeeCapError"
2141
+ });
2142
+ }
2143
+ }
2144
+ Object.defineProperty(de, "nodeMessage", {
2145
+ enumerable: !0,
2146
+ configurable: !0,
2147
+ writable: !0,
2148
+ value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
2149
+ });
2150
+ class Ht extends u {
2151
+ constructor({ cause: t }) {
2152
+ super(`An error occurred while executing: ${t?.shortMessage}`, {
2153
+ cause: t,
2154
+ name: "UnknownNodeError"
2155
+ });
2156
+ }
2157
+ }
2158
+ function Ks(e, t) {
2159
+ const n = (e.details || "").toLowerCase(), s = e instanceof u ? e.walk((r) => r?.code === _.code) : e;
2160
+ return s instanceof u ? new _({
2161
+ cause: e,
2162
+ message: s.details
2163
+ }) : _.nodeMessage.test(n) ? new _({
2164
+ cause: e,
2165
+ message: e.details
2166
+ }) : j.nodeMessage.test(n) ? new j({
2167
+ cause: e,
2168
+ maxFeePerGas: t?.maxFeePerGas
2169
+ }) : Fe.nodeMessage.test(n) ? new Fe({
2170
+ cause: e,
2171
+ maxFeePerGas: t?.maxFeePerGas
2172
+ }) : Ce.nodeMessage.test(n) ? new Ce({ cause: e, nonce: t?.nonce }) : ke.nodeMessage.test(n) ? new ke({ cause: e, nonce: t?.nonce }) : ze.nodeMessage.test(n) ? new ze({ cause: e, nonce: t?.nonce }) : Se.nodeMessage.test(n) ? new Se({ cause: e }) : Ue.nodeMessage.test(n) ? new Ue({ cause: e, gas: t?.gas }) : Me.nodeMessage.test(n) ? new Me({ cause: e, gas: t?.gas }) : Le.nodeMessage.test(n) ? new Le({ cause: e }) : de.nodeMessage.test(n) ? new de({
2173
+ cause: e,
2174
+ maxFeePerGas: t?.maxFeePerGas,
2175
+ maxPriorityFeePerGas: t?.maxPriorityFeePerGas
2176
+ }) : new Ht({
2177
+ cause: e
2178
+ });
2179
+ }
2180
+ function Ys(e, { format: t }) {
2181
+ if (!t)
2182
+ return {};
2183
+ const n = {};
2184
+ function s(o) {
2185
+ const i = Object.keys(o);
2186
+ for (const a of i)
2187
+ a in e && (n[a] = e[a]), o[a] && typeof o[a] == "object" && !Array.isArray(o[a]) && s(o[a]);
2188
+ }
2189
+ const r = t(e || {});
2190
+ return s(r), n;
2191
+ }
2192
+ function Ke(e, t) {
2193
+ return ({ exclude: n, format: s }) => ({
2194
+ exclude: n,
2195
+ format: (r, o) => {
2196
+ const i = t(r, o);
2197
+ if (n)
2198
+ for (const a of n)
2199
+ delete i[a];
2200
+ return {
2201
+ ...i,
2202
+ ...s(r, o)
2203
+ };
2204
+ },
2205
+ type: e
2206
+ });
2207
+ }
2208
+ const Zs = {
2209
+ legacy: "0x0",
2210
+ eip2930: "0x1",
2211
+ eip1559: "0x2",
2212
+ eip4844: "0x3",
2213
+ eip7702: "0x4"
2214
+ };
2215
+ function Xs(e, t) {
2216
+ const n = {};
2217
+ return typeof e.authorizationList < "u" && (n.authorizationList = Js(e.authorizationList)), typeof e.accessList < "u" && (n.accessList = e.accessList), typeof e.blobVersionedHashes < "u" && (n.blobVersionedHashes = e.blobVersionedHashes), typeof e.blobs < "u" && (typeof e.blobs[0] != "string" ? n.blobs = e.blobs.map((s) => E(s)) : n.blobs = e.blobs), typeof e.data < "u" && (n.data = e.data), e.account && (n.from = e.account.address), typeof e.from < "u" && (n.from = e.from), typeof e.gas < "u" && (n.gas = f(e.gas)), typeof e.gasPrice < "u" && (n.gasPrice = f(e.gasPrice)), typeof e.maxFeePerBlobGas < "u" && (n.maxFeePerBlobGas = f(e.maxFeePerBlobGas)), typeof e.maxFeePerGas < "u" && (n.maxFeePerGas = f(e.maxFeePerGas)), typeof e.maxPriorityFeePerGas < "u" && (n.maxPriorityFeePerGas = f(e.maxPriorityFeePerGas)), typeof e.nonce < "u" && (n.nonce = f(e.nonce)), typeof e.to < "u" && (n.to = e.to), typeof e.type < "u" && (n.type = Zs[e.type]), typeof e.value < "u" && (n.value = f(e.value)), n;
2218
+ }
2219
+ function Js(e) {
2220
+ return e.map((t) => ({
2221
+ address: t.address,
2222
+ r: t.r ? f(BigInt(t.r)) : t.r,
2223
+ s: t.s ? f(BigInt(t.s)) : t.s,
2224
+ chainId: f(t.chainId),
2225
+ nonce: f(t.nonce),
2226
+ ...typeof t.yParity < "u" ? { yParity: f(t.yParity) } : {},
2227
+ ...typeof t.v < "u" && typeof t.yParity > "u" ? { v: f(t.v) } : {}
2228
+ }));
2229
+ }
2230
+ const ye = 2n ** 256n - 1n;
2231
+ function Qs(e) {
2232
+ const { account: t, maxFeePerGas: n, maxPriorityFeePerGas: s, to: r } = e, o = t ? Ve(t) : void 0;
2233
+ if (o && !v(o.address))
2234
+ throw new A({ address: o.address });
2235
+ if (r && !v(r))
2236
+ throw new A({ address: r });
2237
+ if (n && n > ye)
2238
+ throw new j({ maxFeePerGas: n });
2239
+ if (s && n && s > n)
2240
+ throw new de({ maxFeePerGas: n, maxPriorityFeePerGas: s });
2241
+ }
2242
+ const jt = {
2243
+ "0x0": "legacy",
2244
+ "0x1": "eip2930",
2245
+ "0x2": "eip1559",
2246
+ "0x3": "eip4844",
2247
+ "0x4": "eip7702"
2248
+ };
2249
+ function Ye(e, t) {
2250
+ const n = {
2251
+ ...e,
2252
+ blockHash: e.blockHash ? e.blockHash : null,
2253
+ blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
2254
+ ...e.blockTimestamp != null && {
2255
+ blockTimestamp: BigInt(e.blockTimestamp)
2256
+ },
2257
+ chainId: e.chainId ? ie(e.chainId) : void 0,
2258
+ gas: e.gas ? BigInt(e.gas) : void 0,
2259
+ gasPrice: e.gasPrice ? BigInt(e.gasPrice) : void 0,
2260
+ maxFeePerBlobGas: e.maxFeePerBlobGas ? BigInt(e.maxFeePerBlobGas) : void 0,
2261
+ maxFeePerGas: e.maxFeePerGas ? BigInt(e.maxFeePerGas) : void 0,
2262
+ maxPriorityFeePerGas: e.maxPriorityFeePerGas ? BigInt(e.maxPriorityFeePerGas) : void 0,
2263
+ nonce: e.nonce ? ie(e.nonce) : void 0,
2264
+ to: e.to ? e.to : null,
2265
+ transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
2266
+ type: e.type ? jt[e.type] : void 0,
2267
+ typeHex: e.type ? e.type : void 0,
2268
+ value: e.value ? BigInt(e.value) : void 0,
2269
+ v: e.v ? BigInt(e.v) : void 0
2270
+ };
2271
+ return e.authorizationList && (n.authorizationList = er(e.authorizationList)), n.yParity = (() => {
2272
+ if (e.yParity)
2273
+ return Number(e.yParity);
2274
+ if (typeof n.v == "bigint") {
2275
+ if (n.v === 0n || n.v === 27n)
2276
+ return 0;
2277
+ if (n.v === 1n || n.v === 28n)
2278
+ return 1;
2279
+ if (n.v >= 35n)
2280
+ return n.v % 2n === 0n ? 1 : 0;
2281
+ }
2282
+ })(), n.type === "legacy" && (delete n.accessList, delete n.maxFeePerBlobGas, delete n.maxFeePerGas, delete n.maxPriorityFeePerGas, delete n.yParity), n.type === "eip2930" && (delete n.maxFeePerBlobGas, delete n.maxFeePerGas, delete n.maxPriorityFeePerGas), n.type === "eip1559" && delete n.maxFeePerBlobGas, n;
2283
+ }
2284
+ const qs = /* @__PURE__ */ Ke("transaction", Ye);
2285
+ function er(e) {
2286
+ return e.map((t) => ({
2287
+ address: t.address,
2288
+ chainId: Number(t.chainId),
2289
+ nonce: Number(t.nonce),
2290
+ r: t.r,
2291
+ s: t.s,
2292
+ yParity: Number(t.yParity)
2293
+ }));
2294
+ }
2295
+ function tr(e, t) {
2296
+ const n = (e.transactions ?? []).map((s) => typeof s == "string" ? s : Ye(s));
2297
+ return {
2298
+ ...e,
2299
+ baseFeePerGas: e.baseFeePerGas ? BigInt(e.baseFeePerGas) : null,
2300
+ blobGasUsed: e.blobGasUsed ? BigInt(e.blobGasUsed) : void 0,
2301
+ difficulty: e.difficulty ? BigInt(e.difficulty) : void 0,
2302
+ excessBlobGas: e.excessBlobGas ? BigInt(e.excessBlobGas) : void 0,
2303
+ gasLimit: e.gasLimit ? BigInt(e.gasLimit) : void 0,
2304
+ gasUsed: e.gasUsed ? BigInt(e.gasUsed) : void 0,
2305
+ hash: e.hash ? e.hash : null,
2306
+ logsBloom: e.logsBloom ? e.logsBloom : null,
2307
+ nonce: e.nonce ? e.nonce : null,
2308
+ number: e.number ? BigInt(e.number) : null,
2309
+ size: e.size ? BigInt(e.size) : void 0,
2310
+ timestamp: e.timestamp ? BigInt(e.timestamp) : void 0,
2311
+ transactions: n,
2312
+ totalDifficulty: e.totalDifficulty ? BigInt(e.totalDifficulty) : null
2313
+ };
2314
+ }
2315
+ const nr = /* @__PURE__ */ Ke("block", tr);
2316
+ function Dt(e) {
2317
+ const { kzg: t } = e, n = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), s = typeof e.blobs[0] == "string" ? e.blobs.map((o) => M(o)) : e.blobs, r = [];
2318
+ for (const o of s)
2319
+ r.push(Uint8Array.from(t.blobToKzgCommitment(o)));
2320
+ return n === "bytes" ? r : r.map((o) => E(o));
2321
+ }
2322
+ function _t(e) {
2323
+ const { kzg: t } = e, n = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), s = typeof e.blobs[0] == "string" ? e.blobs.map((i) => M(i)) : e.blobs, r = typeof e.commitments[0] == "string" ? e.commitments.map((i) => M(i)) : e.commitments, o = [];
2324
+ for (let i = 0; i < s.length; i++) {
2325
+ const a = s[i], c = r[i];
2326
+ o.push(Uint8Array.from(t.computeBlobKzgProof(a, c)));
2327
+ }
2328
+ return n === "bytes" ? o : o.map((i) => E(i));
2329
+ }
2330
+ function sr(e, t, n, s) {
2331
+ if (typeof e.setBigUint64 == "function")
2332
+ return e.setBigUint64(t, n, s);
2333
+ const r = BigInt(32), o = BigInt(4294967295), i = Number(n >> r & o), a = Number(n & o), c = s ? 4 : 0, d = s ? 0 : 4;
2334
+ e.setUint32(t + c, i, s), e.setUint32(t + d, a, s);
2335
+ }
2336
+ function rr(e, t, n) {
2337
+ return e & t ^ ~e & n;
2338
+ }
2339
+ function or(e, t, n) {
2340
+ return e & t ^ e & n ^ t & n;
2341
+ }
2342
+ class ir extends Et {
2343
+ constructor(t, n, s, r) {
2344
+ super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = t, this.outputLen = n, this.padOffset = s, this.isLE = r, this.buffer = new Uint8Array(t), this.view = ve(this.buffer);
2345
+ }
2346
+ update(t) {
2347
+ pe(this), t = Ne(t), K(t);
2348
+ const { view: n, buffer: s, blockLen: r } = this, o = t.length;
2349
+ for (let i = 0; i < o; ) {
2350
+ const a = Math.min(r - this.pos, o - i);
2351
+ if (a === r) {
2352
+ const c = ve(t);
2353
+ for (; r <= o - i; i += r)
2354
+ this.process(c, i);
2355
+ continue;
2356
+ }
2357
+ s.set(t.subarray(i, i + a), this.pos), this.pos += a, i += a, this.pos === r && (this.process(n, 0), this.pos = 0);
2358
+ }
2359
+ return this.length += t.length, this.roundClean(), this;
2360
+ }
2361
+ digestInto(t) {
2362
+ pe(this), wt(t, this), this.finished = !0;
2363
+ const { buffer: n, view: s, blockLen: r, isLE: o } = this;
2364
+ let { pos: i } = this;
2365
+ n[i++] = 128, ae(this.buffer.subarray(i)), this.padOffset > r - i && (this.process(s, 0), i = 0);
2366
+ for (let l = i; l < r; l++)
2367
+ n[l] = 0;
2368
+ sr(s, r - 8, BigInt(this.length * 8), o), this.process(s, 0);
2369
+ const a = ve(t), c = this.outputLen;
2370
+ if (c % 4)
2371
+ throw new Error("_sha2: outputLen should be aligned to 32bit");
2372
+ const d = c / 4, h = this.get();
2373
+ if (d > h.length)
2374
+ throw new Error("_sha2: outputLen bigger than state");
2375
+ for (let l = 0; l < d; l++)
2376
+ a.setUint32(4 * l, h[l], o);
2377
+ }
2378
+ digest() {
2379
+ const { buffer: t, outputLen: n } = this;
2380
+ this.digestInto(t);
2381
+ const s = t.slice(0, n);
2382
+ return this.destroy(), s;
2383
+ }
2384
+ _cloneInto(t) {
2385
+ t || (t = new this.constructor()), t.set(...this.get());
2386
+ const { blockLen: n, buffer: s, length: r, finished: o, destroyed: i, pos: a } = this;
2387
+ return t.destroyed = i, t.finished = o, t.length = r, t.pos = a, r % n && t.buffer.set(s), t;
2388
+ }
2389
+ clone() {
2390
+ return this._cloneInto();
2391
+ }
2392
+ }
2393
+ const z = /* @__PURE__ */ Uint32Array.from([
2394
+ 1779033703,
2395
+ 3144134277,
2396
+ 1013904242,
2397
+ 2773480762,
2398
+ 1359893119,
2399
+ 2600822924,
2400
+ 528734635,
2401
+ 1541459225
2402
+ ]), ar = /* @__PURE__ */ Uint32Array.from([
2403
+ 1116352408,
2404
+ 1899447441,
2405
+ 3049323471,
2406
+ 3921009573,
2407
+ 961987163,
2408
+ 1508970993,
2409
+ 2453635748,
2410
+ 2870763221,
2411
+ 3624381080,
2412
+ 310598401,
2413
+ 607225278,
2414
+ 1426881987,
2415
+ 1925078388,
2416
+ 2162078206,
2417
+ 2614888103,
2418
+ 3248222580,
2419
+ 3835390401,
2420
+ 4022224774,
2421
+ 264347078,
2422
+ 604807628,
2423
+ 770255983,
2424
+ 1249150122,
2425
+ 1555081692,
2426
+ 1996064986,
2427
+ 2554220882,
2428
+ 2821834349,
2429
+ 2952996808,
2430
+ 3210313671,
2431
+ 3336571891,
2432
+ 3584528711,
2433
+ 113926993,
2434
+ 338241895,
2435
+ 666307205,
2436
+ 773529912,
2437
+ 1294757372,
2438
+ 1396182291,
2439
+ 1695183700,
2440
+ 1986661051,
2441
+ 2177026350,
2442
+ 2456956037,
2443
+ 2730485921,
2444
+ 2820302411,
2445
+ 3259730800,
2446
+ 3345764771,
2447
+ 3516065817,
2448
+ 3600352804,
2449
+ 4094571909,
2450
+ 275423344,
2451
+ 430227734,
2452
+ 506948616,
2453
+ 659060556,
2454
+ 883997877,
2455
+ 958139571,
2456
+ 1322822218,
2457
+ 1537002063,
2458
+ 1747873779,
2459
+ 1955562222,
2460
+ 2024104815,
2461
+ 2227730452,
2462
+ 2361852424,
2463
+ 2428436474,
2464
+ 2756734187,
2465
+ 3204031479,
2466
+ 3329325298
2467
+ ]), S = /* @__PURE__ */ new Uint32Array(64);
2468
+ class cr extends ir {
2469
+ constructor(t = 32) {
2470
+ super(64, t, 8, !1), this.A = z[0] | 0, this.B = z[1] | 0, this.C = z[2] | 0, this.D = z[3] | 0, this.E = z[4] | 0, this.F = z[5] | 0, this.G = z[6] | 0, this.H = z[7] | 0;
2471
+ }
2472
+ get() {
2473
+ const { A: t, B: n, C: s, D: r, E: o, F: i, G: a, H: c } = this;
2474
+ return [t, n, s, r, o, i, a, c];
2475
+ }
2476
+ // prettier-ignore
2477
+ set(t, n, s, r, o, i, a, c) {
2478
+ this.A = t | 0, this.B = n | 0, this.C = s | 0, this.D = r | 0, this.E = o | 0, this.F = i | 0, this.G = a | 0, this.H = c | 0;
2479
+ }
2480
+ process(t, n) {
2481
+ for (let l = 0; l < 16; l++, n += 4)
2482
+ S[l] = t.getUint32(n, !1);
2483
+ for (let l = 16; l < 64; l++) {
2484
+ const b = S[l - 15], p = S[l - 2], w = $(b, 7) ^ $(b, 18) ^ b >>> 3, x = $(p, 17) ^ $(p, 19) ^ p >>> 10;
2485
+ S[l] = x + S[l - 7] + w + S[l - 16] | 0;
2486
+ }
2487
+ let { A: s, B: r, C: o, D: i, E: a, F: c, G: d, H: h } = this;
2488
+ for (let l = 0; l < 64; l++) {
2489
+ const b = $(a, 6) ^ $(a, 11) ^ $(a, 25), p = h + b + rr(a, c, d) + ar[l] + S[l] | 0, x = ($(s, 2) ^ $(s, 13) ^ $(s, 22)) + or(s, r, o) | 0;
2490
+ h = d, d = c, c = a, a = i + p | 0, i = o, o = r, r = s, s = p + x | 0;
2491
+ }
2492
+ s = s + this.A | 0, r = r + this.B | 0, o = o + this.C | 0, i = i + this.D | 0, a = a + this.E | 0, c = c + this.F | 0, d = d + this.G | 0, h = h + this.H | 0, this.set(s, r, o, i, a, c, d, h);
2493
+ }
2494
+ roundClean() {
2495
+ ae(S);
2496
+ }
2497
+ destroy() {
2498
+ this.set(0, 0, 0, 0, 0, 0, 0, 0), ae(this.buffer);
2499
+ }
2500
+ }
2501
+ const ur = /* @__PURE__ */ vt(() => new cr()), dr = ur;
2502
+ function lr(e, t) {
2503
+ return dr(Z(e, { strict: !1 }) ? Oe(e) : e);
2504
+ }
2505
+ function fr(e) {
2506
+ const { commitment: t, version: n = 1 } = e, s = e.to ?? (typeof t == "string" ? "hex" : "bytes"), r = lr(t);
2507
+ return r.set([n], 0), s === "bytes" ? r : E(r);
2508
+ }
2509
+ function hr(e) {
2510
+ const { commitments: t, version: n } = e, s = e.to ?? (typeof t[0] == "string" ? "hex" : "bytes"), r = [];
2511
+ for (const o of t)
2512
+ r.push(fr({
2513
+ commitment: o,
2514
+ to: s,
2515
+ version: n
2516
+ }));
2517
+ return r;
2518
+ }
2519
+ const ct = 6, Rt = 32, Ze = 4096, Vt = Rt * Ze, ut = Vt * ct - // terminator byte (0x80).
2520
+ 1 - // zero byte (0x00) appended to each field element.
2521
+ 1 * Ze * ct, Wt = 1;
2522
+ class pr extends u {
2523
+ constructor({ maxSize: t, size: n }) {
2524
+ super("Blob size is too large.", {
2525
+ metaMessages: [`Max: ${t} bytes`, `Given: ${n} bytes`],
2526
+ name: "BlobSizeTooLargeError"
2527
+ });
2528
+ }
2529
+ }
2530
+ class Kt extends u {
2531
+ constructor() {
2532
+ super("Blob data must not be empty.", { name: "EmptyBlobError" });
2533
+ }
2534
+ }
2535
+ class br extends u {
2536
+ constructor({ hash: t, size: n }) {
2537
+ super(`Versioned hash "${t}" size is invalid.`, {
2538
+ metaMessages: ["Expected: 32", `Received: ${n}`],
2539
+ name: "InvalidVersionedHashSizeError"
2540
+ });
2541
+ }
2542
+ }
2543
+ class mr extends u {
2544
+ constructor({ hash: t, version: n }) {
2545
+ super(`Versioned hash "${t}" version is invalid.`, {
2546
+ metaMessages: [
2547
+ `Expected: ${Wt}`,
2548
+ `Received: ${n}`
2549
+ ],
2550
+ name: "InvalidVersionedHashVersionError"
2551
+ });
2552
+ }
2553
+ }
2554
+ function yr(e) {
2555
+ const t = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), n = typeof e.data == "string" ? M(e.data) : e.data, s = g(n);
2556
+ if (!s)
2557
+ throw new Kt();
2558
+ if (s > ut)
2559
+ throw new pr({
2560
+ maxSize: ut,
2561
+ size: s
2562
+ });
2563
+ const r = [];
2564
+ let o = !0, i = 0;
2565
+ for (; o; ) {
2566
+ const a = We(new Uint8Array(Vt));
2567
+ let c = 0;
2568
+ for (; c < Ze; ) {
2569
+ const d = n.slice(i, i + (Rt - 1));
2570
+ if (a.pushByte(0), a.pushBytes(d), d.length < 31) {
2571
+ a.pushByte(128), o = !1;
2572
+ break;
2573
+ }
2574
+ c++, i += 31;
2575
+ }
2576
+ r.push(a);
2577
+ }
2578
+ return t === "bytes" ? r.map((a) => a.bytes) : r.map((a) => E(a.bytes));
2579
+ }
2580
+ function gr(e) {
2581
+ const { data: t, kzg: n, to: s } = e, r = e.blobs ?? yr({ data: t, to: s }), o = e.commitments ?? Dt({ blobs: r, kzg: n, to: s }), i = e.proofs ?? _t({ blobs: r, commitments: o, kzg: n, to: s }), a = [];
2582
+ for (let c = 0; c < r.length; c++)
2583
+ a.push({
2584
+ blob: r[c],
2585
+ commitment: o[c],
2586
+ proof: i[c]
2587
+ });
2588
+ return a;
2589
+ }
2590
+ function xr(e) {
2591
+ if (e.type)
2592
+ return e.type;
2593
+ if (typeof e.authorizationList < "u")
2594
+ return "eip7702";
2595
+ if (typeof e.blobs < "u" || typeof e.blobVersionedHashes < "u" || typeof e.maxFeePerBlobGas < "u" || typeof e.sidecars < "u")
2596
+ return "eip4844";
2597
+ if (typeof e.maxFeePerGas < "u" || typeof e.maxPriorityFeePerGas < "u")
2598
+ return "eip1559";
2599
+ if (typeof e.gasPrice < "u")
2600
+ return typeof e.accessList < "u" ? "eip2930" : "legacy";
2601
+ throw new js({ transaction: e });
2602
+ }
2603
+ function wr(e, { args: t, eventName: n } = {}) {
2604
+ return {
2605
+ ...e,
2606
+ blockHash: e.blockHash ? e.blockHash : null,
2607
+ blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
2608
+ blockTimestamp: e.blockTimestamp ? BigInt(e.blockTimestamp) : e.blockTimestamp === null ? null : void 0,
2609
+ logIndex: e.logIndex ? Number(e.logIndex) : null,
2610
+ transactionHash: e.transactionHash ? e.transactionHash : null,
2611
+ transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
2612
+ ...n ? { args: t, eventName: n } : {}
2613
+ };
2614
+ }
2615
+ class So extends u {
2616
+ constructor({ blockNumber: t, chain: n, contract: s }) {
2617
+ super(`Chain "${n.name}" does not support contract "${s.name}".`, {
2618
+ metaMessages: [
2619
+ "This could be due to any of the following:",
2620
+ ...t && s.blockCreated && s.blockCreated > t ? [
2621
+ `- The contract "${s.name}" was not deployed until block ${s.blockCreated} (current block ${t}).`
2622
+ ] : [
2623
+ `- The chain does not have the contract "${s.name}" configured.`
2624
+ ]
2625
+ ],
2626
+ name: "ChainDoesNotSupportContract"
2627
+ });
2628
+ }
2629
+ }
2630
+ class Uo extends u {
2631
+ constructor({ chain: t, currentChainId: n }) {
2632
+ super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`, {
2633
+ metaMessages: [
2634
+ `Current Chain ID: ${n}`,
2635
+ `Expected Chain ID: ${t.id} – ${t.name}`
2636
+ ],
2637
+ name: "ChainMismatchError"
2638
+ });
2639
+ }
2640
+ }
2641
+ class Mo extends u {
2642
+ constructor() {
2643
+ super([
2644
+ "No chain was provided to the request.",
2645
+ "Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."
2646
+ ].join(`
2647
+ `), {
2648
+ name: "ChainNotFoundError"
2649
+ });
2650
+ }
2651
+ }
2652
+ class Lo extends u {
2653
+ constructor() {
2654
+ super("No chain was provided to the Client.", {
2655
+ name: "ClientChainNotConfiguredError"
2656
+ });
2657
+ }
2658
+ }
2659
+ class ge extends u {
2660
+ constructor({ chainId: t }) {
2661
+ super(typeof t == "number" ? `Chain ID "${t}" is invalid.` : "Chain ID is invalid.", { name: "InvalidChainIdError" });
2662
+ }
2663
+ }
2664
+ function Er(e, { docsPath: t, ...n }) {
2665
+ const s = (() => {
2666
+ const r = Ks(e, n);
2667
+ return r instanceof Ht ? e : r;
2668
+ })();
2669
+ return new Rs(s, {
2670
+ docsPath: t,
2671
+ ...n
2672
+ });
2673
+ }
2674
+ class vr extends u {
2675
+ constructor({ docsPath: t } = {}) {
2676
+ super([
2677
+ "Could not find an Account to execute with this Action.",
2678
+ "Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."
2679
+ ].join(`
2680
+ `), {
2681
+ docsPath: t,
2682
+ docsSlug: "account",
2683
+ name: "AccountNotFoundError"
2684
+ });
2685
+ }
2686
+ }
2687
+ class Go extends u {
2688
+ constructor({ docsPath: t, metaMessages: n, type: s }) {
2689
+ super(`Account type "${s}" is not supported.`, {
2690
+ docsPath: t,
2691
+ metaMessages: n,
2692
+ name: "AccountTypeNotSupportedError"
2693
+ });
2694
+ }
2695
+ }
2696
+ const Ar = {
2697
+ "0x0": "reverted",
2698
+ "0x1": "success"
2699
+ };
2700
+ function Pr(e, t) {
2701
+ const n = {
2702
+ ...e,
2703
+ blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
2704
+ contractAddress: e.contractAddress ? e.contractAddress : null,
2705
+ cumulativeGasUsed: e.cumulativeGasUsed ? BigInt(e.cumulativeGasUsed) : null,
2706
+ effectiveGasPrice: e.effectiveGasPrice ? BigInt(e.effectiveGasPrice) : null,
2707
+ gasUsed: e.gasUsed ? BigInt(e.gasUsed) : null,
2708
+ logs: e.logs ? e.logs.map((s) => wr(s)) : null,
2709
+ to: e.to ? e.to : null,
2710
+ transactionIndex: e.transactionIndex ? ie(e.transactionIndex) : null,
2711
+ status: e.status ? Ar[e.status] : null,
2712
+ type: e.type ? jt[e.type] || e.type : null
2713
+ };
2714
+ return e.blobGasPrice && (n.blobGasPrice = BigInt(e.blobGasPrice)), e.blobGasUsed && (n.blobGasUsed = BigInt(e.blobGasUsed)), n;
2715
+ }
2716
+ const $r = /* @__PURE__ */ Ke("transactionReceipt", Pr);
2717
+ function Br(e) {
2718
+ const { authorizationList: t } = e;
2719
+ if (t)
2720
+ for (const n of t) {
2721
+ const { chainId: s } = n, r = n.address;
2722
+ if (!v(r))
2723
+ throw new A({ address: r });
2724
+ if (s < 0)
2725
+ throw new ge({ chainId: s });
2726
+ }
2727
+ Xe(e);
2728
+ }
2729
+ function Tr(e) {
2730
+ const { blobVersionedHashes: t } = e;
2731
+ if (t) {
2732
+ if (t.length === 0)
2733
+ throw new Kt();
2734
+ for (const n of t) {
2735
+ const s = g(n), r = ie(ce(n, 0, 1));
2736
+ if (s !== 32)
2737
+ throw new br({ hash: n, size: s });
2738
+ if (r !== Wt)
2739
+ throw new mr({
2740
+ hash: n,
2741
+ version: r
2742
+ });
2743
+ }
2744
+ }
2745
+ Xe(e);
2746
+ }
2747
+ function Xe(e) {
2748
+ const { chainId: t, maxPriorityFeePerGas: n, maxFeePerGas: s, to: r } = e;
2749
+ if (t <= 0)
2750
+ throw new ge({ chainId: t });
2751
+ if (r && !v(r))
2752
+ throw new A({ address: r });
2753
+ if (s && s > ye)
2754
+ throw new j({ maxFeePerGas: s });
2755
+ if (n && s && n > s)
2756
+ throw new de({ maxFeePerGas: s, maxPriorityFeePerGas: n });
2757
+ }
2758
+ function Ir(e) {
2759
+ const { chainId: t, maxPriorityFeePerGas: n, gasPrice: s, maxFeePerGas: r, to: o } = e;
2760
+ if (t <= 0)
2761
+ throw new ge({ chainId: t });
2762
+ if (o && !v(o))
2763
+ throw new A({ address: o });
2764
+ if (n || r)
2765
+ throw new u("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");
2766
+ if (s && s > ye)
2767
+ throw new j({ maxFeePerGas: s });
2768
+ }
2769
+ function Fr(e) {
2770
+ const { chainId: t, maxPriorityFeePerGas: n, gasPrice: s, maxFeePerGas: r, to: o } = e;
2771
+ if (o && !v(o))
2772
+ throw new A({ address: o });
2773
+ if (typeof t < "u" && t <= 0)
2774
+ throw new ge({ chainId: t });
2775
+ if (n || r)
2776
+ throw new u("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");
2777
+ if (s && s > ye)
2778
+ throw new j({ maxFeePerGas: s });
2779
+ }
2780
+ function xe(e) {
2781
+ if (!e || e.length === 0)
2782
+ return [];
2783
+ const t = [];
2784
+ for (let n = 0; n < e.length; n++) {
2785
+ const { address: s, storageKeys: r } = e[n];
2786
+ for (let o = 0; o < r.length; o++)
2787
+ if (r[o].length - 2 !== 64)
2788
+ throw new Ds({ storageKey: r[o] });
2789
+ if (!v(s, { strict: !1 }))
2790
+ throw new A({ address: s });
2791
+ t.push([s, r]);
2792
+ }
2793
+ return t;
2794
+ }
2795
+ function Cr(e, t) {
2796
+ const n = xr(e);
2797
+ return n === "eip1559" ? Sr(e, t) : n === "eip2930" ? Ur(e, t) : n === "eip4844" ? zr(e, t) : n === "eip7702" ? kr(e, t) : Mr(e, t);
2798
+ }
2799
+ function kr(e, t) {
2800
+ const { authorizationList: n, chainId: s, gas: r, nonce: o, to: i, value: a, maxFeePerGas: c, maxPriorityFeePerGas: d, accessList: h, data: l } = e;
2801
+ Br(e);
2802
+ const b = xe(h), p = Lr(n);
2803
+ return J([
2804
+ "0x04",
2805
+ H([
2806
+ f(s),
2807
+ o ? f(o) : "0x",
2808
+ d ? f(d) : "0x",
2809
+ c ? f(c) : "0x",
2810
+ r ? f(r) : "0x",
2811
+ i ?? "0x",
2812
+ a ? f(a) : "0x",
2813
+ l ?? "0x",
2814
+ b,
2815
+ p,
2816
+ ...le(e, t)
2817
+ ])
2818
+ ]);
2819
+ }
2820
+ function zr(e, t) {
2821
+ const { chainId: n, gas: s, nonce: r, to: o, value: i, maxFeePerBlobGas: a, maxFeePerGas: c, maxPriorityFeePerGas: d, accessList: h, data: l } = e;
2822
+ Tr(e);
2823
+ let b = e.blobVersionedHashes, p = e.sidecars;
2824
+ if (e.blobs && (typeof b > "u" || typeof p > "u")) {
2825
+ const k = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((O) => E(O)), L = e.kzg, G = Dt({
2826
+ blobs: k,
2827
+ kzg: L
2828
+ });
2829
+ if (typeof b > "u" && (b = hr({
2830
+ commitments: G
2831
+ })), typeof p > "u") {
2832
+ const O = _t({ blobs: k, commitments: G, kzg: L });
2833
+ p = gr({ blobs: k, commitments: G, proofs: O });
2834
+ }
2835
+ }
2836
+ const w = xe(h), x = [
2837
+ f(n),
2838
+ r ? f(r) : "0x",
2839
+ d ? f(d) : "0x",
2840
+ c ? f(c) : "0x",
2841
+ s ? f(s) : "0x",
2842
+ o ?? "0x",
2843
+ i ? f(i) : "0x",
2844
+ l ?? "0x",
2845
+ w,
2846
+ a ? f(a) : "0x",
2847
+ b ?? [],
2848
+ ...le(e, t)
2849
+ ], we = [], Q = [], q = [];
2850
+ if (p)
2851
+ for (let k = 0; k < p.length; k++) {
2852
+ const { blob: L, commitment: G, proof: O } = p[k];
2853
+ we.push(L), Q.push(G), q.push(O);
2854
+ }
2855
+ return J([
2856
+ "0x03",
2857
+ // If sidecars are enabled, envelope turns into a "wrapper":
2858
+ H(p ? [x, we, Q, q] : x)
2859
+ ]);
2860
+ }
2861
+ function Sr(e, t) {
2862
+ const { chainId: n, gas: s, nonce: r, to: o, value: i, maxFeePerGas: a, maxPriorityFeePerGas: c, accessList: d, data: h } = e;
2863
+ Xe(e);
2864
+ const l = xe(d), b = [
2865
+ f(n),
2866
+ r ? f(r) : "0x",
2867
+ c ? f(c) : "0x",
2868
+ a ? f(a) : "0x",
2869
+ s ? f(s) : "0x",
2870
+ o ?? "0x",
2871
+ i ? f(i) : "0x",
2872
+ h ?? "0x",
2873
+ l,
2874
+ ...le(e, t)
2875
+ ];
2876
+ return J([
2877
+ "0x02",
2878
+ H(b)
2879
+ ]);
2880
+ }
2881
+ function Ur(e, t) {
2882
+ const { chainId: n, gas: s, data: r, nonce: o, to: i, value: a, accessList: c, gasPrice: d } = e;
2883
+ Ir(e);
2884
+ const h = xe(c), l = [
2885
+ f(n),
2886
+ o ? f(o) : "0x",
2887
+ d ? f(d) : "0x",
2888
+ s ? f(s) : "0x",
2889
+ i ?? "0x",
2890
+ a ? f(a) : "0x",
2891
+ r ?? "0x",
2892
+ h,
2893
+ ...le(e, t)
2894
+ ];
2895
+ return J([
2896
+ "0x01",
2897
+ H(l)
2898
+ ]);
2899
+ }
2900
+ function Mr(e, t) {
2901
+ const { chainId: n = 0, gas: s, data: r, nonce: o, to: i, value: a, gasPrice: c } = e;
2902
+ Fr(e);
2903
+ let d = [
2904
+ o ? f(o) : "0x",
2905
+ c ? f(c) : "0x",
2906
+ s ? f(s) : "0x",
2907
+ i ?? "0x",
2908
+ a ? f(a) : "0x",
2909
+ r ?? "0x"
2910
+ ];
2911
+ if (t) {
2912
+ const h = (() => {
2913
+ if (t.v >= 35n)
2914
+ return (t.v - 35n) / 2n > 0 ? t.v : 27n + (t.v === 35n ? 0n : 1n);
2915
+ if (n > 0)
2916
+ return BigInt(n * 2) + BigInt(35n + t.v - 27n);
2917
+ const p = 27n + (t.v === 27n ? 0n : 1n);
2918
+ if (t.v !== p)
2919
+ throw new Hs({ v: t.v });
2920
+ return p;
2921
+ })(), l = B(t.r), b = B(t.s);
2922
+ d = [
2923
+ ...d,
2924
+ f(h),
2925
+ l === "0x00" ? "0x" : l,
2926
+ b === "0x00" ? "0x" : b
2927
+ ];
2928
+ } else n > 0 && (d = [
2929
+ ...d,
2930
+ f(n),
2931
+ "0x",
2932
+ "0x"
2933
+ ]);
2934
+ return H(d);
2935
+ }
2936
+ function le(e, t) {
2937
+ const n = t ?? e, { v: s, yParity: r } = n;
2938
+ if (typeof n.r > "u")
2939
+ return [];
2940
+ if (typeof n.s > "u")
2941
+ return [];
2942
+ if (typeof s > "u" && typeof r > "u")
2943
+ return [];
2944
+ const o = B(n.r), i = B(n.s);
2945
+ return [typeof r == "number" ? r ? f(1) : "0x" : s === 0n ? "0x" : s === 1n ? f(1) : s === 27n ? "0x" : f(1), o === "0x00" ? "0x" : o, i === "0x00" ? "0x" : i];
2946
+ }
2947
+ function Lr(e) {
2948
+ if (!e || e.length === 0)
2949
+ return [];
2950
+ const t = [];
2951
+ for (const n of e) {
2952
+ const { chainId: s, nonce: r, ...o } = n, i = n.address;
2953
+ t.push([
2954
+ s ? R(s) : "0x",
2955
+ i,
2956
+ r ? R(r) : "0x",
2957
+ ...le({}, o)
2958
+ ]);
2959
+ }
2960
+ return t;
2961
+ }
2962
+ function m(e) {
2963
+ const t = {
2964
+ formatters: void 0,
2965
+ fees: void 0,
2966
+ serializers: void 0,
2967
+ ...e
2968
+ };
2969
+ function n(s) {
2970
+ return (r) => {
2971
+ const o = typeof r == "function" ? r(s) : r, i = { ...s, ...o };
2972
+ return Object.assign(i, { extend: n(i) });
2973
+ };
2974
+ }
2975
+ return Object.assign(t, {
2976
+ extend: n(t)
2977
+ });
2978
+ }
2979
+ const Gr = {
2980
+ gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
2981
+ l1Block: { address: "0x4200000000000000000000000000000000000015" },
2982
+ l2CrossDomainMessenger: {
2983
+ address: "0x4200000000000000000000000000000000000007"
2984
+ },
2985
+ l2Erc721Bridge: { address: "0x4200000000000000000000000000000000000014" },
2986
+ l2StandardBridge: { address: "0x4200000000000000000000000000000000000010" },
2987
+ l2ToL1MessagePasser: {
2988
+ address: "0x4200000000000000000000000000000000000016"
2989
+ }
2990
+ }, Or = {
2991
+ block: /* @__PURE__ */ nr({
2992
+ format(e) {
2993
+ return {
2994
+ transactions: e.transactions?.map((n) => {
2995
+ if (typeof n == "string")
2996
+ return n;
2997
+ const s = Ye(n);
2998
+ return s.typeHex === "0x7e" && (s.isSystemTx = n.isSystemTx, s.mint = n.mint ? N(n.mint) : void 0, s.sourceHash = n.sourceHash, s.type = "deposit"), s;
2999
+ }),
3000
+ stateRoot: e.stateRoot
3001
+ };
3002
+ }
3003
+ }),
3004
+ transaction: /* @__PURE__ */ qs({
3005
+ format(e) {
3006
+ const t = {};
3007
+ return e.type === "0x7e" && (t.isSystemTx = e.isSystemTx, t.mint = e.mint ? N(e.mint) : void 0, t.sourceHash = e.sourceHash, t.type = "deposit"), t;
3008
+ }
3009
+ }),
3010
+ transactionReceipt: /* @__PURE__ */ $r({
3011
+ format(e) {
3012
+ return {
3013
+ l1GasPrice: e.l1GasPrice ? N(e.l1GasPrice) : null,
3014
+ l1GasUsed: e.l1GasUsed ? N(e.l1GasUsed) : null,
3015
+ l1Fee: e.l1Fee ? N(e.l1Fee) : null,
3016
+ l1FeeScalar: e.l1FeeScalar ? Number(e.l1FeeScalar) : null
3017
+ };
3018
+ }
3019
+ })
3020
+ };
3021
+ function Nr(e, t) {
3022
+ return Dr(e) ? jr(e) : Cr(e, t);
3023
+ }
3024
+ const Hr = {
3025
+ transaction: Nr
3026
+ };
3027
+ function jr(e) {
3028
+ _r(e);
3029
+ const { sourceHash: t, data: n, from: s, gas: r, isSystemTx: o, mint: i, to: a, value: c } = e, d = [
3030
+ t,
3031
+ s,
3032
+ a ?? "0x",
3033
+ i ? R(i) : "0x",
3034
+ c ? R(c) : "0x",
3035
+ r ? R(r) : "0x",
3036
+ o ? "0x1" : "0x",
3037
+ n ?? "0x"
3038
+ ];
3039
+ return J([
3040
+ "0x7e",
3041
+ H(d)
3042
+ ]);
3043
+ }
3044
+ function Dr(e) {
3045
+ return e.type === "deposit" || typeof e.sourceHash < "u";
3046
+ }
3047
+ function _r(e) {
3048
+ const { from: t, to: n } = e;
3049
+ if (t && !v(t))
3050
+ throw new A({ address: t });
3051
+ if (n && !v(n))
3052
+ throw new A({ address: n });
3053
+ }
3054
+ const I = {
3055
+ blockTime: 2e3,
3056
+ contracts: Gr,
3057
+ formatters: Or,
3058
+ serializers: Hr
3059
+ }, Rr = 42161, Yt = /* @__PURE__ */ m({
3060
+ id: 33139,
3061
+ name: "ApeChain",
3062
+ nativeCurrency: {
3063
+ name: "ApeCoin",
3064
+ symbol: "APE",
3065
+ decimals: 18
3066
+ },
3067
+ rpcUrls: {
3068
+ default: {
3069
+ http: ["https://rpc.apechain.com/http"],
3070
+ webSocket: ["wss://rpc.apechain.com/ws"]
3071
+ }
3072
+ },
3073
+ blockExplorers: {
3074
+ default: {
3075
+ name: "Apescan",
3076
+ url: "https://apescan.io",
3077
+ apiUrl: "https://api.apescan.io/api"
3078
+ }
3079
+ },
3080
+ contracts: {
3081
+ multicall3: {
3082
+ address: "0xcA11bde05977b3631167028862bE2a173976CA11",
3083
+ blockCreated: 20889
3084
+ }
3085
+ },
3086
+ sourceId: Rr
3087
+ }), Zt = /* @__PURE__ */ m({
3088
+ id: 42161,
3089
+ name: "Arbitrum One",
3090
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
3091
+ blockTime: 250,
3092
+ rpcUrls: {
3093
+ default: {
3094
+ http: ["https://arb1.arbitrum.io/rpc"]
3095
+ }
3096
+ },
3097
+ blockExplorers: {
3098
+ default: {
3099
+ name: "Arbiscan",
3100
+ url: "https://arbiscan.io",
3101
+ apiUrl: "https://api.arbiscan.io/api"
3102
+ }
3103
+ },
3104
+ contracts: {
3105
+ multicall3: {
3106
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
3107
+ blockCreated: 7654707
3108
+ }
3109
+ }
3110
+ }), ne = 1, Je = /* @__PURE__ */ m({
3111
+ ...I,
3112
+ id: 8453,
3113
+ name: "Base",
3114
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
3115
+ rpcUrls: {
3116
+ default: {
3117
+ http: ["https://mainnet.base.org"]
3118
+ }
3119
+ },
3120
+ blockExplorers: {
3121
+ default: {
3122
+ name: "Basescan",
3123
+ url: "https://basescan.org",
3124
+ apiUrl: "https://api.basescan.org/api"
3125
+ }
3126
+ },
3127
+ contracts: {
3128
+ ...I.contracts,
3129
+ disputeGameFactory: {
3130
+ [ne]: {
3131
+ address: "0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"
3132
+ }
3133
+ },
3134
+ l2OutputOracle: {
3135
+ [ne]: {
3136
+ address: "0x56315b90c40730925ec5485cf004d835058518A0"
3137
+ }
3138
+ },
3139
+ multicall3: {
3140
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
3141
+ blockCreated: 5022
3142
+ },
3143
+ portal: {
3144
+ [ne]: {
3145
+ address: "0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",
3146
+ blockCreated: 17482143
3147
+ }
3148
+ },
3149
+ l1StandardBridge: {
3150
+ [ne]: {
3151
+ address: "0x3154Cf16ccdb4C6d922629664174b904d80F2C35",
3152
+ blockCreated: 17482143
3153
+ }
3154
+ }
3155
+ },
3156
+ sourceId: ne
3157
+ });
3158
+ ({
3159
+ ...Je
3160
+ });
3161
+ const se = 11155111, Qe = /* @__PURE__ */ m({
3162
+ ...I,
3163
+ id: 84532,
3164
+ network: "base-sepolia",
3165
+ name: "Base Sepolia",
3166
+ nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
3167
+ rpcUrls: {
3168
+ default: {
3169
+ http: ["https://sepolia.base.org"]
3170
+ }
3171
+ },
3172
+ blockExplorers: {
3173
+ default: {
3174
+ name: "Basescan",
3175
+ url: "https://sepolia.basescan.org",
3176
+ apiUrl: "https://api-sepolia.basescan.org/api"
3177
+ }
3178
+ },
3179
+ contracts: {
3180
+ ...I.contracts,
3181
+ disputeGameFactory: {
3182
+ [se]: {
3183
+ address: "0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"
3184
+ }
3185
+ },
3186
+ l2OutputOracle: {
3187
+ [se]: {
3188
+ address: "0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"
3189
+ }
3190
+ },
3191
+ portal: {
3192
+ [se]: {
3193
+ address: "0x49f53e41452c74589e85ca1677426ba426459e85",
3194
+ blockCreated: 4446677
3195
+ }
3196
+ },
3197
+ l1StandardBridge: {
3198
+ [se]: {
3199
+ address: "0xfd0Bf71F60660E2f608ed56e1659C450eB113120",
3200
+ blockCreated: 4446677
3201
+ }
3202
+ },
3203
+ multicall3: {
3204
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
3205
+ blockCreated: 1059647
3206
+ }
3207
+ },
3208
+ testnet: !0,
3209
+ sourceId: se
3210
+ });
3211
+ ({
3212
+ ...Qe
3213
+ });
3214
+ const Xt = /* @__PURE__ */ m({
3215
+ id: 80094,
3216
+ name: "Berachain",
3217
+ blockTime: 2e3,
3218
+ nativeCurrency: {
3219
+ decimals: 18,
3220
+ name: "BERA Token",
3221
+ symbol: "BERA"
3222
+ },
3223
+ contracts: {
3224
+ multicall3: {
3225
+ address: "0xcA11bde05977b3631167028862bE2a173976CA11",
3226
+ blockCreated: 0
3227
+ },
3228
+ ensRegistry: {
3229
+ address: "0x5b22280886a2f5e09a49bea7e320eab0e5320e28",
3230
+ blockCreated: 877007
3231
+ },
3232
+ ensUniversalResolver: {
3233
+ address: "0x4D41762915F83c76EcaF6776d9b08076aA32b492",
3234
+ blockCreated: 9310021
3235
+ }
3236
+ },
3237
+ rpcUrls: {
3238
+ default: { http: ["https://rpc.berachain.com"] }
3239
+ },
3240
+ blockExplorers: {
3241
+ default: {
3242
+ name: "Berascan",
3243
+ url: "https://berascan.com"
3244
+ }
3245
+ },
3246
+ ensTlds: [".bera"],
3247
+ testnet: !1
3248
+ }), Jt = /* @__PURE__ */ m({
3249
+ id: 56,
3250
+ name: "BNB Smart Chain",
3251
+ blockTime: 750,
3252
+ nativeCurrency: {
3253
+ decimals: 18,
3254
+ name: "BNB",
3255
+ symbol: "BNB"
3256
+ },
3257
+ rpcUrls: {
3258
+ default: { http: ["https://56.rpc.thirdweb.com"] }
3259
+ },
3260
+ blockExplorers: {
3261
+ default: {
3262
+ name: "BscScan",
3263
+ url: "https://bscscan.com",
3264
+ apiUrl: "https://api.bscscan.com/api"
3265
+ }
3266
+ },
3267
+ contracts: {
3268
+ multicall3: {
3269
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
3270
+ blockCreated: 15921452
3271
+ }
3272
+ }
3273
+ }), Qt = /* @__PURE__ */ m({
3274
+ id: 17e3,
3275
+ name: "Holesky",
3276
+ nativeCurrency: { name: "Holesky Ether", symbol: "ETH", decimals: 18 },
3277
+ rpcUrls: {
3278
+ default: {
3279
+ http: ["https://ethereum-holesky-rpc.publicnode.com"]
3280
+ }
3281
+ },
3282
+ blockExplorers: {
3283
+ default: {
3284
+ name: "Etherscan",
3285
+ url: "https://holesky.etherscan.io",
3286
+ apiUrl: "https://api-holesky.etherscan.io/api"
3287
+ }
3288
+ },
3289
+ contracts: {
3290
+ multicall3: {
3291
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
3292
+ blockCreated: 77
3293
+ },
3294
+ ensUniversalResolver: {
3295
+ address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",
3296
+ blockCreated: 4295055
3297
+ }
3298
+ },
3299
+ testnet: !0
3300
+ }), qt = /* @__PURE__ */ m({
3301
+ id: 560048,
3302
+ name: "Hoodi",
3303
+ nativeCurrency: { name: "Hoodi Ether", symbol: "ETH", decimals: 18 },
3304
+ rpcUrls: {
3305
+ default: {
3306
+ http: ["https://rpc.hoodi.ethpandaops.io"]
3307
+ }
3308
+ },
3309
+ blockExplorers: {
3310
+ default: {
3311
+ name: "Etherscan",
3312
+ url: "https://hoodi.etherscan.io"
3313
+ }
3314
+ },
3315
+ contracts: {
3316
+ multicall3: {
3317
+ address: "0xcA11bde05977b3631167028862bE2a173976CA11",
3318
+ blockCreated: 2589
3319
+ }
3320
+ },
3321
+ testnet: !0
3322
+ }), en = /* @__PURE__ */ m({
3323
+ id: 999,
3324
+ name: "HyperEVM",
3325
+ nativeCurrency: { name: "HYPE", symbol: "HYPE", decimals: 18 },
3326
+ blockExplorers: {
3327
+ default: {
3328
+ name: "HyperEVMScan",
3329
+ url: "https://hyperevmscan.io"
3330
+ }
3331
+ },
3332
+ contracts: {
3333
+ multicall3: {
3334
+ address: "0xcA11bde05977b3631167028862bE2a173976CA11",
3335
+ blockCreated: 13051
3336
+ }
3337
+ },
3338
+ rpcUrls: {
3339
+ default: {
3340
+ http: ["https://rpc.hyperliquid.xyz/evm"]
3341
+ }
3342
+ },
3343
+ testnet: !1
3344
+ });
3345
+ async function Vr(e, t) {
3346
+ const { account: n = e.account } = t;
3347
+ if (!n)
3348
+ throw new vr();
3349
+ const s = Ve(n);
3350
+ try {
3351
+ const { accessList: r, blockNumber: o, blockTag: i, data: a, gas: c, gasPrice: d, maxFeePerGas: h, maxPriorityFeePerGas: l, nonce: b, to: p, value: w, ...x } = t, Q = (typeof o == "bigint" ? f(o) : void 0) || i;
3352
+ Qs(t);
3353
+ const q = e.chain?.formatters?.transactionRequest?.format, L = (q || Xs)({
3354
+ // Pick out extra data that might exist on the chain's transaction request type.
3355
+ ...Ys(x, { format: q }),
3356
+ account: s,
3357
+ accessList: r,
3358
+ data: a,
3359
+ gas: c,
3360
+ gasPrice: d,
3361
+ maxFeePerGas: h,
3362
+ maxPriorityFeePerGas: l,
3363
+ nonce: b,
3364
+ to: p,
3365
+ value: w
3366
+ }, "estimateGas"), { baseFeePerGas: G, gasLimit: O, priorityFeePerGas: dn } = await e.request({
3367
+ method: "linea_estimateGas",
3368
+ params: Q ? [L, Q] : [L]
3369
+ });
3370
+ return {
3371
+ baseFeePerGas: BigInt(G),
3372
+ gasLimit: BigInt(O),
3373
+ priorityFeePerGas: BigInt(dn)
3374
+ };
3375
+ } catch (r) {
3376
+ throw Er(r, {
3377
+ ...t,
3378
+ account: s,
3379
+ chain: e.chain
3380
+ });
3381
+ }
3382
+ }
3383
+ const Wr = {
3384
+ fees: {
3385
+ estimateFeesPerGas: dt,
3386
+ async maxPriorityFeePerGas({ block: e, client: t, request: n }) {
3387
+ const s = await dt({
3388
+ block: e,
3389
+ client: t,
3390
+ multiply: (r) => r,
3391
+ request: n,
3392
+ type: "eip1559"
3393
+ });
3394
+ return s?.maxPriorityFeePerGas ? s.maxPriorityFeePerGas : null;
3395
+ }
3396
+ }
3397
+ };
3398
+ async function dt({ client: e, multiply: t, request: n, type: s }) {
3399
+ try {
3400
+ const r = await Vr(e, {
3401
+ ...n,
3402
+ account: n?.account
3403
+ }), { priorityFeePerGas: o } = r, a = t(BigInt(r.baseFeePerGas)) + o;
3404
+ return s === "legacy" ? { gasPrice: a } : {
3405
+ maxFeePerGas: a,
3406
+ maxPriorityFeePerGas: o
3407
+ };
3408
+ } catch {
3409
+ return null;
3410
+ }
3411
+ }
3412
+ const tn = /* @__PURE__ */ m({
3413
+ ...Wr,
3414
+ id: 59144,
3415
+ name: "Linea Mainnet",
3416
+ blockTime: 2e3,
3417
+ nativeCurrency: { name: "Linea Ether", symbol: "ETH", decimals: 18 },
3418
+ rpcUrls: {
3419
+ default: {
3420
+ http: ["https://rpc.linea.build"],
3421
+ webSocket: ["wss://rpc.linea.build"]
3422
+ }
3423
+ },
3424
+ blockExplorers: {
3425
+ default: {
3426
+ name: "Etherscan",
3427
+ url: "https://lineascan.build",
3428
+ apiUrl: "https://api.lineascan.build/api"
3429
+ }
3430
+ },
3431
+ contracts: {
3432
+ multicall3: {
3433
+ address: "0xcA11bde05977b3631167028862bE2a173976CA11",
3434
+ blockCreated: 42
3435
+ },
3436
+ ensRegistry: {
3437
+ address: "0x50130b669B28C339991d8676FA73CF122a121267",
3438
+ blockCreated: 6682888
3439
+ },
3440
+ ensUniversalResolver: {
3441
+ address: "0x4D41762915F83c76EcaF6776d9b08076aA32b492",
3442
+ blockCreated: 22222151
3443
+ }
3444
+ },
3445
+ ensTlds: [".linea.eth"],
3446
+ testnet: !1
3447
+ }), nn = /* @__PURE__ */ m({
3448
+ id: 1,
3449
+ name: "Ethereum",
3450
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
3451
+ blockTime: 12e3,
3452
+ rpcUrls: {
3453
+ default: {
3454
+ http: ["https://eth.merkle.io"]
3455
+ }
3456
+ },
3457
+ blockExplorers: {
3458
+ default: {
3459
+ name: "Etherscan",
3460
+ url: "https://etherscan.io",
3461
+ apiUrl: "https://api.etherscan.io/api"
3462
+ }
3463
+ },
3464
+ contracts: {
3465
+ ensUniversalResolver: {
3466
+ address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",
3467
+ blockCreated: 23085558
3468
+ },
3469
+ multicall3: {
3470
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
3471
+ blockCreated: 14353601
3472
+ }
3473
+ }
3474
+ }), sn = /* @__PURE__ */ m({
3475
+ id: 143,
3476
+ name: "Monad",
3477
+ blockTime: 400,
3478
+ nativeCurrency: {
3479
+ name: "Monad",
3480
+ symbol: "MON",
3481
+ decimals: 18
3482
+ },
3483
+ rpcUrls: {
3484
+ default: {
3485
+ http: ["https://rpc.monad.xyz", "https://rpc1.monad.xyz"],
3486
+ webSocket: ["wss://rpc.monad.xyz", "wss://rpc1.monad.xyz"]
3487
+ }
3488
+ },
3489
+ blockExplorers: {
3490
+ default: {
3491
+ name: "Monadscan",
3492
+ url: "https://monadscan.com",
3493
+ apiUrl: "https://api.etherscan.io/v2/api?chainid=143"
3494
+ },
3495
+ monadvision: {
3496
+ name: "MonadVision",
3497
+ url: "https://monadvision.com"
3498
+ }
3499
+ },
3500
+ testnet: !1,
3501
+ contracts: {
3502
+ multicall3: {
3503
+ address: "0xcA11bde05977b3631167028862bE2a173976CA11",
3504
+ blockCreated: 9248132
3505
+ }
3506
+ }
3507
+ }), re = 11155111, rn = /* @__PURE__ */ m({
3508
+ ...I,
3509
+ id: 11155420,
3510
+ name: "OP Sepolia",
3511
+ nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
3512
+ rpcUrls: {
3513
+ default: {
3514
+ http: ["https://sepolia.optimism.io"]
3515
+ }
3516
+ },
3517
+ blockExplorers: {
3518
+ default: {
3519
+ name: "Blockscout",
3520
+ url: "https://optimism-sepolia.blockscout.com",
3521
+ apiUrl: "https://optimism-sepolia.blockscout.com/api"
3522
+ }
3523
+ },
3524
+ contracts: {
3525
+ ...I.contracts,
3526
+ disputeGameFactory: {
3527
+ [re]: {
3528
+ address: "0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"
3529
+ }
3530
+ },
3531
+ l2OutputOracle: {
3532
+ [re]: {
3533
+ address: "0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"
3534
+ }
3535
+ },
3536
+ multicall3: {
3537
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
3538
+ blockCreated: 1620204
3539
+ },
3540
+ portal: {
3541
+ [re]: {
3542
+ address: "0x16Fc5058F25648194471939df75CF27A2fdC48BC"
3543
+ }
3544
+ },
3545
+ l1StandardBridge: {
3546
+ [re]: {
3547
+ address: "0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"
3548
+ }
3549
+ }
3550
+ },
3551
+ testnet: !0,
3552
+ sourceId: re
3553
+ }), on = /* @__PURE__ */ m({
3554
+ id: 11155111,
3555
+ name: "Sepolia",
3556
+ nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
3557
+ rpcUrls: {
3558
+ default: {
3559
+ http: ["https://11155111.rpc.thirdweb.com"]
3560
+ }
3561
+ },
3562
+ blockExplorers: {
3563
+ default: {
3564
+ name: "Etherscan",
3565
+ url: "https://sepolia.etherscan.io",
3566
+ apiUrl: "https://api-sepolia.etherscan.io/api"
3567
+ }
3568
+ },
3569
+ contracts: {
3570
+ multicall3: {
3571
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
3572
+ blockCreated: 751532
3573
+ },
3574
+ ensUniversalResolver: {
3575
+ address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee",
3576
+ blockCreated: 8928790
3577
+ }
3578
+ },
3579
+ testnet: !0
3580
+ }), oe = 1, an = /* @__PURE__ */ m({
3581
+ ...I,
3582
+ id: 1868,
3583
+ name: "Soneium Mainnet",
3584
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
3585
+ rpcUrls: {
3586
+ default: {
3587
+ http: ["https://rpc.soneium.org"]
3588
+ }
3589
+ },
3590
+ blockExplorers: {
3591
+ default: {
3592
+ name: "Blockscout",
3593
+ url: "https://soneium.blockscout.com",
3594
+ apiUrl: "https://soneium.blockscout.com/api"
3595
+ }
3596
+ },
3597
+ contracts: {
3598
+ ...I.contracts,
3599
+ disputeGameFactory: {
3600
+ [oe]: {
3601
+ address: "0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0"
3602
+ }
3603
+ },
3604
+ l2OutputOracle: {
3605
+ [oe]: {
3606
+ address: "0x0000000000000000000000000000000000000000"
3607
+ }
3608
+ },
3609
+ portal: {
3610
+ [oe]: {
3611
+ address: "0x88e529a6ccd302c948689cd5156c83d4614fae92",
3612
+ blockCreated: 7061266
3613
+ }
3614
+ },
3615
+ l1StandardBridge: {
3616
+ [oe]: {
3617
+ address: "0xeb9bf100225c214efc3e7c651ebbadcf85177607",
3618
+ blockCreated: 7061266
3619
+ }
3620
+ },
3621
+ multicall3: {
3622
+ address: "0xcA11bde05977b3631167028862bE2a173976CA11",
3623
+ blockCreated: 1
3624
+ }
3625
+ },
3626
+ sourceId: oe
3627
+ }), cn = /* @__PURE__ */ m({
3628
+ id: 239,
3629
+ name: "TAC",
3630
+ nativeCurrency: { name: "TAC", symbol: "TAC", decimals: 18 },
3631
+ rpcUrls: {
3632
+ default: {
3633
+ http: ["https://rpc.ankr.com/tac"]
3634
+ }
3635
+ },
3636
+ blockExplorers: {
3637
+ default: {
3638
+ name: "Blockscout",
3639
+ url: "https://tac.blockscout.com",
3640
+ apiUrl: "https://tac.blockscout.com/api"
3641
+ },
3642
+ native: {
3643
+ name: "TAC Explorer",
3644
+ url: "https://explorer.tac.build",
3645
+ apiUrl: "https://explorer.tac.build/api"
3646
+ }
3647
+ },
3648
+ contracts: {
3649
+ multicall3: {
3650
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
3651
+ blockCreated: 0
3652
+ }
3653
+ }
3654
+ }), $e = 1, un = /* @__PURE__ */ m({
3655
+ ...I,
3656
+ id: 48900,
3657
+ name: "Zircuit Mainnet",
3658
+ nativeCurrency: {
3659
+ decimals: 18,
3660
+ name: "Ether",
3661
+ symbol: "ETH"
3662
+ },
3663
+ rpcUrls: {
3664
+ default: {
3665
+ http: ["https://mainnet.zircuit.com"]
3666
+ }
3667
+ },
3668
+ blockExplorers: {
3669
+ default: {
3670
+ name: "Zircuit Explorer",
3671
+ url: "https://explorer.zircuit.com"
3672
+ }
3673
+ },
3674
+ contracts: {
3675
+ ...I.contracts,
3676
+ multicall3: {
3677
+ address: "0xcA11bde05977b3631167028862bE2a173976CA11"
3678
+ },
3679
+ l2OutputOracle: {
3680
+ [$e]: {
3681
+ address: "0x92Ef6Af472b39F1b363da45E35530c24619245A4"
3682
+ }
3683
+ },
3684
+ portal: {
3685
+ [$e]: {
3686
+ address: "0x17bfAfA932d2e23Bd9B909Fd5B4D2e2a27043fb1"
3687
+ }
3688
+ },
3689
+ l1StandardBridge: {
3690
+ [$e]: {
3691
+ address: "0x386B76D9cA5F5Fb150B6BFB35CF5379B22B26dd8"
3692
+ }
3693
+ }
3694
+ },
3695
+ testnet: !1
3696
+ });
3697
+ var y = ((e) => (e[e.Mainnet = nn.id] = "Mainnet", e[e.Holesky = Qt.id] = "Holesky", e[e.Base = Je.id] = "Base", e[e.Bsc = Jt.id] = "Bsc", e[e.Arbitrum = Zt.id] = "Arbitrum", e[e.ApeChain = Yt.id] = "ApeChain", e[e.Soneium = an.id] = "Soneium", e[e.Sepolia = on.id] = "Sepolia", e[e.OptimismSepolia = rn.id] = "OptimismSepolia", e[e.BaseSepolia = Qe.id] = "BaseSepolia", e[e.Zircuit = un.id] = "Zircuit", e[e.Berachain = Xt.id] = "Berachain", e[e.Hoodi = qt.id] = "Hoodi", e[e.TAC = cn.id] = "TAC", e[e.Monad = sn.id] = "Monad", e[e.HyperEVM = en.id] = "HyperEVM", e[e.Linea = tn.id] = "Linea", e))(y || {});
3698
+ const Oo = {
3699
+ [y.Mainnet]: nn,
3700
+ [y.Holesky]: Qt,
3701
+ [y.Base]: Je,
3702
+ [y.Bsc]: Jt,
3703
+ [y.Arbitrum]: Zt,
3704
+ [y.ApeChain]: Yt,
3705
+ [y.Soneium]: an,
3706
+ [y.Sepolia]: on,
3707
+ [y.OptimismSepolia]: rn,
3708
+ [y.BaseSepolia]: Qe,
3709
+ [y.Zircuit]: un,
3710
+ [y.Berachain]: Xt,
3711
+ [y.Hoodi]: qt,
3712
+ [y.TAC]: cn,
3713
+ [y.Monad]: sn,
3714
+ [y.HyperEVM]: en,
3715
+ [y.Linea]: tn
3716
+ };
3717
+ export {
3718
+ Fo as $,
3719
+ oo as A,
3720
+ u as B,
3721
+ y as C,
3722
+ xs as D,
3723
+ _ as E,
3724
+ fo as F,
3725
+ Ne as G,
3726
+ Et as H,
3727
+ En as I,
3728
+ ae as J,
3729
+ pe as K,
3730
+ K as L,
3731
+ he as M,
3732
+ po as N,
3733
+ ho as O,
3734
+ ur as P,
3735
+ ln as Q,
3736
+ Kr as R,
3737
+ Yr as S,
3738
+ Zr as T,
3739
+ no as U,
3740
+ Oo as V,
3741
+ rs as W,
3742
+ Tt as X,
3743
+ zo as Y,
3744
+ ht as Z,
3745
+ Co as _,
3746
+ Oe as a,
3747
+ Ao as a$,
3748
+ Io as a0,
3749
+ je as a1,
3750
+ g as a2,
3751
+ ie as a3,
3752
+ H as a4,
3753
+ M as a5,
3754
+ me as a6,
3755
+ T as a7,
3756
+ Gt as a8,
3757
+ Ks as a9,
3758
+ Xr as aA,
3759
+ Jr as aB,
3760
+ So as aC,
3761
+ Lo as aD,
3762
+ ko as aE,
3763
+ Er as aF,
3764
+ Mo as aG,
3765
+ Uo as aH,
3766
+ vr as aI,
3767
+ Go as aJ,
3768
+ Ar as aK,
3769
+ B as aL,
3770
+ as as aM,
3771
+ bo as aN,
3772
+ Pr as aO,
3773
+ gt as aP,
3774
+ cs as aQ,
3775
+ mo as aR,
3776
+ io as aS,
3777
+ qn as aT,
3778
+ ee as aU,
3779
+ Eo as aV,
3780
+ vo as aW,
3781
+ fn as aX,
3782
+ Rs as aY,
3783
+ lo as aZ,
3784
+ Po as a_,
3785
+ Ht as aa,
3786
+ v as ab,
3787
+ A as ac,
3788
+ go as ad,
3789
+ xo as ae,
3790
+ uo as af,
3791
+ tr as ag,
3792
+ wo as ah,
3793
+ Qs as ai,
3794
+ Ve as aj,
3795
+ Ys as ak,
3796
+ Ye as al,
3797
+ Xs as am,
3798
+ Ft as an,
3799
+ Dt as ao,
3800
+ hr as ap,
3801
+ _t as aq,
3802
+ gr as ar,
3803
+ xr as as,
3804
+ eo as at,
3805
+ to as au,
3806
+ co as av,
3807
+ pn as aw,
3808
+ Es as ax,
3809
+ ao as ay,
3810
+ wr as az,
3811
+ E as b,
3812
+ Bs as c,
3813
+ Ls as d,
3814
+ Ms as e,
3815
+ Y as f,
3816
+ To as g,
3817
+ N as h,
3818
+ yo as i,
3819
+ $o as j,
3820
+ Bo as k,
3821
+ Z as l,
3822
+ ce as m,
3823
+ f as n,
3824
+ St as o,
3825
+ U as p,
3826
+ W as q,
3827
+ Ts as r,
3828
+ xt as s,
3829
+ R as t,
3830
+ ys as u,
3831
+ qr as v,
3832
+ Qr as w,
3833
+ J as x,
3834
+ so as y,
3835
+ ro as z
3836
+ };
3837
+ //# sourceMappingURL=constants-C-rrOSfg.js.map