@zoralabs/protocol-deployments 0.3.5-COMMENTS.0 → 0.3.5-COMMENTS.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.
package/dist/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  encodeAbiParameters,
3
+ etherUnits,
3
4
  getAbiItem,
4
5
  keccak256,
5
6
  toHex
6
- } from "./chunk-YMRS2KON.js";
7
+ } from "./chunk-IB365BT5.js";
7
8
  import "./chunk-5JV63AHR.js";
8
9
  import {
9
10
  __export
@@ -154,7 +155,19 @@ var commentsABI = [
154
155
  {
155
156
  stateMutability: "view",
156
157
  type: "function",
157
- inputs: [{ name: "commentId", internalType: "bytes32", type: "bytes32" }],
158
+ inputs: [
159
+ {
160
+ name: "commentIdentifier",
161
+ internalType: "struct IComments.CommentIdentifier",
162
+ type: "tuple",
163
+ components: [
164
+ { name: "commenter", internalType: "address", type: "address" },
165
+ { name: "contractAddress", internalType: "address", type: "address" },
166
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
167
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
168
+ ]
169
+ }
170
+ ],
158
171
  name: "commentSparksQuantity",
159
172
  outputs: [{ name: "", internalType: "uint64", type: "uint64" }]
160
173
  },
@@ -207,6 +220,21 @@ var commentsABI = [
207
220
  }
208
221
  ]
209
222
  },
223
+ {
224
+ stateMutability: "view",
225
+ type: "function",
226
+ inputs: [],
227
+ name: "eip712Domain",
228
+ outputs: [
229
+ { name: "fields", internalType: "bytes1", type: "bytes1" },
230
+ { name: "name", internalType: "string", type: "string" },
231
+ { name: "version", internalType: "string", type: "string" },
232
+ { name: "chainId", internalType: "uint256", type: "uint256" },
233
+ { name: "verifyingContract", internalType: "address", type: "address" },
234
+ { name: "salt", internalType: "bytes32", type: "bytes32" },
235
+ { name: "extensions", internalType: "uint256[]", type: "uint256[]" }
236
+ ]
237
+ },
210
238
  {
211
239
  stateMutability: "view",
212
240
  type: "function",
@@ -322,15 +350,14 @@ var commentsABI = [
322
350
  ]
323
351
  },
324
352
  { name: "text", internalType: "string", type: "string" },
325
- { name: "sparksQuantity", internalType: "uint64", type: "uint64" },
326
353
  { name: "deadline", internalType: "uint256", type: "uint256" },
327
354
  { name: "nonce", internalType: "bytes32", type: "bytes32" },
328
355
  { name: "referrer", internalType: "address", type: "address" },
329
- { name: "sourceChainId", internalType: "uint256", type: "uint256" },
356
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
330
357
  {
331
358
  name: "destinationChainId",
332
- internalType: "uint256",
333
- type: "uint256"
359
+ internalType: "uint32",
360
+ type: "uint32"
334
361
  }
335
362
  ]
336
363
  }
@@ -367,11 +394,11 @@ var commentsABI = [
367
394
  { name: "deadline", internalType: "uint256", type: "uint256" },
368
395
  { name: "nonce", internalType: "bytes32", type: "bytes32" },
369
396
  { name: "referrer", internalType: "address", type: "address" },
370
- { name: "sourceChainId", internalType: "uint256", type: "uint256" },
397
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
371
398
  {
372
399
  name: "destinationChainId",
373
- internalType: "uint256",
374
- type: "uint256"
400
+ internalType: "uint32",
401
+ type: "uint32"
375
402
  }
376
403
  ]
377
404
  }
@@ -379,6 +406,13 @@ var commentsABI = [
379
406
  name: "hashPermitSparkComment",
380
407
  outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }]
381
408
  },
409
+ {
410
+ stateMutability: "view",
411
+ type: "function",
412
+ inputs: [],
413
+ name: "implementation",
414
+ outputs: [{ name: "", internalType: "address", type: "address" }]
415
+ },
382
416
  {
383
417
  stateMutability: "nonpayable",
384
418
  type: "function",
@@ -440,15 +474,14 @@ var commentsABI = [
440
474
  ]
441
475
  },
