@zoralabs/protocol-deployments 0.3.4 → 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,15 +1,959 @@
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
10
11
  } from "./chunk-3EJPJMEH.js";
11
12
 
12
13
  // src/generated/wagmi.ts
14
+ var commentsABI = [
15
+ {
16
+ stateMutability: "nonpayable",
17
+ type: "constructor",
18
+ inputs: [
19
+ { name: "_sparkValue", internalType: "uint256", type: "uint256" },
20
+ { name: "_protocolRewards", internalType: "address", type: "address" }
21
+ ]
22
+ },
23
+ {
24
+ stateMutability: "view",
25
+ type: "function",
26
+ inputs: [],
27
+ name: "BACKFILLER_ROLE",
28
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }]
29
+ },
30
+ {
31
+ stateMutability: "view",
32
+ type: "function",
33
+ inputs: [],
34
+ name: "DEFAULT_ADMIN_ROLE",
35
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }]
36
+ },
37
+ {
38
+ stateMutability: "view",
39
+ type: "function",
40
+ inputs: [],
41
+ name: "DELEGATE_COMMENTOR",
42
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }]
43
+ },
44
+ {
45
+ stateMutability: "view",
46
+ type: "function",
47
+ inputs: [],
48
+ name: "DOMAIN_NAME",
49
+ outputs: [{ name: "", internalType: "string", type: "string" }]
50
+ },
51
+ {
52
+ stateMutability: "view",
53
+ type: "function",
54
+ inputs: [],
55
+ name: "DOMAIN_VERSION",
56
+ outputs: [{ name: "", internalType: "string", type: "string" }]
57
+ },
58
+ {
59
+ stateMutability: "view",
60
+ type: "function",
61
+ inputs: [],
62
+ name: "PERMISSION_BIT_ADMIN",
63
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }]
64
+ },
65
+ {
66
+ stateMutability: "view",
67
+ type: "function",
68
+ inputs: [],
69
+ name: "REFERRER_REWARD_PCT",
70
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }]
71
+ },
72
+ {
73
+ stateMutability: "view",
74
+ type: "function",
75
+ inputs: [],
76
+ name: "UPGRADE_INTERFACE_VERSION",
77
+ outputs: [{ name: "", internalType: "string", type: "string" }]
78
+ },
79
+ {
80
+ stateMutability: "view",
81
+ type: "function",
82
+ inputs: [],
83
+ name: "ZORA_REWARD_NO_REFERRER_PCT",
84
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }]
85
+ },
86
+ {
87
+ stateMutability: "view",
88
+ type: "function",
89
+ inputs: [],
90
+ name: "ZORA_REWARD_PCT",
91
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }]
92
+ },
93
+ {
94
+ stateMutability: "nonpayable",
95
+ type: "function",
96
+ inputs: [
97
+ {
98
+ name: "commentIdentifiers",
99
+ internalType: "struct IComments.CommentIdentifier[]",
100
+ type: "tuple[]",
101
+ components: [
102
+ { name: "commenter", internalType: "address", type: "address" },
103
+ { name: "contractAddress", internalType: "address", type: "address" },
104
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
105
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
106
+ ]
107
+ },
108
+ { name: "texts", internalType: "string[]", type: "string[]" },
109
+ { name: "timestamps", internalType: "uint256[]", type: "uint256[]" },
110
+ {
111
+ name: "originalTransactionHashes",
112
+ internalType: "bytes32[]",
113
+ type: "bytes32[]"
114
+ }
115
+ ],
116
+ name: "backfillBatchAddComment",
117
+ outputs: []
118
+ },
119
+ {
120
+ stateMutability: "payable",
121
+ type: "function",
122
+ inputs: [
123
+ { name: "commenter", internalType: "address", type: "address" },
124
+ { name: "contractAddress", internalType: "address", type: "address" },
125
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
126
+ { name: "text", internalType: "string", type: "string" },
127
+ {
128
+ name: "replyTo",
129
+ internalType: "struct IComments.CommentIdentifier",
130
+ type: "tuple",
131
+ components: [
132
+ { name: "commenter", internalType: "address", type: "address" },
133
+ { name: "contractAddress", internalType: "address", type: "address" },
134
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
135
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
136
+ ]
137
+ },
138
+ { name: "referrer", internalType: "address", type: "address" }
139
+ ],
140
+ name: "comment",
141
+ outputs: [
142
+ {
143
+ name: "commentIdentifier",
144
+ internalType: "struct IComments.CommentIdentifier",
145
+ type: "tuple",
146
+ components: [
147
+ { name: "commenter", internalType: "address", type: "address" },
148
+ { name: "contractAddress", internalType: "address", type: "address" },
149
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
150
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
151
+ ]
152
+ }
153
+ ]
154
+ },
155
+ {
156
+ stateMutability: "view",
157
+ type: "function",
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
+ ],
171
+ name: "commentSparksQuantity",
172
+ outputs: [{ name: "", internalType: "uint64", type: "uint64" }]
173
+ },
174
+ {
175
+ stateMutability: "pure",
176
+ type: "function",
177
+ inputs: [],
178
+ name: "contractName",
179
+ outputs: [{ name: "", internalType: "string", type: "string" }]
180
+ },
181
+ {
182
+ stateMutability: "pure",
183
+ type: "function",
184
+ inputs: [],
185
+ name: "contractVersion",
186
+ outputs: [{ name: "", internalType: "string", type: "string" }]
187
+ },
188
+ {
189
+ stateMutability: "nonpayable",
190
+ type: "function",
191
+ inputs: [
192
+ { name: "commenter", internalType: "address", type: "address" },
193
+ { name: "contractAddress", internalType: "address", type: "address" },
194
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
195
+ { name: "text", internalType: "string", type: "string" },
196
+ {
197
+ name: "replyTo",
198
+ internalType: "struct IComments.CommentIdentifier",
199
+ type: "tuple",
200
+ components: [
201
+ { name: "commenter", internalType: "address", type: "address" },
202
+ { name: "contractAddress", internalType: "address", type: "address" },
203
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
204
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
205
+ ]
206
+ }
207
+ ],
208
+ name: "delegateComment",
209
+ outputs: [
210
+ {
211
+ name: "commentIdentifier",
212
+ internalType: "struct IComments.CommentIdentifier",
213
+ type: "tuple",
214
+ components: [
215
+ { name: "commenter", internalType: "address", type: "address" },
216
+ { name: "contractAddress", internalType: "address", type: "address" },
217
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
218
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
219
+ ]
220
+ }
221
+ ]
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
+ },
238
+ {
239
+ stateMutability: "view",
240
+ type: "function",
241
+ inputs: [{ name: "role", internalType: "bytes32", type: "bytes32" }],
242
+ name: "getRoleAdmin",
243
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }]
244
+ },
245
+ {
246
+ stateMutability: "nonpayable",
247
+ type: "function",
248
+ inputs: [
249
+ { name: "role", internalType: "bytes32", type: "bytes32" },
250
+ { name: "account", internalType: "address", type: "address" }
251
+ ],
252
+ name: "grantRole",
253
+ outputs: []
254
+ },
255
+ {
256
+ stateMutability: "view",
257
+ type: "function",
258
+ inputs: [
259
+ { name: "role", internalType: "bytes32", type: "bytes32" },
260
+ { name: "account", internalType: "address", type: "address" }
261
+ ],
262
+ name: "hasRole",
263
+ outputs: [{ name: "", internalType: "bool", type: "bool" }]
264
+ },
265
+ {
266
+ stateMutability: "view",
267
+ type: "function",
268
+ inputs: [
269
+ {
270
+ name: "commentIdentifier",
271
+ internalType: "struct IComments.CommentIdentifier",
272
+ type: "tuple",
273
+ components: [
274
+ { name: "commenter", internalType: "address", type: "address" },
275
+ { name: "contractAddress", internalType: "address", type: "address" },
276
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
277
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
278
+ ]
279
+ }
280
+ ],
281
+ name: "hashAndCheckCommentExists",
282
+ outputs: [
283
+ { name: "commentId", internalType: "bytes32", type: "bytes32" },
284
+ { name: "exists", internalType: "bool", type: "bool" }
285
+ ]
286
+ },
287
+ {
288
+ stateMutability: "view",
289
+ type: "function",
290
+ inputs: [
291
+ {
292
+ name: "commentIdentifier",
293
+ internalType: "struct IComments.CommentIdentifier",
294
+ type: "tuple",
295
+ components: [
296
+ { name: "commenter", internalType: "address", type: "address" },
297
+ { name: "contractAddress", internalType: "address", type: "address" },
298
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
299
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
300
+ ]
301
+ }
302
+ ],
303
+ name: "hashAndValidateCommentExists",
304
+ outputs: [{ name: "commentId", internalType: "bytes32", type: "bytes32" }]
305
+ },
306
+ {
307
+ stateMutability: "pure",
308
+ type: "function",
309
+ inputs: [
310
+ {
311
+ name: "commentIdentifier",
312
+ internalType: "struct IComments.CommentIdentifier",
313
+ type: "tuple",
314
+ components: [
315
+ { name: "commenter", internalType: "address", type: "address" },
316
+ { name: "contractAddress", internalType: "address", type: "address" },
317
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
318
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
319
+ ]
320
+ }
321
+ ],
322
+ name: "hashCommentIdentifier",
323
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }]
324
+ },
325
+ {
326
+ stateMutability: "view",
327
+ type: "function",
328
+ inputs: [
329
+ {
330
+ name: "permit",
331
+ internalType: "struct IComments.PermitComment",
332
+ type: "tuple",
333
+ components: [
334
+ { name: "commenter", internalType: "address", type: "address" },
335
+ { name: "contractAddress", internalType: "address", type: "address" },
336
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
337
+ {
338
+ name: "replyTo",
339
+ internalType: "struct IComments.CommentIdentifier",
340
+ type: "tuple",
341
+ components: [
342
+ { name: "commenter", internalType: "address", type: "address" },
343
+ {
344
+ name: "contractAddress",
345
+ internalType: "address",
346
+ type: "address"
347
+ },
348
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
349
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
350
+ ]
351
+ },
352
+ { name: "text", internalType: "string", type: "string" },
353
+ { name: "deadline", internalType: "uint256", type: "uint256" },
354
+ { name: "nonce", internalType: "bytes32", type: "bytes32" },
355
+ { name: "referrer", internalType: "address", type: "address" },
356
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
357
+ {
358
+ name: "destinationChainId",
359
+ internalType: "uint32",
360
+ type: "uint32"
361
+ }
362
+ ]
363
+ }
364
+ ],
365
+ name: "hashPermitComment",
366
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }]
367
+ },
368
+ {
369
+ stateMutability: "view",
370
+ type: "function",
371
+ inputs: [
372
+ {
373
+ name: "permit",
374
+ internalType: "struct IComments.PermitSparkComment",
375
+ type: "tuple",
376
+ components: [
377
+ {
378
+ name: "comment",
379
+ internalType: "struct IComments.CommentIdentifier",
380
+ type: "tuple",
381
+ components: [
382
+ { name: "commenter", internalType: "address", type: "address" },
383
+ {
384
+ name: "contractAddress",
385
+ internalType: "address",
386
+ type: "address"
387
+ },
388
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
389
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
390
+ ]
391
+ },
392
+ { name: "sparker", internalType: "address", type: "address" },
393
+ { name: "sparksQuantity", internalType: "uint64", type: "uint64" },
394
+ { name: "deadline", internalType: "uint256", type: "uint256" },
395
+ { name: "nonce", internalType: "bytes32", type: "bytes32" },
396
+ { name: "referrer", internalType: "address", type: "address" },
397
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
398
+ {
399
+ name: "destinationChainId",
400
+ internalType: "uint32",
401
+ type: "uint32"
402
+ }
403
+ ]
404
+ }
405
+ ],
406
+ name: "hashPermitSparkComment",
407
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }]
408
+ },
409
+ {
410
+ stateMutability: "view",
411
+ type: "function",
412
+ inputs: [],
413
+ name: "implementation",
414
+ outputs: [{ name: "", internalType: "address", type: "address" }]
415
+ },
416
+ {
417
+ stateMutability: "nonpayable",
418
+ type: "function",
419
+ inputs: [
420
+ { name: "_zoraRecipient", internalType: "address", type: "address" },
421
+ { name: "defaultAdmin", internalType: "address", type: "address" },
422
+ { name: "backfiller", internalType: "address", type: "address" },
423
+ {
424
+ name: "delegateCommenters",
425
+ internalType: "address[]",
426
+ type: "address[]"
427
+ }
428
+ ],
429
+ name: "initialize",
430
+ outputs: []
431
+ },
432
+ {
433
+ stateMutability: "view",
434
+ type: "function",
435
+ inputs: [],
436
+ name: "nextNonce",
437
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }]
438
+ },
439
+ {
440
+ stateMutability: "view",
441
+ type: "function",
442
+ inputs: [
443
+ { name: "owner", internalType: "address", type: "address" },
444
+ { name: "nonce", internalType: "uint256", type: "uint256" }
445
+ ],
446
+ name: "nonceUsed",
447
+ outputs: [{ name: "", internalType: "bool", type: "bool" }]
448
+ },
449
+ {
450
+ stateMutability: "payable",
451
+ type: "function",
452
+ inputs: [
453
+ {
454
+ name: "permit",
455
+ internalType: "struct IComments.PermitComment",
456
+ type: "tuple",
457
+ components: [
458
+ { name: "commenter", internalType: "address", type: "address" },
459
+ { name: "contractAddress", internalType: "address", type: "address" },
460
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
461
+ {
462
+ name: "replyTo",
463
+ internalType: "struct IComments.CommentIdentifier",
464
+ type: "tuple",
465
+ components: [
466
+ { name: "commenter", internalType: "address", type: "address" },
467
+ {
468
+ name: "contractAddress",
469
+ internalType: "address",
470
+ type: "address"
471
+ },
472
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
473
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
474
+ ]
475
+ },
476
+ { name: "text", internalType: "string", type: "string" },
477
+ { name: "deadline", internalType: "uint256", type: "uint256" },
478
+ { name: "nonce", internalType: "bytes32", type: "bytes32" },
479
+ { name: "referrer", internalType: "address", type: "address" },
480
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
481
+ {
482
+ name: "destinationChainId",
483
+ internalType: "uint32",
484
+ type: "uint32"
485
+ }
486
+ ]
487
+ },
488
+ { name: "signature", internalType: "bytes", type: "bytes" }
489
+ ],
490
+ name: "permitComment",
491
+ outputs: []
492
+ },
493
+ {
494
+ stateMutability: "payable",
495
+ type: "function",
496
+ inputs: [
497
+ {
498
+ name: "permit",
499
+ internalType: "struct IComments.PermitSparkComment",
500
+ type: "tuple",
501
+ components: [
502
+ {
503
+ name: "comment",
504
+ internalType: "struct IComments.CommentIdentifier",
505
+ type: "tuple",
506
+ components: [
507
+ { name: "commenter", internalType: "address", type: "address" },
508
+ {
509
+ name: "contractAddress",
510
+ internalType: "address",
511
+ type: "address"
512
+ },
513
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
514
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
515
+ ]
516
+ },
517
+ { name: "sparker", internalType: "address", type: "address" },
518
+ { name: "sparksQuantity", internalType: "uint64", type: "uint64" },
519
+ { name: "deadline", internalType: "uint256", type: "uint256" },
520
+ { name: "nonce", internalType: "bytes32", type: "bytes32" },
521
+ { name: "referrer", internalType: "address", type: "address" },
522
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
523
+ {
524
+ name: "destinationChainId",
525
+ internalType: "uint32",
526
+ type: "uint32"
527
+ }
528
+ ]
529
+ },
530
+ { name: "signature", internalType: "bytes", type: "bytes" }
531
+ ],
532
+ name: "permitSparkComment",
533
+ outputs: []
534
+ },
535
+ {
536
+ stateMutability: "view",
537
+ type: "function",
538
+ inputs: [],
539
+ name: "protocolRewards",
540
+ outputs: [
541
+ { name: "", internalType: "contract IProtocolRewards", type: "address" }
542
+ ]
543
+ },
544
+ {
545
+ stateMutability: "view",
546
+ type: "function",
547
+ inputs: [],
548
+ name: "proxiableUUID",
549
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }]
550
+ },
551
+ {
552
+ stateMutability: "nonpayable",
553
+ type: "function",
554
+ inputs: [
555
+ { name: "role", internalType: "bytes32", type: "bytes32" },
556
+ { name: "callerConfirmation", internalType: "address", type: "address" }
557
+ ],
558
+ name: "renounceRole",
559
+ outputs: []
560
+ },
561
+ {
562
+ stateMutability: "nonpayable",
563
+ type: "function",
564
+ inputs: [
565
+ { name: "role", internalType: "bytes32", type: "bytes32" },
566
+ { name: "account", internalType: "address", type: "address" }
567
+ ],
568
+ name: "revokeRole",
569
+ outputs: []
570
+ },
571
+ {
572
+ stateMutability: "payable",
573
+ type: "function",
574
+ inputs: [
575
+ {
576
+ name: "commentIdentifier",
577
+ internalType: "struct IComments.CommentIdentifier",
578
+ type: "tuple",
579
+ components: [
580
+ { name: "commenter", internalType: "address", type: "address" },
581
+ { name: "contractAddress", internalType: "address", type: "address" },
582
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
583
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
584
+ ]
585
+ },
586
+ { name: "sparksQuantity", internalType: "uint64", type: "uint64" },
587
+ { name: "referrer", internalType: "address", type: "address" }
588
+ ],
589
+ name: "sparkComment",
590
+ outputs: []
591
+ },
592
+ {
593
+ stateMutability: "view",
594
+ type: "function",
595
+ inputs: [],
596
+ name: "sparkValue",
597
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }]
598
+ },
599
+ {
600
+ stateMutability: "view",
601
+ type: "function",
602
+ inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }],
603
+ name: "supportsInterface",
604
+ outputs: [{ name: "", internalType: "bool", type: "bool" }]
605
+ },
606
+ {
607
+ stateMutability: "payable",
608
+ type: "function",
609
+ inputs: [
610
+ { name: "newImplementation", internalType: "address", type: "address" },
611
+ { name: "data", internalType: "bytes", type: "bytes" }
612
+ ],
613
+ name: "upgradeToAndCall",
614
+ outputs: []
615
+ },
616
+ {
617
+ type: "event",
618
+ anonymous: false,
619
+ inputs: [
620
+ {
621
+ name: "commentId",
622
+ internalType: "bytes32",
623
+ type: "bytes32",
624
+ indexed: true
625
+ },
626
+ {
627
+ name: "comment",
628
+ internalType: "struct IComments.CommentIdentifier",
629
+ type: "tuple",
630
+ components: [
631
+ { name: "commenter", internalType: "address", type: "address" },
632
+ { name: "contractAddress", internalType: "address", type: "address" },
633
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
634
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
635
+ ],
636
+ indexed: false
637
+ },
638
+ { name: "text", internalType: "string", type: "string", indexed: false },
639
+ {
640
+ name: "timestamp",
641
+ internalType: "uint256",
642
+ type: "uint256",
643
+ indexed: false
644
+ },
645
+ {
646
+ name: "originalTransactionId",
647
+ internalType: "bytes32",
648
+ type: "bytes32",
649
+ indexed: false
650
+ }
651
+ ],
652
+ name: "BackfilledComment"
653
+ },
654
+ {
655
+ type: "event",
656
+ anonymous: false,
657
+ inputs: [
658
+ {
659
+ name: "commentId",
660
+ internalType: "bytes32",
661
+ type: "bytes32",
662
+ indexed: true
663
+ },
664
+ {
665
+ name: "comment",
666
+ internalType: "struct IComments.CommentIdentifier",
667
+ type: "tuple",
668
+ components: [
669
+ { name: "commenter", internalType: "address", type: "address" },
670
+ { name: "contractAddress", internalType: "address", type: "address" },
671
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
672
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
673
+ ],
674
+ indexed: false
675
+ },
676
+ {
677
+ name: "replyToId",
678
+ internalType: "bytes32",
679
+ type: "bytes32",
680
+ indexed: false
681
+ },
682
+ {
683
+ name: "replyTo",
684
+ internalType: "struct IComments.CommentIdentifier",
685
+ type: "tuple",
686
+ components: [
687
+ { name: "commenter", internalType: "address", type: "address" },
688
+ { name: "contractAddress", internalType: "address", type: "address" },
689
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
690
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
691
+ ],
692
+ indexed: false
693
+ },
694
+ {
695
+ name: "sparksQuantity",
696
+ internalType: "uint64",
697
+ type: "uint64",
698
+ indexed: false
699
+ },
700
+ { name: "text", internalType: "string", type: "string", indexed: false },
701
+ {
702
+ name: "timestamp",
703
+ internalType: "uint256",
704
+ type: "uint256",
705
+ indexed: false
706
+ },
707
+ {
708
+ name: "referrer",
709
+ internalType: "address",
710
+ type: "address",
711
+ indexed: false
712
+ }
713
+ ],
714
+ name: "Commented"
715
+ },
716
+ { type: "event", anonymous: false, inputs: [], name: "EIP712DomainChanged" },
717
+ {
718
+ type: "event",
719
+ anonymous: false,
720
+ inputs: [
721
+ {
722
+ name: "version",
723
+ internalType: "uint64",
724
+ type: "uint64",
725
+ indexed: false
726
+ }
727
+ ],
728
+ name: "Initialized"
729
+ },
730
+ {
731
+ type: "event",
732
+ anonymous: false,
733
+ inputs: [
734
+ { name: "role", internalType: "bytes32", type: "bytes32", indexed: true },
735
+ {
736
+ name: "previousAdminRole",
737
+ internalType: "bytes32",
738
+ type: "bytes32",
739
+ indexed: true
740
+ },
741
+ {
742
+ name: "newAdminRole",
743
+ internalType: "bytes32",
744
+ type: "bytes32",
745
+ indexed: true
746
+ }
747
+ ],
748
+ name: "RoleAdminChanged"
749
+ },
750
+ {
751
+ type: "event",
752
+ anonymous: false,
753
+ inputs: [
754
+ { name: "role", internalType: "bytes32", type: "bytes32", indexed: true },
755
+ {
756
+ name: "account",
757
+ internalType: "address",
758
+ type: "address",
759
+ indexed: true
760
+ },
761
+ {
762
+ name: "sender",
763
+ internalType: "address",
764
+ type: "address",
765
+ indexed: true
766
+ }
767
+ ],
768
+ name: "RoleGranted"
769
+ },
770
+ {
771
+ type: "event",
772
+ anonymous: false,
773
+ inputs: [
774
+ { name: "role", internalType: "bytes32", type: "bytes32", indexed: true },
775
+ {
776
+ name: "account",
777
+ internalType: "address",
778
+ type: "address",
779
+ indexed: true
780
+ },
781
+ {
782
+ name: "sender",
783
+ internalType: "address",
784
+ type: "address",
785
+ indexed: true
786
+ }
787
+ ],
788
+ name: "RoleRevoked"
789
+ },
790
+ {
791
+ type: "event",
792
+ anonymous: false,
793
+ inputs: [
794
+ {
795
+ name: "commentId",
796
+ internalType: "bytes32",
797
+ type: "bytes32",
798
+ indexed: true
799
+ },
800
+ {
801
+ name: "commentIdentifier",
802
+ internalType: "struct IComments.CommentIdentifier",
803
+ type: "tuple",
804
+ components: [
805
+ { name: "commenter", internalType: "address", type: "address" },
806
+ { name: "contractAddress", internalType: "address", type: "address" },
807
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
808
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
809
+ ],
810
+ indexed: false
811
+ },
812
+ {
813
+ name: "sparksQuantity",
814
+ internalType: "uint64",
815
+ type: "uint64",
816
+ indexed: false
817
+ },
818
+ {
819
+ name: "sparker",
820
+ internalType: "address",
821
+ type: "address",
822
+ indexed: false
823
+ },
824
+ {
825
+ name: "timestamp",
826
+ internalType: "uint256",
827
+ type: "uint256",
828
+ indexed: false
829
+ }
830
+ ],
831
+ name: "SparkedComment"
832
+ },
833
+ {
834
+ type: "event",
835
+ anonymous: false,
836
+ inputs: [
837
+ {
838
+ name: "implementation",
839
+ internalType: "address",
840
+ type: "address",
841
+ indexed: true
842
+ }
843
+ ],
844
+ name: "Upgraded"
845
+ },
846
+ { type: "error", inputs: [], name: "AccessControlBadConfirmation" },
847
+ {
848
+ type: "error",
849
+ inputs: [
850
+ { name: "account", internalType: "address", type: "address" },
851
+ { name: "neededRole", internalType: "bytes32", type: "bytes32" }
852
+ ],
853
+ name: "AccessControlUnauthorizedAccount"
854
+ },
855
+ {
856
+ type: "error",
857
+ inputs: [{ name: "target", internalType: "address", type: "address" }],
858
+ name: "AddressEmptyCode"
859
+ },
860
+ { type: "error", inputs: [], name: "ArrayLengthMismatch" },
861
+ { type: "error", inputs: [], name: "CannotSparkOwnComment" },
862
+ {
863
+ type: "error",
864
+ inputs: [
865
+ { name: "commentAddress", internalType: "address", type: "address" },
866
+ { name: "commentTokenId", internalType: "uint256", type: "uint256" },
867
+ { name: "replyAddress", internalType: "address", type: "address" },
868
+ { name: "replyTokenId", internalType: "uint256", type: "uint256" }
869
+ ],
870
+ name: "CommentAddressOrTokenIdsDoNotMatch"
871
+ },
872
+ { type: "error", inputs: [], name: "CommentDoesntExist" },
873
+ {
874
+ type: "error",
875
+ inputs: [
876
+ { name: "expected", internalType: "address", type: "address" },
877
+ { name: "actual", internalType: "address", type: "address" }
878
+ ],
879
+ name: "CommenterMismatch"
880
+ },
881
+ {
882
+ type: "error",
883
+ inputs: [{ name: "commentId", internalType: "bytes32", type: "bytes32" }],
884
+ name: "DuplicateComment"
885
+ },
886
+ {
887
+ type: "error",
888
+ inputs: [
889
+ { name: "implementation", internalType: "address", type: "address" }
890
+ ],
891
+ name: "ERC1967InvalidImplementation"
892
+ },
893
+ { type: "error", inputs: [], name: "ERC1967NonPayable" },
894
+ {
895
+ type: "error",
896
+ inputs: [{ name: "deadline", internalType: "uint256", type: "uint256" }],
897
+ name: "ERC2612ExpiredSignature"
898
+ },
899
+ { type: "error", inputs: [], name: "EmptyComment" },
900
+ { type: "error", inputs: [], name: "FailedInnerCall" },
901
+ {
902
+ type: "error",
903
+ inputs: [
904
+ {
905
+ name: "wrongDestinationChainId",
906
+ internalType: "uint256",
907
+ type: "uint256"
908
+ }
909
+ ],
910
+ name: "IncorrectDestinationChain"
911
+ },
912
+ {
913
+ type: "error",
914
+ inputs: [
915
+ { name: "actual", internalType: "uint256", type: "uint256" },
916
+ { name: "expected", internalType: "uint256", type: "uint256" }
917
+ ],
918
+ name: "IncorrectETHAmountForSparks"
919
+ },
920
+ {
921
+ type: "error",
922
+ inputs: [
923
+ { name: "account", internalType: "address", type: "address" },
924
+ { name: "currentNonce", internalType: "uint256", type: "uint256" }
925
+ ],
926
+ name: "InvalidAccountNonce"
927
+ },
928
+ { type: "error", inputs: [], name: "InvalidInitialization" },
929
+ { type: "error", inputs: [], name: "InvalidSignature" },
930
+ { type: "error", inputs: [], name: "MustSendAtLeastOneSpark" },
931
+ { type: "error", inputs: [], name: "NotInitializing" },
932
+ { type: "error", inputs: [], name: "NotTokenHolderOrAdmin" },
933
+ { type: "error", inputs: [], name: "OnlySparksContract" },
934
+ { type: "error", inputs: [], name: "TransferFailed" },
935
+ { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" },
936
+ {
937
+ type: "error",
938
+ inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }],
939
+ name: "UUPSUnsupportedProxiableUUID"
940
+ },
941
+ {
942
+ type: "error",
943
+ inputs: [
944
+ { name: "currentName", internalType: "string", type: "string" },
945
+ { name: "newName", internalType: "string", type: "string" }
946
+ ],
947
+ name: "UpgradeToMismatchedContractName"
948
+ }
949
+ ];
950
+ var commentsAddress = {
951
+ 999999999: "0x7777777bE14a1F7Fd6896B5FBDa5ceD5FC6e501a"
952
+ };
953
+ var commentsConfig = {
954
+ address: commentsAddress,
955
+ abi: commentsABI
956
+ };
13
957
  var erc20MinterABI = [
14
958
  {
15
959
  stateMutability: "nonpayable",
@@ -3829,6 +4773,7 @@ var zoraCreator1155FactoryImplABI = [
3829
4773
  { type: "error", inputs: [], name: "MarketMinimumNotReached" },
3830
4774
  { type: "error", inputs: [], name: "MinimumMarketEthNotMet" },
3831
4775
  { type: "error", inputs: [], name: "NeedsToBeAtLeastOneSaleToStartMarket" },
4776
+ { type: "error", inputs: [], name: "NoCodeAtAddress" },
3832
4777
  { type: "error", inputs: [], name: "NotInitializing" },
3833
4778
  { type: "error", inputs: [], name: "OnlyZoraRewardRecipient" },
3834
4779
  {
@@ -5250,6 +6195,7 @@ var zoraCreator1155ImplABI = [
5250
6195
  { type: "error", inputs: [], name: "MarketMinimumNotReached" },
5251
6196
  { type: "error", inputs: [], name: "MinimumMarketEthNotMet" },
5252
6197
  { type: "error", inputs: [], name: "NeedsToBeAtLeastOneSaleToStartMarket" },
6198
+ { type: "error", inputs: [], name: "NoCodeAtAddress" },
5253
6199
  { type: "error", inputs: [], name: "NotInitializing" },
5254
6200
  { type: "error", inputs: [], name: "OnlyZoraRewardRecipient" },
5255
6201
  {
@@ -9757,7 +10703,17 @@ var zoraSparksManagerImplConfig = {
9757
10703
  abi: zoraSparksManagerImplABI
9758
10704
  };
9759
10705
  var zoraTimedSaleStrategyABI = [
9760
- { stateMutability: "nonpayable", type: "constructor", inputs: [] },
10706
+ {
10707
+ stateMutability: "nonpayable",
10708
+ type: "constructor",
10709
+ inputs: [
10710
+ {
10711
+ name: "_comments",
10712
+ internalType: "contract IComments",
10713
+ type: "address"
10714
+ }
10715
+ ]
10716
+ },
9761
10717
  {
9762
10718
  stateMutability: "view",
9763
10719
  type: "function",
@@ -9806,6 +10762,15 @@ var zoraTimedSaleStrategyABI = [
9806
10762
  }
9807
10763
  ]
9808
10764
  },
10765
+ {
10766
+ stateMutability: "view",
10767
+ type: "function",
10768
+ inputs: [],
10769
+ name: "comments",
10770
+ outputs: [
10771
+ { name: "", internalType: "contract IComments", type: "address" }
10772
+ ]
10773
+ },
9809
10774
  {
9810
10775
  stateMutability: "pure",
9811
10776
  type: "function",
@@ -9875,6 +10840,13 @@ var zoraTimedSaleStrategyABI = [
9875
10840
  { name: "createReferral", internalType: "address", type: "address" }
9876
10841
  ]
9877
10842
  },
10843
+ {
10844
+ stateMutability: "view",
10845
+ type: "function",
10846
+ inputs: [],
10847
+ name: "implementation",
10848
+ outputs: [{ name: "", internalType: "address", type: "address" }]
10849
+ },
9878
10850
  {
9879
10851
  stateMutability: "nonpayable",
9880
10852
  type: "function",
@@ -10232,6 +11204,43 @@ var zoraTimedSaleStrategyABI = [
10232
11204
  ],
10233
11205
  name: "MintComment"
10234
11206
  },
11207
+ {
11208
+ type: "event",
11209
+ anonymous: false,
11210
+ inputs: [
11211
+ {
11212
+ name: "commentId",
11213
+ internalType: "bytes32",
11214
+ type: "bytes32",
11215
+ indexed: true
11216
+ },
11217
+ {
11218
+ name: "commentIdentifier",
11219
+ internalType: "struct IComments.CommentIdentifier",
11220
+ type: "tuple",
11221
+ components: [
11222
+ { name: "commenter", internalType: "address", type: "address" },
11223
+ { name: "contractAddress", internalType: "address", type: "address" },
11224
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
11225
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
11226
+ ],
11227
+ indexed: false
11228
+ },
11229
+ {
11230
+ name: "mintQuantity",
11231
+ internalType: "uint256",
11232
+ type: "uint256",
11233
+ indexed: false
11234
+ },
11235
+ {
11236
+ name: "comment",
11237
+ internalType: "string",
11238
+ type: "string",
11239
+ indexed: false
11240
+ }
11241
+ ],
11242
+ name: "MintedAndCommented"
11243
+ },
10235
11244
  {
10236
11245
  type: "event",
10237
11246
  anonymous: false,
@@ -10508,6 +11517,7 @@ var zoraTimedSaleStrategyABI = [
10508
11517
  { type: "error", inputs: [], name: "MarketMinimumNotReached" },
10509
11518
  { type: "error", inputs: [], name: "MinimumMarketEthNotMet" },
10510
11519
  { type: "error", inputs: [], name: "NeedsToBeAtLeastOneSaleToStartMarket" },
11520
+ { type: "error", inputs: [], name: "NoCodeAtAddress" },
10511
11521
  { type: "error", inputs: [], name: "NotInitializing" },
10512
11522
  { type: "error", inputs: [], name: "OnlyZoraRewardRecipient" },
10513
11523
  {
@@ -10561,6 +11571,44 @@ var zoraTimedSaleStrategyConfig = {
10561
11571
  abi: zoraTimedSaleStrategyABI
10562
11572
  };
10563
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
+
10564
11612
  // src/types.ts
10565
11613
  var PremintConfigVersion = /* @__PURE__ */ ((PremintConfigVersion2) => {
10566
11614
  PremintConfigVersion2["V1"] = "1";
@@ -10568,6 +11616,16 @@ var PremintConfigVersion = /* @__PURE__ */ ((PremintConfigVersion2) => {
10568
11616
  PremintConfigVersion2["V3"] = "3";
10569
11617
  return PremintConfigVersion2;
10570
11618
  })(PremintConfigVersion || {});
11619
+ var emptyCommentIdentifier = () => {
11620
+ const zeroAddress = "0x0000000000000000000000000000000000000000";
11621
+ const zeroHash = "0x0000000000000000000000000000000000000000000000000000000000000000";
11622
+ return {
11623
+ commenter: zeroAddress,
11624
+ contractAddress: zeroAddress,
11625
+ tokenId: 0n,
11626
+ nonce: zeroHash
11627
+ };
11628
+ };
10571
11629
 
10572
11630
  // src/typedData.ts
10573
11631
  var premintTypedDataDomain = ({
@@ -10858,6 +11916,70 @@ var sponsoredSparksBatchTypedDataDefinition = ({
10858
11916
  verifyingContract: sponsoredSparksSpenderAddress[chainId]
10859
11917
  }
10860
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");
10861
11983
 
10862
11984
  // src/encoding.ts
10863
11985
  var safeTransferSwapAbiParameters = [
@@ -11196,7 +12318,11 @@ var addresses2 = {
11196
12318
  };
11197
12319
  export {
11198
12320
  PremintConfigVersion,
12321
+ commentsABI,
12322
+ commentsAddress,
12323
+ commentsConfig,
11199
12324
  __exports as contracts1155,
12325
+ emptyCommentIdentifier,
11200
12326
  encodePremintConfig,
11201
12327
  erc20MinterABI,
11202
12328
  erc20MinterAddress,
@@ -11213,6 +12339,8 @@ export {
11213
12339
  mintsEthUnwrapperAndCallerConfig,
11214
12340
  mintsSafeTransferBatchTypedDataDefinition,
11215
12341
  mintsSafeTransferTypedDataDefinition,
12342
+ permitCommentTypedDataDefinition,
12343
+ permitSparkCommentTypedDataDefinition,
11216
12344
  premintTypedDataDefinition,
11217
12345
  premintV1TypedDataDefinition,
11218
12346
  premintV2TypedDataDefinition,
@@ -11223,6 +12351,7 @@ export {
11223
12351
  secondarySwapABI,
11224
12352
  secondarySwapAddress,
11225
12353
  secondarySwapConfig,
12354
+ sparkValue,
11226
12355
  sparks_exports as sparks,
11227
12356
  sponsoredSparksBatchTransferTypedDataType,
11228
12357
  sponsoredSparksBatchTypedDataDefinition,