@zoralabs/comments-contracts 0.0.1 → 0.0.2-COMMENTS.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/.turbo/turbo-build.log +48 -30
  2. package/CHANGELOG.md +8 -0
  3. package/README.md +10 -39
  4. package/abis/AddDelegateCommenterRole.json +22 -0
  5. package/abis/CallerAndCommenter.json +62 -0
  6. package/abis/CallerAndCommenterImpl.json +1218 -0
  7. package/abis/CallerAndCommenterMintAndCommentTest.json +771 -0
  8. package/abis/CallerAndCommenterSwapAndCommentTest.json +844 -0
  9. package/abis/CallerAndCommenterTestBase.json +577 -0
  10. package/abis/CommentsImpl.json +189 -59
  11. package/abis/CommentsImplConstants.json +106 -0
  12. package/abis/CommentsPermitTest.json +26 -6
  13. package/abis/CommentsTest.json +58 -10
  14. package/abis/Comments_mintAndCommentTest.json +11 -4
  15. package/abis/Comments_smartWallet.json +711 -0
  16. package/abis/DeployCallerAndCommenterImpl.json +22 -0
  17. package/abis/EIP712Upgradeable.json +74 -0
  18. package/abis/EIP712UpgradeableWithChainId.json +49 -0
  19. package/abis/ERC20.json +310 -0
  20. package/abis/ICallerAndCommenter.json +797 -0
  21. package/abis/IComments.json +629 -9
  22. package/abis/IERC20.json +39 -42
  23. package/abis/IERC20Metadata.json +224 -0
  24. package/abis/IMultiOwnable.json +21 -0
  25. package/abis/IProtocolRewards.json +19 -0
  26. package/abis/ISecondarySwap.json +45 -0
  27. package/abis/IZoraCreator1155.json +51 -0
  28. package/abis/IZoraTimedSaleStrategy.json +91 -0
  29. package/abis/Mock1155.json +75 -1
  30. package/abis/Mock1155NoCreatorRewardRecipient.json +605 -0
  31. package/abis/Mock1155NoOwner.json +566 -0
  32. package/abis/{MockMinter.json → MockDelegateCommenter.json} +12 -2
  33. package/abis/MockERC20z.json +315 -0
  34. package/abis/MockMultiOwnable.json +212 -0
  35. package/abis/MockSecondarySwap.json +95 -0
  36. package/abis/MockZoraTimedSale.json +139 -0
  37. package/abis/Ownable2StepUpgradeable.json +138 -0
  38. package/abis/UnorderedNoncesUpgradeable.json +4 -4
  39. package/addresses/10.json +9 -0
  40. package/addresses/11155111.json +9 -0
  41. package/addresses/11155420.json +9 -0
  42. package/addresses/42161.json +9 -0
  43. package/addresses/7777777.json +9 -0
  44. package/addresses/8453.json +9 -0
  45. package/addresses/84532.json +9 -0
  46. package/addresses/999999999.json +7 -2
  47. package/deterministicConfig/callerAndCommenter.json +8 -0
  48. package/deterministicConfig/comments.json +2 -2
  49. package/dist/index.cjs +724 -35
  50. package/dist/index.cjs.map +1 -1
  51. package/dist/index.js +723 -35
  52. package/dist/index.js.map +1 -1
  53. package/dist/types.d.ts +1 -1
  54. package/dist/types.d.ts.map +1 -1
  55. package/dist/wagmiGenerated.d.ts +1102 -57
  56. package/dist/wagmiGenerated.d.ts.map +1 -1
  57. package/package/types.ts +4 -1
  58. package/package/wagmiGenerated.ts +728 -32
  59. package/package.json +11 -10
  60. package/script/AddDelegateCommenterRole.s.sol +24 -0
  61. package/script/CommentsDeployerBase.sol +101 -19
  62. package/script/Deploy.s.sol +2 -44
  63. package/script/DeployCallerAndCommenterImpl.s.sol +27 -0
  64. package/script/DeployImpl.s.sol +1 -0
  65. package/script/DeployNonDeterministic.s.sol +22 -13
  66. package/script/GenerateDeterministicParams.s.sol +32 -4
  67. package/scripts/generateCommentsTestData.ts +170 -79
  68. package/src/CommentsImpl.sol +267 -134
  69. package/src/CommentsImplConstants.sol +44 -0
  70. package/src/interfaces/ICallerAndCommenter.sol +215 -0
  71. package/src/interfaces/IComments.sol +189 -42
  72. package/src/interfaces/IMultiOwnable.sol +10 -0
  73. package/src/interfaces/ISecondarySwap.sol +40 -0
  74. package/src/interfaces/IZoraCreator1155.sol +6 -1
  75. package/src/interfaces/IZoraCreator1155TypesV1.sol +46 -0
  76. package/src/interfaces/IZoraTimedSaleStrategy.sol +25 -0
  77. package/src/proxy/CallerAndCommenter.sol +43 -0
  78. package/src/utils/CallerAndCommenterImpl.sol +376 -0
  79. package/src/utils/EIP712UpgradeableWithChainId.sol +12 -23
  80. package/src/version/ContractVersionBase.sol +1 -1
  81. package/test/CallerAndCommenterTestBase.sol +77 -0
  82. package/test/CallerAndCommenter_mintAndComment.t copy.sol +214 -0
  83. package/test/CallerAndCommenter_swapAndComment.t.sol +523 -0
  84. package/test/Comments.t.sol +166 -29
  85. package/test/CommentsTestBase.sol +12 -20
  86. package/test/Comments_delegateComment.t.sol +129 -0
  87. package/test/Comments_permit.t.sol +131 -44
  88. package/test/Comments_smartWallet.t.sol +152 -0
  89. package/test/mocks/Mock1155.sol +12 -1
  90. package/test/mocks/Mock1155NoCreatorRewardRecipient.sol +65 -0
  91. package/test/mocks/Mock1155NoOwner.sol +53 -0
  92. package/test/mocks/MockDelegateCommenter.sol +36 -0
  93. package/test/mocks/MockIZoraCreator1155.sol +16 -0
  94. package/test/mocks/MockSecondarySwap.sol +30 -0
  95. package/test/mocks/MockZoraTimedSale.sol +38 -0
  96. package/wagmi.config.ts +3 -1
  97. package/scripts/backfillComments.ts +0 -176
  98. package/scripts/queries.ts +0 -73
  99. package/scripts/queryAndSaveComments.ts +0 -48
  100. package/scripts/queryQuantityOfComments.ts +0 -53
  101. package/scripts/writeComments.ts +0 -198
  102. package/src/deployments/CommentsDeployment.sol +0 -14
  103. package/test/Comments_mintAndComment.t.sol +0 -101
  104. package/test/mocks/MockMinter.sol +0 -29
