@zoralabs/protocol-deployments 0.5.4 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -20,18 +20,18 @@ var __copyProps = (to, from, except, desc) => {
20
20
  };
21
21
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
22
 
23
- // ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/regex.js
23
+ // ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.8.3_zod@3.24.1/node_modules/abitype/dist/esm/regex.js
24
24
  function execTyped(regex, string) {
25
25
  const match = regex.exec(string);
26
26
  return match?.groups;
27
27
  }
28
28
  var init_regex = __esm({
29
- "../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/regex.js"() {
29
+ "../../node_modules/.pnpm/abitype@1.0.7_typescript@5.8.3_zod@3.24.1/node_modules/abitype/dist/esm/regex.js"() {
30
30
  "use strict";
31
31
  }
32
32
  });
33
33
 
34
- // ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js
34
+ // ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.8.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js
35
35
  function formatAbiParameter(abiParameter) {
36
36
  let type = abiParameter.type;
37
37
  if (tupleRegex.test(abiParameter.type) && "components" in abiParameter) {
@@ -58,14 +58,14 @@ function formatAbiParameter(abiParameter) {
58
58
  }
59
59
  var tupleRegex;
60
60
  var init_formatAbiParameter = __esm({
61
- "../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js"() {
61
+ "../../node_modules/.pnpm/abitype@1.0.7_typescript@5.8.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js"() {
62
62
  "use strict";
63
63
  init_regex();
64
64
  tupleRegex = /^tuple(?<array>(\[(\d*)\])*)$/;
65
65
  }
66
66
  });
67
67
 
68
- // ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js
68
+ // ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.8.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js
69
69
  function formatAbiParameters(abiParameters) {
70
70
  let params = "";
71
71
  const length = abiParameters.length;
@@ -78,13 +78,13 @@ function formatAbiParameters(abiParameters) {
78
78
  return params;
79
79
  }
80
80
  var init_formatAbiParameters = __esm({
81
- "../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js"() {
81
+ "../../node_modules/.pnpm/abitype@1.0.7_typescript@5.8.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js"() {
82
82
  "use strict";
83
83
  init_formatAbiParameter();
84
84
  }
85
85
  });
86
86
 
87
- // ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js
87
+ // ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.8.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js
88
88
  function formatAbiItem(abiItem) {
89
89
  if (abiItem.type === "function")
90
90
  return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== "nonpayable" ? ` ${abiItem.stateMutability}` : ""}${abiItem.outputs?.length ? ` returns (${formatAbiParameters(abiItem.outputs)})` : ""}`;
@@ -99,21 +99,21 @@ function formatAbiItem(abiItem) {
99
99
  return "receive() external payable";
100
100
  }
101
101
  var init_formatAbiItem = __esm({
102
- "../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js"() {
102
+ "../../node_modules/.pnpm/abitype@1.0.7_typescript@5.8.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js"() {
103
103
  "use strict";
104
104
  init_formatAbiParameters();
105
105
  }
106
106
  });
107
107
 
108
- // ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/exports/index.js
108
+ // ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.8.3_zod@3.24.1/node_modules/abitype/dist/esm/exports/index.js
109
109
  var init_exports = __esm({
110
- "../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/exports/index.js"() {
110
+ "../../node_modules/.pnpm/abitype@1.0.7_typescript@5.8.3_zod@3.24.1/node_modules/abitype/dist/esm/exports/index.js"() {
111
111
  "use strict";
112
112
  init_formatAbiItem();
113
113
  }
114
114
  });
115
115
 
116
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/formatAbiItem.js
116
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/formatAbiItem.js
117
117
  function formatAbiItem2(abiItem, { includeName = false } = {}) {
118
118
  if (abiItem.type !== "function" && abiItem.type !== "event" && abiItem.type !== "error")
119
119
  throw new InvalidDefinitionTypeError(abiItem.type);
@@ -131,13 +131,13 @@ function formatAbiParam(param, { includeName }) {
131
131
  return param.type + (includeName && param.name ? ` ${param.name}` : "");
132
132
  }
133
133
  var init_formatAbiItem2 = __esm({
134
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/formatAbiItem.js"() {
134
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/formatAbiItem.js"() {
135
135
  "use strict";
136
136
  init_abi();
137
137
  }
138
138
  });
139
139
 
140
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/isHex.js
140
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/isHex.js
141
141
  function isHex(value, { strict = true } = {}) {
142
142
  if (!value)
143
143
  return false;
@@ -146,34 +146,34 @@ function isHex(value, { strict = true } = {}) {
146
146
  return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith("0x");
147
147
  }
148
148
  var init_isHex = __esm({
149
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/isHex.js"() {
149
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/isHex.js"() {
150
150
  "use strict";
151
151
  }
152
152
  });
153
153
 
154
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/size.js
154
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/size.js
155
155
  function size(value) {
156
156
  if (isHex(value, { strict: false }))
157
157
  return Math.ceil((value.length - 2) / 2);
158
158
  return value.length;
159
159
  }
160
160
  var init_size = __esm({
161
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/size.js"() {
161
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/size.js"() {
162
162
  "use strict";
163
163
  init_isHex();
164
164
  }
165
165
  });
166
166
 
167
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/version.js
167
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/version.js
168
168
  var version;
169
169
  var init_version = __esm({
170
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/version.js"() {
170
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/version.js"() {
171
171
  "use strict";
172
172
  version = "2.22.12";
173
173
  }
174
174
  });
175
175
 
176
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/base.js
176
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/base.js
177
177
  function walk(err, fn) {
178
178
  if (fn?.(err))
179
179
  return err;
@@ -183,11 +183,11 @@ function walk(err, fn) {
183
183
  }
184
184
  var errorConfig, BaseError;
185
185
  var init_base = __esm({
186
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/base.js"() {
186
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/base.js"() {
187
187
  "use strict";
188
188
  init_version();
189
189
  errorConfig = {
190
- getDocsUrl: ({ docsBaseUrl, docsPath = "", docsSlug }) => docsPath ? `${docsBaseUrl ?? "https://viem.sh"}${docsPath}${docsSlug ? `#${docsSlug}` : ""}` : void 0,
190
+ getDocsUrl: ({ docsBaseUrl, docsPath: docsPath2 = "", docsSlug }) => docsPath2 ? `${docsBaseUrl ?? "https://viem.sh"}${docsPath2}${docsSlug ? `#${docsSlug}` : ""}` : void 0,
191
191
  version: `viem@${version}`
192
192
  };
193
193
  BaseError = class _BaseError extends Error {
@@ -199,12 +199,12 @@ var init_base = __esm({
199
199
  return args.cause.message;
200
200
  return args.details;
201
201
  })();
202
- const docsPath = (() => {
202
+ const docsPath2 = (() => {
203
203
  if (args.cause instanceof _BaseError)
204
204
  return args.cause.docsPath || args.docsPath;
205
205
  return args.docsPath;
206
206
  })();
207
- const docsUrl = errorConfig.getDocsUrl?.({ ...args, docsPath });
207
+ const docsUrl = errorConfig.getDocsUrl?.({ ...args, docsPath: docsPath2 });
208
208
  const message = [
209
209
  shortMessage || "An error occurred.",
210
210
  "",
@@ -251,7 +251,7 @@ var init_base = __esm({
251
251
  value: "BaseError"
252
252
  });
253
253
  this.details = details;
254
- this.docsPath = docsPath;
254
+ this.docsPath = docsPath2;
255
255
  this.metaMessages = args.metaMessages;
256
256
  this.name = args.name ?? this.name;
257
257
  this.shortMessage = shortMessage;
@@ -264,14 +264,53 @@ var init_base = __esm({
264
264
  }
265
265
  });
266
266
 
267
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/abi.js
268
- var AbiEncodingArrayLengthMismatchError, AbiEncodingBytesSizeMismatchError, AbiEncodingLengthMismatchError, AbiItemAmbiguityError, InvalidAbiEncodingTypeError, InvalidArrayError, InvalidDefinitionTypeError;
267
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/abi.js
268
+ var AbiDecodingDataSizeTooSmallError, AbiDecodingZeroDataError, AbiEncodingArrayLengthMismatchError, AbiEncodingBytesSizeMismatchError, AbiEncodingLengthMismatchError, AbiFunctionNotFoundError, AbiItemAmbiguityError, InvalidAbiEncodingTypeError, InvalidAbiDecodingTypeError, InvalidArrayError, InvalidDefinitionTypeError;
269
269
  var init_abi = __esm({
270
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/abi.js"() {
270
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/abi.js"() {
271
271
  "use strict";
272
272
  init_formatAbiItem2();
273
273
  init_size();
274
274
  init_base();
275
+ AbiDecodingDataSizeTooSmallError = class extends BaseError {
276
+ constructor({ data, params, size: size2 }) {
277
+ super([`Data size of ${size2} bytes is too small for given parameters.`].join("\n"), {
278
+ metaMessages: [
279
+ `Params: (${formatAbiParams(params, { includeName: true })})`,
280
+ `Data: ${data} (${size2} bytes)`
281
+ ],
282
+ name: "AbiDecodingDataSizeTooSmallError"
283
+ });
284
+ Object.defineProperty(this, "data", {
285
+ enumerable: true,
286
+ configurable: true,
287
+ writable: true,
288
+ value: void 0
289
+ });
290
+ Object.defineProperty(this, "params", {
291
+ enumerable: true,
292
+ configurable: true,
293
+ writable: true,
294
+ value: void 0
295
+ });
296
+ Object.defineProperty(this, "size", {
297
+ enumerable: true,
298
+ configurable: true,
299
+ writable: true,
300
+ value: void 0
301
+ });
302
+ this.data = data;
303
+ this.params = params;
304
+ this.size = size2;
305
+ }
306
+ };
307
+ AbiDecodingZeroDataError = class extends BaseError {
308
+ constructor() {
309
+ super('Cannot decode zero data ("0x") with ABI parameters.', {
310
+ name: "AbiDecodingZeroDataError"
311
+ });
312
+ }
313
+ };
275
314
  AbiEncodingArrayLengthMismatchError = class extends BaseError {
276
315
  constructor({ expectedLength, givenLength, type }) {
277
316
  super([
@@ -295,6 +334,17 @@ var init_abi = __esm({
295
334
  ].join("\n"), { name: "AbiEncodingLengthMismatchError" });
296
335
  }
297
336
  };
337
+ AbiFunctionNotFoundError = class extends BaseError {
338
+ constructor(functionName, { docsPath: docsPath2 } = {}) {
339
+ super([
340
+ `Function ${functionName ? `"${functionName}" ` : ""}not found on ABI.`,
341
+ "Make sure you are using the correct ABI and that the function exists on it."
342
+ ].join("\n"), {
343
+ docsPath: docsPath2,
344
+ name: "AbiFunctionNotFoundError"
345
+ });
346
+ }
347
+ };
298
348
  AbiItemAmbiguityError = class extends BaseError {
299
349
  constructor(x, y) {
300
350
  super("Found ambiguous types in overloaded ABI items.", {
@@ -310,11 +360,19 @@ var init_abi = __esm({
310
360
  }
311
361
  };
312
362
  InvalidAbiEncodingTypeError = class extends BaseError {
313
- constructor(type, { docsPath }) {
363
+ constructor(type, { docsPath: docsPath2 }) {
314
364
  super([
315
365
  `Type "${type}" is not a valid encoding type.`,
316
366
  "Please provide a valid ABI type."
317
- ].join("\n"), { docsPath, name: "InvalidAbiEncodingType" });
367
+ ].join("\n"), { docsPath: docsPath2, name: "InvalidAbiEncodingType" });
368
+ }
369
+ };
370
+ InvalidAbiDecodingTypeError = class extends BaseError {
371
+ constructor(type, { docsPath: docsPath2 }) {
372
+ super([
373
+ `Type "${type}" is not a valid decoding type.`,
374
+ "Please provide a valid ABI type."
375
+ ].join("\n"), { docsPath: docsPath2, name: "InvalidAbiDecodingType" });
318
376
  }
319
377
  };
320
378
  InvalidArrayError = class extends BaseError {
@@ -335,10 +393,10 @@ var init_abi = __esm({
335
393
  }
336
394
  });
337
395
 
338
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/data.js
396
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/data.js
339
397
  var SliceOffsetOutOfBoundsError, SizeExceedsPaddingSizeError;
340
398
  var init_data = __esm({
341
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/data.js"() {
399
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/data.js"() {
342
400
  "use strict";
343
401
  init_base();
344
402
  SliceOffsetOutOfBoundsError = class extends BaseError {
@@ -354,7 +412,7 @@ var init_data = __esm({
354
412
  }
355
413
  });
356
414
 
357
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/pad.js
415
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/pad.js
358
416
  function pad(hexOrBytes, { dir, size: size2 = 32 } = {}) {
359
417
  if (typeof hexOrBytes === "string")
360
418
  return padHex(hexOrBytes, { dir, size: size2 });
@@ -389,16 +447,16 @@ function padBytes(bytes, { dir, size: size2 = 32 } = {}) {
389
447
  return paddedBytes;
390
448
  }
391
449
  var init_pad = __esm({
392
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/pad.js"() {
450
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/pad.js"() {
393
451
  "use strict";
394
452
  init_data();
395
453
  }
396
454
  });
397
455
 
398
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/encoding.js
399
- var IntegerOutOfRangeError, SizeOverflowError;
456
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/encoding.js
457
+ var IntegerOutOfRangeError, InvalidBytesBooleanError, SizeOverflowError;
400
458
  var init_encoding = __esm({
401
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/encoding.js"() {
459
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/encoding.js"() {
402
460
  "use strict";
403
461
  init_base();
404
462
  IntegerOutOfRangeError = class extends BaseError {
@@ -406,6 +464,13 @@ var init_encoding = __esm({
406
464
  super(`Number "${value}" is not in safe ${size2 ? `${size2 * 8}-bit ${signed ? "signed" : "unsigned"} ` : ""}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: "IntegerOutOfRangeError" });
407
465
  }
408
466
  };
467
+ InvalidBytesBooleanError = class extends BaseError {
468
+ constructor(bytes) {
469
+ super(`Bytes value "${bytes}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
470
+ name: "InvalidBytesBooleanError"
471
+ });
472
+ }
473
+ };
409
474
  SizeOverflowError = class extends BaseError {
410
475
  constructor({ givenSize, maxSize }) {
411
476
  super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`, { name: "SizeOverflowError" });
@@ -414,7 +479,31 @@ var init_encoding = __esm({
414
479
  }
415
480
  });
416
481
 
417
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/fromHex.js
482
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/trim.js
483
+ function trim(hexOrBytes, { dir = "left" } = {}) {
484
+ let data = typeof hexOrBytes === "string" ? hexOrBytes.replace("0x", "") : hexOrBytes;
485
+ let sliceLength = 0;
486
+ for (let i = 0; i < data.length - 1; i++) {
487
+ if (data[dir === "left" ? i : data.length - i - 1].toString() === "0")
488
+ sliceLength++;
489
+ else
490
+ break;
491
+ }
492
+ data = dir === "left" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);
493
+ if (typeof hexOrBytes === "string") {
494
+ if (data.length === 1 && dir === "right")
495
+ data = `${data}0`;
496
+ return `0x${data.length % 2 === 1 ? `0${data}` : data}`;
497
+ }
498
+ return data;
499
+ }
500
+ var init_trim = __esm({
501
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/trim.js"() {
502
+ "use strict";
503
+ }
504
+ });
505
+
506
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/fromHex.js
418
507
  function assertSize(hexOrBytes, { size: size2 }) {
419
508
  if (size(hexOrBytes) > size2)
420
509
  throw new SizeOverflowError({
@@ -422,15 +511,31 @@ function assertSize(hexOrBytes, { size: size2 }) {
422
511
  maxSize: size2
423
512
  });
424
513
  }
514
+ function hexToBigInt(hex, opts = {}) {
515
+ const { signed } = opts;
516
+ if (opts.size)
517
+ assertSize(hex, { size: opts.size });
518
+ const value = BigInt(hex);
519
+ if (!signed)
520
+ return value;
521
+ const size2 = (hex.length - 2) / 2;
522
+ const max = (1n << BigInt(size2) * 8n - 1n) - 1n;
523
+ if (value <= max)
524
+ return value;
525
+ return value - BigInt(`0x${"f".padStart(size2 * 2, "f")}`) - 1n;
526
+ }
527
+ function hexToNumber(hex, opts = {}) {
528
+ return Number(hexToBigInt(hex, opts));
529
+ }
425
530
  var init_fromHex = __esm({
426
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/fromHex.js"() {
531
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/fromHex.js"() {
427
532
  "use strict";
428
533
  init_encoding();
429
534
  init_size();
430
535
  }
431
536
  });
432
537
 
433
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/toHex.js
538
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/toHex.js
434
539
  function toHex(value, opts = {}) {
435
540
  if (typeof value === "number" || typeof value === "bigint")
436
541
  return numberToHex(value, opts);
@@ -495,7 +600,7 @@ function stringToHex(value_, opts = {}) {
495
600
  }
496
601
  var hexes, encoder;
497
602
  var init_toHex = __esm({
498
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/toHex.js"() {
603
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/toHex.js"() {
499
604
  "use strict";
500
605
  init_encoding();
501
606
  init_pad();
@@ -505,7 +610,7 @@ var init_toHex = __esm({
505
610
  }
506
611
  });
507
612
 
508
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/toBytes.js
613
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/toBytes.js
509
614
  function toBytes(value, opts = {}) {
510
615
  if (typeof value === "number" || typeof value === "bigint")
511
616
  return numberToBytes(value, opts);
@@ -568,7 +673,7 @@ function stringToBytes(value, opts = {}) {
568
673
  }
569
674
  var encoder2, charCodeMap;
570
675
  var init_toBytes = __esm({
571
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/toBytes.js"() {
676
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/toBytes.js"() {
572
677
  "use strict";
573
678
  init_base();
574
679
  init_isHex();
@@ -893,7 +998,7 @@ var init_sha3 = __esm({
893
998
  }
894
999
  });
895
1000
 
896
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/keccak256.js
1001
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/keccak256.js
897
1002
  function keccak256(value, to_) {
898
1003
  const to = to_ || "hex";
899
1004
  const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);
@@ -902,7 +1007,7 @@ function keccak256(value, to_) {
902
1007
  return toHex(bytes);
903
1008
  }
904
1009
  var init_keccak256 = __esm({
905
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/keccak256.js"() {
1010
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/keccak256.js"() {
906
1011
  "use strict";
907
1012
  init_sha3();
908
1013
  init_isHex();
@@ -911,13 +1016,13 @@ var init_keccak256 = __esm({
911
1016
  }
912
1017
  });
913
1018
 
914
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/hashSignature.js
1019
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/hashSignature.js
915
1020
  function hashSignature(sig) {
916
1021
  return hash(sig);
917
1022
  }
918
1023
  var hash;
919
1024
  var init_hashSignature = __esm({
920
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/hashSignature.js"() {
1025
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/hashSignature.js"() {
921
1026
  "use strict";
922
1027
  init_toBytes();
923
1028
  init_keccak256();
@@ -925,7 +1030,7 @@ var init_hashSignature = __esm({
925
1030
  }
926
1031
  });
927
1032
 
928
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/normalizeSignature.js
1033
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/normalizeSignature.js
929
1034
  function normalizeSignature(signature) {
930
1035
  let active = true;
931
1036
  let current = "";
@@ -969,16 +1074,16 @@ function normalizeSignature(signature) {
969
1074
  return result;
970
1075
  }
971
1076
  var init_normalizeSignature = __esm({
972
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/normalizeSignature.js"() {
1077
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/normalizeSignature.js"() {
973
1078
  "use strict";
974
1079
  init_base();
975
1080
  }
976
1081
  });
977
1082
 
978
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toSignature.js
1083
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toSignature.js
979
1084
  var toSignature;
980
1085
  var init_toSignature = __esm({
981
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toSignature.js"() {
1086
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toSignature.js"() {
982
1087
  "use strict";
983
1088
  init_exports();
984
1089
  init_normalizeSignature();
@@ -993,32 +1098,32 @@ var init_toSignature = __esm({
993
1098
  }
994
1099
  });
995
1100
 
996
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toSignatureHash.js
1101
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toSignatureHash.js
997
1102
  function toSignatureHash(fn) {
998
1103
  return hashSignature(toSignature(fn));
999
1104
  }
1000
1105
  var init_toSignatureHash = __esm({
1001
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toSignatureHash.js"() {
1106
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toSignatureHash.js"() {
1002
1107
  "use strict";
1003
1108
  init_hashSignature();
1004
1109
  init_toSignature();
1005
1110
  }
1006
1111
  });
1007
1112
 
1008
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toEventSelector.js
1113
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toEventSelector.js
1009
1114
  var toEventSelector;
1010
1115
  var init_toEventSelector = __esm({
1011
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toEventSelector.js"() {
1116
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toEventSelector.js"() {
1012
1117
  "use strict";
1013
1118
  init_toSignatureHash();
1014
1119
  toEventSelector = toSignatureHash;
1015
1120
  }
1016
1121
  });
1017
1122
 
1018
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/address.js
1123
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/address.js
1019
1124
  var InvalidAddressError;
1020
1125
  var init_address = __esm({
1021
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/address.js"() {
1126
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/address.js"() {
1022
1127
  "use strict";
1023
1128
  init_base();
1024
1129
  InvalidAddressError = class extends BaseError {
@@ -1035,10 +1140,10 @@ var init_address = __esm({
1035
1140
  }
1036
1141
  });
1037
1142
 
1038
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/lru.js
1143
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/lru.js
1039
1144
  var LruMap;
1040
1145
  var init_lru = __esm({
1041
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/lru.js"() {
1146
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/lru.js"() {
1042
1147
  "use strict";
1043
1148
  LruMap = class extends Map {
1044
1149
  constructor(size2) {
@@ -1072,7 +1177,7 @@ var init_lru = __esm({
1072
1177
  }
1073
1178
  });
1074
1179
 
1075
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/address/getAddress.js
1180
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/address/getAddress.js
1076
1181
  function checksumAddress(address_, chainId) {
1077
1182
  if (checksumAddressCache.has(`${address_}.${chainId}`))
1078
1183
  return checksumAddressCache.get(`${address_}.${chainId}`);
@@ -1093,7 +1198,7 @@ function checksumAddress(address_, chainId) {
1093
1198
  }
1094
1199
  var checksumAddressCache;
1095
1200
  var init_getAddress = __esm({
1096
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/address/getAddress.js"() {
1201
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/address/getAddress.js"() {
1097
1202
  "use strict";
1098
1203
  init_toBytes();
1099
1204
  init_keccak256();
@@ -1102,7 +1207,7 @@ var init_getAddress = __esm({
1102
1207
  }
1103
1208
  });
1104
1209
 
1105
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/address/isAddress.js
1210
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/address/isAddress.js
1106
1211
  function isAddress(address, options) {
1107
1212
  const { strict = true } = options ?? {};
1108
1213
  const cacheKey = `${address}.${strict}`;
@@ -1122,7 +1227,7 @@ function isAddress(address, options) {
1122
1227
  }
1123
1228
  var addressRegex, isAddressCache;
1124
1229
  var init_isAddress = __esm({
1125
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/address/isAddress.js"() {
1230
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/address/isAddress.js"() {
1126
1231
  "use strict";
1127
1232
  init_lru();
1128
1233
  init_getAddress();
@@ -1131,7 +1236,7 @@ var init_isAddress = __esm({
1131
1236
  }
1132
1237
  });
1133
1238
 
1134
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/concat.js
1239
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/concat.js
1135
1240
  function concat(values) {
1136
1241
  if (typeof values[0] === "string")
1137
1242
  return concatHex(values);
@@ -1154,12 +1259,12 @@ function concatHex(values) {
1154
1259
  return `0x${values.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
1155
1260
  }
1156
1261
  var init_concat = __esm({
1157
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/concat.js"() {
1262
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/concat.js"() {
1158
1263
  "use strict";
1159
1264
  }
1160
1265
  });
1161
1266
 
1162
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/slice.js
1267
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/slice.js
1163
1268
  function slice(value, start, end, { strict } = {}) {
1164
1269
  if (isHex(value, { strict: false }))
1165
1270
  return sliceHex(value, start, end, {
@@ -1201,7 +1306,7 @@ function sliceHex(value_, start, end, { strict } = {}) {
1201
1306
  return value;
1202
1307
  }
1203
1308
  var init_slice = __esm({
1204
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/slice.js"() {
1309
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/slice.js"() {
1205
1310
  "use strict";
1206
1311
  init_data();
1207
1312
  init_isHex();
@@ -1209,16 +1314,16 @@ var init_slice = __esm({
1209
1314
  }
1210
1315
  });
1211
1316
 
1212
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/regex.js
1317
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/regex.js
1213
1318
  var integerRegex;
1214
1319
  var init_regex2 = __esm({
1215
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/regex.js"() {
1320
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/regex.js"() {
1216
1321
  "use strict";
1217
1322
  integerRegex = /^(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)?$/;
1218
1323
  }
1219
1324
  });
1220
1325
 
1221
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
1326
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
1222
1327
  function encodeAbiParameters(params, values) {
1223
1328
  if (params.length !== values.length)
1224
1329
  throw new AbiEncodingLengthMismatchError({
@@ -1432,7 +1537,7 @@ function getArrayComponents(type) {
1432
1537
  ) : void 0;
1433
1538
  }
1434
1539
  var init_encodeAbiParameters = __esm({
1435
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js"() {
1540
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js"() {
1436
1541
  "use strict";
1437
1542
  init_abi();
1438
1543
  init_address();
@@ -1448,10 +1553,10 @@ var init_encodeAbiParameters = __esm({
1448
1553
  }
1449
1554
  });
1450
1555
 
1451
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toFunctionSelector.js
1556
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toFunctionSelector.js
1452
1557
  var toFunctionSelector;
1453
1558
  var init_toFunctionSelector = __esm({
1454
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toFunctionSelector.js"() {
1559
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toFunctionSelector.js"() {
1455
1560
  "use strict";
1456
1561
  init_slice();
1457
1562
  init_toSignatureHash();
@@ -1459,7 +1564,7 @@ var init_toFunctionSelector = __esm({
1459
1564
  }
1460
1565
  });
1461
1566
 
1462
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/getAbiItem.js
1567
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/getAbiItem.js
1463
1568
  function getAbiItem(parameters) {
1464
1569
  const { abi, args = [], name } = parameters;
1465
1570
  const isSelector = isHex(name, { strict: false });
@@ -1571,7 +1676,7 @@ function getAmbiguousTypes(sourceParameters, targetParameters, args) {
1571
1676
  return;
1572
1677
  }
1573
1678
  var init_getAbiItem = __esm({
1574
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/getAbiItem.js"() {
1679
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/getAbiItem.js"() {
1575
1680
  "use strict";
1576
1681
  init_abi();
1577
1682
  init_isHex();
@@ -1581,10 +1686,511 @@ var init_getAbiItem = __esm({
1581
1686
  }
1582
1687
  });
1583
1688
 
1584
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/unit.js
1689
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js
1690
+ function prepareEncodeFunctionData(parameters) {
1691
+ const { abi, args, functionName } = parameters;
1692
+ let abiItem = abi[0];
1693
+ if (functionName) {
1694
+ const item = getAbiItem({
1695
+ abi,
1696
+ args,
1697
+ name: functionName
1698
+ });
1699
+ if (!item)
1700
+ throw new AbiFunctionNotFoundError(functionName, { docsPath });
1701
+ abiItem = item;
1702
+ }
1703
+ if (abiItem.type !== "function")
1704
+ throw new AbiFunctionNotFoundError(void 0, { docsPath });
1705
+ return {
1706
+ abi: [abiItem],
1707
+ functionName: toFunctionSelector(formatAbiItem2(abiItem))
1708
+ };
1709
+ }
1710
+ var docsPath;
1711
+ var init_prepareEncodeFunctionData = __esm({
1712
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js"() {
1713
+ "use strict";
1714
+ init_abi();
1715
+ init_toFunctionSelector();
1716
+ init_formatAbiItem2();
1717
+ init_getAbiItem();
1718
+ docsPath = "/docs/contract/encodeFunctionData";
1719
+ }
1720
+ });
1721
+
1722
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/encodeFunctionData.js
1723
+ function encodeFunctionData(parameters) {
1724
+ const { args } = parameters;
1725
+ const { abi, functionName } = (() => {
1726
+ if (parameters.abi.length === 1 && parameters.functionName?.startsWith("0x"))
1727
+ return parameters;
1728
+ return prepareEncodeFunctionData(parameters);
1729
+ })();
1730
+ const abiItem = abi[0];
1731
+ const signature = functionName;
1732
+ const data = "inputs" in abiItem && abiItem.inputs ? encodeAbiParameters(abiItem.inputs, args ?? []) : void 0;
1733
+ return concatHex([signature, data ?? "0x"]);
1734
+ }
1735
+ var init_encodeFunctionData = __esm({
1736
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/encodeFunctionData.js"() {
1737
+ "use strict";
1738
+ init_concat();
1739
+ init_encodeAbiParameters();
1740
+ init_prepareEncodeFunctionData();
1741
+ }
1742
+ });
1743
+
1744
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/cursor.js
1745
+ var NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError;
1746
+ var init_cursor = __esm({
1747
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/cursor.js"() {
1748
+ "use strict";
1749
+ init_base();
1750
+ NegativeOffsetError = class extends BaseError {
1751
+ constructor({ offset }) {
1752
+ super(`Offset \`${offset}\` cannot be negative.`, {
1753
+ name: "NegativeOffsetError"
1754
+ });
1755
+ }
1756
+ };
1757
+ PositionOutOfBoundsError = class extends BaseError {
1758
+ constructor({ length, position }) {
1759
+ super(`Position \`${position}\` is out of bounds (\`0 < position < ${length}\`).`, { name: "PositionOutOfBoundsError" });
1760
+ }
1761
+ };
1762
+ RecursiveReadLimitExceededError = class extends BaseError {
1763
+ constructor({ count, limit }) {
1764
+ super(`Recursive read limit of \`${limit}\` exceeded (recursive read count: \`${count}\`).`, { name: "RecursiveReadLimitExceededError" });
1765
+ }
1766
+ };
1767
+ }
1768
+ });
1769
+
1770
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/cursor.js
1771
+ function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {
1772
+ const cursor = Object.create(staticCursor);
1773
+ cursor.bytes = bytes;
1774
+ cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
1775
+ cursor.positionReadCount = /* @__PURE__ */ new Map();
1776
+ cursor.recursiveReadLimit = recursiveReadLimit;
1777
+ return cursor;
1778
+ }
1779
+ var staticCursor;
1780
+ var init_cursor2 = __esm({
1781
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/cursor.js"() {
1782
+ "use strict";
1783
+ init_cursor();
1784
+ staticCursor = {
1785
+ bytes: new Uint8Array(),
1786
+ dataView: new DataView(new ArrayBuffer(0)),
1787
+ position: 0,
1788
+ positionReadCount: /* @__PURE__ */ new Map(),
1789
+ recursiveReadCount: 0,
1790
+ recursiveReadLimit: Number.POSITIVE_INFINITY,
1791
+ assertReadLimit() {
1792
+ if (this.recursiveReadCount >= this.recursiveReadLimit)
1793
+ throw new RecursiveReadLimitExceededError({
1794
+ count: this.recursiveReadCount + 1,
1795
+ limit: this.recursiveReadLimit
1796
+ });
1797
+ },
1798
+ assertPosition(position) {
1799
+ if (position < 0 || position > this.bytes.length - 1)
1800
+ throw new PositionOutOfBoundsError({
1801
+ length: this.bytes.length,
1802
+ position
1803
+ });
1804
+ },
1805
+ decrementPosition(offset) {
1806
+ if (offset < 0)
1807
+ throw new NegativeOffsetError({ offset });
1808
+ const position = this.position - offset;
1809
+ this.assertPosition(position);
1810
+ this.position = position;
1811
+ },
1812
+ getReadCount(position) {
1813
+ return this.positionReadCount.get(position || this.position) || 0;
1814
+ },
1815
+ incrementPosition(offset) {
1816
+ if (offset < 0)
1817
+ throw new NegativeOffsetError({ offset });
1818
+ const position = this.position + offset;
1819
+ this.assertPosition(position);
1820
+ this.position = position;
1821
+ },
1822
+ inspectByte(position_) {
1823
+ const position = position_ ?? this.position;
1824
+ this.assertPosition(position);
1825
+ return this.bytes[position];
1826
+ },
1827
+ inspectBytes(length, position_) {
1828
+ const position = position_ ?? this.position;
1829
+ this.assertPosition(position + length - 1);
1830
+ return this.bytes.subarray(position, position + length);
1831
+ },
1832
+ inspectUint8(position_) {
1833
+ const position = position_ ?? this.position;
1834
+ this.assertPosition(position);
1835
+ return this.bytes[position];
1836
+ },
1837
+ inspectUint16(position_) {
1838
+ const position = position_ ?? this.position;
1839
+ this.assertPosition(position + 1);
1840
+ return this.dataView.getUint16(position);
1841
+ },
1842
+ inspectUint24(position_) {
1843
+ const position = position_ ?? this.position;
1844
+ this.assertPosition(position + 2);
1845
+ return (this.dataView.getUint16(position) << 8) + this.dataView.getUint8(position + 2);
1846
+ },
1847
+ inspectUint32(position_) {
1848
+ const position = position_ ?? this.position;
1849
+ this.assertPosition(position + 3);
1850
+ return this.dataView.getUint32(position);
1851
+ },
1852
+ pushByte(byte) {
1853
+ this.assertPosition(this.position);
1854
+ this.bytes[this.position] = byte;
1855
+ this.position++;
1856
+ },
1857
+ pushBytes(bytes) {
1858
+ this.assertPosition(this.position + bytes.length - 1);
1859
+ this.bytes.set(bytes, this.position);
1860
+ this.position += bytes.length;
1861
+ },
1862
+ pushUint8(value) {
1863
+ this.assertPosition(this.position);
1864
+ this.bytes[this.position] = value;
1865
+ this.position++;
1866
+ },
1867
+ pushUint16(value) {
1868
+ this.assertPosition(this.position + 1);
1869
+ this.dataView.setUint16(this.position, value);
1870
+ this.position += 2;
1871
+ },
1872
+ pushUint24(value) {
1873
+ this.assertPosition(this.position + 2);
1874
+ this.dataView.setUint16(this.position, value >> 8);
1875
+ this.dataView.setUint8(this.position + 2, value & ~4294967040);
1876
+ this.position += 3;
1877
+ },
1878
+ pushUint32(value) {
1879
+ this.assertPosition(this.position + 3);
1880
+ this.dataView.setUint32(this.position, value);
1881
+ this.position += 4;
1882
+ },
1883
+ readByte() {
1884
+ this.assertReadLimit();
1885
+ this._touch();
1886
+ const value = this.inspectByte();
1887
+ this.position++;
1888
+ return value;
1889
+ },
1890
+ readBytes(length, size2) {
1891
+ this.assertReadLimit();
1892
+ this._touch();
1893
+ const value = this.inspectBytes(length);
1894
+ this.position += size2 ?? length;
1895
+ return value;
1896
+ },
1897
+ readUint8() {
1898
+ this.assertReadLimit();
1899
+ this._touch();
1900
+ const value = this.inspectUint8();
1901
+ this.position += 1;
1902
+ return value;
1903
+ },
1904
+ readUint16() {
1905
+ this.assertReadLimit();
1906
+ this._touch();
1907
+ const value = this.inspectUint16();
1908
+ this.position += 2;
1909
+ return value;
1910
+ },
1911
+ readUint24() {
1912
+ this.assertReadLimit();
1913
+ this._touch();
1914
+ const value = this.inspectUint24();
1915
+ this.position += 3;
1916
+ return value;
1917
+ },
1918
+ readUint32() {
1919
+ this.assertReadLimit();
1920
+ this._touch();
1921
+ const value = this.inspectUint32();
1922
+ this.position += 4;
1923
+ return value;
1924
+ },
1925
+ get remaining() {
1926
+ return this.bytes.length - this.position;
1927
+ },
1928
+ setPosition(position) {
1929
+ const oldPosition = this.position;
1930
+ this.assertPosition(position);
1931
+ this.position = position;
1932
+ return () => this.position = oldPosition;
1933
+ },
1934
+ _touch() {
1935
+ if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)
1936
+ return;
1937
+ const count = this.getReadCount();
1938
+ this.positionReadCount.set(this.position, count + 1);
1939
+ if (count > 0)
1940
+ this.recursiveReadCount++;
1941
+ }
1942
+ };
1943
+ }
1944
+ });
1945
+
1946
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/fromBytes.js
1947
+ function bytesToBigInt(bytes, opts = {}) {
1948
+ if (typeof opts.size !== "undefined")
1949
+ assertSize(bytes, { size: opts.size });
1950
+ const hex = bytesToHex(bytes, opts);
1951
+ return hexToBigInt(hex, opts);
1952
+ }
1953
+ function bytesToBool(bytes_, opts = {}) {
1954
+ let bytes = bytes_;
1955
+ if (typeof opts.size !== "undefined") {
1956
+ assertSize(bytes, { size: opts.size });
1957
+ bytes = trim(bytes);
1958
+ }
1959
+ if (bytes.length > 1 || bytes[0] > 1)
1960
+ throw new InvalidBytesBooleanError(bytes);
1961
+ return Boolean(bytes[0]);
1962
+ }
1963
+ function bytesToNumber(bytes, opts = {}) {
1964
+ if (typeof opts.size !== "undefined")
1965
+ assertSize(bytes, { size: opts.size });
1966
+ const hex = bytesToHex(bytes, opts);
1967
+ return hexToNumber(hex, opts);
1968
+ }
1969
+ function bytesToString(bytes_, opts = {}) {
1970
+ let bytes = bytes_;
1971
+ if (typeof opts.size !== "undefined") {
1972
+ assertSize(bytes, { size: opts.size });
1973
+ bytes = trim(bytes, { dir: "right" });
1974
+ }
1975
+ return new TextDecoder().decode(bytes);
1976
+ }
1977
+ var init_fromBytes = __esm({
1978
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/fromBytes.js"() {
1979
+ "use strict";
1980
+ init_encoding();
1981
+ init_trim();
1982
+ init_fromHex();
1983
+ init_toHex();
1984
+ }
1985
+ });
1986
+
1987
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js
1988
+ function decodeAbiParameters(params, data) {
1989
+ const bytes = typeof data === "string" ? hexToBytes(data) : data;
1990
+ const cursor = createCursor(bytes);
1991
+ if (size(bytes) === 0 && params.length > 0)
1992
+ throw new AbiDecodingZeroDataError();
1993
+ if (size(data) && size(data) < 32)
1994
+ throw new AbiDecodingDataSizeTooSmallError({
1995
+ data: typeof data === "string" ? data : bytesToHex(data),
1996
+ params,
1997
+ size: size(data)
1998
+ });
1999
+ let consumed = 0;
2000
+ const values = [];
2001
+ for (let i = 0; i < params.length; ++i) {
2002
+ const param = params[i];
2003
+ cursor.setPosition(consumed);
2004
+ const [data2, consumed_] = decodeParameter(cursor, param, {
2005
+ staticPosition: 0
2006
+ });
2007
+ consumed += consumed_;
2008
+ values.push(data2);
2009
+ }
2010
+ return values;
2011
+ }
2012
+ function decodeParameter(cursor, param, { staticPosition }) {
2013
+ const arrayComponents = getArrayComponents(param.type);
2014
+ if (arrayComponents) {
2015
+ const [length, type] = arrayComponents;
2016
+ return decodeArray(cursor, { ...param, type }, { length, staticPosition });
2017
+ }
2018
+ if (param.type === "tuple")
2019
+ return decodeTuple(cursor, param, { staticPosition });
2020
+ if (param.type === "address")
2021
+ return decodeAddress(cursor);
2022
+ if (param.type === "bool")
2023
+ return decodeBool(cursor);
2024
+ if (param.type.startsWith("bytes"))
2025
+ return decodeBytes(cursor, param, { staticPosition });
2026
+ if (param.type.startsWith("uint") || param.type.startsWith("int"))
2027
+ return decodeNumber(cursor, param);
2028
+ if (param.type === "string")
2029
+ return decodeString(cursor, { staticPosition });
2030
+ throw new InvalidAbiDecodingTypeError(param.type, {
2031
+ docsPath: "/docs/contract/decodeAbiParameters"
2032
+ });
2033
+ }
2034
+ function decodeAddress(cursor) {
2035
+ const value = cursor.readBytes(32);
2036
+ return [checksumAddress(bytesToHex(sliceBytes(value, -20))), 32];
2037
+ }
2038
+ function decodeArray(cursor, param, { length, staticPosition }) {
2039
+ if (!length) {
2040
+ const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));
2041
+ const start = staticPosition + offset;
2042
+ const startOfData = start + sizeOfLength;
2043
+ cursor.setPosition(start);
2044
+ const length2 = bytesToNumber(cursor.readBytes(sizeOfLength));
2045
+ const dynamicChild = hasDynamicChild(param);
2046
+ let consumed2 = 0;
2047
+ const value2 = [];
2048
+ for (let i = 0; i < length2; ++i) {
2049
+ cursor.setPosition(startOfData + (dynamicChild ? i * 32 : consumed2));
2050
+ const [data, consumed_] = decodeParameter(cursor, param, {
2051
+ staticPosition: startOfData
2052
+ });
2053
+ consumed2 += consumed_;
2054
+ value2.push(data);
2055
+ }
2056
+ cursor.setPosition(staticPosition + 32);
2057
+ return [value2, 32];
2058
+ }
2059
+ if (hasDynamicChild(param)) {
2060
+ const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));
2061
+ const start = staticPosition + offset;
2062
+ const value2 = [];
2063
+ for (let i = 0; i < length; ++i) {
2064
+ cursor.setPosition(start + i * 32);
2065
+ const [data] = decodeParameter(cursor, param, {
2066
+ staticPosition: start
2067
+ });
2068
+ value2.push(data);
2069
+ }
2070
+ cursor.setPosition(staticPosition + 32);
2071
+ return [value2, 32];
2072
+ }
2073
+ let consumed = 0;
2074
+ const value = [];
2075
+ for (let i = 0; i < length; ++i) {
2076
+ const [data, consumed_] = decodeParameter(cursor, param, {
2077
+ staticPosition: staticPosition + consumed
2078
+ });
2079
+ consumed += consumed_;
2080
+ value.push(data);
2081
+ }
2082
+ return [value, consumed];
2083
+ }
2084
+ function decodeBool(cursor) {
2085
+ return [bytesToBool(cursor.readBytes(32), { size: 32 }), 32];
2086
+ }
2087
+ function decodeBytes(cursor, param, { staticPosition }) {
2088
+ const [_, size2] = param.type.split("bytes");
2089
+ if (!size2) {
2090
+ const offset = bytesToNumber(cursor.readBytes(32));
2091
+ cursor.setPosition(staticPosition + offset);
2092
+ const length = bytesToNumber(cursor.readBytes(32));
2093
+ if (length === 0) {
2094
+ cursor.setPosition(staticPosition + 32);
2095
+ return ["0x", 32];
2096
+ }
2097
+ const data = cursor.readBytes(length);
2098
+ cursor.setPosition(staticPosition + 32);
2099
+ return [bytesToHex(data), 32];
2100
+ }
2101
+ const value = bytesToHex(cursor.readBytes(Number.parseInt(size2), 32));
2102
+ return [value, 32];
2103
+ }
2104
+ function decodeNumber(cursor, param) {
2105
+ const signed = param.type.startsWith("int");
2106
+ const size2 = Number.parseInt(param.type.split("int")[1] || "256");
2107
+ const value = cursor.readBytes(32);
2108
+ return [
2109
+ size2 > 48 ? bytesToBigInt(value, { signed }) : bytesToNumber(value, { signed }),
2110
+ 32
2111
+ ];
2112
+ }
2113
+ function decodeTuple(cursor, param, { staticPosition }) {
2114
+ const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name }) => !name);
2115
+ const value = hasUnnamedChild ? [] : {};
2116
+ let consumed = 0;
2117
+ if (hasDynamicChild(param)) {
2118
+ const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));
2119
+ const start = staticPosition + offset;
2120
+ for (let i = 0; i < param.components.length; ++i) {
2121
+ const component = param.components[i];
2122
+ cursor.setPosition(start + consumed);
2123
+ const [data, consumed_] = decodeParameter(cursor, component, {
2124
+ staticPosition: start
2125
+ });
2126
+ consumed += consumed_;
2127
+ value[hasUnnamedChild ? i : component?.name] = data;
2128
+ }
2129
+ cursor.setPosition(staticPosition + 32);
2130
+ return [value, 32];
2131
+ }
2132
+ for (let i = 0; i < param.components.length; ++i) {
2133
+ const component = param.components[i];
2134
+ const [data, consumed_] = decodeParameter(cursor, component, {
2135
+ staticPosition
2136
+ });
2137
+ value[hasUnnamedChild ? i : component?.name] = data;
2138
+ consumed += consumed_;
2139
+ }
2140
+ return [value, consumed];
2141
+ }
2142
+ function decodeString(cursor, { staticPosition }) {
2143
+ const offset = bytesToNumber(cursor.readBytes(32));
2144
+ const start = staticPosition + offset;
2145
+ cursor.setPosition(start);
2146
+ const length = bytesToNumber(cursor.readBytes(32));
2147
+ if (length === 0) {
2148
+ cursor.setPosition(staticPosition + 32);
2149
+ return ["", 32];
2150
+ }
2151
+ const data = cursor.readBytes(length, 32);
2152
+ const value = bytesToString(trim(data));
2153
+ cursor.setPosition(staticPosition + 32);
2154
+ return [value, 32];
2155
+ }
2156
+ function hasDynamicChild(param) {
2157
+ const { type } = param;
2158
+ if (type === "string")
2159
+ return true;
2160
+ if (type === "bytes")
2161
+ return true;
2162
+ if (type.endsWith("[]"))
2163
+ return true;
2164
+ if (type === "tuple")
2165
+ return param.components?.some(hasDynamicChild);
2166
+ const arrayComponents = getArrayComponents(param.type);
2167
+ if (arrayComponents && hasDynamicChild({ ...param, type: arrayComponents[1] }))
2168
+ return true;
2169
+ return false;
2170
+ }
2171
+ var sizeOfLength, sizeOfOffset;
2172
+ var init_decodeAbiParameters = __esm({
2173
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js"() {
2174
+ "use strict";
2175
+ init_abi();
2176
+ init_getAddress();
2177
+ init_cursor2();
2178
+ init_size();
2179
+ init_slice();
2180
+ init_trim();
2181
+ init_fromBytes();
2182
+ init_toBytes();
2183
+ init_toHex();
2184
+ init_encodeAbiParameters();
2185
+ sizeOfLength = 32;
2186
+ sizeOfOffset = 32;
2187
+ }
2188
+ });
2189
+
2190
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/unit.js
1585
2191
  var etherUnits;
