@zoralabs/coins 2.4.0 → 2.4.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.
Files changed (120) hide show
  1. package/.turbo/turbo-build$colon$js.log +116 -124
  2. package/CHANGELOG.md +6 -0
  3. package/abis/Address.json +0 -16
  4. package/abis/BuySupplyWithSwapRouterHook.json +0 -27
  5. package/abis/BuySupplyWithV4SwapHook.json +0 -32
  6. package/abis/Clones.json +1 -1
  7. package/abis/CoinDopplerMultiCurve.json +109 -0
  8. package/abis/Create2.json +0 -21
  9. package/abis/ERC1967Proxy.json +1 -1
  10. package/abis/ERC1967Utils.json +0 -45
  11. package/abis/{UpgradeCoinImpl.json → Errors.json} +14 -10
  12. package/abis/{MockERC20.json → IERC1363.json} +134 -104
  13. package/abis/IERC1967.json +47 -0
  14. package/abis/IERC20.json +0 -36
  15. package/abis/IProtocolRewards.json +0 -258
  16. package/abis/{Script.json → ISupportsLimitOrderFill.json} +2 -2
  17. package/abis/IZoraLimitOrderBookCoinsInterface.json +67 -0
  18. package/abis/IZoraV4CoinHook.json +10 -0
  19. package/abis/ProxyShim.json +15 -16
  20. package/abis/SafeCast.json +51 -0
  21. package/abis/{AddressConstants.json → SafeCast160.json} +1 -1
  22. package/abis/Strings.json +10 -0
  23. package/abis/UUPSUpgradeable.json +1 -1
  24. package/abis/V3ToV4SwapLib.json +28 -0
  25. package/abis/ZoraFactory.json +1 -1
  26. package/abis/ZoraFactoryImpl.json +22 -6
  27. package/abis/ZoraV4CoinHook.json +20 -48
  28. package/dist/index.cjs +950 -43
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.js +948 -41
  31. package/dist/index.js.map +1 -1
  32. package/dist/wagmiGenerated.d.ts +1459 -76
  33. package/dist/wagmiGenerated.d.ts.map +1 -1
  34. package/package/wagmiGenerated.ts +951 -44
  35. package/package.json +9 -9
  36. package/remappings.txt +2 -1
  37. package/src/ZoraFactoryImpl.sol +8 -0
  38. package/src/deployment/ForkedCoinsAddresses.sol +54 -0
  39. package/src/hooks/ZoraV4CoinHook.sol +74 -20
  40. package/src/hooks/deployment/BuySupplyWithV4SwapHook.sol +20 -142
  41. package/src/interfaces/ISupportsLimitOrderFill.sol +11 -0
  42. package/src/interfaces/IZoraLimitOrderBookCoinsInterface.sol +21 -0
  43. package/src/interfaces/IZoraV4CoinHook.sol +6 -0
  44. package/src/libs/CoinConstants.sol +6 -0
  45. package/src/libs/CoinDopplerMultiCurve.sol +1 -1
  46. package/src/libs/CoinRewardsV4.sol +0 -1
  47. package/src/libs/HooksDeployment.sol +20 -8
  48. package/src/libs/UniV4SwapHelper.sol +35 -0
  49. package/src/libs/V3ToV4SwapLib.sol +261 -0
  50. package/src/version/ContractVersionBase.sol +1 -1
  51. package/test/BuySupplyWithV4SwapHook.t.sol +4 -3
  52. package/test/Coin.t.sol +7 -1
  53. package/test/CoinUniV4.t.sol +2 -1
  54. package/test/ContentCoinRewards.t.sol +5 -1
  55. package/test/CreatorCoin.t.sol +3 -1
  56. package/test/CreatorCoinRewards.t.sol +3 -1
  57. package/test/Factory.t.sol +20 -7
  58. package/test/HooksDeployment.t.sol +16 -3
  59. package/test/LiquidityMigration.t.sol +52 -44
  60. package/test/MultiOwnable.t.sol +2 -1
  61. package/test/Upgrades.t.sol +110 -81
  62. package/test/V4Liquidity.t.sol +1 -1
  63. package/test/mocks/MockSwapRouter.sol +33 -0
  64. package/test/mocks/MockZoraLimitOrderBook.sol +14 -0
  65. package/test/utils/BaseTest.sol +14 -448
  66. package/test/utils/FeeEstimatorHook.sol +6 -2
  67. package/test/utils/V4TestSetup.sol +595 -0
  68. package/wagmi.config.ts +1 -1
  69. package/abis/BaseTest.json +0 -718
  70. package/abis/DeterministicDeployerAndCaller.json +0 -315
  71. package/abis/DeterministicUUPSProxyDeployer.json +0 -167
  72. package/abis/EIP712.json +0 -67
  73. package/abis/ERC20.json +0 -310
  74. package/abis/FeeEstimatorHook.json +0 -1938
  75. package/abis/IERC721.json +0 -287
  76. package/abis/IERC721Enumerable.json +0 -343
  77. package/abis/IERC721Metadata.json +0 -332
  78. package/abis/IERC721TokenReceiver.json +0 -36
  79. package/abis/IImmutableCreate2Factory.json +0 -93
  80. package/abis/IMulticall3.json +0 -440
  81. package/abis/ISafe.json +0 -15
  82. package/abis/ISymbol.json +0 -15
  83. package/abis/IUniswapV4Router04.json +0 -484
  84. package/abis/IUniversalRouter.json +0 -61
  85. package/abis/IV4Quoter.json +0 -310
  86. package/abis/ImmutableCreate2FactoryUtils.json +0 -15
  87. package/abis/LibString.json +0 -7
  88. package/abis/Math.json +0 -7
  89. package/abis/MockAirlock.json +0 -39
  90. package/abis/MockERC721.json +0 -350
  91. package/abis/ProtocolRewards.json +0 -494
  92. package/abis/ShortStrings.json +0 -18
  93. package/abis/SimpleERC20.json +0 -326
  94. package/abis/StdAssertions.json +0 -379
  95. package/abis/StdInvariant.json +0 -180
  96. package/abis/Test.json +0 -570
  97. package/abis/VmContractHelper235.json +0 -233
  98. package/abis/VmContractHelper242.json +0 -233
  99. package/abis/stdError.json +0 -119
  100. package/abis/stdStorageSafe.json +0 -52
  101. package/addresses/8453.json +0 -13
  102. package/addresses/84532.json +0 -10
  103. package/deterministicConfig/deployerAndCaller.json +0 -5
  104. package/deterministicConfig/zoraFactory.json +0 -8
  105. package/script/Deploy.s.sol +0 -23
  106. package/script/DeployAutoSwapper.s.sol +0 -30
  107. package/script/DeployDevFactory.s.sol +0 -21
  108. package/script/DeployPostDeploymentHooks.s.sol +0 -20
  109. package/script/DeployTrustedMsgSenderLookup.s.sol +0 -20
  110. package/script/DeployUpgradeGate.s.sol +0 -21
  111. package/script/GenerateDeterministicParams.s.sol +0 -43
  112. package/script/PrintRegisterUpgradePath.s.sol +0 -28
  113. package/script/PrintUpgradeCommand.s.sol +0 -13
  114. package/script/TestBackingCoinSwap.s.sol +0 -144
  115. package/script/TestV4Swap.s.sol +0 -133
  116. package/script/UpgradeCoinImpl.sol +0 -23
  117. package/script/UpgradeFactoryImpl.s.sol +0 -28
  118. package/script/UpgradeHooks.s.sol +0 -23
  119. package/src/deployment/CoinsDeployerBase.sol +0 -297
  120. /package/{test → src}/utils/ProxyShim.sol +0 -0