package/dist/index.js CHANGED
@@ -1,11 +1,634 @@
1
1
  // package/wagmiGenerated.ts
2
+ var callerAndCommenterImplABI = [
3
+ {
4
+ stateMutability: "nonpayable",
5
+ type: "constructor",
6
+ inputs: [
7
+ { name: "_comments", internalType: "address", type: "address" },
8
+ { name: "_zoraTimedSale", internalType: "address", type: "address" },
9
+ { name: "_swapHelper", internalType: "address", type: "address" },
10
+ { name: "_sparksValue", internalType: "uint256", type: "uint256" }
11
+ ]
12
+ },
13
+ {
14
+ stateMutability: "view",
15
+ type: "function",
16
+ inputs: [],
17
+ name: "UPGRADE_INTERFACE_VERSION",
18
+ outputs: [{ name: "", internalType: "string", type: "string" }]
19
+ },
20
+ {
21
+ stateMutability: "nonpayable",
22
+ type: "function",
23
+ inputs: [],
24
+ name: "acceptOwnership",
25
+ outputs: []
26
+ },
27
+ {
28
+ stateMutability: "payable",
29
+ type: "function",
30
+ inputs: [
31
+ { name: "commenter", internalType: "address", type: "address" },
32
+ { name: "quantity", internalType: "uint256", type: "uint256" },
33
+ { name: "collection", internalType: "address", type: "address" },
34
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
35
+ {
36
+ name: "excessRefundRecipient",
37
+ internalType: "address payable",
38
+ type: "address"
39
+ },
40
+ { name: "maxEthToSpend", internalType: "uint256", type: "uint256" },
41
+ { name: "sqrtPriceLimitX96", internalType: "uint160", type: "uint160" },
42
+ { name: "comment", internalType: "string", type: "string" }
43
+ ],
44
+ name: "buyOnSecondaryAndComment",
45
+ outputs: [
46
+ {
47
+ name: "",
48
+ internalType: "struct IComments.CommentIdentifier",
49
+ type: "tuple",
50
+ components: [
51
+ { name: "commenter", internalType: "address", type: "address" },
52
+ { name: "contractAddress", internalType: "address", type: "address" },
53
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
54
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
55
+ ]
56
+ }
57
+ ]
58
+ },
59
+ {
60
+ stateMutability: "view",
61
+ type: "function",
62
+ inputs: [],
63
+ name: "comments",
64
+ outputs: [
65
+ { name: "", internalType: "contract IComments", type: "address" }
66
+ ]
67
+ },
68
+ {
69
+ stateMutability: "pure",
70
+ type: "function",
71
+ inputs: [],
72
+ name: "contractName",
73
+ outputs: [{ name: "", internalType: "string", type: "string" }]
74
+ },
75
+ {
76
+ stateMutability: "pure",
77
+ type: "function",
78
+ inputs: [],
79
+ name: "contractVersion",
80
+ outputs: [{ name: "", internalType: "string", type: "string" }]
81
+ },
82
+ {
83
+ stateMutability: "view",
84
+ type: "function",
85
+ inputs: [],
86
+ name: "eip712Domain",
87
+ outputs: [
88
+ { name: "fields", internalType: "bytes1", type: "bytes1" },
89
+ { name: "name", internalType: "string", type: "string" },
90
+ { name: "version", internalType: "string", type: "string" },
91
+ { name: "chainId", internalType: "uint256", type: "uint256" },
92
+ { name: "verifyingContract", internalType: "address", type: "address" },
93
+ { name: "salt", internalType: "bytes32", type: "bytes32" },
94
+ { name: "extensions", internalType: "uint256[]", type: "uint256[]" }
95
+ ]
96
+ },
97
+ {
98
+ stateMutability: "view",
99
+ type: "function",
100
+ inputs: [
101
+ {
102
+ name: "permit",
103
+ internalType: "struct ICallerAndCommenter.PermitBuyOnSecondaryAndComment",
104
+ type: "tuple",
105
+ components: [
106
+ { name: "commenter", internalType: "address", type: "address" },
107
+ { name: "quantity", internalType: "uint256", type: "uint256" },
108
+ { name: "collection", internalType: "address", type: "address" },
109
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
110
+ { name: "maxEthToSpend", internalType: "uint256", type: "uint256" },
111
+ {
112
+ name: "sqrtPriceLimitX96",
113
+ internalType: "uint160",
114
+ type: "uint160"
115
+ },
116
+ { name: "comment", internalType: "string", type: "string" },
117
+ { name: "deadline", internalType: "uint256", type: "uint256" },
118
+ { name: "nonce", internalType: "bytes32", type: "bytes32" },
119
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
120
+ {
121
+ name: "destinationChainId",
122
+ internalType: "uint32",
123
+ type: "uint32"
124
+ }
125
+ ]
126
+ }
127
+ ],
128
+ name: "hashPermitBuyOnSecondaryAndComment",
129
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }]
130
+ },
131
+ {
132
+ stateMutability: "view",
133
+ type: "function",
134
+ inputs: [
135
+ {
136
+ name: "permit",
137
+ internalType: "struct ICallerAndCommenter.PermitTimedSaleMintAndComment",
138
+ type: "tuple",
139
+ components: [
140
+ { name: "commenter", internalType: "address", type: "address" },
141
+ { name: "quantity", internalType: "uint256", type: "uint256" },
142
+ { name: "collection", internalType: "address", type: "address" },
143
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
144
+ { name: "mintReferral", internalType: "address", type: "address" },
145
+ { name: "comment", internalType: "string", type: "string" },
146
+ { name: "deadline", internalType: "uint256", type: "uint256" },
147
+ { name: "nonce", internalType: "bytes32", type: "bytes32" },
148
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
149
+ {
150
+ name: "destinationChainId",
151
+ internalType: "uint32",
152
+ type: "uint32"
153
+ }
154
+ ]
155
+ }
156
+ ],
157
+ name: "hashPermitTimedSaleMintAndComment",
158
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }]
159
+ },
160
+ {
161
+ stateMutability: "nonpayable",
162
+ type: "function",
163
+ inputs: [{ name: "owner", internalType: "address", type: "address" }],
164
+ name: "initialize",
165
+ outputs: []
166
+ },
167
+ {
168
+ stateMutability: "view",
169
+ type: "function",
170
+ inputs: [
171
+ { name: "owner", internalType: "address", type: "address" },
172
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
173
+ ],
174
+ name: "nonceUsed",
175
+ outputs: [{ name: "", internalType: "bool", type: "bool" }]
176
+ },
177
+ {
178
+ stateMutability: "view",
179
+ type: "function",
180
+ inputs: [],
181
+ name: "owner",
182
+ outputs: [{ name: "", internalType: "address", type: "address" }]
183
+ },
184
+ {
185
+ stateMutability: "view",
186
+ type: "function",
187
+ inputs: [],
188
+ name: "pendingOwner",
189
+ outputs: [{ name: "", internalType: "address", type: "address" }]
190
+ },
191
+ {
192
+ stateMutability: "payable",
193
+ type: "function",
194
+ inputs: [
195
+ {
196
+ name: "permit",
197
+ internalType: "struct ICallerAndCommenter.PermitBuyOnSecondaryAndComment",
198
+ type: "tuple",
199
+ components: [
200
+ { name: "commenter", internalType: "address", type: "address" },
201
+ { name: "quantity", internalType: "uint256", type: "uint256" },
202
+ { name: "collection", internalType: "address", type: "address" },
203
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
204
+ { name: "maxEthToSpend", internalType: "uint256", type: "uint256" },
205
+ {
206
+ name: "sqrtPriceLimitX96",
207
+ internalType: "uint160",
208
+ type: "uint160"
209
+ },
210
+ { name: "comment", internalType: "string", type: "string" },
211
+ { name: "deadline", internalType: "uint256", type: "uint256" },
212
+ { name: "nonce", internalType: "bytes32", type: "bytes32" },
213
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
214
+ {
215
+ name: "destinationChainId",
216
+ internalType: "uint32",
217
+ type: "uint32"
218
+ }
219
+ ]
220
+ },
221
+ { name: "signature", internalType: "bytes", type: "bytes" }
222
+ ],
223
+ name: "permitBuyOnSecondaryAndComment",
224
+ outputs: [
225
+ {
226
+ name: "",
227
+ internalType: "struct IComments.CommentIdentifier",
228
+ type: "tuple",
229
+ components: [
230
+ { name: "commenter", internalType: "address", type: "address" },
231
+ { name: "contractAddress", internalType: "address", type: "address" },
232
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
233
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
234
+ ]
235
+ }
236
+ ]
237
+ },
238
+ {
239
+ stateMutability: "payable",
240
+ type: "function",
241
+ inputs: [
242
+ {
243
+ name: "permit",
244
+ internalType: "struct ICallerAndCommenter.PermitTimedSaleMintAndComment",
245
+ type: "tuple",
246
+ components: [
247
+ { name: "commenter", internalType: "address", type: "address" },
248
+ { name: "quantity", internalType: "uint256", type: "uint256" },
249
+ { name: "collection", internalType: "address", type: "address" },
250
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
251
+ { name: "mintReferral", internalType: "address", type: "address" },
252
+ { name: "comment", internalType: "string", type: "string" },
253
+ { name: "deadline", internalType: "uint256", type: "uint256" },
254
+ { name: "nonce", internalType: "bytes32", type: "bytes32" },
255
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
256
+ {
257
+ name: "destinationChainId",
258
+ internalType: "uint32",
259
+ type: "uint32"
260
+ }
261
+ ]
262
+ },
263
+ { name: "signature", internalType: "bytes", type: "bytes" }
264
+ ],
265
+ name: "permitTimedSaleMintAndComment",
266
+ outputs: [
267
+ {
268
+ name: "",
269
+ internalType: "struct IComments.CommentIdentifier",
270
+ type: "tuple",
271
+ components: [
272
+ { name: "commenter", internalType: "address", type: "address" },
273
+ { name: "contractAddress", internalType: "address", type: "address" },
274
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
275
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
276
+ ]
277
+ }
278
+ ]
279
+ },
280
+ {
281
+ stateMutability: "view",
282
+ type: "function",
283
+ inputs: [],
284
+ name: "proxiableUUID",
285
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }]
286
+ },
287
+ {
288
+ stateMutability: "nonpayable",
289
+ type: "function",
290
+ inputs: [],
291
+ name: "renounceOwnership",
292
+ outputs: []
293
+ },
294
+ {
295
+ stateMutability: "view",
296
+ type: "function",
297
+ inputs: [],
298
+ name: "secondarySwap",
299
+ outputs: [
300
+ { name: "", internalType: "contract ISecondarySwap", type: "address" }
301
+ ]
302
+ },
303
+ {
304
+ stateMutability: "payable",
305
+ type: "function",
306
+ inputs: [
307
+ { name: "commenter", internalType: "address", type: "address" },
308
+ { name: "quantity", internalType: "uint256", type: "uint256" },
309
+ { name: "collection", internalType: "address", type: "address" },
310
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
311
+ { name: "recipient", internalType: "address payable", type: "address" },
312
+ { name: "minEthToAcquire", internalType: "uint256", type: "uint256" },
313
+ { name: "sqrtPriceLimitX96", internalType: "uint160", type: "uint160" },
314
+ { name: "comment", internalType: "string", type: "string" }
315
+ ],
316
+ name: "sellOnSecondaryAndComment",
317
+ outputs: [
318
+ {
319
+ name: "commentIdentifier",
320
+ internalType: "struct IComments.CommentIdentifier",
321
+ type: "tuple",
322
+ components: [
323
+ { name: "commenter", internalType: "address", type: "address" },
324
+ { name: "contractAddress", internalType: "address", type: "address" },
325
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
326
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
327
+ ]
328
+ }
329
+ ]
330
+ },
331
+ {
332
+ stateMutability: "view",
333
+ type: "function",
334
+ inputs: [],
335
+ name: "sparkValue",
336
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }]
337
+ },
338
+ {
339
+ stateMutability: "payable",
340
+ type: "function",
341
+ inputs: [
342
+ { name: "commenter", internalType: "address", type: "address" },
343
+ { name: "quantity", internalType: "uint256", type: "uint256" },
344
+ { name: "collection", internalType: "address", type: "address" },
345
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
346
+ { name: "mintReferral", internalType: "address", type: "address" },
347
+ { name: "comment", internalType: "string", type: "string" }
348
+ ],
349
+ name: "timedSaleMintAndComment",
350
+ outputs: [
351
+ {
352
+ name: "",
353
+ internalType: "struct IComments.CommentIdentifier",
354
+ type: "tuple",
355
+ components: [
356
+ { name: "commenter", internalType: "address", type: "address" },
357
+ { name: "contractAddress", internalType: "address", type: "address" },
358
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
359
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
360
+ ]
361
+ }
362
+ ]
363
+ },
364
+ {
365
+ stateMutability: "nonpayable",
366
+ type: "function",
367
+ inputs: [{ name: "newOwner", internalType: "address", type: "address" }],
368
+ name: "transferOwnership",
369
+ outputs: []
370
+ },
371
+ {
372
+ stateMutability: "payable",
373
+ type: "function",
374
+ inputs: [
375
+ { name: "newImplementation", internalType: "address", type: "address" },
376
+ { name: "data", internalType: "bytes", type: "bytes" }
377
+ ],
378
+ name: "upgradeToAndCall",
379
+ outputs: []
380
+ },
381
+ {
382
+ stateMutability: "view",
383
+ type: "function",
384
+ inputs: [],
385
+ name: "zoraTimedSale",
386
+ outputs: [
387
+ {
388
+ name: "",
389
+ internalType: "contract IZoraTimedSaleStrategy",
390
+ type: "address"
391
+ }
392
+ ]
393
+ },
394
+ { type: "event", anonymous: false, inputs: [], name: "EIP712DomainChanged" },
395
+ {
396
+ type: "event",
397
+ anonymous: false,
398
+ inputs: [
399
+ {
400
+ name: "version",
401
+ internalType: "uint64",
402
+ type: "uint64",
403
+ indexed: false
404
+ }
405
+ ],
406
+ name: "Initialized"
407
+ },
408
+ {
409
+ type: "event",
410
+ anonymous: false,
411
+ inputs: [
412
+ {
413
+ name: "commentId",
414
+ internalType: "bytes32",
415
+ type: "bytes32",
416
+ indexed: true
417
+ },
418
+ {
419
+ name: "commentIdentifier",
420
+ internalType: "struct IComments.CommentIdentifier",
421
+ type: "tuple",
422
+ components: [
423
+ { name: "commenter", internalType: "address", type: "address" },
424
+ { name: "contractAddress", internalType: "address", type: "address" },
425
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
426
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
427
+ ],
428
+ indexed: false
429
+ },
430
+ {
431
+ name: "quantity",
432
+ internalType: "uint256",
433
+ type: "uint256",
434
+ indexed: false
435
+ },
436
+ { name: "text", internalType: "string", type: "string", indexed: false }
437
+ ],
438
+ name: "MintedAndCommented"
439
+ },
440
+ {
441
+ type: "event",
442
+ anonymous: false,
443
+ inputs: [
444
+ {
445
+ name: "previousOwner",
446
+ internalType: "address",
447
+ type: "address",
448
+ indexed: true
449
+ },
450
+ {
451
+ name: "newOwner",
452
+ internalType: "address",
453
+ type: "address",
454
+ indexed: true
455
+ }
456
+ ],
457
+ name: "OwnershipTransferStarted"
458
+ },
459
+ {
460
+ type: "event",
461
+ anonymous: false,
462
+ inputs: [
463
+ {
464
+ name: "previousOwner",
465
+ internalType: "address",
466
+ type: "address",
467
+ indexed: true
468
+ },
469
+ {
470
+ name: "newOwner",
471
+ internalType: "address",
472
+ type: "address",
473
+ indexed: true
474
+ }
475
+ ],
476
+ name: "OwnershipTransferred"
477
+ },
478
+ {
479
+ type: "event",
480
+ anonymous: false,
481
+ inputs: [
482
+ {
483
+ name: "commentId",
484
+ internalType: "bytes32",
485
+ type: "bytes32",
486
+ indexed: true
487
+ },
488
+ {
489
+ name: "commentIdentifier",
490
+ internalType: "struct IComments.CommentIdentifier",
491
+ type: "tuple",
492
+ components: [
493
+ { name: "commenter", internalType: "address", type: "address" },
494
+ { name: "contractAddress", internalType: "address", type: "address" },
495
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
496
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
497
+ ],
498
+ indexed: false
499
+ },
500
+ {
501
+ name: "quantity",
502
+ internalType: "uint256",
503
+ type: "uint256",
504
+ indexed: true
505
+ },
506
+ {
507
+ name: "comment",
508
+ internalType: "string",
509
+ type: "string",
510
+ indexed: false
511
+ },
512
+ {
513
+ name: "swapDirection",
514
+ internalType: "enum ICallerAndCommenter.SwapDirection",
515
+ type: "uint8",
516
+ indexed: true
517
+ }
518
+ ],
519
+ name: "SwappedOnSecondaryAndCommented"
520
+ },
521
+ {
522
+ type: "event",
523
+ anonymous: false,
524
+ inputs: [
525
+ {
526
+ name: "implementation",
527
+ internalType: "address",
528
+ type: "address",
529
+ indexed: true
530
+ }
531
+ ],
532
+ name: "Upgraded"
533
+ },
534
+ {
535
+ type: "error",
536
+ inputs: [{ name: "target", internalType: "address", type: "address" }],
537
+ name: "AddressEmptyCode"
538
+ },
539
+ {
540
+ type: "error",
541
+ inputs: [
542
+ { name: "expected", internalType: "address", type: "address" },
543
+ { name: "actual", internalType: "address", type: "address" }
544
+ ],
545
+ name: "CommenterMismatch"
546
+ },
547
+ {
548
+ type: "error",
549
+ inputs: [
550
+ { name: "implementation", internalType: "address", type: "address" }
551
+ ],
552
+ name: "ERC1967InvalidImplementation"
553
+ },
554
+ { type: "error", inputs: [], name: "ERC1967NonPayable" },
555
+ {
556
+ type: "error",
557
+ inputs: [{ name: "deadline", internalType: "uint256", type: "uint256" }],
558
+ name: "ERC2612ExpiredSignature"
559
+ },
560
+ { type: "error", inputs: [], name: "FailedInnerCall" },
561
+ {
562
+ type: "error",
563
+ inputs: [
564
+ {
565
+ name: "wrongDestinationChainId",
566
+ internalType: "uint256",
567
+ type: "uint256"
568
+ }
569
+ ],
570
+ name: "IncorrectDestinationChain"
571
+ },
572
+ {
573
+ type: "error",
574
+ inputs: [
575
+ { name: "account", internalType: "address", type: "address" },
576
+ { name: "currentNonce", internalType: "bytes32", type: "bytes32" }
577
+ ],
578
+ name: "InvalidAccountNonce"
579
+ },
580
+ { type: "error", inputs: [], name: "InvalidInitialization" },
581
+ { type: "error", inputs: [], name: "InvalidSignature" },
582
+ { type: "error", inputs: [], name: "NotInitializing" },
583
+ {
584
+ type: "error",
585
+ inputs: [{ name: "owner", internalType: "address", type: "address" }],
586
+ name: "OwnableInvalidOwner"
587
+ },
588
+ {
589
+ type: "error",
590
+ inputs: [{ name: "account", internalType: "address", type: "address" }],
591
+ name: "OwnableUnauthorizedAccount"
592
+ },
593
+ {
594
+ type: "error",
595
+ inputs: [
596
+ { name: "collection", internalType: "address", type: "address" },
597
+ { name: "tokenId", internalType: "uint256", type: "uint256" }
598
+ ],
599
+ name: "SaleNotSet"
600
+ },
601
+ { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" },
602
+ {
603
+ type: "error",
604
+ inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }],
605
+ name: "UUPSUnsupportedProxiableUUID"
606
+ },
607
+ {
608
+ type: "error",
609
+ inputs: [
610
+ { name: "currentName", internalType: "string", type: "string" },
611
+ { name: "newName", internalType: "string", type: "string" }
612
+ ],
613
+ name: "UpgradeToMismatchedContractName"
614
+ },
615
+ {
616
+ type: "error",
617
+ inputs: [
618
+ { name: "expected", internalType: "uint256", type: "uint256" },
619
+ { name: "actual", internalType: "uint256", type: "uint256" }
620
+ ],
621
+ name: "WrongValueSent"
622
+ }
623
+ ];
2
624
  var commentsImplABI = [
3
625
  {
4
626
  stateMutability: "nonpayable",
5
627
  type: "constructor",
6
628
  inputs: [
7
629
  { name: "_sparkValue", internalType: "uint256", type: "uint256" },
8
- { name: "_protocolRewards", internalType: "address", type: "address" }
630
+ { name: "_protocolRewards", internalType: "address", type: "address" },
631
+ { name: "_zoraRecipient", internalType: "address", type: "address" }
9
632
  ]
10
633
  },
11
634
  {
@@ -26,7 +649,7 @@ var commentsImplABI = [
26
649
  stateMutability: "view",
27
650
  type: "function",
28
651
  inputs: [],
29
- name: "DELEGATE_COMMENTOR",
652
+ name: "DELEGATE_COMMENTER",
30
653
  outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }]
31
654
  },