442
476
  { name: "text", internalType: "string", type: "string" },
443
- { name: "sparksQuantity", internalType: "uint64", type: "uint64" },
444
477
  { name: "deadline", internalType: "uint256", type: "uint256" },
445
478
  { name: "nonce", internalType: "bytes32", type: "bytes32" },
446
479
  { name: "referrer", internalType: "address", type: "address" },
447
- { name: "sourceChainId", internalType: "uint256", type: "uint256" },
480
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
448
481
  {
449
482
  name: "destinationChainId",
450
- internalType: "uint256",
451
- type: "uint256"
483
+ internalType: "uint32",
484
+ type: "uint32"
452
485
  }
453
486
  ]
454
487
  },
@@ -486,11 +519,11 @@ var commentsABI = [
486
519
  { name: "deadline", internalType: "uint256", type: "uint256" },
487
520
  { name: "nonce", internalType: "bytes32", type: "bytes32" },
488
521
  { name: "referrer", internalType: "address", type: "address" },
489
- { name: "sourceChainId", internalType: "uint256", type: "uint256" },
522
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
490
523
  {
491
524
  name: "destinationChainId",
492
- internalType: "uint256",
493
- type: "uint256"
525
+ internalType: "uint32",
526
+ type: "uint32"
494
527
  }
495
528
  ]
496
529
  },
@@ -680,6 +713,7 @@ var commentsABI = [
680
713
  ],
681
714
  name: "Commented"
682
715
  },
