@zoralabs/comments-contracts 0.1.0 → 0.1.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.
@@ -0,0 +1,233 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "deployCode",
5
+ "inputs": [
6
+ {
7
+ "name": "_artifact",
8
+ "type": "string",
9
+ "internalType": "string"
10
+ },
11
+ {
12
+ "name": "_value",
13
+ "type": "uint256",
14
+ "internalType": "uint256"
15
+ },
16
+ {
17
+ "name": "_salt",
18
+ "type": "bytes32",
19
+ "internalType": "bytes32"
20
+ }
21
+ ],
22
+ "outputs": [
23
+ {
24
+ "name": "",
25
+ "type": "address",
26
+ "internalType": "address"
27
+ }
28
+ ],
29
+ "stateMutability": "nonpayable"
30
+ },
31
+ {
32
+ "type": "function",
33
+ "name": "deployCode",
34
+ "inputs": [
35
+ {
36
+ "name": "_artifact",
37
+ "type": "string",
38
+ "internalType": "string"
39
+ },
40
+ {
41
+ "name": "_args",
42
+ "type": "bytes",
43
+ "internalType": "bytes"
44
+ },
45
+ {
46
+ "name": "_salt",
47
+ "type": "bytes32",
48
+ "internalType": "bytes32"
49
+ }
50
+ ],
51
+ "outputs": [
52
+ {
53
+ "name": "",
54
+ "type": "address",
55
+ "internalType": "address"
56
+ }
57
+ ],
58
+ "stateMutability": "nonpayable"
59
+ },
60
+ {
61
+ "type": "function",
62
+ "name": "deployCode",
63
+ "inputs": [
64
+ {
65
+ "name": "_artifact",
66
+ "type": "string",
67
+ "internalType": "string"
68
+ },
69
+ {
70
+ "name": "_value",
71
+ "type": "uint256",
72
+ "internalType": "uint256"
73
+ }
74
+ ],
75
+ "outputs": [
76
+ {
77
+ "name": "",
78
+ "type": "address",
79
+ "internalType": "address"
80
+ }
81
+ ],
82
+ "stateMutability": "nonpayable"
83
+ },
84
+ {
85
+ "type": "function",
86
+ "name": "deployCode",
87
+ "inputs": [
88
+ {
89
+ "name": "_artifact",
90
+ "type": "string",
91
+ "internalType": "string"
92
+ },
93
+ {
94
+ "name": "_salt",
95
+ "type": "bytes32",
96
+ "internalType": "bytes32"
97
+ }
98
+ ],
99
+ "outputs": [
100
+ {
101
+ "name": "",
102
+ "type": "address",
103
+ "internalType": "address"
104
+ }
105
+ ],
106
+ "stateMutability": "nonpayable"
107
+ },
108
+ {
109
+ "type": "function",
110
+ "name": "deployCode",
111
+ "inputs": [
112
+ {
113
+ "name": "_artifact",
114
+ "type": "string",
115
+ "internalType": "string"
116
+ },
117
+ {
118
+ "name": "_args",
119
+ "type": "bytes",
120
+ "internalType": "bytes"
121
+ }
122
+ ],
123
+ "outputs": [
124
+ {
125
+ "name": "",
126
+ "type": "address",
127
+ "internalType": "address"
128
+ }
129
+ ],
130
+ "stateMutability": "nonpayable"
131
+ },
132
+ {
133
+ "type": "function",
134
+ "name": "deployCode",
135
+ "inputs": [
136
+ {
137
+ "name": "_artifact",
138
+ "type": "string",
139
+ "internalType": "string"
140
+ },
141
+ {
142
+ "name": "_args",
143
+ "type": "bytes",
144
+ "internalType": "bytes"
145
+ },
146
+ {
147
+ "name": "_value",
148
+ "type": "uint256",
149
+ "internalType": "uint256"
150
+ },
151
+ {
152
+ "name": "_salt",
153
+ "type": "bytes32",
154
+ "internalType": "bytes32"
155
+ }
156
+ ],
157
+ "outputs": [
158
+ {
159
+ "name": "",
160
+ "type": "address",
161
+ "internalType": "address"
162
+ }
163
+ ],
164
+ "stateMutability": "nonpayable"
165
+ },
166
+ {
167
+ "type": "function",
168
+ "name": "deployCode",
169
+ "inputs": [
170
+ {
171
+ "name": "_artifact",
172
+ "type": "string",
173
+ "internalType": "string"
174
+ }
175
+ ],
176
+ "outputs": [
177
+ {
178
+ "name": "",
179
+ "type": "address",
180
+ "internalType": "address"
181
+ }
182
+ ],
183
+ "stateMutability": "nonpayable"
184
+ },
185
+ {
186
+ "type": "function",
187
+ "name": "deployCode",
188
+ "inputs": [
189
+ {
190
+ "name": "_artifact",
191
+ "type": "string",
192
+ "internalType": "string"
193
+ },
194
+ {
195
+ "name": "_args",
196
+ "type": "bytes",
197
+ "internalType": "bytes"
198
+ },
199
+ {
200
+ "name": "_value",
201
+ "type": "uint256",
202
+ "internalType": "uint256"
203
+ }
204
+ ],
205
+ "outputs": [
206
+ {
207
+ "name": "",
208
+ "type": "address",
209
+ "internalType": "address"
210
+ }
211
+ ],
212
+ "stateMutability": "nonpayable"
213
+ },
214
+ {
215
+ "type": "function",
216
+ "name": "getCode",
217
+ "inputs": [
218
+ {
219
+ "name": "_artifact",
220
+ "type": "string",
221
+ "internalType": "string"
222
+ }
223
+ ],
224
+ "outputs": [
225
+ {
226
+ "name": "",
227
+ "type": "bytes",
228
+ "internalType": "bytes"
229
+ }
230
+ ],
231
+ "stateMutability": "nonpayable"
232
+ }
233
+ ]
package/foundry.toml CHANGED
@@ -6,6 +6,7 @@ via_ir = true
6
6
  solc_version = '0.8.23'