32
655
  {
@@ -123,6 +746,11 @@ var commentsImplABI = [
123
746
  { name: "nonce", internalType: "bytes32", type: "bytes32" }
124
747
  ]
125
748
  },
749
+ {
750
+ name: "commenterSmartWallet",
751
+ internalType: "address",
752
+ type: "address"
753
+ },
126
754
  { name: "referrer", internalType: "address", type: "address" }
127
755
  ],
128
756
  name: "comment",
@@ -143,9 +771,21 @@ var commentsImplABI = [
143
771
  {
144
772
  stateMutability: "view",
145
773
  type: "function",
146
- inputs: [{ name: "commentId", internalType: "bytes32", type: "bytes32" }],
774
+ inputs: [
775
+ {
776
+ name: "commentIdentifier",
777
+ internalType: "struct IComments.CommentIdentifier",
778
+ type: "tuple",
779
+ components: [
780
+ { name: "commenter", internalType: "address", type: "address" },
781
+ { name: "contractAddress", internalType: "address", type: "address" },
782
+ { name: "tokenId", internalType: "uint256", type: "uint256" },
783
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
784
+ ]
785
+ }
786
+ ],
147
787
  name: "commentSparksQuantity",
148
- outputs: [{ name: "", internalType: "uint64", type: "uint64" }]
788
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }]
149
789
  },
