Commit 112f9e3
authored
Macro audit fixes (#116)
* Fix [M-1]: Encryption key can be potentially intercepted to retrieve revealed URI
* Fix [L-2]: User must approve themselves to burn their own token
* Fix [M-2]: Callback marked as OPTIONAL does revert when not implemented in extension
* Complete fix [L-2]: User must approve themselves to burn their own token
* Fix [M-3]: ERC1155Core's mint() doesn’t follow the CEI pattern can lead to potential reentrancy
* Fix [M-4]: Extension may fail to get uninstalled
* Fix [L-1]: name and symbol properties are not correctly initiated
* Fix [M-5]: Update to ClaimCondition can cause the caller paying more than expected
* Fix [L-3]: Not including EIP712’s eip712Domain() function as a fallback function, lead to the function unreachable
* Fix [L-5]: Allowing core contracts to receive native tokens without any efficient way to take it out
* Fix [L-6]: Not following ERC4906 in BatchMetadata and DelayedRevealBatchMetadata contracts
* Fix [L-7]: tokenURI should revert for invalid tokenIds
* Fix [L-8]: _validateClaimCondition() returns an outdated condition
* Fix tests from fix for [L-7]
* Fix [L-9]: Native tokens can be locked in MintableERC20
* Fix [M-7]: supportsInterface() issues
* Fix [Q-1]: batchMint for ERC1155Core contract and safeMint for ERC721Core contract are currently not supported
* Fix [Q-2] Support for multiple requiredInterfaceIds
* Fix [Q-3]: Core contract implementations are not protected against initialization
* Fix [Q-4]: MintableERC721 should have getAllMetadataBatches function
* Fix [Q-5]: Inconsistent payable tags
* Fix [Q-6]: Nitpicks1 parent 3d914b7 commit 112f9e3
File tree
39 files changed
+808
-319
lines changed- src
- callback
- core/token
- extension/token
- metadata
- minting
- royalty
- transferable
- interface
- test
- extension
- metadata
- minting
- transferable
39 files changed
+808
-319
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
| |||
147 | 145 | | |
148 | 146 | | |
149 | 147 | | |
150 | | - | |
| 148 | + | |
151 | 149 | | |
152 | 150 | | |
153 | 151 | | |
| |||
174 | 172 | | |
175 | 173 | | |
176 | 174 | | |
177 | | - | |
178 | | - | |
179 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
| 274 | + | |
279 | 275 | | |
280 | 276 | | |
281 | 277 | | |
| |||
307 | 303 | | |
308 | 304 | | |
309 | 305 | | |
310 | | - | |
311 | | - | |
312 | | - | |
| 306 | + | |
| 307 | + | |
313 | 308 | | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
| 309 | + | |
| 310 | + | |
318 | 311 | | |
319 | 312 | | |
320 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
113 | | - | |
| 114 | + | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| |||
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
123 | | - | |
| 125 | + | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| |||
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
146 | 152 | | |
147 | 153 | | |
148 | 154 | | |
| |||
168 | 174 | | |
169 | 175 | | |
170 | 176 | | |
171 | | - | |
172 | 177 | | |
173 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
174 | 201 | | |
175 | 202 | | |
176 | 203 | | |
| |||
181 | 208 | | |
182 | 209 | | |
183 | 210 | | |
184 | | - | |
| 211 | + | |
185 | 212 | | |
186 | | - | |
187 | 213 | | |
188 | 214 | | |
| 215 | + | |
189 | 216 | | |
190 | 217 | | |
191 | 218 | | |
| |||
239 | 266 | | |
240 | 267 | | |
241 | 268 | | |
242 | | - | |
243 | | - | |
| 269 | + | |
| 270 | + | |
244 | 271 | | |
245 | 272 | | |
246 | 273 | | |
| |||
256 | 283 | | |
257 | 284 | | |
258 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
259 | 297 | | |
260 | 298 | | |
261 | 299 | | |
| |||
0 commit comments