@zoralabs/comments-contracts 0.0.1 → 0.0.2
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/.turbo/turbo-build.log +49 -31
- package/README.md +10 -39
- package/abis/AddDelegateCommenterRole.json +9 -0
- package/abis/CallerAndCommenter.json +62 -0
- package/abis/CallerAndCommenterImpl.json +1218 -0
- package/abis/CallerAndCommenterMintAndCommentTest.json +771 -0
- package/abis/CallerAndCommenterSwapAndCommentTest.json +844 -0
- package/abis/CallerAndCommenterTestBase.json +577 -0
- package/abis/CommentsImpl.json +189 -59
- package/abis/CommentsImplConstants.json +106 -0
- package/abis/CommentsPermitTest.json +26 -6
- package/abis/CommentsTest.json +58 -10
- package/abis/Comments_mintAndCommentTest.json +11 -4
- package/abis/Comments_smartWallet.json +711 -0
- package/abis/DeployCallerAndCommenterImpl.json +9 -0
- package/abis/DeployImpl.json +0 -13
- package/abis/DeployNonDeterministic.json +0 -13
- package/abis/DeployScript.json +0 -13
- package/abis/EIP712Upgradeable.json +74 -0
- package/abis/EIP712UpgradeableWithChainId.json +49 -0
- package/abis/ERC20.json +310 -0
- package/abis/GenerateDeterministicParams.json +0 -13
- package/abis/ICallerAndCommenter.json +797 -0
- package/abis/IComments.json +629 -9
- package/abis/IERC20.json +39 -42
- package/abis/IERC20Metadata.json +224 -0
- package/abis/{CommentsDeployerBase.json → IMultiOwnable.json} +8 -2
- package/abis/IProtocolRewards.json +19 -0
- package/abis/ISecondarySwap.json +45 -0
- package/abis/IZoraCreator1155.json +51 -0
- package/abis/IZoraTimedSaleStrategy.json +91 -0
- package/abis/Mock1155.json +75 -1
- package/abis/Mock1155NoCreatorRewardRecipient.json +605 -0
- package/abis/Mock1155NoOwner.json +566 -0
- package/abis/{MockMinter.json → MockDelegateCommenter.json} +12 -2
- package/abis/MockERC20z.json +315 -0
- package/abis/MockMultiOwnable.json +212 -0
- package/abis/MockSecondarySwap.json +95 -0
- package/abis/MockZoraTimedSale.json +139 -0
- package/abis/Ownable2StepUpgradeable.json +138 -0
- package/abis/UnorderedNoncesUpgradeable.json +4 -4
- package/addresses/1.json +9 -0
- package/addresses/10.json +9 -0
- package/addresses/11155111.json +9 -0
- package/addresses/11155420.json +9 -0
- package/addresses/42161.json +9 -0
- package/addresses/7777777.json +9 -0
- package/addresses/81457.json +9 -0
- package/addresses/8453.json +9 -0
- package/addresses/84532.json +9 -0
- package/addresses/999999999.json +7 -2
- package/deterministicConfig/callerAndCommenter.json +8 -0
- package/deterministicConfig/comments.json +2 -2
- package/dist/index.cjs +724 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +723 -35
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/wagmiGenerated.d.ts +1102 -57
- package/dist/wagmiGenerated.d.ts.map +1 -1
- package/package/types.ts +4 -1
- package/package/wagmiGenerated.ts +728 -32
- package/package.json +12 -11
- package/script/AddDelegateCommenterRole.s.sol +24 -0
- package/script/CommentsDeployerBase.sol +102 -19
- package/script/Deploy.s.sol +2 -44
- package/script/DeployCallerAndCommenterImpl.s.sol +29 -0
- package/script/DeployImpl.s.sol +1 -0
- package/script/DeployNonDeterministic.s.sol +22 -13
- package/script/GenerateDeterministicParams.s.sol +32 -4
- package/scripts/generateCommentsTestData.ts +170 -79
- package/src/CommentsImpl.sol +267 -134
- package/src/CommentsImplConstants.sol +44 -0
- package/src/interfaces/ICallerAndCommenter.sol +215 -0
- package/src/interfaces/IComments.sol +189 -42
- package/src/interfaces/IMultiOwnable.sol +10 -0
- package/src/interfaces/ISecondarySwap.sol +40 -0
- package/src/interfaces/IZoraCreator1155.sol +6 -1
- package/src/interfaces/IZoraCreator1155TypesV1.sol +46 -0
- package/src/interfaces/IZoraTimedSaleStrategy.sol +25 -0
- package/src/proxy/CallerAndCommenter.sol +43 -0
- package/src/utils/CallerAndCommenterImpl.sol +376 -0
- package/src/utils/EIP712UpgradeableWithChainId.sol +12 -23
- package/src/version/ContractVersionBase.sol +1 -1
- package/test/CallerAndCommenterTestBase.sol +77 -0
- package/test/CallerAndCommenter_mintAndComment.t copy.sol +214 -0
- package/test/CallerAndCommenter_swapAndComment.t.sol +523 -0
- package/test/Comments.t.sol +166 -29
- package/test/CommentsTestBase.sol +12 -20
- package/test/Comments_delegateComment.t.sol +129 -0
- package/test/Comments_permit.t.sol +131 -44
- package/test/Comments_smartWallet.t.sol +152 -0
- package/test/mocks/Mock1155.sol +12 -1
- package/test/mocks/Mock1155NoCreatorRewardRecipient.sol +65 -0
- package/test/mocks/Mock1155NoOwner.sol +53 -0
- package/test/mocks/MockDelegateCommenter.sol +36 -0
- package/test/mocks/MockIZoraCreator1155.sol +16 -0
- package/test/mocks/MockSecondarySwap.sol +30 -0
- package/test/mocks/MockZoraTimedSale.sol +38 -0
- package/wagmi.config.ts +3 -1
- package/abis/ProxyDeployerScript.json +0 -15
- package/scripts/backfillComments.ts +0 -176
- package/scripts/queries.ts +0 -73
- package/scripts/queryAndSaveComments.ts +0 -48
- package/scripts/queryQuantityOfComments.ts +0 -53
- package/scripts/writeComments.ts +0 -198
- package/src/deployments/CommentsDeployment.sol +0 -14
- package/test/Comments_mintAndComment.t.sol +0 -101
- package/test/mocks/MockMinter.sol +0 -29
package/abis/CommentsTest.json
CHANGED
|
@@ -319,8 +319,8 @@
|
|
|
319
319
|
"inputs": [
|
|
320
320
|
{
|
|
321
321
|
"name": "sparksQuantity",
|
|
322
|
-
"type": "
|
|
323
|
-
"internalType": "
|
|
322
|
+
"type": "uint256",
|
|
323
|
+
"internalType": "uint256"
|
|
324
324
|
}
|
|
325
325
|
],
|
|
326
326
|
"outputs": [],
|
|
@@ -332,8 +332,8 @@
|
|
|
332
332
|
"inputs": [
|
|
333
333
|
{
|
|
334
334
|
"name": "sparksQuantity",
|
|
335
|
-
"type": "
|
|
336
|
-
"internalType": "
|
|
335
|
+
"type": "uint256",
|
|
336
|
+
"internalType": "uint256"
|
|
337
337
|
}
|
|
338
338
|
],
|
|
339
339
|
"outputs": [],
|
|
@@ -360,6 +360,41 @@
|
|
|
360
360
|
"outputs": [],
|
|
361
361
|
"stateMutability": "nonpayable"
|
|
362
362
|
},
|
|
363
|
+
{
|
|
364
|
+
"type": "function",
|
|
365
|
+
"name": "testCommentWithMock1155NoCreatorRewardRecipient",
|
|
366
|
+
"inputs": [],
|
|
367
|
+
"outputs": [],
|
|
368
|
+
"stateMutability": "nonpayable"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"type": "function",
|
|
372
|
+
"name": "testCommentWithMock1155NoOwner",
|
|
373
|
+
"inputs": [],
|
|
374
|
+
"outputs": [],
|
|
375
|
+
"stateMutability": "nonpayable"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"type": "function",
|
|
379
|
+
"name": "testCommentsConstructorAddressZero",
|
|
380
|
+
"inputs": [],
|
|
381
|
+
"outputs": [],
|
|
382
|
+
"stateMutability": "nonpayable"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"type": "function",
|
|
386
|
+
"name": "testCommentsInitializeAddressZero",
|
|
387
|
+
"inputs": [],
|
|
388
|
+
"outputs": [],
|
|
389
|
+
"stateMutability": "nonpayable"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"type": "function",
|
|
393
|
+
"name": "testGrantRoleWithBackfillRole",
|
|
394
|
+
"inputs": [],
|
|
395
|
+
"outputs": [],
|
|
396
|
+
"stateMutability": "nonpayable"
|
|
397
|
+
},
|
|
363
398
|
{
|
|
364
399
|
"type": "function",
|
|
365
400
|
"name": "testHashAndCheckCommentExists",
|
|
@@ -367,6 +402,13 @@
|
|
|
367
402
|
"outputs": [],
|
|
368
403
|
"stateMutability": "nonpayable"
|
|
369
404
|
},
|
|
405
|
+
{
|
|
406
|
+
"type": "function",
|
|
407
|
+
"name": "testImplementation",
|
|
408
|
+
"inputs": [],
|
|
409
|
+
"outputs": [],
|
|
410
|
+
"stateMutability": "view"
|
|
411
|
+
},
|
|
370
412
|
{
|
|
371
413
|
"type": "function",
|
|
372
414
|
"name": "testReplyToCommentThatAddressDoesNotMatch",
|
|
@@ -413,7 +455,7 @@
|
|
|
413
455
|
"internalType": "bytes32"
|
|
414
456
|
},
|
|
415
457
|
{
|
|
416
|
-
"name": "
|
|
458
|
+
"name": "commentIdentifier",
|
|
417
459
|
"type": "tuple",
|
|
418
460
|
"indexed": false,
|
|
419
461
|
"internalType": "struct IComments.CommentIdentifier",
|
|
@@ -472,7 +514,7 @@
|
|
|
472
514
|
"internalType": "bytes32"
|
|
473
515
|
},
|
|
474
516
|
{
|
|
475
|
-
"name": "
|
|
517
|
+
"name": "commentIdentifier",
|
|
476
518
|
"type": "tuple",
|
|
477
519
|
"indexed": false,
|
|
478
520
|
"internalType": "struct IComments.CommentIdentifier",
|
|
@@ -535,9 +577,9 @@
|
|
|
535
577
|
},
|
|
536
578
|
{
|
|
537
579
|
"name": "sparksQuantity",
|
|
538
|
-
"type": "
|
|
580
|
+
"type": "uint256",
|
|
539
581
|
"indexed": false,
|
|
540
|
-
"internalType": "
|
|
582
|
+
"internalType": "uint256"
|
|
541
583
|
},
|
|
542
584
|
{
|
|
543
585
|
"name": "text",
|
|
@@ -600,9 +642,9 @@
|
|
|
600
642
|
},
|
|
601
643
|
{
|
|
602
644
|
"name": "sparksQuantity",
|
|
603
|
-
"type": "
|
|
645
|
+
"type": "uint256",
|
|
604
646
|
"indexed": false,
|
|
605
|
-
"internalType": "
|
|
647
|
+
"internalType": "uint256"
|
|
606
648
|
},
|
|
607
649
|
{
|
|
608
650
|
"name": "sparker",
|
|
@@ -615,6 +657,12 @@
|
|
|
615
657
|
"type": "uint256",
|
|
616
658
|
"indexed": false,
|
|
617
659
|
"internalType": "uint256"
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"name": "referrer",
|
|
663
|
+
"type": "address",
|
|
664
|
+
"indexed": false,
|
|
665
|
+
"internalType": "address"
|
|
618
666
|
}
|
|
619
667
|
],
|
|
620
668
|
"anonymous": false
|
|
@@ -212,7 +212,14 @@
|
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
"type": "function",
|
|
215
|
-
"name": "
|
|
215
|
+
"name": "testCanDelegateCommentWithSparks",
|
|
216
|
+
"inputs": [],
|
|
217
|
+
"outputs": [],
|
|
218
|
+
"stateMutability": "nonpayable"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"type": "function",
|
|
222
|
+
"name": "testDelegateCommentRevertsWhenMoreThanOneSpark",
|
|
216
223
|
"inputs": [],
|
|
217
224
|
"outputs": [],
|
|
218
225
|
"stateMutability": "nonpayable"
|
|
@@ -235,7 +242,7 @@
|
|
|
235
242
|
"internalType": "bytes32"
|
|
236
243
|
},
|
|
237
244
|
{
|
|
238
|
-
"name": "
|
|
245
|
+
"name": "commentIdentifier",
|
|
239
246
|
"type": "tuple",
|
|
240
247
|
"indexed": false,
|
|
241
248
|
"internalType": "struct IComments.CommentIdentifier",
|
|
@@ -298,9 +305,9 @@
|
|
|
298
305
|
},
|
|
299
306
|
{
|
|
300
307
|
"name": "sparksQuantity",
|
|
301
|
-
"type": "
|
|
308
|
+
"type": "uint256",
|
|
302
309
|
"indexed": false,
|
|
303
|
-
"internalType": "
|
|
310
|
+
"internalType": "uint256"
|
|
304
311
|
},
|
|
305
312
|
{
|
|
306
313
|
"name": "text",
|