150
790
  {
151
791
  stateMutability: "pure",
@@ -162,7 +802,7 @@ var commentsImplABI = [
162
802
  outputs: [{ name: "", internalType: "string", type: "string" }]
163
803
  },
164
804
  {
165
- stateMutability: "nonpayable",
805
+ stateMutability: "payable",
166
806
  type: "function",
167
807
  inputs: [
168
808
  { name: "commenter", internalType: "address", type: "address" },
@@ -179,7 +819,13 @@ var commentsImplABI = [
179
819
  { name: "tokenId", internalType: "uint256", type: "uint256" },
180
820
  { name: "nonce", internalType: "bytes32", type: "bytes32" }
181
821
  ]
182
- }
822
+ },
823
+ {
824
+ name: "commenterSmartWalletOwner",
825
+ internalType: "address",
826
+ type: "address"
827
+ },
828
+ { name: "referrer", internalType: "address", type: "address" }
183
829
  ],
184
830
  name: "delegateComment",
185
831
  outputs: [
@@ -193,7 +839,23 @@ var commentsImplABI = [
193
839
  { name: "tokenId", internalType: "uint256", type: "uint256" },
194
840
  { name: "nonce", internalType: "bytes32", type: "bytes32" }
195
841
  ]
196
- }
842
+ },
843
+ { name: "commentId", internalType: "bytes32", type: "bytes32" }
844
+ ]
845
+ },
846
+ {
847
+ stateMutability: "view",
848
+ type: "function",
849
+ inputs: [],
850
+ name: "eip712Domain",
851
+ outputs: [
852
+ { name: "fields", internalType: "bytes1", type: "bytes1" },
853
+ { name: "name", internalType: "string", type: "string" },
854
+ { name: "version", internalType: "string", type: "string" },
855
+ { name: "chainId", internalType: "uint256", type: "uint256" },
856
+ { name: "verifyingContract", internalType: "address", type: "address" },
857
+ { name: "salt", internalType: "bytes32", type: "bytes32" },
858
+ { name: "extensions", internalType: "uint256[]", type: "uint256[]" }
197
859
  ]
198
860
  },
