@zoralabs/comments-contracts 0.0.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/.env.example +11 -0
- package/.turbo/turbo-build.log +60 -0
- package/LICENSE +21 -0
- package/README.md +70 -0
- package/_imagine/Enjoy.sol +41 -0
- package/abis/AccessControlUpgradeable.json +250 -0
- package/abis/Address.json +29 -0
- package/abis/Comments.json +62 -0
- package/abis/CommentsDeployerBase.json +15 -0
- package/abis/CommentsImpl.json +1750 -0
- package/abis/CommentsPermitTest.json +847 -0
- package/abis/CommentsTest.json +986 -0
- package/abis/CommentsTestBase.json +577 -0
- package/abis/Comments_mintAndCommentTest.json +690 -0
- package/abis/ContextUpgradeable.json +25 -0
- package/abis/ContractVersionBase.json +15 -0
- package/abis/Create2.json +28 -0
- package/abis/DeployImpl.json +22 -0
- package/abis/DeployNonDeterministic.json +22 -0
- package/abis/DeployScript.json +22 -0
- package/abis/DeterministicDeployerAndCaller.json +315 -0
- package/abis/DeterministicUUPSProxyDeployer.json +167 -0
- package/abis/ECDSA.json +29 -0
- package/abis/EIP712.json +67 -0
- package/abis/EIP712UpgradeableWithChainId.json +25 -0
- package/abis/ERC1155.json +416 -0
- package/abis/ERC1155Holder.json +99 -0
- package/abis/ERC165.json +21 -0
- package/abis/ERC165Upgradeable.json +44 -0
- package/abis/ERC1967Proxy.json +67 -0
- package/abis/ERC1967Utils.json +85 -0
- package/abis/GenerateDeterministicParams.json +22 -0
- package/abis/IAccessControl.json +195 -0
- package/abis/IBeacon.json +15 -0
- package/abis/IComments.json +654 -0
- package/abis/IContractMetadata.json +28 -0
- package/abis/IERC1155.json +295 -0
- package/abis/IERC1155Errors.json +104 -0
- package/abis/IERC1155MetadataURI.json +314 -0
- package/abis/IERC1155Receiver.json +99 -0
- package/abis/IERC1271.json +26 -0
- package/abis/IERC165.json +21 -0
- package/abis/IERC1822Proxiable.json +15 -0
- package/abis/IERC20.json +224 -0
- package/abis/IERC20Errors.json +88 -0
- package/abis/IERC5267.json +51 -0
- package/abis/IERC721.json +287 -0
- package/abis/IERC721Enumerable.json +343 -0
- package/abis/IERC721Errors.json +105 -0
- package/abis/IERC721Metadata.json +332 -0
- package/abis/IERC721TokenReceiver.json +36 -0
- package/abis/IHasContractName.json +15 -0
- package/abis/IImmutableCreate2Factory.json +93 -0
- package/abis/IMulticall3.json +440 -0
- package/abis/IProtocolRewards.json +342 -0
- package/abis/ISafe.json +15 -0
- package/abis/ISymbol.json +15 -0
- package/abis/IVersionedContract.json +15 -0
- package/abis/IZoraCreator1155.json +343 -0
- package/abis/ImmutableCreate2FactoryUtils.json +15 -0
- package/abis/Initializable.json +25 -0
- package/abis/LibString.json +7 -0
- package/abis/Math.json +7 -0
- package/abis/Mock1155.json +547 -0
- package/abis/MockERC20.json +322 -0
- package/abis/MockERC721.json +350 -0
- package/abis/MockMinter.json +64 -0
- package/abis/OwnableUpgradeable.json +99 -0
- package/abis/ProtocolRewards.json +494 -0
- package/abis/Proxy.json +6 -0
- package/abis/ProxyDeployerScript.json +15 -0
- package/abis/ProxyShim.json +112 -0
- package/abis/Script.json +15 -0
- package/abis/ShortStrings.json +18 -0
- package/abis/StdAssertions.json +379 -0
- package/abis/StdInvariant.json +180 -0
- package/abis/Strings.json +18 -0
- package/abis/Test.json +570 -0
- package/abis/UUPSUpgradeable.json +130 -0
- package/abis/UnorderedNoncesUpgradeable.json +42 -0
- package/abis/Vm.json +8627 -0
- package/abis/VmSafe.json +7297 -0
- package/abis/stdError.json +119 -0
- package/abis/stdStorageSafe.json +52 -0
- package/addresses/999999999.json +4 -0
- package/deterministicConfig/comments.json +8 -0
- package/dist/index.cjs +935 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +908 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/wagmiGenerated.d.ts +1354 -0
- package/dist/wagmiGenerated.d.ts.map +1 -0
- package/foundry.toml +24 -0
- package/package/index.ts +4 -0
- package/package/types.ts +5 -0
- package/package/wagmiGenerated.ts +907 -0
- package/package.json +62 -0
- package/remappings.txt +8 -0
- package/script/CommentsDeployerBase.sol +60 -0
- package/script/Deploy.s.sol +66 -0
- package/script/DeployImpl.s.sol +26 -0
- package/script/DeployNonDeterministic.s.sol +43 -0
- package/script/GenerateDeterministicParams.s.sol +55 -0
- package/script/bundle-abis.ts +109 -0
- package/script/storage-check.sh +57 -0
- package/script/update-contract-version.ts +63 -0
- package/scripts/abis.ts +3 -0
- package/scripts/backfillComments.ts +176 -0
- package/scripts/generateCommentsTestData.ts +247 -0
- package/scripts/getCommentsAddresses.ts +10 -0
- package/scripts/queries.ts +73 -0
- package/scripts/queryAndSaveComments.ts +48 -0
- package/scripts/queryQuantityOfComments.ts +53 -0
- package/scripts/signDeployAndCall.ts +51 -0
- package/scripts/turnkey.ts +36 -0
- package/scripts/utils.ts +127 -0
- package/scripts/writeComments.ts +198 -0
- package/slither.config.json +7 -0
- package/src/CommentsImpl.sol +552 -0
- package/src/deployments/CommentsDeployment.sol +14 -0
- package/src/interfaces/IComments.sol +156 -0
- package/src/interfaces/IZoraCreator1155.sol +12 -0
- package/src/proxy/Comments.sol +43 -0
- package/src/utils/EIP712UpgradeableWithChainId.sol +36 -0
- package/src/version/ContractVersionBase.sol +14 -0
- package/test/Comments.t.sol +482 -0
- package/test/CommentsTestBase.sol +86 -0
- package/test/Comments_mintAndComment.t.sol +101 -0
- package/test/Comments_permit.t.sol +397 -0
- package/test/mocks/Mock1155.sol +50 -0
- package/test/mocks/MockMinter.sol +29 -0
- package/test/mocks/ProtocolRewards.sol +1497 -0
- package/tsconfig.build.json +10 -0
- package/tsconfig.json +9 -0
- package/tsup.config.ts +11 -0
- package/wagmi.config.ts +14 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "event",
|
|
4
|
+
"name": "AdminChanged",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "previousAdmin",
|
|
8
|
+
"type": "address",
|
|
9
|
+
"indexed": false,
|
|
10
|
+
"internalType": "address"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "newAdmin",
|
|
14
|
+
"type": "address",
|
|
15
|
+
"indexed": false,
|
|
16
|
+
"internalType": "address"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"anonymous": false
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "event",
|
|
23
|
+
"name": "BeaconUpgraded",
|
|
24
|
+
"inputs": [
|
|
25
|
+
{
|
|
26
|
+
"name": "beacon",
|
|
27
|
+
"type": "address",
|
|
28
|
+
"indexed": true,
|
|
29
|
+
"internalType": "address"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"anonymous": false
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "event",
|
|
36
|
+
"name": "Upgraded",
|
|
37
|
+
"inputs": [
|
|
38
|
+
{
|
|
39
|
+
"name": "implementation",
|
|
40
|
+
"type": "address",
|
|
41
|
+
"indexed": true,
|
|
42
|
+
"internalType": "address"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"anonymous": false
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"type": "error",
|
|
49
|
+
"name": "ERC1967InvalidAdmin",
|
|
50
|
+
"inputs": [
|
|
51
|
+
{
|
|
52
|
+
"name": "admin",
|
|
53
|
+
"type": "address",
|
|
54
|
+
"internalType": "address"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "error",
|
|
60
|
+
"name": "ERC1967InvalidBeacon",
|
|
61
|
+
"inputs": [
|
|
62
|
+
{
|
|
63
|
+
"name": "beacon",
|
|
64
|
+
"type": "address",
|
|
65
|
+
"internalType": "address"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "error",
|
|
71
|
+
"name": "ERC1967InvalidImplementation",
|
|
72
|
+
"inputs": [
|
|
73
|
+
{
|
|
74
|
+
"name": "implementation",
|
|
75
|
+
"type": "address",
|
|
76
|
+
"internalType": "address"
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "error",
|
|
82
|
+
"name": "ERC1967NonPayable",
|
|
83
|
+
"inputs": []
|
|
84
|
+
}
|
|
85
|
+
]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "IS_SCRIPT",
|
|
5
|
+
"inputs": [],
|
|
6
|
+
"outputs": [
|
|
7
|
+
{
|
|
8
|
+
"name": "",
|
|
9
|
+
"type": "bool",
|
|
10
|
+
"internalType": "bool"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"stateMutability": "view"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "function",
|
|
17
|
+
"name": "run",
|
|
18
|
+
"inputs": [],
|
|
19
|
+
"outputs": [],
|
|
20
|
+
"stateMutability": "nonpayable"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "getRoleAdmin",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "role",
|
|
8
|
+
"type": "bytes32",
|
|
9
|
+
"internalType": "bytes32"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"outputs": [
|
|
13
|
+
{
|
|
14
|
+
"name": "",
|
|
15
|
+
"type": "bytes32",
|
|
16
|
+
"internalType": "bytes32"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"stateMutability": "view"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "function",
|
|
23
|
+
"name": "grantRole",
|
|
24
|
+
"inputs": [
|
|
25
|
+
{
|
|
26
|
+
"name": "role",
|
|
27
|
+
"type": "bytes32",
|
|
28
|
+
"internalType": "bytes32"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "account",
|
|
32
|
+
"type": "address",
|
|
33
|
+
"internalType": "address"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"outputs": [],
|
|
37
|
+
"stateMutability": "nonpayable"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "function",
|
|
41
|
+
"name": "hasRole",
|
|
42
|
+
"inputs": [
|
|
43
|
+
{
|
|
44
|
+
"name": "role",
|
|
45
|
+
"type": "bytes32",
|
|
46
|
+
"internalType": "bytes32"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "account",
|
|
50
|
+
"type": "address",
|
|
51
|
+
"internalType": "address"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"outputs": [
|
|
55
|
+
{
|
|
56
|
+
"name": "",
|
|
57
|
+
"type": "bool",
|
|
58
|
+
"internalType": "bool"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"stateMutability": "view"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"type": "function",
|
|
65
|
+
"name": "renounceRole",
|
|
66
|
+
"inputs": [
|
|
67
|
+
{
|
|
68
|
+
"name": "role",
|
|
69
|
+
"type": "bytes32",
|
|
70
|
+
"internalType": "bytes32"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "callerConfirmation",
|
|
74
|
+
"type": "address",
|
|
75
|
+
"internalType": "address"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"outputs": [],
|
|
79
|
+
"stateMutability": "nonpayable"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "function",
|
|
83
|
+
"name": "revokeRole",
|
|
84
|
+
"inputs": [
|
|
85
|
+
{
|
|
86
|
+
"name": "role",
|
|
87
|
+
"type": "bytes32",
|
|
88
|
+
"internalType": "bytes32"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "account",
|
|
92
|
+
"type": "address",
|
|
93
|
+
"internalType": "address"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"outputs": [],
|
|
97
|
+
"stateMutability": "nonpayable"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "event",
|
|
101
|
+
"name": "RoleAdminChanged",
|
|
102
|
+
"inputs": [
|
|
103
|
+
{
|
|
104
|
+
"name": "role",
|
|
105
|
+
"type": "bytes32",
|
|
106
|
+
"indexed": true,
|
|
107
|
+
"internalType": "bytes32"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "previousAdminRole",
|
|
111
|
+
"type": "bytes32",
|
|
112
|
+
"indexed": true,
|
|
113
|
+
"internalType": "bytes32"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "newAdminRole",
|
|
117
|
+
"type": "bytes32",
|
|
118
|
+
"indexed": true,
|
|
119
|
+
"internalType": "bytes32"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"anonymous": false
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "event",
|
|
126
|
+
"name": "RoleGranted",
|
|
127
|
+
"inputs": [
|
|
128
|
+
{
|
|
129
|
+
"name": "role",
|
|
130
|
+
"type": "bytes32",
|
|
131
|
+
"indexed": true,
|
|
132
|
+
"internalType": "bytes32"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "account",
|
|
136
|
+
"type": "address",
|
|
137
|
+
"indexed": true,
|
|
138
|
+
"internalType": "address"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "sender",
|
|
142
|
+
"type": "address",
|
|
143
|
+
"indexed": true,
|
|
144
|
+
"internalType": "address"
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"anonymous": false
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"type": "event",
|
|
151
|
+
"name": "RoleRevoked",
|
|
152
|
+
"inputs": [
|
|
153
|
+
{
|
|
154
|
+
"name": "role",
|
|
155
|
+
"type": "bytes32",
|
|
156
|
+
"indexed": true,
|
|
157
|
+
"internalType": "bytes32"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "account",
|
|
161
|
+
"type": "address",
|
|
162
|
+
"indexed": true,
|
|
163
|
+
"internalType": "address"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "sender",
|
|
167
|
+
"type": "address",
|
|
168
|
+
"indexed": true,
|
|
169
|
+
"internalType": "address"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"anonymous": false
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"type": "error",
|
|
176
|
+
"name": "AccessControlBadConfirmation",
|
|
177
|
+
"inputs": []
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"type": "error",
|
|
181
|
+
"name": "AccessControlUnauthorizedAccount",
|
|
182
|
+
"inputs": [
|
|
183
|
+
{
|
|
184
|
+
"name": "account",
|
|
185
|
+
"type": "address",
|
|
186
|
+
"internalType": "address"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "neededRole",
|
|
190
|
+
"type": "bytes32",
|
|
191
|
+
"internalType": "bytes32"
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
]
|