7
7
  optimizer = true
8
8
  optimizer_runs = 1_000_000
9
+ dynamic_test_linking = true
9
10
  fs_permissions = [
10
11
  { access = "readwrite", path = "./addresses" },
11
12
  { access = "read", path = "./package.json" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zoralabs/comments-contracts",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "author": "oveddan",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -34,12 +34,12 @@
34
34
  "tsup": "^7.2.0",
35
35
  "tsx": "^3.13.0",
36
36
  "typescript": "^5.2.2",
37
- "viem": "^2.21.18",
38
- "@zoralabs/shared-scripts": "^0.0.0",
39
- "@zoralabs/shared-contracts": "^0.0.5",
37
+ "viem": "2.53.1",
40
38
  "@zoralabs/protocol-rewards": "^1.2.9",
41
- "@zoralabs/tsconfig": "^0.0.1",
39
+ "@zoralabs/shared-contracts": "^0.0.5",
40
+ "@zoralabs/shared-scripts": "^0.0.0",
42
41
  "@zoralabs/sparks-contracts": "^0.2.5",
42
+ "@zoralabs/tsconfig": "^0.0.1",
43
43
  "@zoralabs/zora-1155-contracts": "^2.13.2"
44
44
  },
45
45
  "dependencies": {
@@ -49,16 +49,20 @@
49
49
  "scripts": {
50
50
  "prettier:check": "prettier --check 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'",
51
51
  "prettier:write": "prettier --write 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'",
52
- "test": "forge test -vv",
52
+ "test": "forge test -vv --no-match-contract '(CallerAndCommenterSwapAndCommentTest|Comments_mintAndCommentTest)'",
53
+ "abi-check:check": "../../scripts/abi-check.sh check",
54
+ "abi-check:generate": "../../scripts/abi-check.sh generate",
53
55
  "dev": "FOUNDRY_PROFILE=dev forge test --watch -vvv",
54
56
  "test-gas": "forge test --gas-report",
55
57
  "storage-inspect:check": "./script/storage-check.sh check ZoraTimedSaleStrategyImpl",
56
58
  "storage-inspect:generate": "./script/storage-check.sh generate ZoraTimedSaleStrategyImpl",
59
+ "build:contracts:minimal": "forge build --skip test --skip script --no-metadata",
57
60
  "build:sizes": "forge build src/ --sizes",
58
61
  "copy-abis": "pnpm exec bundle-abis",
59
62
  "coverage": "FOUNDRY_PROFILE=default forge coverage --report lcov",
60
- "build": "pnpm run wagmi:generate && pnpm run copy-abis && pnpm run prettier:write && tsup",
61
- "wagmi:generate": "FOUNDRY_PROFILE=dev forge build && wagmi generate && pnpm exec rename-generated-abi-casing ./package/wagmiGenerated.ts",
63
+ "build": "forge build",
64
+ "build:js": "pnpm run wagmi:generate && pnpm run copy-abis && pnpm run prettier:write && tsup",
65
+ "wagmi:generate": "pnpm run build:contracts:minimal && wagmi generate && pnpm exec rename-generated-abi-casing ./package/wagmiGenerated.ts",
62
66
  "update-contract-version": "pnpm exec update-contract-version"
63
67
  }
64
68
  }
@@ -64,7 +64,7 @@ contract CommentsDeployerBase is ProxyDeployerScript {
64
64
  deployment.callerAndCommenterVersion = readStringOrDefaultToEmpty(json, "CALLER_AND_COMMENTER_VERSION");
65
65
  }
66
66
 
67
- function commentsImplCreationCode() internal pure returns (bytes memory) {
67
+ function commentsImplCreationCode() internal returns (bytes memory) {
68
68
  return abi.encodePacked(type(CommentsImpl).creationCode, abi.encode(SPARK_VALUE, PROTOCOL_REWARDS));
69
69
  }
70
70
 
@@ -9,6 +9,6 @@ import {IVersionedContract} from "@zoralabs/shared-contracts/interfaces/IVersion
9
9
  contract ContractVersionBase is IVersionedContract {
10
10
  /// @notice The version of the contract
11
11
  function contractVersion() external pure override returns (string memory) {
12
- return "0.1.0";
12
+ return "0.1.1";
13
13
  }
14
14
  }
@@ -1,84 +0,0 @@
1
-
2
- > @zoralabs/comments-contracts@0.1.0 build /home/runner/work/zora-protocol-private/zora-protocol-private/packages/comments
3
- > pnpm run wagmi:generate && pnpm run copy-abis && pnpm run prettier:write && tsup
4
-
5
-
6
- > @zoralabs/comments-contracts@0.1.0 wagmi:generate /home/runner/work/zora-protocol-private/zora-protocol-private/packages/comments
7
- > FOUNDRY_PROFILE=dev forge build && wagmi generate && pnpm exec rename-generated-abi-casing ./package/wagmiGenerated.ts
8
-
9
- Compiling 121 files with Solc 0.8.23
10
- Solc 0.8.23 finished in 85.76s
11
- Compiler run successful!
12
- - Validating plugins
13
- ✔ Validating plugins
14
- - Resolving contracts
15
- ✔ Resolving contracts
16
- - Running plugins
17
- ✔ Running plugins
18
- - Writing to package/wagmiGenerated.ts
19
- ✔ Writing to package/wagmiGenerated.ts
20
- 🔄 Processing 1 file(s) to replace 'Abi' with 'ABI'...
21
- 📝 Processing ./package/wagmiGenerated.ts...
22
- ✅ Updated ./package/wagmiGenerated.ts (2 replacements)
23
- ✨ All files processed successfully!
24
-
25
- > @zoralabs/comments-contracts@0.1.0 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/comments
26
- > pnpm exec bundle-abis
27
-
28
-
29
- > @zoralabs/comments-contracts@0.1.0 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/comments
30
- > prettier --write 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'
31
-
32
- src/CommentsImpl.sol 1550ms (unchanged)
33
- src/CommentsImplConstants.sol 17ms (unchanged)
34
- src/interfaces/ICallerAndCommenter.sol 50ms (unchanged)
35
- src/interfaces/ICoinComments.sol 8ms (unchanged)
36
- src/interfaces/IComments.sol 70ms
37
- src/interfaces/IMultiOwnable.sol 2ms (unchanged)
38
- src/interfaces/ISecondarySwap.sol 24ms (unchanged)
39
- src/interfaces/IZoraCreator1155.sol 8ms (unchanged)
40
- src/interfaces/IZoraCreator1155TypesV1.sol 28ms (unchanged)
41
- src/interfaces/IZoraTimedSaleStrategy.sol 9ms (unchanged)
42
- src/proxy/CallerAndCommenter.sol 33ms (unchanged)
43
- src/proxy/Comments.sol 17ms (unchanged)
44
- src/utils/CallerAndCommenterImpl.sol 476ms (unchanged)
45
- src/utils/EIP712UpgradeableWithChainId.sol 22ms (unchanged)
46
- src/version/ContractVersionBase.sol 1ms (unchanged)
47
- test/CallerAndCommenter_mintAndComment.t copy.sol 394ms (unchanged)
48
- test/CallerAndCommenter_swapAndComment.t.sol 841ms (unchanged)
49
- test/CallerAndCommenterTestBase.sol 146ms (unchanged)
50
- test/Comments_delegateComment.t.sol 222ms (unchanged)
51
- test/Comments_permit.t.sol 747ms (unchanged)
52
- test/Comments_smartWallet.t.sol 302ms (unchanged)
53
- test/Comments.t.sol 823ms (unchanged)
54
- test/CommentsTestBase.sol 58ms (unchanged)
55
- test/mocks/Mock1155.sol 34ms (unchanged)
56
- test/mocks/Mock1155NoCreatorRewardRecipient.sol 24ms (unchanged)
57
- test/mocks/Mock1155NoOwner.sol 16ms (unchanged)
58
- test/mocks/MockCoin.sol 27ms (unchanged)
59
- test/mocks/MockDelegateCommenter.sol 21ms (unchanged)
60
- test/mocks/MockIZoraCreator1155.sol 2ms (unchanged)
61
- test/mocks/MockSecondarySwap.sol 22ms (unchanged)
62
- test/mocks/MockZoraTimedSale.sol 24ms (unchanged)
63
- test/mocks/ProtocolRewards.sol 553ms (unchanged)
64
- script/AddDelegateCommenterRole.s.sol 10ms (unchanged)
65
- script/CommentsDeployerBase.sol 92ms (unchanged)
66
- script/Deploy.s.sol 6ms (unchanged)
67
- script/DeployCallerAndCommenterImpl.s.sol 16ms (unchanged)
68
- script/DeployImpl.s.sol 15ms (unchanged)
69
- script/DeployNonDeterministic.s.sol 27ms (unchanged)
70
- script/GenerateDeterministicParams.s.sol 33ms (unchanged)
71
- CLI Building entry: package/index.ts
72
- CLI Using tsconfig: tsconfig.json
73
- CLI tsup v8.4.0
74
- CLI Using tsup config: /home/runner/work/zora-protocol-private/zora-protocol-private/packages/comments/tsup.config.ts
75
- CLI Target: es2021
76
- CLI Cleaning output folder
77
- CJS Build start
78
- ESM Build start
79
- ESM dist/index.js 47.88 KB
80
- ESM dist/index.js.map 83.45 KB
81
- ESM ⚡️ Build success in 41ms
82
- CJS dist/index.cjs 48.96 KB
83
- CJS dist/index.cjs.map 83.73 KB
84
- CJS ⚡️ Build success in 41ms
@@ -1,9 +0,0 @@
1
- [
2
- {
3
- "type": "function",
4
- "name": "run",
5
- "inputs": [],
6
- "outputs": [],
7
- "stateMutability": "view"
8
- }
9
- ]