199
861
  {
@@ -293,6 +955,11 @@ var commentsImplABI = [
293
955
  type: "tuple",
294
956
  components: [
295
957
  { name: "commenter", internalType: "address", type: "address" },
958
+ {
959
+ name: "commenterSmartWallet",
960
+ internalType: "address",
961
+ type: "address"
962
+ },
296
963
  { name: "contractAddress", internalType: "address", type: "address" },
297
964
  { name: "tokenId", internalType: "uint256", type: "uint256" },
298
965
  {
@@ -311,15 +978,14 @@ var commentsImplABI = [
311
978
  ]
312
979
  },
313
980
  { name: "text", internalType: "string", type: "string" },
314
- { name: "sparksQuantity", internalType: "uint64", type: "uint64" },
981
+ { name: "referrer", internalType: "address", type: "address" },
315
982
  { name: "deadline", internalType: "uint256", type: "uint256" },
316
983
  { name: "nonce", internalType: "bytes32", type: "bytes32" },
317
- { name: "referrer", internalType: "address", type: "address" },
318
- { name: "sourceChainId", internalType: "uint256", type: "uint256" },
984
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
319
985
  {
320
986
  name: "destinationChainId",
321
- internalType: "uint256",
322
- type: "uint256"
987
+ internalType: "uint32",
988
+ type: "uint32"
323
989
  }
324
990
  ]
325
991
  }
@@ -352,15 +1018,15 @@ var commentsImplABI = [
352
1018
  ]
353
1019
  },
