@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
@@ -1,3 +1,634 @@
1
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2
+ // CallerAndCommenterImpl
3
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4
+
5
+ export const callerAndCommenterImplABI = [
6
+ {
7
+ stateMutability: 'nonpayable',
8
+ type: 'constructor',
9
+ inputs: [
10
+ { name: '_comments', internalType: 'address', type: 'address' },
11
+ { name: '_zoraTimedSale', internalType: 'address', type: 'address' },
12
+ { name: '_swapHelper', internalType: 'address', type: 'address' },
13
+ { name: '_sparksValue', internalType: 'uint256', type: 'uint256' },
14
+ ],
15
+ },
16
+ {
17
+ stateMutability: 'view',
18
+ type: 'function',
19
+ inputs: [],
20
+ name: 'UPGRADE_INTERFACE_VERSION',
21
+ outputs: [{ name: '', internalType: 'string', type: 'string' }],
22
+ },
23
+ {
24
+ stateMutability: 'nonpayable',
25
+ type: 'function',
26
+ inputs: [],
27
+ name: 'acceptOwnership',
28
+ outputs: [],
29
+ },
30
+ {
31
+ stateMutability: 'payable',
32
+ type: 'function',
33
+ inputs: [
34
+ { name: 'commenter', internalType: 'address', type: 'address' },
35
+ { name: 'quantity', internalType: 'uint256', type: 'uint256' },
36
+ { name: 'collection', internalType: 'address', type: 'address' },
37
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
38
+ {
39
+ name: 'excessRefundRecipient',
40
+ internalType: 'address payable',
41
+ type: 'address',
42
+ },
43
+ { name: 'maxEthToSpend', internalType: 'uint256', type: 'uint256' },
44
+ { name: 'sqrtPriceLimitX96', internalType: 'uint160', type: 'uint160' },
45
+ { name: 'comment', internalType: 'string', type: 'string' },
46
+ ],
47
+ name: 'buyOnSecondaryAndComment',
48
+ outputs: [
49
+ {
50
+ name: '',
51
+ internalType: 'struct IComments.CommentIdentifier',
52
+ type: 'tuple',
53
+ components: [
54
+ { name: 'commenter', internalType: 'address', type: 'address' },
55
+ { name: 'contractAddress', internalType: 'address', type: 'address' },
56
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
57
+ { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
58
+ ],
59
+ },
60
+ ],
61
+ },
62
+ {
63
+ stateMutability: 'view',
64
+ type: 'function',
65
+ inputs: [],
66
+ name: 'comments',
67
+ outputs: [
68
+ { name: '', internalType: 'contract IComments', type: 'address' },
69
+ ],
70
+ },
71
+ {
72
+ stateMutability: 'pure',
73
+ type: 'function',
74
+ inputs: [],
75
+ name: 'contractName',
76
+ outputs: [{ name: '', internalType: 'string', type: 'string' }],
77
+ },
78
+ {
79
+ stateMutability: 'pure',
80
+ type: 'function',
81
+ inputs: [],
82
+ name: 'contractVersion',
83
+ outputs: [{ name: '', internalType: 'string', type: 'string' }],
84
+ },
85
+ {
86
+ stateMutability: 'view',
87
+ type: 'function',
88
+ inputs: [],
89
+ name: 'eip712Domain',
90
+ outputs: [
91
+ { name: 'fields', internalType: 'bytes1', type: 'bytes1' },
92
+ { name: 'name', internalType: 'string', type: 'string' },
93
+ { name: 'version', internalType: 'string', type: 'string' },
94
+ { name: 'chainId', internalType: 'uint256', type: 'uint256' },
95
+ { name: 'verifyingContract', internalType: 'address', type: 'address' },
96
+ { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
97
+ { name: 'extensions', internalType: 'uint256[]', type: 'uint256[]' },
98
+ ],
99
+ },
100
+ {
101
+ stateMutability: 'view',
102
+ type: 'function',
103
+ inputs: [
104
+ {
105
+ name: 'permit',
106
+ internalType:
107
+ 'struct ICallerAndCommenter.PermitBuyOnSecondaryAndComment',
108
+ type: 'tuple',
109
+ components: [
110
+ { name: 'commenter', internalType: 'address', type: 'address' },
111
+ { name: 'quantity', internalType: 'uint256', type: 'uint256' },
112
+ { name: 'collection', internalType: 'address', type: 'address' },
113
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
114
+ { name: 'maxEthToSpend', internalType: 'uint256', type: 'uint256' },
115
+ {
116
+ name: 'sqrtPriceLimitX96',
117
+ internalType: 'uint160',
118
+ type: 'uint160',
119
+ },
120
+ { name: 'comment', internalType: 'string', type: 'string' },
121
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
122
+ { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
123
+ { name: 'sourceChainId', internalType: 'uint32', type: 'uint32' },
124
+ {
125
+ name: 'destinationChainId',
126
+ internalType: 'uint32',
127
+ type: 'uint32',
128
+ },
129
+ ],
130
+ },
131
+ ],
132
+ name: 'hashPermitBuyOnSecondaryAndComment',
133
+ outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
134
+ },
135
+ {
136
+ stateMutability: 'view',
137
+ type: 'function',
138
+ inputs: [
139
+ {
140
+ name: 'permit',
141
+ internalType:
142
+ 'struct ICallerAndCommenter.PermitTimedSaleMintAndComment',
143
+ type: 'tuple',
144
+ components: [
145
+ { name: 'commenter', internalType: 'address', type: 'address' },
146
+ { name: 'quantity', internalType: 'uint256', type: 'uint256' },
147
+ { name: 'collection', internalType: 'address', type: 'address' },
148
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
149
+ { name: 'mintReferral', internalType: 'address', type: 'address' },
150
+ { name: 'comment', internalType: 'string', type: 'string' },
151
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
152
+ { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
153
+ { name: 'sourceChainId', internalType: 'uint32', type: 'uint32' },
154
+ {
155
+ name: 'destinationChainId',
156
+ internalType: 'uint32',
157
+ type: 'uint32',
158
+ },
159
+ ],
160
+ },
161
+ ],
162
+ name: 'hashPermitTimedSaleMintAndComment',
163
+ outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
164
+ },
165
+ {
166
+ stateMutability: 'nonpayable',
167
+ type: 'function',
168
+ inputs: [{ name: 'owner', internalType: 'address', type: 'address' }],
169
+ name: 'initialize',
170
+ outputs: [],
171
+ },
172
+ {
173
+ stateMutability: 'view',
174
+ type: 'function',
175
+ inputs: [
176
+ { name: 'owner', internalType: 'address', type: 'address' },
177
+ { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
178
+ ],
179
+ name: 'nonceUsed',
180
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
181
+ },
182
+ {
183
+ stateMutability: 'view',
184
+ type: 'function',
185
+ inputs: [],
186
+ name: 'owner',
187
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
188
+ },
189
+ {
190
+ stateMutability: 'view',
191
+ type: 'function',
192
+ inputs: [],
193
+ name: 'pendingOwner',
194
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
195
+ },
196
+ {
197
+ stateMutability: 'payable',
198
+ type: 'function',
199
+ inputs: [
200
+ {
201
+ name: 'permit',
202
+ internalType:
203
+ 'struct ICallerAndCommenter.PermitBuyOnSecondaryAndComment',
204
+ type: 'tuple',
205
+ components: [
206
+ { name: 'commenter', internalType: 'address', type: 'address' },
207
+ { name: 'quantity', internalType: 'uint256', type: 'uint256' },
208
+ { name: 'collection', internalType: 'address', type: 'address' },
209
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
210
+ { name: 'maxEthToSpend', internalType: 'uint256', type: 'uint256' },
211
+ {
212
+ name: 'sqrtPriceLimitX96',
213
+ internalType: 'uint160',
214
+ type: 'uint160',
215
+ },
216
+ { name: 'comment', internalType: 'string', type: 'string' },
217
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
218
+ { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
219
+ { name: 'sourceChainId', internalType: 'uint32', type: 'uint32' },
220
+ {
221
+ name: 'destinationChainId',
222
+ internalType: 'uint32',
223
+ type: 'uint32',
224
+ },
225
+ ],
226
+ },
227
+ { name: 'signature', internalType: 'bytes', type: 'bytes' },
228
+ ],
229
+ name: 'permitBuyOnSecondaryAndComment',
230
+ outputs: [
231
+ {
232
+ name: '',
233
+ internalType: 'struct IComments.CommentIdentifier',
234
+ type: 'tuple',
235
+ components: [
236
+ { name: 'commenter', internalType: 'address', type: 'address' },
237
+ { name: 'contractAddress', internalType: 'address', type: 'address' },
238
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
239
+ { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
240
+ ],
241
+ },
242
+ ],
243
+ },
244
+ {
245
+ stateMutability: 'payable',
246
+ type: 'function',
247
+ inputs: [
248
+ {
249
+ name: 'permit',
250
+ internalType:
251
+ 'struct ICallerAndCommenter.PermitTimedSaleMintAndComment',
252
+ type: 'tuple',
253
+ components: [
254
+ { name: 'commenter', internalType: 'address', type: 'address' },
255
+ { name: 'quantity', internalType: 'uint256', type: 'uint256' },
256
+ { name: 'collection', internalType: 'address', type: 'address' },
257
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
258
+ { name: 'mintReferral', internalType: 'address', type: 'address' },
259
+ { name: 'comment', internalType: 'string', type: 'string' },
260
+ { name: 'deadline', internalType: 'uint256', type: 'uint256' },
261
+ { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
262
+ { name: 'sourceChainId', internalType: 'uint32', type: 'uint32' },
263
+ {
264
+ name: 'destinationChainId',
265
+ internalType: 'uint32',
266
+ type: 'uint32',
267
+ },
268
+ ],
269
+ },
270
+ { name: 'signature', internalType: 'bytes', type: 'bytes' },
271
+ ],
272
+ name: 'permitTimedSaleMintAndComment',
273
+ outputs: [
274
+ {
275
+ name: '',
276
+ internalType: 'struct IComments.CommentIdentifier',
277
+ type: 'tuple',
278
+ components: [
279
+ { name: 'commenter', internalType: 'address', type: 'address' },
280
+ { name: 'contractAddress', internalType: 'address', type: 'address' },
281
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
282
+ { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
283
+ ],
284
+ },
285
+ ],
286
+ },
287
+ {
288
+ stateMutability: 'view',
289
+ type: 'function',
290
+ inputs: [],
291
+ name: 'proxiableUUID',
292
+ outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
293
+ },
294
+ {
295
+ stateMutability: 'nonpayable',
296
+ type: 'function',
297
+ inputs: [],
298
+ name: 'renounceOwnership',
299
+ outputs: [],
300
+ },
301
+ {
302
+ stateMutability: 'view',
303
+ type: 'function',
304
+ inputs: [],
305
+ name: 'secondarySwap',
306
+ outputs: [
307
+ { name: '', internalType: 'contract ISecondarySwap', type: 'address' },
308
+ ],
309
+ },
310
+ {
311
+ stateMutability: 'payable',
312
+ type: 'function',
313
+ inputs: [
314
+ { name: 'commenter', internalType: 'address', type: 'address' },
315
+ { name: 'quantity', internalType: 'uint256', type: 'uint256' },
316
+ { name: 'collection', internalType: 'address', type: 'address' },
317
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
318
+ { name: 'recipient', internalType: 'address payable', type: 'address' },
319
+ { name: 'minEthToAcquire', internalType: 'uint256', type: 'uint256' },
320
+ { name: 'sqrtPriceLimitX96', internalType: 'uint160', type: 'uint160' },
321
+ { name: 'comment', internalType: 'string', type: 'string' },
322
+ ],
323
+ name: 'sellOnSecondaryAndComment',
324
+ outputs: [
325
+ {
326
+ name: 'commentIdentifier',
327
+ internalType: 'struct IComments.CommentIdentifier',
328
+ type: 'tuple',
329
+ components: [
330
+ { name: 'commenter', internalType: 'address', type: 'address' },
331
+ { name: 'contractAddress', internalType: 'address', type: 'address' },
332
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
333
+ { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
334
+ ],
335
+ },
336
+ ],
337
+ },
338
+ {
339
+ stateMutability: 'view',
340
+ type: 'function',
341
+ inputs: [],
342
+ name: 'sparkValue',
343
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
344
+ },
345
+ {
346
+ stateMutability: 'payable',
347
+ type: 'function',
348
+ inputs: [
349
+ { name: 'commenter', internalType: 'address', type: 'address' },
350
+ { name: 'quantity', internalType: 'uint256', type: 'uint256' },
351
+ { name: 'collection', internalType: 'address', type: 'address' },
352
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
353
+ { name: 'mintReferral', internalType: 'address', type: 'address' },
354
+ { name: 'comment', internalType: 'string', type: 'string' },
355
+ ],
356
+ name: 'timedSaleMintAndComment',
357
+ outputs: [
358
+ {
359
+ name: '',
360
+ internalType: 'struct IComments.CommentIdentifier',
361
+ type: 'tuple',
362
+ components: [
363
+ { name: 'commenter', internalType: 'address', type: 'address' },
364
+ { name: 'contractAddress', internalType: 'address', type: 'address' },
365
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
366
+ { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
367
+ ],
368
+ },
369
+ ],
370
+ },
371
+ {
372
+ stateMutability: 'nonpayable',
373
+ type: 'function',
374
+ inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }],
375
+ name: 'transferOwnership',
376
+ outputs: [],
377
+ },
378
+ {
379
+ stateMutability: 'payable',
380
+ type: 'function',
381
+ inputs: [
382
+ { name: 'newImplementation', internalType: 'address', type: 'address' },
383
+ { name: 'data', internalType: 'bytes', type: 'bytes' },
384
+ ],
385
+ name: 'upgradeToAndCall',
386
+ outputs: [],
387
+ },
388
+ {
389
+ stateMutability: 'view',
390
+ type: 'function',
391
+ inputs: [],
392
+ name: 'zoraTimedSale',
393
+ outputs: [
394
+ {
395
+ name: '',
396
+ internalType: 'contract IZoraTimedSaleStrategy',
397
+ type: 'address',
398
+ },
399
+ ],
400
+ },
401
+ { type: 'event', anonymous: false, inputs: [], name: 'EIP712DomainChanged' },
402
+ {
403
+ type: 'event',
404
+ anonymous: false,
405
+ inputs: [
406
+ {
407
+ name: 'version',
408
+ internalType: 'uint64',
409
+ type: 'uint64',
410
+ indexed: false,
411
+ },
412
+ ],
413
+ name: 'Initialized',
414
+ },
415
+ {
416
+ type: 'event',
417
+ anonymous: false,
418
+ inputs: [
419
+ {
420
+ name: 'commentId',
421
+ internalType: 'bytes32',
422
+ type: 'bytes32',
423
+ indexed: true,
424
+ },
425
+ {
426
+ name: 'commentIdentifier',
427
+ internalType: 'struct IComments.CommentIdentifier',
428
+ type: 'tuple',
429
+ components: [
430
+ { name: 'commenter', internalType: 'address', type: 'address' },
431
+ { name: 'contractAddress', internalType: 'address', type: 'address' },
432
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
433
+ { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
434
+ ],
435
+ indexed: false,
436
+ },
437
+ {
438
+ name: 'quantity',
439
+ internalType: 'uint256',
440
+ type: 'uint256',
441
+ indexed: false,
442
+ },
443
+ { name: 'text', internalType: 'string', type: 'string', indexed: false },
444
+ ],
445
+ name: 'MintedAndCommented',
446
+ },
447
+ {
448
+ type: 'event',
449
+ anonymous: false,
450
+ inputs: [
451
+ {
452
+ name: 'previousOwner',
453
+ internalType: 'address',
454
+ type: 'address',
455
+ indexed: true,
456
+ },
457
+ {
458
+ name: 'newOwner',
459
+ internalType: 'address',
460
+ type: 'address',
461
+ indexed: true,
462
+ },
463
+ ],
464
+ name: 'OwnershipTransferStarted',
465
+ },
466
+ {
467
+ type: 'event',
468
+ anonymous: false,
469
+ inputs: [
470
+ {
471
+ name: 'previousOwner',
472
+ internalType: 'address',
473
+ type: 'address',
474
+ indexed: true,
475
+ },
476
+ {
477
+ name: 'newOwner',
478
+ internalType: 'address',
479
+ type: 'address',
480
+ indexed: true,
481
+ },
482
+ ],
483
+ name: 'OwnershipTransferred',
484
+ },
485
+ {
486
+ type: 'event',
487
+ anonymous: false,
488
+ inputs: [
489
+ {
490
+ name: 'commentId',
491
+ internalType: 'bytes32',
492
+ type: 'bytes32',
493
+ indexed: true,
494
+ },
495
+ {
496
+ name: 'commentIdentifier',
497
+ internalType: 'struct IComments.CommentIdentifier',
498
+ type: 'tuple',
499
+ components: [
500
+ { name: 'commenter', internalType: 'address', type: 'address' },
501
+ { name: 'contractAddress', internalType: 'address', type: 'address' },
502
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
503
+ { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
504
+ ],
505
+ indexed: false,
506
+ },
507
+ {
508
+ name: 'quantity',
509
+ internalType: 'uint256',
510
+ type: 'uint256',
511
+ indexed: true,
512
+ },
513
+ {
514
+ name: 'comment',
515
+ internalType: 'string',
516
+ type: 'string',
517
+ indexed: false,
518
+ },
519
+ {
520
+ name: 'swapDirection',
521
+ internalType: 'enum ICallerAndCommenter.SwapDirection',
522
+ type: 'uint8',
523
+ indexed: true,
524
+ },
525
+ ],
526
+ name: 'SwappedOnSecondaryAndCommented',
527
+ },
528
+ {
529
+ type: 'event',
530
+ anonymous: false,
531
+ inputs: [
532
+ {
533
+ name: 'implementation',
534
+ internalType: 'address',
535
+ type: 'address',
536
+ indexed: true,
537
+ },
538
+ ],
539
+ name: 'Upgraded',
540
+ },
541
+ {
542
+ type: 'error',
543
+ inputs: [{ name: 'target', internalType: 'address', type: 'address' }],
544
+ name: 'AddressEmptyCode',
545
+ },
546
+ {
547
+ type: 'error',
548
+ inputs: [
549
+ { name: 'expected', internalType: 'address', type: 'address' },
550
+ { name: 'actual', internalType: 'address', type: 'address' },
551
+ ],
552
+ name: 'CommenterMismatch',
553
+ },
554
+ {
555
+ type: 'error',
556
+ inputs: [
557
+ { name: 'implementation', internalType: 'address', type: 'address' },
558
+ ],
559
+ name: 'ERC1967InvalidImplementation',
560
+ },
561
+ { type: 'error', inputs: [], name: 'ERC1967NonPayable' },
562
+ {
563
+ type: 'error',
564
+ inputs: [{ name: 'deadline', internalType: 'uint256', type: 'uint256' }],
565
+ name: 'ERC2612ExpiredSignature',
566
+ },
567
+ { type: 'error', inputs: [], name: 'FailedInnerCall' },
568
+ {
569
+ type: 'error',
570
+ inputs: [
571
+ {
572
+ name: 'wrongDestinationChainId',
573
+ internalType: 'uint256',
574
+ type: 'uint256',
575
+ },
576
+ ],
577
+ name: 'IncorrectDestinationChain',
578
+ },
579
+ {
580
+ type: 'error',
581
+ inputs: [
582
+ { name: 'account', internalType: 'address', type: 'address' },
583
+ { name: 'currentNonce', internalType: 'bytes32', type: 'bytes32' },
584
+ ],
585
+ name: 'InvalidAccountNonce',
586
+ },
587
+ { type: 'error', inputs: [], name: 'InvalidInitialization' },
588
+ { type: 'error', inputs: [], name: 'InvalidSignature' },
589
+ { type: 'error', inputs: [], name: 'NotInitializing' },
590
+ {
591
+ type: 'error',
592
+ inputs: [{ name: 'owner', internalType: 'address', type: 'address' }],
593
+ name: 'OwnableInvalidOwner',
594
+ },
595
+ {
596
+ type: 'error',
597
+ inputs: [{ name: 'account', internalType: 'address', type: 'address' }],
598
+ name: 'OwnableUnauthorizedAccount',
599
+ },
600
+ {
601
+ type: 'error',
602
+ inputs: [
603
+ { name: 'collection', internalType: 'address', type: 'address' },
604
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
605
+ ],
606
+ name: 'SaleNotSet',
607
+ },
608
+ { type: 'error', inputs: [], name: 'UUPSUnauthorizedCallContext' },
609
+ {
610
+ type: 'error',
611
+ inputs: [{ name: 'slot', internalType: 'bytes32', type: 'bytes32' }],
612
+ name: 'UUPSUnsupportedProxiableUUID',
613
+ },
614
+ {
615
+ type: 'error',
616
+ inputs: [
617
+ { name: 'currentName', internalType: 'string', type: 'string' },
618
+ { name: 'newName', internalType: 'string', type: 'string' },
619
+ ],
620
+ name: 'UpgradeToMismatchedContractName',
621
+ },
622
+ {
623
+ type: 'error',
624
+ inputs: [
625
+ { name: 'expected', internalType: 'uint256', type: 'uint256' },
626
+ { name: 'actual', internalType: 'uint256', type: 'uint256' },
627
+ ],
628
+ name: 'WrongValueSent',
629
+ },
630
+ ] as const
631
+
1
632
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2
633
  // CommentsImpl
3
634
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -9,6 +640,7 @@ export const commentsImplABI = [
9
640
  inputs: [
10
641
  { name: '_sparkValue', internalType: 'uint256', type: 'uint256' },
11
642
  { name: '_protocolRewards', internalType: 'address', type: 'address' },
643
+ { name: '_zoraRecipient', internalType: 'address', type: 'address' },
12
644
  ],
13
645
  },
14
646
  {
@@ -29,7 +661,7 @@ export const commentsImplABI = [
29
661
  stateMutability: 'view',
30
662
  type: 'function',
31
663
  inputs: [],
32
- name: 'DELEGATE_COMMENTOR',
664
+ name: 'DELEGATE_COMMENTER',
33
665
  outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
34
666
  },
35
667
  {
@@ -126,6 +758,11 @@ export const commentsImplABI = [
126
758
  { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
127
759
  ],
128
760
  },
761
+ {
762
+ name: 'commenterSmartWallet',
763
+ internalType: 'address',
764
+ type: 'address',
765
+ },
129
766
  { name: 'referrer', internalType: 'address', type: 'address' },
130
767
  ],
131
768
  name: 'comment',
@@ -146,9 +783,21 @@ export const commentsImplABI = [
146
783
  {
147
784
  stateMutability: 'view',
148
785
  type: 'function',
149
- inputs: [{ name: 'commentId', internalType: 'bytes32', type: 'bytes32' }],
786
+ inputs: [
787
+ {
788
+ name: 'commentIdentifier',
789
+ internalType: 'struct IComments.CommentIdentifier',
790
+ type: 'tuple',
791
+ components: [
792
+ { name: 'commenter', internalType: 'address', type: 'address' },
793
+ { name: 'contractAddress', internalType: 'address', type: 'address' },
794
+ { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
795
+ { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
796
+ ],
797
+ },
798
+ ],
150
799
  name: 'commentSparksQuantity',
151
- outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }],
800
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
152
801
  },
153
802
  {
154
803
  stateMutability: 'pure',
@@ -165,7 +814,7 @@ export const commentsImplABI = [
165
814
  outputs: [{ name: '', internalType: 'string', type: 'string' }],
166
815
  },
167
816
  {
168
- stateMutability: 'nonpayable',
817
+ stateMutability: 'payable',
169
818
  type: 'function',
170
819
  inputs: [
171
820
  { name: 'commenter', internalType: 'address', type: 'address' },
@@ -183,6 +832,12 @@ export const commentsImplABI = [
183
832
  { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
184
833
  ],
185
834
  },
835
+ {
836
+ name: 'commenterSmartWalletOwner',
837
+ internalType: 'address',
838
+ type: 'address',
839
+ },
840
+ { name: 'referrer', internalType: 'address', type: 'address' },
186
841
  ],
187
842
  name: 'delegateComment',
188
843
  outputs: [
@@ -197,6 +852,22 @@ export const commentsImplABI = [
197
852
  { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
198
853
  ],
199
854
  },
855
+ { name: 'commentId', internalType: 'bytes32', type: 'bytes32' },
856
+ ],
857
+ },
858
+ {
859
+ stateMutability: 'view',
860
+ type: 'function',
861
+ inputs: [],
862
+ name: 'eip712Domain',
863
+ outputs: [
864
+ { name: 'fields', internalType: 'bytes1', type: 'bytes1' },
865
+ { name: 'name', internalType: 'string', type: 'string' },
866
+ { name: 'version', internalType: 'string', type: 'string' },
867
+ { name: 'chainId', internalType: 'uint256', type: 'uint256' },
868
+ { name: 'verifyingContract', internalType: 'address', type: 'address' },
869
+ { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
870
+ { name: 'extensions', internalType: 'uint256[]', type: 'uint256[]' },
200
871
  ],
201
872
  },
202
873
  {
@@ -296,6 +967,11 @@ export const commentsImplABI = [
296
967
  type: 'tuple',
297
968
  components: [
298
969
  { name: 'commenter', internalType: 'address', type: 'address' },
970
+ {
971
+ name: 'commenterSmartWallet',
972
+ internalType: 'address',
973
+ type: 'address',
974
+ },
299
975
  { name: 'contractAddress', internalType: 'address', type: 'address' },
300
976
  { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
301
977
  {
@@ -314,15 +990,14 @@ export const commentsImplABI = [
314
990
  ],
315
991
  },
316
992
  { name: 'text', internalType: 'string', type: 'string' },
317
- { name: 'sparksQuantity', internalType: 'uint64', type: 'uint64' },
993
+ { name: 'referrer', internalType: 'address', type: 'address' },
318
994
  { name: 'deadline', internalType: 'uint256', type: 'uint256' },
319
995
  { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
320
- { name: 'referrer', internalType: 'address', type: 'address' },
321
- { name: 'sourceChainId', internalType: 'uint256', type: 'uint256' },
996
+ { name: 'sourceChainId', internalType: 'uint32', type: 'uint32' },
322
997
  {
323
998
  name: 'destinationChainId',
324
- internalType: 'uint256',
325
- type: 'uint256',
999
+ internalType: 'uint32',
1000
+ type: 'uint32',
326
1001
  },
327
1002
  ],
328
1003
  },
@@ -355,15 +1030,15 @@ export const commentsImplABI = [
355
1030
  ],
356
1031
  },
357
1032
  { name: 'sparker', internalType: 'address', type: 'address' },
358
- { name: 'sparksQuantity', internalType: 'uint64', type: 'uint64' },
1033
+ { name: 'sparksQuantity', internalType: 'uint256', type: 'uint256' },
359
1034
  { name: 'deadline', internalType: 'uint256', type: 'uint256' },
360
1035
  { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
361
1036
  { name: 'referrer', internalType: 'address', type: 'address' },
362
- { name: 'sourceChainId', internalType: 'uint256', type: 'uint256' },
1037
+ { name: 'sourceChainId', internalType: 'uint32', type: 'uint32' },
363
1038
  {
364
1039
  name: 'destinationChainId',
365
- internalType: 'uint256',
366
- type: 'uint256',
1040
+ internalType: 'uint32',
1041
+ type: 'uint32',
367
1042
  },
368
1043
  ],
369
1044
  },
@@ -371,11 +1046,17 @@ export const commentsImplABI = [
371
1046
  name: 'hashPermitSparkComment',
372
1047
  outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
373
1048
  },
1049
+ {
1050
+ stateMutability: 'view',
1051
+ type: 'function',
1052
+ inputs: [],
1053
+ name: 'implementation',
1054
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
1055
+ },
374
1056
  {
375
1057
  stateMutability: 'nonpayable',
376
1058
  type: 'function',
377
1059
  inputs: [
378
- { name: '_zoraRecipient', internalType: 'address', type: 'address' },
379
1060
  { name: 'defaultAdmin', internalType: 'address', type: 'address' },
380
1061
  { name: 'backfiller', internalType: 'address', type: 'address' },
381
1062
  {
@@ -399,7 +1080,7 @@ export const commentsImplABI = [
399
1080
  type: 'function',
400
1081
  inputs: [
401
1082
  { name: 'owner', internalType: 'address', type: 'address' },
402
- { name: 'nonce', internalType: 'uint256', type: 'uint256' },
1083
+ { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
403
1084
  ],
404
1085
  name: 'nonceUsed',
405
1086
  outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
@@ -414,6 +1095,11 @@ export const commentsImplABI = [
414
1095
  type: 'tuple',
415
1096
  components: [
416
1097
  { name: 'commenter', internalType: 'address', type: 'address' },
1098
+ {
1099
+ name: 'commenterSmartWallet',
1100
+ internalType: 'address',
1101
+ type: 'address',
1102
+ },
417
1103
  { name: 'contractAddress', internalType: 'address', type: 'address' },
418
1104
  { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
419
1105
  {
@@ -432,15 +1118,14 @@ export const commentsImplABI = [
432
1118
  ],
433
1119
  },
434
1120
  { name: 'text', internalType: 'string', type: 'string' },
435
- { name: 'sparksQuantity', internalType: 'uint64', type: 'uint64' },
1121
+ { name: 'referrer', internalType: 'address', type: 'address' },
436
1122
  { name: 'deadline', internalType: 'uint256', type: 'uint256' },
437
1123
  { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
438
- { name: 'referrer', internalType: 'address', type: 'address' },
439
- { name: 'sourceChainId', internalType: 'uint256', type: 'uint256' },
1124
+ { name: 'sourceChainId', internalType: 'uint32', type: 'uint32' },
440
1125
  {
441
1126
  name: 'destinationChainId',
442
- internalType: 'uint256',
443
- type: 'uint256',
1127
+ internalType: 'uint32',
1128
+ type: 'uint32',
444
1129
  },
445
1130
  ],
446
1131
  },
@@ -474,15 +1159,15 @@ export const commentsImplABI = [
474
1159
  ],
475
1160
  },
476
1161
  { name: 'sparker', internalType: 'address', type: 'address' },
477
- { name: 'sparksQuantity', internalType: 'uint64', type: 'uint64' },
1162
+ { name: 'sparksQuantity', internalType: 'uint256', type: 'uint256' },
478
1163
  { name: 'deadline', internalType: 'uint256', type: 'uint256' },
479
1164
  { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
480
1165
  { name: 'referrer', internalType: 'address', type: 'address' },
481
- { name: 'sourceChainId', internalType: 'uint256', type: 'uint256' },
1166
+ { name: 'sourceChainId', internalType: 'uint32', type: 'uint32' },
482
1167
  {
483
1168
  name: 'destinationChainId',
484
- internalType: 'uint256',
485
- type: 'uint256',
1169
+ internalType: 'uint32',
1170
+ type: 'uint32',
486
1171
  },
487
1172
  ],
488
1173
  },
@@ -542,7 +1227,7 @@ export const commentsImplABI = [
542
1227
  { name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
543
1228
  ],
544
1229
  },
545
- { name: 'sparksQuantity', internalType: 'uint64', type: 'uint64' },
1230
+ { name: 'sparksQuantity', internalType: 'uint256', type: 'uint256' },
546
1231
  { name: 'referrer', internalType: 'address', type: 'address' },
547
1232
  ],
548
1233
  name: 'sparkComment',
@@ -583,7 +1268,7 @@ export const commentsImplABI = [
583
1268
  indexed: true,
584
1269
  },
585
1270
  {
586
- name: 'comment',
1271
+ name: 'commentIdentifier',
587
1272
  internalType: 'struct IComments.CommentIdentifier',
588
1273
  type: 'tuple',
589
1274
  components: [
@@ -621,7 +1306,7 @@ export const commentsImplABI = [
621
1306
  indexed: true,
622
1307
  },
623
1308
  {
624
- name: 'comment',
1309
+ name: 'commentIdentifier',
625
1310
  internalType: 'struct IComments.CommentIdentifier',
626
1311
  type: 'tuple',
627
1312
  components: [
@@ -652,8 +1337,8 @@ export const commentsImplABI = [
652
1337
  },
653
1338
  {
654
1339
  name: 'sparksQuantity',
655
- internalType: 'uint64',
656
- type: 'uint64',
1340
+ internalType: 'uint256',
1341
+ type: 'uint256',
657
1342
  indexed: false,
658
1343
  },
659
1344
  { name: 'text', internalType: 'string', type: 'string', indexed: false },
@@ -672,6 +1357,7 @@ export const commentsImplABI = [
672
1357
  ],
673
1358
  name: 'Commented',
674
1359
  },
1360
+ { type: 'event', anonymous: false, inputs: [], name: 'EIP712DomainChanged' },
675
1361
  {
676
1362
  type: 'event',
677
1363
  anonymous: false,
@@ -769,8 +1455,8 @@ export const commentsImplABI = [
769
1455
  },
770
1456
  {
771
1457
  name: 'sparksQuantity',
772
- internalType: 'uint64',
773
- type: 'uint64',
1458
+ internalType: 'uint256',
1459
+ type: 'uint256',
774
1460
  indexed: false,
775
1461
  },
776
1462
  {
@@ -785,6 +1471,12 @@ export const commentsImplABI = [
785
1471
  type: 'uint256',
786
1472
  indexed: false,
787
1473
  },
1474
+ {
1475
+ name: 'referrer',
1476
+ internalType: 'address',
1477
+ type: 'address',
1478
+ indexed: false,
1479
+ },
788
1480
  ],
789
1481
  name: 'SparkedComment',
790
1482
  },
@@ -815,6 +1507,7 @@ export const commentsImplABI = [
815
1507
  inputs: [{ name: 'target', internalType: 'address', type: 'address' }],
816
1508
  name: 'AddressEmptyCode',
817
1509
  },
1510
+ { type: 'error', inputs: [], name: 'AddressZero' },
818
1511
  { type: 'error', inputs: [], name: 'ArrayLengthMismatch' },
819
1512
  { type: 'error', inputs: [], name: 'CannotSparkOwnComment' },
820
1513
  {
@@ -879,14 +1572,17 @@ export const commentsImplABI = [
879
1572
  type: 'error',
880
1573
  inputs: [
881
1574
  { name: 'account', internalType: 'address', type: 'address' },
882
- { name: 'currentNonce', internalType: 'uint256', type: 'uint256' },
1575
+ { name: 'currentNonce', internalType: 'bytes32', type: 'bytes32' },
883
1576
  ],
884
1577
  name: 'InvalidAccountNonce',
885
1578
  },
886
1579
  { type: 'error', inputs: [], name: 'InvalidInitialization' },
887
1580
  { type: 'error', inputs: [], name: 'InvalidSignature' },
888
1581
  { type: 'error', inputs: [], name: 'MustSendAtLeastOneSpark' },
1582
+ { type: 'error', inputs: [], name: 'NoFundsRecipient' },
889
1583
  { type: 'error', inputs: [], name: 'NotInitializing' },
1584
+ { type: 'error', inputs: [], name: 'NotSmartWallet' },
1585
+ { type: 'error', inputs: [], name: 'NotSmartWalletOwner' },
890
1586
  { type: 'error', inputs: [], name: 'NotTokenHolderOrAdmin' },
891
1587
  { type: 'error', inputs: [], name: 'OnlySparksContract' },
892
1588
  { type: 'error', inputs: [], name: 'TransferFailed' },