716
+ { type: "event", anonymous: false, inputs: [], name: "EIP712DomainChanged" },
683
717
  {
684
718
  type: "event",
685
719
  anonymous: false,
@@ -11537,6 +11571,44 @@ var zoraTimedSaleStrategyConfig = {
11537
11571
  abi: zoraTimedSaleStrategyABI
11538
11572
  };
11539
11573
 
11574
+ // ../../node_modules/.pnpm/viem@2.18.0_bufferutil@4.0.8_typescript@5.5.4_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/unit/parseUnits.js
11575
+ function parseUnits(value, decimals) {
11576
+ let [integer, fraction = "0"] = value.split(".");
11577
+ const negative = integer.startsWith("-");
11578
+ if (negative)
11579
+ integer = integer.slice(1);
11580
+ fraction = fraction.replace(/(0+)$/, "");
11581
+ if (decimals === 0) {
11582
+ if (Math.round(Number(`.${fraction}`)) === 1)
11583
+ integer = `${BigInt(integer) + 1n}`;
11584
+ fraction = "";
11585
+ } else if (fraction.length > decimals) {
11586
+ const [left, unit, right] = [
11587
+ fraction.slice(0, decimals - 1),
11588
+ fraction.slice(decimals - 1, decimals),
11589
+ fraction.slice(decimals)
11590
+ ];
11591
+ const rounded = Math.round(Number(`${unit}.${right}`));
11592
+ if (rounded > 9)
11593
+ fraction = `${BigInt(left) + BigInt(1)}0`.padStart(left.length + 1, "0");
11594
+ else
11595
+ fraction = `${left}${rounded}`;
11596
+ if (fraction.length > decimals) {
11597
+ fraction = fraction.slice(1);
11598
+ integer = `${BigInt(integer) + 1n}`;
11599
+ }
11600
+ fraction = fraction.slice(0, decimals);
11601
+ } else {
11602
+ fraction = fraction.padEnd(decimals, "0");
11603
+ }
11604
+ return BigInt(`${negative ? "-" : ""}${integer}${fraction}`);
11605
+ }
11606
+
11607
+ // ../../node_modules/.pnpm/viem@2.18.0_bufferutil@4.0.8_typescript@5.5.4_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/utils/unit/parseEther.js
11608
+ function parseEther(ether, unit = "wei") {
11609
+ return parseUnits(ether, etherUnits[unit]);
11610
+ }
11611
+
11540
11612
  // src/types.ts
11541
11613
  var PremintConfigVersion = /* @__PURE__ */ ((PremintConfigVersion2) => {
11542
11614
  PremintConfigVersion2["V1"] = "1";
@@ -11844,6 +11916,70 @@ var sponsoredSparksBatchTypedDataDefinition = ({
11844
11916
  verifyingContract: sponsoredSparksSpenderAddress[chainId]
11845
11917
  }
11846
11918
  });
11919
+ var commentIdentifierType = [
11920
+ { name: "contractAddress", type: "address" },
11921
+ { name: "tokenId", type: "uint256" },
11922
+ { name: "commenter", type: "address" },
11923
+ { name: "nonce", type: "bytes32" }
11924
+ ];
11925
+ var permitCommentTypedDataType = {
11926
+ PermitComment: [
11927
+ { name: "contractAddress", type: "address" },
11928
+ { name: "tokenId", type: "uint256" },
11929
+ { name: "commenter", type: "address" },
11930
+ { name: "replyTo", type: "CommentIdentifier" },
11931
+ { name: "text", type: "string" },
11932
+ { name: "deadline", type: "uint256" },
11933
+ { name: "nonce", type: "bytes32" },
11934
+ { name: "referrer", type: "address" },
11935
+ { name: "sourceChainId", type: "uint32" },
11936
+ { name: "destinationChainId", type: "uint32" }
11937
+ ],
11938
+ CommentIdentifier: commentIdentifierType
11939
+ };
11940
+ var permitSparkCommentTypedDataType = {
11941
+ PermitSparkComment: [
11942
+ { name: "comment", type: "CommentIdentifier" },
11943
+ { name: "sparker", type: "address" },
11944
+ { name: "sparksQuantity", type: "uint64" },
11945
+ { name: "deadline", type: "uint256" },
11946
+ { name: "nonce", type: "bytes32" },
11947
+ { name: "referrer", type: "address" },
11948
+ { name: "sourceChainId", type: "uint32" },
11949
+ { name: "destinationChainId", type: "uint32" }
11950
+ ],
11951
+ CommentIdentifier: commentIdentifierType
11952
+ };
11953
+ var commentsDomain = ({
11954
+ signingChainId,
11955
+ destinationChainId
11956
+ }) => ({
11957
+ chainId: signingChainId,
11958
+ name: "Comments",
11959
+ version: "1",
11960
+ verifyingContract: commentsAddress[destinationChainId]
11961
+ });
11962
+ var permitCommentTypedDataDefinition = (message) => ({
11963
+ types: permitCommentTypedDataType,
11964
+ message,
11965
+ primaryType: "PermitComment",
11966
+ domain: commentsDomain({
11967
+ signingChainId: message.sourceChainId,
11968
+ destinationChainId: message.destinationChainId
11969
+ }),
11970
+ account: message.commenter
11971
+ });
11972
+ var permitSparkCommentTypedDataDefinition = (message) => ({
11973
+ types: permitSparkCommentTypedDataType,
11974
+ message,
11975
+ primaryType: "PermitSparkComment",
11976
+ domain: commentsDomain({
11977
+ signingChainId: message.sourceChainId,
11978
+ destinationChainId: message.destinationChainId
11979
+ }),
11980
+ account: message.sparker
11981
+ });
11982
+ var sparkValue = () => parseEther("0.000001");
11847
11983
 
11848
11984
  // src/encoding.ts
11849
11985
  var safeTransferSwapAbiParameters = [
@@ -12203,6 +12339,8 @@ export {
12203
12339
  mintsEthUnwrapperAndCallerConfig,
12204
12340
  mintsSafeTransferBatchTypedDataDefinition,
12205
12341
  mintsSafeTransferTypedDataDefinition,
12342
+ permitCommentTypedDataDefinition,
12343
+ permitSparkCommentTypedDataDefinition,
12206
12344
  premintTypedDataDefinition,
12207
12345
  premintV1TypedDataDefinition,
12208
12346
  premintV2TypedDataDefinition,
@@ -12213,6 +12351,7 @@ export {
12213
12351
  secondarySwapABI,
12214
12352
  secondarySwapAddress,
12215
12353
  secondarySwapConfig,
12354
+ sparkValue,
12216
12355
  sparks_exports as sparks,
12217
12356
  sponsoredSparksBatchTransferTypedDataType,
12218
12357
  sponsoredSparksBatchTypedDataDefinition,