354
1020
  { name: "sparker", internalType: "address", type: "address" },
355
- { name: "sparksQuantity", internalType: "uint64", type: "uint64" },
1021
+ { name: "sparksQuantity", internalType: "uint256", type: "uint256" },
356
1022
  { name: "deadline", internalType: "uint256", type: "uint256" },
357
1023
  { name: "nonce", internalType: "bytes32", type: "bytes32" },
358
1024
  { name: "referrer", internalType: "address", type: "address" },
359
- { name: "sourceChainId", internalType: "uint256", type: "uint256" },
1025
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
360
1026
  {
361
1027
  name: "destinationChainId",
362
- internalType: "uint256",
363
- type: "uint256"
1028
+ internalType: "uint32",
1029
+ type: "uint32"
364
1030
  }
365
1031
  ]
366
1032
  }
@@ -368,11 +1034,17 @@ var commentsImplABI = [
368
1034
  name: "hashPermitSparkComment",
369
1035
  outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }]
370
1036
  },
1037
+ {
1038
+ stateMutability: "view",
1039
+ type: "function",
1040
+ inputs: [],
1041
+ name: "implementation",
1042
+ outputs: [{ name: "", internalType: "address", type: "address" }]
1043
+ },
371
1044
  {
372
1045
  stateMutability: "nonpayable",
373
1046
  type: "function",
374
1047
  inputs: [
375
- { name: "_zoraRecipient", internalType: "address", type: "address" },
376
1048
  { name: "defaultAdmin", internalType: "address", type: "address" },
377
1049
  { name: "backfiller", internalType: "address", type: "address" },
378
1050
  {
@@ -396,7 +1068,7 @@ var commentsImplABI = [
396
1068
  type: "function",
397
1069
  inputs: [
398
1070
  { name: "owner", internalType: "address", type: "address" },
399
- { name: "nonce", internalType: "uint256", type: "uint256" }
1071
+ { name: "nonce", internalType: "bytes32", type: "bytes32" }
400
1072
  ],
401
1073
  name: "nonceUsed",
402
1074
  outputs: [{ name: "", internalType: "bool", type: "bool" }]
@@ -411,6 +1083,11 @@ var commentsImplABI = [
411
1083
  type: "tuple",
412
1084
  components: [
413
1085
  { name: "commenter", internalType: "address", type: "address" },
1086
+ {
1087
+ name: "commenterSmartWallet",
1088
+ internalType: "address",
1089
+ type: "address"
1090
+ },
414
1091
  { name: "contractAddress", internalType: "address", type: "address" },
415
1092
  { name: "tokenId", internalType: "uint256", type: "uint256" },
416
1093
  {
@@ -429,15 +1106,14 @@ var commentsImplABI = [
429
1106
  ]
430
1107
  },
431
1108
  { name: "text", internalType: "string", type: "string" },
432
- { name: "sparksQuantity", internalType: "uint64", type: "uint64" },
1109
+ { name: "referrer", internalType: "address", type: "address" },
433
1110
  { name: "deadline", internalType: "uint256", type: "uint256" },
434
1111
  { name: "nonce", internalType: "bytes32", type: "bytes32" },
435
- { name: "referrer", internalType: "address", type: "address" },
436
- { name: "sourceChainId", internalType: "uint256", type: "uint256" },
1112
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
437
1113
  {
438
1114
  name: "destinationChainId",
439
- internalType: "uint256",
440
- type: "uint256"
1115
+ internalType: "uint32",
1116
+ type: "uint32"
441
1117
  }
442
1118
  ]
443
1119
  },
@@ -471,15 +1147,15 @@ var commentsImplABI = [
471
1147
  ]
472
1148
  },
473
1149
  { name: "sparker", internalType: "address", type: "address" },
474
- { name: "sparksQuantity", internalType: "uint64", type: "uint64" },
1150
+ { name: "sparksQuantity", internalType: "uint256", type: "uint256" },
475
1151
  { name: "deadline", internalType: "uint256", type: "uint256" },
476
1152
  { name: "nonce", internalType: "bytes32", type: "bytes32" },
477
1153
  { name: "referrer", internalType: "address", type: "address" },
478
- { name: "sourceChainId", internalType: "uint256", type: "uint256" },
1154
+ { name: "sourceChainId", internalType: "uint32", type: "uint32" },
479
1155
  {
480
1156
  name: "destinationChainId",
481
- internalType: "uint256",
482
- type: "uint256"
1157
+ internalType: "uint32",
1158
+ type: "uint32"
483
1159
  }
484
1160
  ]
485
1161
  },
@@ -539,7 +1215,7 @@ var commentsImplABI = [
539
1215
  { name: "nonce", internalType: "bytes32", type: "bytes32" }
540
1216
  ]
541
1217
  },