@@ -1,484 +0,0 @@
1
- [
2
- {
3
- "type": "receive",
4
- "stateMutability": "payable"
5
- },
6
- {
7
- "type": "function",
8
- "name": "msgSender",
9
- "inputs": [],
10
- "outputs": [
11
- {
12
- "name": "",
13
- "type": "address",
14
- "internalType": "address"
15
- }
16
- ],
17
- "stateMutability": "view"
18
- },
19
- {
20
- "type": "function",
21
- "name": "swap",
22
- "inputs": [
23
- {
24
- "name": "amountSpecified",
25
- "type": "int256",
26
- "internalType": "int256"
27
- },
28
- {
29
- "name": "amountLimit",
30
- "type": "uint256",
31
- "internalType": "uint256"
32
- },
33
- {
34
- "name": "zeroForOne",
35
- "type": "bool",
36
- "internalType": "bool"
37
- },
38
- {
39
- "name": "poolKey",
40
- "type": "tuple",
41
- "internalType": "struct PoolKey",
42
- "components": [
43
- {
44
- "name": "currency0",
45
- "type": "address",
46
- "internalType": "Currency"
47
- },
48
- {
49
- "name": "currency1",
50
- "type": "address",
51
- "internalType": "Currency"
52
- },
53
- {
54
- "name": "fee",
55
- "type": "uint24",
56
- "internalType": "uint24"
57
- },
58
- {
59
- "name": "tickSpacing",
60
- "type": "int24",
61
- "internalType": "int24"
62
- },
63
- {
64
- "name": "hooks",
65
- "type": "address",
66
- "internalType": "contract IHooks"
67
- }
68
- ]
69
- },
70
- {
71
- "name": "hookData",
72
- "type": "bytes",
73
- "internalType": "bytes"
74
- },
75
- {
76
- "name": "receiver",
77
- "type": "address",
78
- "internalType": "address"
79
- },
80
- {
81
- "name": "deadline",
82
- "type": "uint256",
83
- "internalType": "uint256"
84
- }
85
- ],
86
- "outputs": [
87
- {
88
- "name": "",
89
- "type": "int256",
90
- "internalType": "BalanceDelta"
91
- }
92
- ],
93
- "stateMutability": "payable"
94
- },
95
- {
96
- "type": "function",
97
- "name": "swap",
98
- "inputs": [
99
- {
100
- "name": "data",
101
- "type": "bytes",
102
- "internalType": "bytes"
103
- },
104
- {
105
- "name": "deadline",
106
- "type": "uint256",
107
- "internalType": "uint256"
108
- }
109
- ],
110
- "outputs": [
111
- {
112
- "name": "",
113
- "type": "int256",
114
- "internalType": "BalanceDelta"
115
- }
116
- ],
117
- "stateMutability": "payable"
118
- },
119
- {
120
- "type": "function",
121
- "name": "swap",
122
- "inputs": [
123
- {
124
- "name": "amountSpecified",
125
- "type": "int256",
126
- "internalType": "int256"
127
- },
128
- {
129
- "name": "amountLimit",
130
- "type": "uint256",
131
- "internalType": "uint256"
132
- },
133
- {
134
- "name": "startCurrency",
135
- "type": "address",
136
- "internalType": "Currency"
137
- },
138
- {
139
- "name": "path",
140
- "type": "tuple[]",
141
- "internalType": "struct PathKey[]",
142
- "components": [
143
- {
144
- "name": "intermediateCurrency",
145
- "type": "address",
146
- "internalType": "Currency"
147
- },
148
- {
149
- "name": "fee",
150
- "type": "uint24",
151
- "internalType": "uint24"
152
- },
153
- {
154
- "name": "tickSpacing",
155
- "type": "int24",
156
- "internalType": "int24"
157
- },
158
- {
159
- "name": "hooks",
160
- "type": "address",
161
- "internalType": "contract IHooks"
162
- },
163
- {
164
- "name": "hookData",
165
- "type": "bytes",
166
- "internalType": "bytes"
167
- }
168
- ]
169
- },
170
- {
171
- "name": "receiver",
172
- "type": "address",
173
- "internalType": "address"
174
- },
175
- {
176
- "name": "deadline",
177
- "type": "uint256",
178
- "internalType": "uint256"
179
- }
180
- ],
181
- "outputs": [
182
- {
183
- "name": "",
184
- "type": "int256",
185
- "internalType": "BalanceDelta"
186
- }
187
- ],
188
- "stateMutability": "payable"
189
- },
190
- {
191
- "type": "function",
192
- "name": "swapExactTokensForTokens",
193
- "inputs": [
194
- {
195
- "name": "amountIn",
196
- "type": "uint256",
197
- "internalType": "uint256"
198
- },
199
- {
200
- "name": "amountOutMin",
201
- "type": "uint256",
202
- "internalType": "uint256"
203
- },
204
- {
205
- "name": "startCurrency",
206
- "type": "address",
207
- "internalType": "Currency"
208
- },
209
- {
210
- "name": "path",
211
- "type": "tuple[]",
212
- "internalType": "struct PathKey[]",
213
- "components": [
214
- {
215
- "name": "intermediateCurrency",
216
- "type": "address",
217
- "internalType": "Currency"
218
- },
219
- {
220
- "name": "fee",
221
- "type": "uint24",
222
- "internalType": "uint24"
223
- },
224
- {
225
- "name": "tickSpacing",
226
- "type": "int24",
227
- "internalType": "int24"
228
- },
229
- {
230
- "name": "hooks",
231
- "type": "address",
232
- "internalType": "contract IHooks"
233
- },
234
- {
235
- "name": "hookData",
236
- "type": "bytes",
237
- "internalType": "bytes"
238
- }
239
- ]
240
- },
241
- {
242
- "name": "receiver",
243
- "type": "address",
244
- "internalType": "address"
245
- },
246
- {
247
- "name": "deadline",
248
- "type": "uint256",
249
- "internalType": "uint256"
250
- }
251
- ],
252
- "outputs": [
253
- {
254
- "name": "",
255
- "type": "int256",
256
- "internalType": "BalanceDelta"
257
- }
258
- ],
259
- "stateMutability": "payable"
260
- },
261
- {
262
- "type": "function",
263
- "name": "swapExactTokensForTokens",
264
- "inputs": [
265
- {
266
- "name": "amountIn",
267
- "type": "uint256",
268
- "internalType": "uint256"
269
- },
270
- {
271
- "name": "amountOutMin",
272
- "type": "uint256",
273
- "internalType": "uint256"
274
- },
275
- {
276
- "name": "zeroForOne",
277
- "type": "bool",
278
- "internalType": "bool"
279
- },
280
- {
281
- "name": "poolKey",
282
- "type": "tuple",
283
- "internalType": "struct PoolKey",
284
- "components": [
285
- {
286
- "name": "currency0",
287
- "type": "address",
288
- "internalType": "Currency"
289
- },
290
- {
291
- "name": "currency1",
292
- "type": "address",
293
- "internalType": "Currency"
294
- },
295
- {
296
- "name": "fee",
297
- "type": "uint24",
298
- "internalType": "uint24"
299
- },
300
- {
301
- "name": "tickSpacing",
302
- "type": "int24",
303
- "internalType": "int24"
304
- },
305
- {
306
- "name": "hooks",
307
- "type": "address",
308
- "internalType": "contract IHooks"
309
- }
310
- ]
311
- },
312
- {
313
- "name": "hookData",
314
- "type": "bytes",
315
- "internalType": "bytes"
316
- },
317
- {
318
- "name": "receiver",
319
- "type": "address",
320
- "internalType": "address"
321
- },
322
- {
323
- "name": "deadline",
324
- "type": "uint256",
325
- "internalType": "uint256"
326
- }
327
- ],
328
- "outputs": [
329
- {
330
- "name": "",
331
- "type": "int256",
332
- "internalType": "BalanceDelta"
333
- }
334
- ],
335
- "stateMutability": "payable"
336
- },
337
- {
338
- "type": "function",
339
- "name": "swapTokensForExactTokens",
340
- "inputs": [
341
- {
342
- "name": "amountOut",
343
- "type": "uint256",
344
- "internalType": "uint256"
345
- },
346
- {
347
- "name": "amountInMax",
348
- "type": "uint256",
349
- "internalType": "uint256"
350
- },
351
- {
352
- "name": "startCurrency",
353
- "type": "address",
354
- "internalType": "Currency"
355
- },
356
- {
357
- "name": "path",
358
- "type": "tuple[]",
359
- "internalType": "struct PathKey[]",
360
- "components": [
361
- {
362
- "name": "intermediateCurrency",
363
- "type": "address",
364
- "internalType": "Currency"
365
- },
366
- {
367
- "name": "fee",
368
- "type": "uint24",
369
- "internalType": "uint24"
370
- },
371
- {
372
- "name": "tickSpacing",
373
- "type": "int24",
374
- "internalType": "int24"
375
- },
376
- {
377
- "name": "hooks",
378
- "type": "address",
379
- "internalType": "contract IHooks"
380
- },
381
- {
382
- "name": "hookData",
383
- "type": "bytes",
384
- "internalType": "bytes"
385
- }
386
- ]
387
- },
388
- {
389
- "name": "receiver",
390
- "type": "address",
391
- "internalType": "address"
392
- },
393
- {
394
- "name": "deadline",
395
- "type": "uint256",
396
- "internalType": "uint256"
397
- }
398
- ],
399
- "outputs": [
400
- {
401
- "name": "",
402
- "type": "int256",
403
- "internalType": "BalanceDelta"
404
- }
405
- ],
406
- "stateMutability": "payable"
407
- },
408
- {
409
- "type": "function",
410
- "name": "swapTokensForExactTokens",
411
- "inputs": [
412
- {
413
- "name": "amountOut",
414
- "type": "uint256",
415
- "internalType": "uint256"
416
- },
417
- {
418
- "name": "amountInMax",
419
- "type": "uint256",
420
- "internalType": "uint256"
421
- },
422
- {
423
- "name": "zeroForOne",
424
- "type": "bool",
425
- "internalType": "bool"
426
- },
427
- {
428
- "name": "poolKey",
429
- "type": "tuple",
430
- "internalType": "struct PoolKey",
431
- "components": [
432
- {
433
- "name": "currency0",
434
- "type": "address",
435
- "internalType": "Currency"
436
- },
437
- {
438
- "name": "currency1",
439
- "type": "address",
440
- "internalType": "Currency"
441
- },
442
- {
443
- "name": "fee",
444
- "type": "uint24",
445
- "internalType": "uint24"
446
- },
447
- {
448
- "name": "tickSpacing",
449
- "type": "int24",
450
- "internalType": "int24"
451
- },
452
- {
453
- "name": "hooks",
454
- "type": "address",
455
- "internalType": "contract IHooks"
456
- }
457
- ]
458
- },
459
- {
460
- "name": "hookData",
461
- "type": "bytes",
462
- "internalType": "bytes"
463
- },
464
- {
465
- "name": "receiver",
466
- "type": "address",
467
- "internalType": "address"
468
- },
469
- {
470
- "name": "deadline",
471
- "type": "uint256",
472
- "internalType": "uint256"
473
- }
474
- ],
475
- "outputs": [
476
- {
477
- "name": "",
478
- "type": "int256",
479
- "internalType": "BalanceDelta"
480
- }
481
- ],
482
- "stateMutability": "payable"
483
- }
484
- ]
@@ -1,61 +0,0 @@
1
- [
2
- {
3
- "type": "function",
4
- "name": "execute",
5
- "inputs": [
6
- {
7
- "name": "commands",
8
- "type": "bytes",
9
- "internalType": "bytes"
10
- },
11
- {
12
- "name": "inputs",
13
- "type": "bytes[]",
14
- "internalType": "bytes[]"
15
- },
16
- {
17
- "name": "deadline",
18
- "type": "uint256",
19
- "internalType": "uint256"
20
- }
21
- ],
22
- "outputs": [],
23
- "stateMutability": "payable"
24
- },
25
- {
26
- "type": "error",
27
- "name": "ETHNotAccepted",
28
- "inputs": []
29
- },
30
- {
31
- "type": "error",
32
- "name": "ExecutionFailed",
33
- "inputs": [
34
- {
35
- "name": "commandIndex",
36
- "type": "uint256",
37
- "internalType": "uint256"
38
- },
39
- {
40
- "name": "message",
41
- "type": "bytes",
42
- "internalType": "bytes"
43
- }
44
- ]
45
- },
46
- {
47
- "type": "error",
48
- "name": "InvalidEthSender",
49
- "inputs": []
50
- },
51
- {
52
- "type": "error",
53
- "name": "LengthMismatch",
54
- "inputs": []
55
- },
56
- {
57
- "type": "error",
58
- "name": "TransactionDeadlinePassed",
59
- "inputs": []
60
- }
61
- ]