1586
2192
  var init_unit = __esm({
1587
- "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/unit.js"() {
2193
+ "../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/unit.js"() {
1588
2194
  "use strict";
1589
2195
  etherUnits = {
1590
2196
  gwei: 9,
@@ -1594,9 +2200,14 @@ var init_unit = __esm({
1594
2200
  });
1595
2201
 
1596
2202
  // src/index.ts
1597
- var src_exports = {};
1598
- __export(src_exports, {
2203
+ var index_exports = {};
2204
+ __export(index_exports, {
1599
2205
  PremintConfigVersion: () => PremintConfigVersion,
2206
+ buySupplyWithSwapRouterHookABI: () => buySupplyWithSwapRouterHookABI,
2207
+ buySupplyWithSwapRouterHookAbiParameters: () => buySupplyWithSwapRouterHookAbiParameters,
2208
+ buySupplyWithSwapRouterHookAddress: () => buySupplyWithSwapRouterHookAddress,
2209
+ buySupplyWithSwapRouterHookConfig: () => buySupplyWithSwapRouterHookConfig,
2210
+ buySupplyWithSwapRouterHookReturnParameters: () => buySupplyWithSwapRouterHookReturnParameters,
1600
2211
  callerAndCommenterABI: () => callerAndCommenterABI,
1601
2212
  callerAndCommenterAddress: () => callerAndCommenterAddress,
1602
2213
  callerAndCommenterConfig: () => callerAndCommenterConfig,
@@ -1612,7 +2223,11 @@ __export(src_exports, {
1612
2223
  commentsAddress: () => commentsAddress,
1613
2224
  commentsConfig: () => commentsConfig,
1614
2225
  contracts1155: () => __exports,
2226
+ decodeBuySupplyWithSwapRouterHookReturn: () => decodeBuySupplyWithSwapRouterHookReturn,
1615
2227
  emptyCommentIdentifier: () => emptyCommentIdentifier,
2228
+ encodeBuySupplyWithMultiHopSwapRouterHookCall: () => encodeBuySupplyWithMultiHopSwapRouterHookCall,
2229
+ encodeBuySupplyWithSingleHopSwapRouterHookCall: () => encodeBuySupplyWithSingleHopSwapRouterHookCall,
2230
+ encodeBuySupplyWithSwapRouterHookCalldata: () => encodeBuySupplyWithSwapRouterHookCalldata,
1616
2231
  encodePremintConfig: () => encodePremintConfig,
1617
2232
  erc20MinterABI: () => erc20MinterABI,
1618
2233
  erc20MinterAddress: () => erc20MinterAddress,
@@ -1695,9 +2310,73 @@ __export(src_exports, {
1695
2310
  zoraTimedSaleStrategyAddress: () => zoraTimedSaleStrategyAddress,
1696
2311
  zoraTimedSaleStrategyConfig: () => zoraTimedSaleStrategyConfig
1697
2312
  });
1698
- module.exports = __toCommonJS(src_exports);
2313
+ module.exports = __toCommonJS(index_exports);
1699
2314
 
1700
2315
  // src/generated/wagmi.ts
2316
+ var buySupplyWithSwapRouterHookABI = [
2317
+ {
2318
+ type: "constructor",
2319
+ inputs: [
2320
+ {
2321
+ name: "_factory",
2322
+ internalType: "contract IZoraFactory",
2323
+ type: "address"
2324
+ },
2325
+ { name: "_swapRouter", internalType: "address", type: "address" }
2326
+ ],
2327
+ stateMutability: "nonpayable"
2328
+ },
2329
+ {
2330
+ type: "function",
2331
+ inputs: [
2332
+ { name: "sender", internalType: "address", type: "address" },
2333
+ { name: "coin", internalType: "contract ICoin", type: "address" },
2334
+ { name: "hookData", internalType: "bytes", type: "bytes" }
2335
+ ],
2336
+ name: "afterCoinDeploy",
2337
+ outputs: [{ name: "", internalType: "bytes", type: "bytes" }],
2338
+ stateMutability: "payable"
2339
+ },
2340
+ {
2341
+ type: "function",
2342
+ inputs: [],
2343
+ name: "factory",
2344
+ outputs: [
2345
+ { name: "", internalType: "contract IZoraFactory", type: "address" }
2346
+ ],
2347
+ stateMutability: "view"
2348
+ },
2349
+ {
2350
+ type: "function",
2351
+ inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }],
2352
+ name: "supportsInterface",
2353
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
2354
+ stateMutability: "pure"
2355
+ },
2356
+ { type: "error", inputs: [], name: "AddressZero" },
2357
+ {
2358
+ type: "error",
2359
+ inputs: [{ name: "balance", internalType: "uint256", type: "uint256" }],
2360
+ name: "CoinBalanceNot0"
2361
+ },
2362
+ { type: "error", inputs: [], name: "Erc20NotReceived" },
2363
+ { type: "error", inputs: [], name: "HookNotImplemented" },
2364
+ { type: "error", inputs: [], name: "InvalidSwapRouterCall" },
2365
+ { type: "error", inputs: [], name: "NotFactory" },
2366
+ {
2367
+ type: "error",
2368
+ inputs: [{ name: "error", internalType: "bytes", type: "bytes" }],
2369
+ name: "SwapReverted"
2370
+ }
2371
+ ];
2372
+ var buySupplyWithSwapRouterHookAddress = {
2373
+ 8453: "0x264b731e40691Da5B40aA63AC5c3B7F7DAafA721",
2374
+ 84532: "0x6B78be0808262b1d5E9B1eeDfE448aDCE2C637a8"
2375
+ };
2376
+ var buySupplyWithSwapRouterHookConfig = {
2377
+ address: buySupplyWithSwapRouterHookAddress,
2378
+ abi: buySupplyWithSwapRouterHookABI
2379
+ };
1701
2380
  var callerAndCommenterABI = [
1702
2381
  {
1703
2382
  type: "constructor",
@@ -2753,55 +3432,6 @@ var coinABI = [
2753
3432
  outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
2754
3433
  stateMutability: "view"
2755
3434
  },
2756
- {
2757
- type: "function",
2758
- inputs: [],
2759
- name: "MAX_TOTAL_SUPPLY",
2760
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
2761
- stateMutability: "view"
2762
- },
2763
- {
2764
- type: "function",
2765
- inputs: [],
2766
- name: "MIN_ORDER_SIZE",
2767
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
2768
- stateMutability: "view"
2769
- },
2770
- {
2771
- type: "function",
2772
- inputs: [],
2773
- name: "PLATFORM_REFERRER_FEE_BPS",
2774
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
2775
- stateMutability: "view"
2776
- },
2777
- {
2778
- type: "function",
2779
- inputs: [],
2780
- name: "PROTOCOL_FEE_BPS",
2781
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
2782
- stateMutability: "view"
2783
- },
2784
- {
2785
- type: "function",
2786
- inputs: [],
2787
- name: "TOKEN_CREATOR_FEE_BPS",
2788
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
2789
- stateMutability: "view"
2790
- },
2791
- {
2792
- type: "function",
2793
- inputs: [],
2794
- name: "TOTAL_FEE_BPS",
2795
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
2796
- stateMutability: "view"
2797
- },
2798
- {
2799
- type: "function",
2800
- inputs: [],
2801
- name: "TRADE_REFERRER_FEE_BPS",
2802
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
2803
- stateMutability: "view"
2804
- },
2805
3435
  {
2806
3436
  type: "function",
2807
3437
  inputs: [],
@@ -2954,6 +3584,20 @@ var coinABI = [
2954
3584
  outputs: [{ name: "", internalType: "bool", type: "bool" }],
2955
3585
  stateMutability: "view"
2956
3586
  },
3587
+ {
3588
+ type: "function",
3589
+ inputs: [],
3590
+ name: "market",
3591
+ outputs: [{ name: "", internalType: "bytes", type: "bytes" }],
3592
+ stateMutability: "view"
3593
+ },
3594
+ {
3595
+ type: "function",
3596
+ inputs: [],
3597
+ name: "marketVersion",
3598
+ outputs: [{ name: "", internalType: "uint8", type: "uint8" }],
3599
+ stateMutability: "view"
3600
+ },
2957
3601
  {
2958
3602
  type: "function",
2959
3603
  inputs: [],
@@ -3599,6 +4243,7 @@ var coinABI = [
3599
4243
  name: "AddressInsufficientBalance"
3600
4244
  },
3601
4245
  { type: "error", inputs: [], name: "AddressZero" },
4246
+ { type: "error", inputs: [], name: "AddressZero" },
3602
4247
  { type: "error", inputs: [], name: "AlreadyOwner" },
3603
4248
  { type: "error", inputs: [], name: "CannotMintZeroLiquidity" },
3604
4249
  {
@@ -3689,6 +4334,7 @@ var coinABI = [
3689
4334
  { type: "error", inputs: [], name: "InvalidInitialization" },
3690
4335
  { type: "error", inputs: [], name: "InvalidMarketType" },
3691
4336
  { type: "error", inputs: [], name: "InvalidPoolVersion" },
4337
+ { type: "error", inputs: [], name: "InvalidPoolVersion" },
3692
4338
  {
3693
4339
  type: "error",
3694
4340
  inputs: [
@@ -3714,7 +4360,14 @@ var coinABI = [
3714
4360
  { type: "error", inputs: [], name: "NumDiscoveryPositionsOutOfRange" },
3715
4361
  { type: "error", inputs: [], name: "OneOwnerRequired" },
3716
4362
  { type: "error", inputs: [], name: "OnlyOwner" },
3717
- { type: "error", inputs: [], name: "OnlyPool" },
4363
+ {
4364
+ type: "error",
4365
+ inputs: [
4366
+ { name: "sender", internalType: "address", type: "address" },
4367
+ { name: "pool", internalType: "address", type: "address" }
4368
+ ],
4369
+ name: "OnlyPool"
4370
+ },
3718
4371
  { type: "error", inputs: [], name: "OnlyWeth" },
3719
4372
  { type: "error", inputs: [], name: "OwnerCannotBeAddressZero" },
3720
4373
  { type: "error", inputs: [], name: "ReentrancyGuardReentrantCall" },
@@ -3746,6 +4399,20 @@ var coinFactoryABI = [
3746
4399
  outputs: [{ name: "", internalType: "address", type: "address" }],
3747
4400
  stateMutability: "view"
3748
4401
  },
4402
+ {
4403
+ type: "function",
4404
+ inputs: [],
4405
+ name: "contractName",
4406
+ outputs: [{ name: "", internalType: "string", type: "string" }],
4407
+ stateMutability: "pure"
4408
+ },
4409
+ {
4410
+ type: "function",
4411
+ inputs: [],
4412
+ name: "contractVersion",
4413
+ outputs: [{ name: "", internalType: "string", type: "string" }],
4414
+ stateMutability: "pure"
4415
+ },
3749
4416
  {
3750
4417
  type: "function",
3751
4418
  inputs: [
@@ -3785,6 +4452,26 @@ var coinFactoryABI = [
3785
4452
  ],
3786
4453
  stateMutability: "payable"
3787
4454
  },
4455
+ {
4456
+ type: "function",
4457
+ inputs: [
4458
+ { name: "payoutRecipient", internalType: "address", type: "address" },
4459
+ { name: "owners", internalType: "address[]", type: "address[]" },
4460
+ { name: "uri", internalType: "string", type: "string" },
4461
+ { name: "name", internalType: "string", type: "string" },
4462
+ { name: "symbol", internalType: "string", type: "string" },
4463
+ { name: "poolConfig", internalType: "bytes", type: "bytes" },
4464
+ { name: "platformReferrer", internalType: "address", type: "address" },
4465
+ { name: "hook", internalType: "address", type: "address" },
4466
+ { name: "hookData", internalType: "bytes", type: "bytes" }
4467
+ ],
4468
+ name: "deployWithHook",
4469
+ outputs: [
4470
+ { name: "coin", internalType: "address", type: "address" },
4471
+ { name: "hookDataOut", internalType: "bytes", type: "bytes" }
4472
+ ],
4473
+ stateMutability: "payable"
4474
+ },
3788
4475
  {
3789
4476
  type: "function",
3790
4477
  inputs: [],
@@ -3963,6 +4650,7 @@ var coinFactoryABI = [
3963
4650
  { type: "error", inputs: [], name: "ERC20TransferAmountMismatch" },
3964
4651
  { type: "error", inputs: [], name: "EthTransferInvalid" },
3965
4652
  { type: "error", inputs: [], name: "FailedInnerCall" },
4653
+ { type: "error", inputs: [], name: "InvalidHook" },
3966
4654
  { type: "error", inputs: [], name: "InvalidInitialization" },
3967
4655
  { type: "error", inputs: [], name: "NotInitializing" },
3968
4656
  {
@@ -3986,6 +4674,14 @@ var coinFactoryABI = [
3986
4674
  type: "error",
3987
4675
  inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }],
3988
4676
  name: "UUPSUnsupportedProxiableUUID"
4677
+ },
4678
+ {
4679
+ type: "error",
4680
+ inputs: [
4681
+ { name: "currentName", internalType: "string", type: "string" },
4682
+ { name: "newName", internalType: "string", type: "string" }
4683
+ ],
4684
+ name: "UpgradeToMismatchedContractName"
3989
4685
  }
3990
4686
  ];
3991
4687
  var coinFactoryAddress = {
@@ -8662,6 +9358,29 @@ var sponsoredSparksSpenderConfig = {
8662
9358
  abi: sponsoredSparksSpenderABI
8663
9359
  };
8664
9360
  var uniswapV3SwapRouterABI = [
9361
+ {
9362
+ type: "function",
9363
+ inputs: [
9364
+ {
9365
+ name: "params",
9366
+ internalType: "struct ISwapRouter.ExactInputParams",
9367
+ type: "tuple",
9368
+ components: [
9369
+ { name: "path", internalType: "bytes", type: "bytes" },
9370
+ { name: "recipient", internalType: "address", type: "address" },
9371
+ { name: "amountIn", internalType: "uint256", type: "uint256" },
9372
+ {
9373
+ name: "amountOutMinimum",
9374
+ internalType: "uint256",
9375
+ type: "uint256"
9376
+ }
9377
+ ]
9378
+ }
9379
+ ],
9380
+ name: "exactInput",
9381
+ outputs: [{ name: "amountOut", internalType: "uint256", type: "uint256" }],
9382
+ stateMutability: "payable"
9383
+ },
8665
9384
  {
8666
9385
  type: "function",
8667
9386
  inputs: [
@@ -8692,6 +9411,25 @@ var uniswapV3SwapRouterABI = [
8692
9411
  outputs: [{ name: "amountOut", internalType: "uint256", type: "uint256" }],
8693
9412
  stateMutability: "payable"
8694
9413
  },
9414
+ {
9415
+ type: "function",
9416
+ inputs: [
9417
+ {
9418
+ name: "params",
9419
+ internalType: "struct ISwapRouter.ExactOutputParams",
9420
+ type: "tuple",
9421
+ components: [
9422
+ { name: "path", internalType: "bytes", type: "bytes" },
9423
+ { name: "recipient", internalType: "address", type: "address" },
9424
+ { name: "amountOut", internalType: "uint256", type: "uint256" },
9425
+ { name: "amountInMaximum", internalType: "uint256", type: "uint256" }
9426
+ ]
9427
+ }
9428
+ ],
9429
+ name: "exactOutput",
9430
+ outputs: [{ name: "amountIn", internalType: "uint256", type: "uint256" }],
9431
+ stateMutability: "payable"
9432
+ },
8695
9433
  {
8696
9434
  type: "function",
8697
9435
  inputs: [
@@ -16894,7 +17632,7 @@ var zoraTimedSaleStrategyConfig = {
16894
17632
  abi: zoraTimedSaleStrategyABI
16895
17633
  };
16896
17634
 
16897
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/unit.js
17635
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/unit.js
16898
17636
  init_base();
16899
17637
  var InvalidDecimalNumberError = class extends BaseError {
16900
17638
  constructor({ value }) {
@@ -16904,7 +17642,7 @@ var InvalidDecimalNumberError = class extends BaseError {
16904
17642
  }
16905
17643
  };
16906
17644
 
16907
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/unit/parseUnits.js
17645
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/unit/parseUnits.js
16908
17646
  function parseUnits(value, decimals) {
16909
17647
  if (!/^(-?)([0-9]*)\.?([0-9]*)$/.test(value))
16910
17648
  throw new InvalidDecimalNumberError({ value });
@@ -16939,14 +17677,16 @@ function parseUnits(value, decimals) {
16939
17677
  return BigInt(`${negative ? "-" : ""}${integer}${fraction}`);
16940
17678
  }
16941
17679
 
16942
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/unit/parseEther.js
17680
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/unit/parseEther.js
16943
17681
  init_unit();
16944
17682
  function parseEther(ether, unit = "wei") {
16945
17683
  return parseUnits(ether, etherUnits[unit]);
16946
17684
  }
16947
17685
 
16948
- // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/index.js
17686
+ // ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/index.js
17687
+ init_decodeAbiParameters();
16949
17688
  init_encodeAbiParameters();
17689
+ init_encodeFunctionData();
16950
17690
  init_getAbiItem();
16951
17691
  init_toHex();
16952
17692
  init_keccak256();
@@ -17405,6 +18145,82 @@ var safeTransferSwapAbiParameters = [
17405
18145
  { name: "minEthToAcquire", internalType: "uint256", type: "uint256" },
17406
18146
  { name: "sqrtPriceLimitX96", internalType: "uint160", type: "uint160" }
17407
18147
  ];
18148
+ var buySupplyWithSwapRouterHookAbiParameters = [
18149
+ { name: "buyRecipient", internalType: "address", type: "address" },
18150
+ { name: "swapRouterCall", internalType: "bytes", type: "bytes" }
18151
+ ];
18152
+ var buySupplyWithSwapRouterHookReturnParameters = [
18153
+ { name: "amountCurrency", internalType: "uint256", type: "uint256" },
18154
+ { name: "coinsPurchased", internalType: "uint256", type: "uint256" }
18155
+ ];
18156
+ var encodeBuySupplyWithSwapRouterHookCalldata = (buyRecipient, swapRouterCall) => {
18157
+ return encodeAbiParameters(buySupplyWithSwapRouterHookAbiParameters, [
18158
+ buyRecipient,
18159
+ swapRouterCall
18160
+ ]);
18161
+ };
18162
+ var encodeBuySupplyWithSingleHopSwapRouterHookCall = ({
18163
+ buyRecipient,
18164
+ exactInputSingleParams,
18165
+ chainId,
18166
+ ethValue
18167
+ }) => {
18168
+ const hook = buySupplyWithSwapRouterHookAddress[chainId];
18169
+ const callToSwapRouter = encodeFunctionData({
18170
+ abi: uniswapV3SwapRouterABI,
18171
+ functionName: "exactInputSingle",
18172
+ args: [
18173
+ {
18174
+ recipient: hook,
18175
+ ...exactInputSingleParams
18176
+ }
18177
+ ]
18178
+ });
18179
+ return {
18180
+ hook,
18181
+ hookData: encodeBuySupplyWithSwapRouterHookCalldata(
18182
+ buyRecipient,
18183
+ callToSwapRouter
18184
+ ),
18185
+ value: ethValue
18186
+ };
18187
+ };
18188
+ var encodeBuySupplyWithMultiHopSwapRouterHookCall = ({
18189
+ buyRecipient,
18190
+ exactInputParams,
18191
+ chainId,
18192
+ ethValue
18193
+ }) => {
18194
+ const hook = buySupplyWithSwapRouterHookAddress[chainId];
18195
+ const callToSwapRouter = encodeFunctionData({
18196
+ abi: uniswapV3SwapRouterABI,
18197
+ functionName: "exactInput",
18198
+ args: [
18199
+ {
18200
+ recipient: hook,
18201
+ ...exactInputParams
18202
+ }
18203
+ ]
18204
+ });
18205
+ return {
18206
+ hook,
18207
+ hookData: encodeBuySupplyWithSwapRouterHookCalldata(
18208
+ buyRecipient,
18209
+ callToSwapRouter
18210
+ ),
18211
+ value: ethValue
18212
+ };
18213
+ };
18214
+ var decodeBuySupplyWithSwapRouterHookReturn = (returnData) => {
18215
+ const result = decodeAbiParameters(
18216
+ buySupplyWithSwapRouterHookReturnParameters,
18217
+ returnData
18218
+ );
18219
+ return {
18220
+ amountCurrency: result[0],
18221
+ coinsPurchased: result[1]
18222
+ };
18223
+ };
17408
18224
 
17409
18225
  // src/generated/1155.ts
17410
18226
  var __exports = {};
@@ -17803,6 +18619,11 @@ var addresses2 = {
17803
18619
  // Annotate the CommonJS export names for ESM import in node:
17804
18620
  0 && (module.exports = {
17805
18621
  PremintConfigVersion,
18622
+ buySupplyWithSwapRouterHookABI,
18623
+ buySupplyWithSwapRouterHookAbiParameters,
18624
+ buySupplyWithSwapRouterHookAddress,
18625
+ buySupplyWithSwapRouterHookConfig,
18626
+ buySupplyWithSwapRouterHookReturnParameters,
17806
18627
  callerAndCommenterABI,
17807
18628
  callerAndCommenterAddress,
17808
18629
  callerAndCommenterConfig,
@@ -17818,7 +18639,11 @@ var addresses2 = {
17818
18639
  commentsAddress,
17819
18640
  commentsConfig,
17820
18641
  contracts1155,
18642
+ decodeBuySupplyWithSwapRouterHookReturn,
17821
18643
  emptyCommentIdentifier,
18644
+ encodeBuySupplyWithMultiHopSwapRouterHookCall,
18645
+ encodeBuySupplyWithSingleHopSwapRouterHookCall,
18646
+ encodeBuySupplyWithSwapRouterHookCalldata,
17822
18647
  encodePremintConfig,
17823
18648
  erc20MinterABI,
17824
18649
  erc20MinterAddress,