542
- { name: "sparksQuantity", internalType: "uint64", type: "uint64" },
1218
+ { name: "sparksQuantity", internalType: "uint256", type: "uint256" },
543
1219
  { name: "referrer", internalType: "address", type: "address" }
544
1220
  ],
545
1221
  name: "sparkComment",
@@ -580,7 +1256,7 @@ var commentsImplABI = [
580
1256
  indexed: true
581
1257
  },
582
1258
  {
583
- name: "comment",
1259
+ name: "commentIdentifier",
584
1260
  internalType: "struct IComments.CommentIdentifier",
585
1261
  type: "tuple",
586
1262
  components: [
@@ -618,7 +1294,7 @@ var commentsImplABI = [
618
1294
  indexed: true
619
1295
  },
620
1296
  {
621
- name: "comment",
1297
+ name: "commentIdentifier",
622
1298
  internalType: "struct IComments.CommentIdentifier",
623
1299
  type: "tuple",
624
1300
  components: [
@@ -649,8 +1325,8 @@ var commentsImplABI = [
649
1325
  },
650
1326
  {
651
1327
  name: "sparksQuantity",
652
- internalType: "uint64",
653
- type: "uint64",
1328
+ internalType: "uint256",
1329
+ type: "uint256",
654
1330
  indexed: false
655
1331
  },
656
1332
  { name: "text", internalType: "string", type: "string", indexed: false },
@@ -669,6 +1345,7 @@ var commentsImplABI = [
669
1345
  ],
670
1346
  name: "Commented"
671
1347
  },
1348
+ { type: "event", anonymous: false, inputs: [], name: "EIP712DomainChanged" },
672
1349
  {
673
1350
  type: "event",
674
1351
  anonymous: false,
@@ -766,8 +1443,8 @@ var commentsImplABI = [
766
1443
  },
767
1444
  {
768
1445
  name: "sparksQuantity",
769
- internalType: "uint64",
770
- type: "uint64",
1446
+ internalType: "uint256",
1447
+ type: "uint256",
771
1448
  indexed: false
772
1449
  },
773
1450
  {
@@ -781,6 +1458,12 @@ var commentsImplABI = [
781
1458
  internalType: "uint256",
782
1459
  type: "uint256",
783
1460
  indexed: false
1461
+ },
1462
+ {
1463
+ name: "referrer",
1464
+ internalType: "address",
1465
+ type: "address",
1466
+ indexed: false
784
1467
  }
785
1468
  ],
786
1469
  name: "SparkedComment"
@@ -812,6 +1495,7 @@ var commentsImplABI = [
812
1495
  inputs: [{ name: "target", internalType: "address", type: "address" }],
813
1496
  name: "AddressEmptyCode"
814
1497
  },
1498
+ { type: "error", inputs: [], name: "AddressZero" },
815
1499
  { type: "error", inputs: [], name: "ArrayLengthMismatch" },
816
1500
  { type: "error", inputs: [], name: "CannotSparkOwnComment" },
817
1501
  {
@@ -876,14 +1560,17 @@ var commentsImplABI = [
876
1560
  type: "error",
877
1561
  inputs: [
878
1562
  { name: "account", internalType: "address", type: "address" },
879
- { name: "currentNonce", internalType: "uint256", type: "uint256" }
1563
+ { name: "currentNonce", internalType: "bytes32", type: "bytes32" }
880
1564
  ],
881
1565
  name: "InvalidAccountNonce"
882
1566
  },
883
1567
  { type: "error", inputs: [], name: "InvalidInitialization" },
884
1568
  { type: "error", inputs: [], name: "InvalidSignature" },
885
1569
  { type: "error", inputs: [], name: "MustSendAtLeastOneSpark" },
1570
+ { type: "error", inputs: [], name: "NoFundsRecipient" },
886
1571
  { type: "error", inputs: [], name: "NotInitializing" },
1572
+ { type: "error", inputs: [], name: "NotSmartWallet" },
1573
+ { type: "error", inputs: [], name: "NotSmartWalletOwner" },
887
1574
  { type: "error", inputs: [], name: "NotTokenHolderOrAdmin" },
888
1575
  { type: "error", inputs: [], name: "OnlySparksContract" },
889
1576
  { type: "error", inputs: [], name: "TransferFailed" },
@@ -903,6 +1590,7 @@ var commentsImplABI = [
903
1590
  }
904
1591
  ];
905
1592
  export {
1593
+ callerAndCommenterImplABI,
906
1594
  commentsImplABI
907
1595
  };
908
1596
  //# sourceMappingURL=index.js.map