@zoralabs/coins 2.1.2 → 2.2.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 (97) hide show
  1. package/.turbo/turbo-build$colon$js.log +152 -0
  2. package/CHANGELOG.md +54 -0
  3. package/abis/BaseCoin.json +26 -0
  4. package/abis/BaseTest.json +2 -7
  5. package/abis/CoinConstants.json +0 -104
  6. package/abis/ContentCoin.json +26 -0
  7. package/abis/CreatorCoin.json +30 -4
  8. package/abis/FeeEstimatorHook.json +0 -5
  9. package/abis/ICoin.json +26 -0
  10. package/abis/ICoinV3.json +26 -0
  11. package/abis/ICreatorCoin.json +39 -0
  12. package/abis/IERC721.json +36 -36
  13. package/abis/IHasCoinType.json +15 -0
  14. package/abis/IHasTotalSupplyForPositions.json +15 -0
  15. package/abis/IZoraFactory.json +52 -0
  16. package/abis/IZoraHookRegistry.json +188 -0
  17. package/abis/VmContractHelper227.json +233 -0
  18. package/abis/ZoraFactoryImpl.json +32 -6
  19. package/abis/ZoraHookRegistry.json +375 -0
  20. package/abis/{CreatorCoinHook.json → ZoraV4CoinHook.json} +1 -1
  21. package/addresses/8453.json +2 -1
  22. package/dist/index.cjs +72 -10
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.js +72 -10
  25. package/dist/index.js.map +1 -1
  26. package/dist/wagmiGenerated.d.ts +90 -10
  27. package/dist/wagmiGenerated.d.ts.map +1 -1
  28. package/foundry.toml +4 -1
  29. package/package/wagmiGenerated.ts +72 -10
  30. package/package.json +6 -4
  31. package/script/PrintRegisterUpgradePath.s.sol +0 -7
  32. package/script/TestBackingCoinSwap.s.sol +0 -1
  33. package/script/TestV4Swap.s.sol +0 -1
  34. package/script/UpgradeFactoryImpl.s.sol +1 -1
  35. package/src/BaseCoin.sol +15 -12
  36. package/src/ContentCoin.sol +10 -0
  37. package/src/CreatorCoin.sol +28 -7
  38. package/src/ZoraFactoryImpl.sol +62 -23
  39. package/src/deployment/CoinsDeployerBase.sol +24 -58
  40. package/src/hook-registry/ZoraHookRegistry.sol +93 -0
  41. package/src/hooks/{BaseZoraV4CoinHook.sol → ZoraV4CoinHook.sol} +13 -8
  42. package/src/interfaces/ICoin.sol +19 -1
  43. package/src/interfaces/ICreatorCoin.sol +4 -0
  44. package/src/interfaces/IZoraFactory.sol +32 -10
  45. package/src/interfaces/IZoraHookRegistry.sol +47 -0
  46. package/src/libs/CoinConstants.sol +0 -32
  47. package/src/libs/CoinRewardsV4.sol +53 -15
  48. package/src/libs/CreatorCoinConstants.sol +0 -1
  49. package/src/libs/HooksDeployment.sol +13 -65
  50. package/src/libs/MarketConstants.sol +11 -3
  51. package/src/libs/V4Liquidity.sol +30 -0
  52. package/src/version/ContractVersionBase.sol +1 -1
  53. package/test/CoinUniV4.t.sol +33 -30
  54. package/test/ContentCoinRewards.t.sol +320 -0
  55. package/test/CreatorCoin.t.sol +1 -1
  56. package/test/CreatorCoinRewards.t.sol +375 -0
  57. package/test/DeploymentHooks.t.sol +10 -10
  58. package/test/Factory.t.sol +24 -7
  59. package/test/HooksDeployment.t.sol +4 -4
  60. package/test/LiquidityMigration.t.sol +4 -9
  61. package/test/Upgrades.t.sol +44 -48
  62. package/test/ZoraHookRegistry.t.sol +266 -0
  63. package/test/utils/BaseTest.sol +25 -42
  64. package/test/utils/FeeEstimatorHook.sol +4 -6
  65. package/test/utils/RewardTestHelpers.sol +106 -0
  66. package/.turbo/turbo-build.log +0 -199
  67. package/abis/AutoSwapperTest.json +0 -618
  68. package/abis/BadImpl.json +0 -15
  69. package/abis/BaseZoraV4CoinHook.json +0 -1664
  70. package/abis/CoinTest.json +0 -819
  71. package/abis/CoinUniV4Test.json +0 -1128
  72. package/abis/ContentCoinHook.json +0 -1733
  73. package/abis/CreatorCoinTest.json +0 -887
  74. package/abis/Deploy.json +0 -9
  75. package/abis/DeployHooks.json +0 -9
  76. package/abis/DeployScript.json +0 -35
  77. package/abis/DeployedCoinVersionLookupTest.json +0 -740
  78. package/abis/DifferentNamespaceVersionLookup.json +0 -39
  79. package/abis/FactoryTest.json +0 -748
  80. package/abis/FakeHookNoInterface.json +0 -21
  81. package/abis/GenerateDeterministicParams.json +0 -9
  82. package/abis/HooksDeploymentTest.json +0 -645
  83. package/abis/HooksTest.json +0 -709
  84. package/abis/InvalidLiquidityMigrationReceiver.json +0 -21
  85. package/abis/LiquidityMigrationReceiver.json +0 -103
  86. package/abis/LiquidityMigrationTest.json +0 -889
  87. package/abis/MockBadFactory.json +0 -15
  88. package/abis/MultiOwnableTest.json +0 -766
  89. package/abis/PrintUpgradeCommand.json +0 -9
  90. package/abis/TestDeployedCoinVersionLookupImplementation.json +0 -39
  91. package/abis/TestV4Swap.json +0 -9
  92. package/abis/UpgradeFactoryImpl.json +0 -9
  93. package/abis/UpgradeHooks.json +0 -35
  94. package/abis/UpgradesTest.json +0 -723
  95. package/src/hooks/ContentCoinHook.sol +0 -27
  96. package/src/hooks/CreatorCoinHook.sol +0 -27
  97. package/src/libs/CreatorCoinRewards.sol +0 -34
@@ -1,1664 +0,0 @@
1
- [
2
- {
3
- "type": "receive",
4
- "stateMutability": "payable"
5
- },
6
- {
7
- "type": "function",
8
- "name": "afterAddLiquidity",
9
- "inputs": [
10
- {
11
- "name": "sender",
12
- "type": "address",
13
- "internalType": "address"
14
- },
15
- {
16
- "name": "key",
17
- "type": "tuple",
18
- "internalType": "struct PoolKey",
19
- "components": [
20
- {
21
- "name": "currency0",
22
- "type": "address",
23
- "internalType": "Currency"
24
- },
25
- {
26
- "name": "currency1",
27
- "type": "address",
28
- "internalType": "Currency"
29
- },
30
- {
31
- "name": "fee",
32
- "type": "uint24",
33
- "internalType": "uint24"
34
- },
35
- {
36
- "name": "tickSpacing",
37
- "type": "int24",
38
- "internalType": "int24"
39
- },
40
- {
41
- "name": "hooks",
42
- "type": "address",
43
- "internalType": "contract IHooks"
44
- }
45
- ]
46
- },
47
- {
48
- "name": "params",
49
- "type": "tuple",
50
- "internalType": "struct ModifyLiquidityParams",
51
- "components": [
52
- {
53
- "name": "tickLower",
54
- "type": "int24",
55
- "internalType": "int24"
56
- },
57
- {
58
- "name": "tickUpper",
59
- "type": "int24",
60
- "internalType": "int24"
61
- },
62
- {
63
- "name": "liquidityDelta",
64
- "type": "int256",
65
- "internalType": "int256"
66
- },
67
- {
68
- "name": "salt",
69
- "type": "bytes32",
70
- "internalType": "bytes32"
71
- }
72
- ]
73
- },
74
- {
75
- "name": "delta",
76
- "type": "int256",
77
- "internalType": "BalanceDelta"
78
- },
79
- {
80
- "name": "feesAccrued",
81
- "type": "int256",
82
- "internalType": "BalanceDelta"
83
- },
84
- {
85
- "name": "hookData",
86
- "type": "bytes",
87
- "internalType": "bytes"
88
- }
89
- ],
90
- "outputs": [
91
- {
92
- "name": "",
93
- "type": "bytes4",
94
- "internalType": "bytes4"
95
- },
96
- {
97
- "name": "",
98
- "type": "int256",
99
- "internalType": "BalanceDelta"
100
- }
101
- ],
102
- "stateMutability": "nonpayable"
103
- },
104
- {
105
- "type": "function",
106
- "name": "afterDonate",
107
- "inputs": [
108
- {
109
- "name": "sender",
110
- "type": "address",
111
- "internalType": "address"
112
- },
113
- {
114
- "name": "key",
115
- "type": "tuple",
116
- "internalType": "struct PoolKey",
117
- "components": [
118
- {
119
- "name": "currency0",
120
- "type": "address",
121
- "internalType": "Currency"
122
- },
123
- {
124
- "name": "currency1",
125
- "type": "address",
126
- "internalType": "Currency"
127
- },
128
- {
129
- "name": "fee",
130
- "type": "uint24",
131
- "internalType": "uint24"
132
- },
133
- {
134
- "name": "tickSpacing",
135
- "type": "int24",
136
- "internalType": "int24"
137
- },
138
- {
139
- "name": "hooks",
140
- "type": "address",
141
- "internalType": "contract IHooks"
142
- }
143
- ]
144
- },
145
- {
146
- "name": "amount0",
147
- "type": "uint256",
148
- "internalType": "uint256"
149
- },
150
- {
151
- "name": "amount1",
152
- "type": "uint256",
153
- "internalType": "uint256"
154
- },
155
- {
156
- "name": "hookData",
157
- "type": "bytes",
158
- "internalType": "bytes"
159
- }
160
- ],
161
- "outputs": [
162
- {
163
- "name": "",
164
- "type": "bytes4",
165
- "internalType": "bytes4"
166
- }
167
- ],
168
- "stateMutability": "nonpayable"
169
- },
170
- {
171
- "type": "function",
172
- "name": "afterInitialize",
173
- "inputs": [
174
- {
175
- "name": "sender",
176
- "type": "address",
177
- "internalType": "address"
178
- },
179
- {
180
- "name": "key",
181
- "type": "tuple",
182
- "internalType": "struct PoolKey",
183
- "components": [
184
- {
185
- "name": "currency0",
186
- "type": "address",
187
- "internalType": "Currency"
188
- },
189
- {
190
- "name": "currency1",
191
- "type": "address",
192
- "internalType": "Currency"
193
- },
194
- {
195
- "name": "fee",
196
- "type": "uint24",
197
- "internalType": "uint24"
198
- },
199
- {
200
- "name": "tickSpacing",
201
- "type": "int24",
202
- "internalType": "int24"
203
- },
204
- {
205
- "name": "hooks",
206
- "type": "address",
207
- "internalType": "contract IHooks"
208
- }
209
- ]
210
- },
211
- {
212
- "name": "sqrtPriceX96",
213
- "type": "uint160",
214
- "internalType": "uint160"
215
- },
216
- {
217
- "name": "tick",
218
- "type": "int24",
219
- "internalType": "int24"
220
- }
221
- ],
222
- "outputs": [
223
- {
224
- "name": "",
225
- "type": "bytes4",
226
- "internalType": "bytes4"
227
- }
228
- ],
229
- "stateMutability": "nonpayable"
230
- },
231
- {
232
- "type": "function",
233
- "name": "afterRemoveLiquidity",
234
- "inputs": [
235
- {
236
- "name": "sender",
237
- "type": "address",
238
- "internalType": "address"
239
- },
240
- {
241
- "name": "key",
242
- "type": "tuple",
243
- "internalType": "struct PoolKey",
244
- "components": [
245
- {
246
- "name": "currency0",
247
- "type": "address",
248
- "internalType": "Currency"
249
- },
250
- {
251
- "name": "currency1",
252
- "type": "address",
253
- "internalType": "Currency"
254
- },
255
- {
256
- "name": "fee",
257
- "type": "uint24",
258
- "internalType": "uint24"
259
- },
260
- {
261
- "name": "tickSpacing",
262
- "type": "int24",
263
- "internalType": "int24"
264
- },
265
- {
266
- "name": "hooks",
267
- "type": "address",
268
- "internalType": "contract IHooks"
269
- }
270
- ]
271
- },
272
- {
273
- "name": "params",
274
- "type": "tuple",
275
- "internalType": "struct ModifyLiquidityParams",
276
- "components": [
277
- {
278
- "name": "tickLower",
279
- "type": "int24",
280
- "internalType": "int24"
281
- },
282
- {
283
- "name": "tickUpper",
284
- "type": "int24",
285
- "internalType": "int24"
286
- },
287
- {
288
- "name": "liquidityDelta",
289
- "type": "int256",
290
- "internalType": "int256"
291
- },
292
- {
293
- "name": "salt",
294
- "type": "bytes32",
295
- "internalType": "bytes32"
296
- }
297
- ]
298
- },
299
- {
300
- "name": "delta",
301
- "type": "int256",
302
- "internalType": "BalanceDelta"
303
- },
304
- {
305
- "name": "feesAccrued",
306
- "type": "int256",
307
- "internalType": "BalanceDelta"
308
- },
309
- {
310
- "name": "hookData",
311
- "type": "bytes",
312
- "internalType": "bytes"
313
- }
314
- ],
315
- "outputs": [
316
- {
317
- "name": "",
318
- "type": "bytes4",
319
- "internalType": "bytes4"
320
- },
321
- {
322
- "name": "",
323
- "type": "int256",
324
- "internalType": "BalanceDelta"
325
- }
326
- ],
327
- "stateMutability": "nonpayable"
328
- },
329
- {
330
- "type": "function",
331
- "name": "afterSwap",
332
- "inputs": [
333
- {
334
- "name": "sender",
335
- "type": "address",
336
- "internalType": "address"
337
- },
338
- {
339
- "name": "key",
340
- "type": "tuple",
341
- "internalType": "struct PoolKey",
342
- "components": [
343
- {
344
- "name": "currency0",
345
- "type": "address",
346
- "internalType": "Currency"
347
- },
348
- {
349
- "name": "currency1",
350
- "type": "address",
351
- "internalType": "Currency"
352
- },
353
- {
354
- "name": "fee",
355
- "type": "uint24",
356
- "internalType": "uint24"
357
- },
358
- {
359
- "name": "tickSpacing",
360
- "type": "int24",
361
- "internalType": "int24"
362
- },
363
- {
364
- "name": "hooks",
365
- "type": "address",
366
- "internalType": "contract IHooks"
367
- }
368
- ]
369
- },
370
- {
371
- "name": "params",
372
- "type": "tuple",
373
- "internalType": "struct SwapParams",
374
- "components": [
375
- {
376
- "name": "zeroForOne",
377
- "type": "bool",
378
- "internalType": "bool"
379
- },
380
- {
381
- "name": "amountSpecified",
382
- "type": "int256",
383
- "internalType": "int256"
384
- },
385
- {
386
- "name": "sqrtPriceLimitX96",
387
- "type": "uint160",
388
- "internalType": "uint160"
389
- }
390
- ]
391
- },
392
- {
393
- "name": "delta",
394
- "type": "int256",
395
- "internalType": "BalanceDelta"
396
- },
397
- {
398
- "name": "hookData",
399
- "type": "bytes",
400
- "internalType": "bytes"
401
- }
402
- ],
403
- "outputs": [
404
- {
405
- "name": "",
406
- "type": "bytes4",
407
- "internalType": "bytes4"
408
- },
409
- {
410
- "name": "",
411
- "type": "int128",
412
- "internalType": "int128"
413
- }
414
- ],
415
- "stateMutability": "nonpayable"
416
- },
417
- {
418
- "type": "function",
419
- "name": "beforeAddLiquidity",
420
- "inputs": [
421
- {
422
- "name": "sender",
423
- "type": "address",
424
- "internalType": "address"
425
- },
426
- {
427
- "name": "key",
428
- "type": "tuple",
429
- "internalType": "struct PoolKey",
430
- "components": [
431
- {
432
- "name": "currency0",
433
- "type": "address",
434
- "internalType": "Currency"
435
- },
436
- {
437
- "name": "currency1",
438
- "type": "address",
439
- "internalType": "Currency"
440
- },
441
- {
442
- "name": "fee",
443
- "type": "uint24",
444
- "internalType": "uint24"
445
- },
446
- {
447
- "name": "tickSpacing",
448
- "type": "int24",
449
- "internalType": "int24"
450
- },
451
- {
452
- "name": "hooks",
453
- "type": "address",
454
- "internalType": "contract IHooks"
455
- }
456
- ]
457
- },
458
- {
459
- "name": "params",
460
- "type": "tuple",
461
- "internalType": "struct ModifyLiquidityParams",
462
- "components": [
463
- {
464
- "name": "tickLower",
465
- "type": "int24",
466
- "internalType": "int24"
467
- },
468
- {
469
- "name": "tickUpper",
470
- "type": "int24",
471
- "internalType": "int24"
472
- },
473
- {
474
- "name": "liquidityDelta",
475
- "type": "int256",
476
- "internalType": "int256"
477
- },
478
- {
479
- "name": "salt",
480
- "type": "bytes32",
481
- "internalType": "bytes32"
482
- }
483
- ]
484
- },
485
- {
486
- "name": "hookData",
487
- "type": "bytes",
488
- "internalType": "bytes"
489
- }
490
- ],
491
- "outputs": [
492
- {
493
- "name": "",
494
- "type": "bytes4",
495
- "internalType": "bytes4"
496
- }
497
- ],
498
- "stateMutability": "nonpayable"
499
- },
500
- {
501
- "type": "function",
502
- "name": "beforeDonate",
503
- "inputs": [
504
- {
505
- "name": "sender",
506
- "type": "address",
507
- "internalType": "address"
508
- },
509
- {
510
- "name": "key",
511
- "type": "tuple",
512
- "internalType": "struct PoolKey",
513
- "components": [
514
- {
515
- "name": "currency0",
516
- "type": "address",
517
- "internalType": "Currency"
518
- },
519
- {
520
- "name": "currency1",
521
- "type": "address",
522
- "internalType": "Currency"
523
- },
524
- {
525
- "name": "fee",
526
- "type": "uint24",
527
- "internalType": "uint24"
528
- },
529
- {
530
- "name": "tickSpacing",
531
- "type": "int24",
532
- "internalType": "int24"
533
- },
534
- {
535
- "name": "hooks",
536
- "type": "address",
537
- "internalType": "contract IHooks"
538
- }
539
- ]
540
- },
541
- {
542
- "name": "amount0",
543
- "type": "uint256",
544
- "internalType": "uint256"
545
- },
546
- {
547
- "name": "amount1",
548
- "type": "uint256",
549
- "internalType": "uint256"
550
- },
551
- {
552
- "name": "hookData",
553
- "type": "bytes",
554
- "internalType": "bytes"
555
- }
556
- ],
557
- "outputs": [
558
- {
559
- "name": "",
560
- "type": "bytes4",
561
- "internalType": "bytes4"
562
- }
563
- ],
564
- "stateMutability": "nonpayable"
565
- },
566
- {
567
- "type": "function",
568
- "name": "beforeInitialize",
569
- "inputs": [
570
- {
571
- "name": "sender",
572
- "type": "address",
573
- "internalType": "address"
574
- },
575
- {
576
- "name": "key",
577
- "type": "tuple",
578
- "internalType": "struct PoolKey",
579
- "components": [
580
- {
581
- "name": "currency0",
582
- "type": "address",
583
- "internalType": "Currency"
584
- },
585
- {
586
- "name": "currency1",
587
- "type": "address",
588
- "internalType": "Currency"
589
- },
590
- {
591
- "name": "fee",
592
- "type": "uint24",
593
- "internalType": "uint24"
594
- },
595
- {
596
- "name": "tickSpacing",
597
- "type": "int24",
598
- "internalType": "int24"
599
- },
600
- {
601
- "name": "hooks",
602
- "type": "address",
603
- "internalType": "contract IHooks"
604
- }
605
- ]
606
- },
607
- {
608
- "name": "sqrtPriceX96",
609
- "type": "uint160",
610
- "internalType": "uint160"
611
- }
612
- ],
613
- "outputs": [
614
- {
615
- "name": "",
616
- "type": "bytes4",
617
- "internalType": "bytes4"
618
- }
619
- ],
620
- "stateMutability": "nonpayable"
621
- },
622
- {
623
- "type": "function",
624
- "name": "beforeRemoveLiquidity",
625
- "inputs": [
626
- {
627
- "name": "sender",
628
- "type": "address",
629
- "internalType": "address"
630
- },
631
- {
632
- "name": "key",
633
- "type": "tuple",
634
- "internalType": "struct PoolKey",
635
- "components": [
636
- {
637
- "name": "currency0",
638
- "type": "address",
639
- "internalType": "Currency"
640
- },
641
- {
642
- "name": "currency1",
643
- "type": "address",
644
- "internalType": "Currency"
645
- },
646
- {
647
- "name": "fee",
648
- "type": "uint24",
649
- "internalType": "uint24"
650
- },
651
- {
652
- "name": "tickSpacing",
653
- "type": "int24",
654
- "internalType": "int24"
655
- },
656
- {
657
- "name": "hooks",
658
- "type": "address",
659
- "internalType": "contract IHooks"
660
- }
661
- ]
662
- },
663
- {
664
- "name": "params",
665
- "type": "tuple",
666
- "internalType": "struct ModifyLiquidityParams",
667
- "components": [
668
- {
669
- "name": "tickLower",
670
- "type": "int24",
671
- "internalType": "int24"
672
- },
673
- {
674
- "name": "tickUpper",
675
- "type": "int24",
676
- "internalType": "int24"
677
- },
678
- {
679
- "name": "liquidityDelta",
680
- "type": "int256",
681
- "internalType": "int256"
682
- },
683
- {
684
- "name": "salt",
685
- "type": "bytes32",
686
- "internalType": "bytes32"
687
- }
688
- ]
689
- },
690
- {
691
- "name": "hookData",
692
- "type": "bytes",
693
- "internalType": "bytes"
694
- }
695
- ],
696
- "outputs": [
697
- {
698
- "name": "",
699
- "type": "bytes4",
700
- "internalType": "bytes4"
701
- }
702
- ],
703
- "stateMutability": "nonpayable"
704
- },
705
- {
706
- "type": "function",
707
- "name": "beforeSwap",
708
- "inputs": [
709
- {
710
- "name": "sender",
711
- "type": "address",
712
- "internalType": "address"
713
- },
714
- {
715
- "name": "key",
716
- "type": "tuple",
717
- "internalType": "struct PoolKey",
718
- "components": [
719
- {
720
- "name": "currency0",
721
- "type": "address",
722
- "internalType": "Currency"
723
- },
724
- {
725
- "name": "currency1",
726
- "type": "address",
727
- "internalType": "Currency"
728
- },
729
- {
730
- "name": "fee",
731
- "type": "uint24",
732
- "internalType": "uint24"
733
- },
734
- {
735
- "name": "tickSpacing",
736
- "type": "int24",
737
- "internalType": "int24"
738
- },
739
- {
740
- "name": "hooks",
741
- "type": "address",
742
- "internalType": "contract IHooks"
743
- }
744
- ]
745
- },
746
- {
747
- "name": "params",
748
- "type": "tuple",
749
- "internalType": "struct SwapParams",
750
- "components": [
751
- {
752
- "name": "zeroForOne",
753
- "type": "bool",
754
- "internalType": "bool"
755
- },
756
- {
757
- "name": "amountSpecified",
758
- "type": "int256",
759
- "internalType": "int256"
760
- },
761
- {
762
- "name": "sqrtPriceLimitX96",
763
- "type": "uint160",
764
- "internalType": "uint160"
765
- }
766
- ]
767
- },
768
- {
769
- "name": "hookData",
770
- "type": "bytes",
771
- "internalType": "bytes"
772
- }
773
- ],
774
- "outputs": [
775
- {
776
- "name": "",
777
- "type": "bytes4",
778
- "internalType": "bytes4"
779
- },
780
- {
781
- "name": "",
782
- "type": "int256",
783
- "internalType": "BeforeSwapDelta"
784
- },
785
- {
786
- "name": "",
787
- "type": "uint24",
788
- "internalType": "uint24"
789
- }
790
- ],
791
- "stateMutability": "nonpayable"
792
- },
793
- {
794
- "type": "function",
795
- "name": "contractVersion",
796
- "inputs": [],
797
- "outputs": [
798
- {
799
- "name": "",
800
- "type": "string",
801
- "internalType": "string"
802
- }
803
- ],
804
- "stateMutability": "pure"
805
- },
806
- {
807
- "type": "function",
808
- "name": "getHookPermissions",
809
- "inputs": [],
810
- "outputs": [
811
- {
812
- "name": "",
813
- "type": "tuple",
814
- "internalType": "struct Hooks.Permissions",
815
- "components": [
816
- {
817
- "name": "beforeInitialize",
818
- "type": "bool",
819
- "internalType": "bool"
820
- },
821
- {
822
- "name": "afterInitialize",
823
- "type": "bool",
824
- "internalType": "bool"
825
- },
826
- {
827
- "name": "beforeAddLiquidity",
828
- "type": "bool",
829
- "internalType": "bool"
830
- },
831
- {
832
- "name": "afterAddLiquidity",
833
- "type": "bool",
834
- "internalType": "bool"
835
- },
836
- {
837
- "name": "beforeRemoveLiquidity",
838
- "type": "bool",
839
- "internalType": "bool"
840
- },
841
- {
842
- "name": "afterRemoveLiquidity",
843
- "type": "bool",
844
- "internalType": "bool"
845
- },
846
- {
847
- "name": "beforeSwap",
848
- "type": "bool",
849
- "internalType": "bool"
850
- },
851
- {
852
- "name": "afterSwap",
853
- "type": "bool",
854
- "internalType": "bool"
855
- },
856
- {
857
- "name": "beforeDonate",
858
- "type": "bool",
859
- "internalType": "bool"
860
- },
861
- {
862
- "name": "afterDonate",
863
- "type": "bool",
864
- "internalType": "bool"
865
- },
866
- {
867
- "name": "beforeSwapReturnDelta",
868
- "type": "bool",
869
- "internalType": "bool"
870
- },
871
- {
872
- "name": "afterSwapReturnDelta",
873
- "type": "bool",
874
- "internalType": "bool"
875
- },
876
- {
877
- "name": "afterAddLiquidityReturnDelta",
878
- "type": "bool",
879
- "internalType": "bool"
880
- },
881
- {
882
- "name": "afterRemoveLiquidityReturnDelta",
883
- "type": "bool",
884
- "internalType": "bool"
885
- }
886
- ]
887
- }
888
- ],
889
- "stateMutability": "pure"
890
- },
891
- {
892
- "type": "function",
893
- "name": "getPoolCoin",
894
- "inputs": [
895
- {
896
- "name": "key",
897
- "type": "tuple",
898
- "internalType": "struct PoolKey",
899
- "components": [
900
- {
901
- "name": "currency0",
902
- "type": "address",
903
- "internalType": "Currency"
904
- },
905
- {
906
- "name": "currency1",
907
- "type": "address",
908
- "internalType": "Currency"
909
- },
910
- {
911
- "name": "fee",
912
- "type": "uint24",
913
- "internalType": "uint24"
914
- },
915
- {
916
- "name": "tickSpacing",
917
- "type": "int24",
918
- "internalType": "int24"
919
- },
920
- {
921
- "name": "hooks",
922
- "type": "address",
923
- "internalType": "contract IHooks"
924
- }
925
- ]
926
- }
927
- ],
928
- "outputs": [
929
- {
930
- "name": "",
931
- "type": "tuple",
932
- "internalType": "struct IZoraV4CoinHook.PoolCoin",
933
- "components": [
934
- {
935
- "name": "coin",
936
- "type": "address",
937
- "internalType": "address"
938
- },
939
- {
940
- "name": "positions",
941
- "type": "tuple[]",
942
- "internalType": "struct LpPosition[]",
943
- "components": [
944
- {
945
- "name": "tickLower",
946
- "type": "int24",
947
- "internalType": "int24"
948
- },
949
- {
950
- "name": "tickUpper",
951
- "type": "int24",
952
- "internalType": "int24"
953
- },
954
- {
955
- "name": "liquidity",
956
- "type": "uint128",
957
- "internalType": "uint128"
958
- }
959
- ]
960
- }
961
- ]
962
- }
963
- ],
964
- "stateMutability": "view"
965
- },
966
- {
967
- "type": "function",
968
- "name": "getPoolCoinByHash",
969
- "inputs": [
970
- {
971
- "name": "poolKeyHash",
972
- "type": "bytes32",
973
- "internalType": "bytes32"
974
- }
975
- ],
976
- "outputs": [
977
- {
978
- "name": "",
979
- "type": "tuple",
980
- "internalType": "struct IZoraV4CoinHook.PoolCoin",
981
- "components": [
982
- {
983
- "name": "coin",
984
- "type": "address",
985
- "internalType": "address"
986
- },
987
- {
988
- "name": "positions",
989
- "type": "tuple[]",
990
- "internalType": "struct LpPosition[]",
991
- "components": [
992
- {
993
- "name": "tickLower",
994
- "type": "int24",
995
- "internalType": "int24"
996
- },
997
- {
998
- "name": "tickUpper",
999
- "type": "int24",
1000
- "internalType": "int24"
1001
- },
1002
- {
1003
- "name": "liquidity",
1004
- "type": "uint128",
1005
- "internalType": "uint128"
1006
- }
1007
- ]
1008
- }
1009
- ]
1010
- }
1011
- ],
1012
- "stateMutability": "view"
1013
- },
1014
- {
1015
- "type": "function",
1016
- "name": "initializeFromMigration",
1017
- "inputs": [
1018
- {
1019
- "name": "poolKey",
1020
- "type": "tuple",
1021
- "internalType": "struct PoolKey",
1022
- "components": [
1023
- {
1024
- "name": "currency0",
1025
- "type": "address",
1026
- "internalType": "Currency"
1027
- },
1028
- {
1029
- "name": "currency1",
1030
- "type": "address",
1031
- "internalType": "Currency"
1032
- },
1033
- {
1034
- "name": "fee",
1035
- "type": "uint24",
1036
- "internalType": "uint24"
1037
- },
1038
- {
1039
- "name": "tickSpacing",
1040
- "type": "int24",
1041
- "internalType": "int24"
1042
- },
1043
- {
1044
- "name": "hooks",
1045
- "type": "address",
1046
- "internalType": "contract IHooks"
1047
- }
1048
- ]
1049
- },
1050
- {
1051
- "name": "coin",
1052
- "type": "address",
1053
- "internalType": "address"
1054
- },
1055
- {
1056
- "name": "sqrtPriceX96",
1057
- "type": "uint160",
1058
- "internalType": "uint160"
1059
- },
1060
- {
1061
- "name": "migratedLiquidity",
1062
- "type": "tuple[]",
1063
- "internalType": "struct BurnedPosition[]",
1064
- "components": [
1065
- {
1066
- "name": "tickLower",
1067
- "type": "int24",
1068
- "internalType": "int24"
1069
- },
1070
- {
1071
- "name": "tickUpper",
1072
- "type": "int24",
1073
- "internalType": "int24"
1074
- },
1075
- {
1076
- "name": "amount0Received",
1077
- "type": "uint128",
1078
- "internalType": "uint128"
1079
- },
1080
- {
1081
- "name": "amount1Received",
1082
- "type": "uint128",
1083
- "internalType": "uint128"
1084
- }
1085
- ]
1086
- },
1087
- {
1088
- "name": "",
1089
- "type": "bytes",
1090
- "internalType": "bytes"
1091
- }
1092
- ],
1093
- "outputs": [],
1094
- "stateMutability": "nonpayable"
1095
- },
1096
- {
1097
- "type": "function",
1098
- "name": "isTrustedMessageSender",
1099
- "inputs": [
1100
- {
1101
- "name": "sender",
1102
- "type": "address",
1103
- "internalType": "address"
1104
- }
1105
- ],
1106
- "outputs": [
1107
- {
1108
- "name": "",
1109
- "type": "bool",
1110
- "internalType": "bool"
1111
- }
1112
- ],
1113
- "stateMutability": "view"
1114
- },
1115
- {
1116
- "type": "function",
1117
- "name": "migrateLiquidity",
1118
- "inputs": [
1119
- {
1120
- "name": "newHook",
1121
- "type": "address",
1122
- "internalType": "address"
1123
- },
1124
- {
1125
- "name": "poolKey",
1126
- "type": "tuple",
1127
- "internalType": "struct PoolKey",
1128
- "components": [
1129
- {
1130
- "name": "currency0",
1131
- "type": "address",
1132
- "internalType": "Currency"
1133
- },
1134
- {
1135
- "name": "currency1",
1136
- "type": "address",
1137
- "internalType": "Currency"
1138
- },
1139
- {
1140
- "name": "fee",
1141
- "type": "uint24",
1142
- "internalType": "uint24"
1143
- },
1144
- {
1145
- "name": "tickSpacing",
1146
- "type": "int24",
1147
- "internalType": "int24"
1148
- },
1149
- {
1150
- "name": "hooks",
1151
- "type": "address",
1152
- "internalType": "contract IHooks"
1153
- }
1154
- ]
1155
- },
1156
- {
1157
- "name": "additionalData",
1158
- "type": "bytes",
1159
- "internalType": "bytes"
1160
- }
1161
- ],
1162
- "outputs": [
1163
- {
1164
- "name": "newPoolKey",
1165
- "type": "tuple",
1166
- "internalType": "struct PoolKey",
1167
- "components": [
1168
- {
1169
- "name": "currency0",
1170
- "type": "address",
1171
- "internalType": "Currency"
1172
- },
1173
- {
1174
- "name": "currency1",
1175
- "type": "address",
1176
- "internalType": "Currency"
1177
- },
1178
- {
1179
- "name": "fee",
1180
- "type": "uint24",
1181
- "internalType": "uint24"
1182
- },
1183
- {
1184
- "name": "tickSpacing",
1185
- "type": "int24",
1186
- "internalType": "int24"
1187
- },
1188
- {
1189
- "name": "hooks",
1190
- "type": "address",
1191
- "internalType": "contract IHooks"
1192
- }
1193
- ]
1194
- }
1195
- ],
1196
- "stateMutability": "nonpayable"
1197
- },
1198
- {
1199
- "type": "function",
1200
- "name": "poolManager",
1201
- "inputs": [],
1202
- "outputs": [
1203
- {
1204
- "name": "",
1205
- "type": "address",
1206
- "internalType": "contract IPoolManager"
1207
- }
1208
- ],
1209
- "stateMutability": "view"
1210
- },
1211
- {
1212
- "type": "function",
1213
- "name": "supportsInterface",
1214
- "inputs": [
1215
- {
1216
- "name": "interfaceId",
1217
- "type": "bytes4",
1218
- "internalType": "bytes4"
1219
- }
1220
- ],
1221
- "outputs": [
1222
- {
1223
- "name": "",
1224
- "type": "bool",
1225
- "internalType": "bool"
1226
- }
1227
- ],
1228
- "stateMutability": "view"
1229
- },
1230
- {
1231
- "type": "function",
1232
- "name": "unlockCallback",
1233
- "inputs": [
1234
- {
1235
- "name": "data",
1236
- "type": "bytes",
1237
- "internalType": "bytes"
1238
- }
1239
- ],
1240
- "outputs": [
1241
- {
1242
- "name": "",
1243
- "type": "bytes",
1244
- "internalType": "bytes"
1245
- }
1246
- ],
1247
- "stateMutability": "nonpayable"
1248
- },
1249
- {
1250
- "type": "event",
1251
- "name": "CoinMarketRewardsV4",
1252
- "inputs": [
1253
- {
1254
- "name": "coin",
1255
- "type": "address",
1256
- "indexed": false,
1257
- "internalType": "address"
1258
- },
1259
- {
1260
- "name": "currency",
1261
- "type": "address",
1262
- "indexed": false,
1263
- "internalType": "address"
1264
- },
1265
- {
1266
- "name": "payoutRecipient",
1267
- "type": "address",
1268
- "indexed": false,
1269
- "internalType": "address"
1270
- },
1271
- {
1272
- "name": "platformReferrer",
1273
- "type": "address",
1274
- "indexed": false,
1275
- "internalType": "address"
1276
- },
1277
- {
1278
- "name": "tradeReferrer",
1279
- "type": "address",
1280
- "indexed": false,
1281
- "internalType": "address"
1282
- },
1283
- {
1284
- "name": "protocolRewardRecipient",
1285
- "type": "address",
1286
- "indexed": false,
1287
- "internalType": "address"
1288
- },
1289
- {
1290
- "name": "dopplerRecipient",
1291
- "type": "address",
1292
- "indexed": false,
1293
- "internalType": "address"
1294
- },
1295
- {
1296
- "name": "marketRewards",
1297
- "type": "tuple",
1298
- "indexed": false,
1299
- "internalType": "struct IZoraV4CoinHook.MarketRewardsV4",
1300
- "components": [
1301
- {
1302
- "name": "creatorPayoutAmountCurrency",
1303
- "type": "uint256",
1304
- "internalType": "uint256"
1305
- },
1306
- {
1307
- "name": "creatorPayoutAmountCoin",
1308
- "type": "uint256",
1309
- "internalType": "uint256"
1310
- },
1311
- {
1312
- "name": "platformReferrerAmountCurrency",
1313
- "type": "uint256",
1314
- "internalType": "uint256"
1315
- },
1316
- {
1317
- "name": "platformReferrerAmountCoin",
1318
- "type": "uint256",
1319
- "internalType": "uint256"
1320
- },
1321
- {
1322
- "name": "tradeReferrerAmountCurrency",
1323
- "type": "uint256",
1324
- "internalType": "uint256"
1325
- },
1326
- {
1327
- "name": "tradeReferrerAmountCoin",
1328
- "type": "uint256",
1329
- "internalType": "uint256"
1330
- },
1331
- {
1332
- "name": "protocolAmountCurrency",
1333
- "type": "uint256",
1334
- "internalType": "uint256"
1335
- },
1336
- {
1337
- "name": "protocolAmountCoin",
1338
- "type": "uint256",
1339
- "internalType": "uint256"
1340
- },
1341
- {
1342
- "name": "dopplerAmountCurrency",
1343
- "type": "uint256",
1344
- "internalType": "uint256"
1345
- },
1346
- {
1347
- "name": "dopplerAmountCoin",
1348
- "type": "uint256",
1349
- "internalType": "uint256"
1350
- }
1351
- ]
1352
- }
1353
- ],
1354
- "anonymous": false
1355
- },
1356
- {
1357
- "type": "event",
1358
- "name": "LpReward",
1359
- "inputs": [
1360
- {
1361
- "name": "coin",
1362
- "type": "address",
1363
- "indexed": true,
1364
- "internalType": "address"
1365
- },
1366
- {
1367
- "name": "currency",
1368
- "type": "address",
1369
- "indexed": true,
1370
- "internalType": "address"
1371
- },
1372
- {
1373
- "name": "amountCurrency",
1374
- "type": "uint256",
1375
- "indexed": false,
1376
- "internalType": "uint256"
1377
- },
1378
- {
1379
- "name": "tick",
1380
- "type": "int24",
1381
- "indexed": false,
1382
- "internalType": "int24"
1383
- },
1384
- {
1385
- "name": "liquidity",
1386
- "type": "uint128",
1387
- "indexed": false,
1388
- "internalType": "uint128"
1389
- }
1390
- ],
1391
- "anonymous": false
1392
- },
1393
- {
1394
- "type": "event",
1395
- "name": "Swapped",
1396
- "inputs": [
1397
- {
1398
- "name": "sender",
1399
- "type": "address",
1400
- "indexed": true,
1401
- "internalType": "address"
1402
- },
1403
- {
1404
- "name": "swapSender",
1405
- "type": "address",
1406
- "indexed": true,
1407
- "internalType": "address"
1408
- },
1409
- {
1410
- "name": "isTrustedSwapSenderAddress",
1411
- "type": "bool",
1412
- "indexed": false,
1413
- "internalType": "bool"
1414
- },
1415
- {
1416
- "name": "key",
1417
- "type": "tuple",
1418
- "indexed": false,
1419
- "internalType": "struct PoolKey",
1420
- "components": [
1421
- {
1422
- "name": "currency0",
1423
- "type": "address",
1424
- "internalType": "Currency"
1425
- },
1426
- {
1427
- "name": "currency1",
1428
- "type": "address",
1429
- "internalType": "Currency"
1430
- },
1431
- {
1432
- "name": "fee",
1433
- "type": "uint24",
1434
- "internalType": "uint24"
1435
- },
1436
- {
1437
- "name": "tickSpacing",
1438
- "type": "int24",
1439
- "internalType": "int24"
1440
- },
1441
- {
1442
- "name": "hooks",
1443
- "type": "address",
1444
- "internalType": "contract IHooks"
1445
- }
1446
- ]
1447
- },
1448
- {
1449
- "name": "poolKeyHash",
1450
- "type": "bytes32",
1451
- "indexed": true,
1452
- "internalType": "bytes32"
1453
- },
1454
- {
1455
- "name": "params",
1456
- "type": "tuple",
1457
- "indexed": false,
1458
- "internalType": "struct SwapParams",
1459
- "components": [
1460
- {
1461
- "name": "zeroForOne",
1462
- "type": "bool",
1463
- "internalType": "bool"
1464
- },
1465
- {
1466
- "name": "amountSpecified",
1467
- "type": "int256",
1468
- "internalType": "int256"
1469
- },
1470
- {
1471
- "name": "sqrtPriceLimitX96",
1472
- "type": "uint160",
1473
- "internalType": "uint160"
1474
- }
1475
- ]
1476
- },
1477
- {
1478
- "name": "amount0",
1479
- "type": "int128",
1480
- "indexed": false,
1481
- "internalType": "int128"
1482
- },
1483
- {
1484
- "name": "amount1",
1485
- "type": "int128",
1486
- "indexed": false,
1487
- "internalType": "int128"
1488
- },
1489
- {
1490
- "name": "isCoinBuy",
1491
- "type": "bool",
1492
- "indexed": false,
1493
- "internalType": "bool"
1494
- },
1495
- {
1496
- "name": "hookData",
1497
- "type": "bytes",
1498
- "indexed": false,
1499
- "internalType": "bytes"
1500
- },
1501
- {
1502
- "name": "sqrtPriceX96",
1503
- "type": "uint160",
1504
- "indexed": false,
1505
- "internalType": "uint160"
1506
- }
1507
- ],
1508
- "anonymous": false
1509
- },
1510
- {
1511
- "type": "error",
1512
- "name": "CannotMintZeroLiquidity",
1513
- "inputs": []
1514
- },
1515
- {
1516
- "type": "error",
1517
- "name": "CoinVersionLookupCannotBeZeroAddress",
1518
- "inputs": []
1519
- },
1520
- {
1521
- "type": "error",
1522
- "name": "HookNotImplemented",
1523
- "inputs": []
1524
- },
1525
- {
1526
- "type": "error",
1527
- "name": "InvalidCallbackId",
1528
- "inputs": [
1529
- {
1530
- "name": "callbackId",
1531
- "type": "uint8",
1532
- "internalType": "uint8"
1533
- }
1534
- ]
1535
- },
1536
- {
1537
- "type": "error",
1538
- "name": "InvalidNewHook",
1539
- "inputs": [
1540
- {
1541
- "name": "newHook",
1542
- "type": "address",
1543
- "internalType": "address"
1544
- }
1545
- ]
1546
- },
1547
- {
1548
- "type": "error",
1549
- "name": "InvalidTickRangeMisordered",
1550
- "inputs": [
1551
- {
1552
- "name": "tickLower",
1553
- "type": "int24",
1554
- "internalType": "int24"
1555
- },
1556
- {
1557
- "name": "tickUpper",
1558
- "type": "int24",
1559
- "internalType": "int24"
1560
- }
1561
- ]
1562
- },
1563
- {
1564
- "type": "error",
1565
- "name": "NoCoinForHook",
1566
- "inputs": [
1567
- {
1568
- "name": "key",
1569
- "type": "tuple",
1570
- "internalType": "struct PoolKey",
1571
- "components": [
1572
- {
1573
- "name": "currency0",
1574
- "type": "address",
1575
- "internalType": "Currency"
1576
- },
1577
- {
1578
- "name": "currency1",
1579
- "type": "address",
1580
- "internalType": "Currency"
1581
- },
1582
- {
1583
- "name": "fee",
1584
- "type": "uint24",
1585
- "internalType": "uint24"
1586
- },
1587
- {
1588
- "name": "tickSpacing",
1589
- "type": "int24",
1590
- "internalType": "int24"
1591
- },
1592
- {
1593
- "name": "hooks",
1594
- "type": "address",
1595
- "internalType": "contract IHooks"
1596
- }
1597
- ]
1598
- }
1599
- ]
1600
- },
1601
- {
1602
- "type": "error",
1603
- "name": "NotACoin",
1604
- "inputs": [
1605
- {
1606
- "name": "coin",
1607
- "type": "address",
1608
- "internalType": "address"
1609
- }
1610
- ]
1611
- },
1612
- {
1613
- "type": "error",
1614
- "name": "NotPoolManager",
1615
- "inputs": []
1616
- },
1617
- {
1618
- "type": "error",
1619
- "name": "OnlyCoin",
1620
- "inputs": [
1621
- {
1622
- "name": "caller",
1623
- "type": "address",
1624
- "internalType": "address"
1625
- },
1626
- {
1627
- "name": "expectedCoin",
1628
- "type": "address",
1629
- "internalType": "address"
1630
- }
1631
- ]
1632
- },
1633
- {
1634
- "type": "error",
1635
- "name": "PathMustHaveAtLeastOneStep",
1636
- "inputs": []
1637
- },
1638
- {
1639
- "type": "error",
1640
- "name": "SafeCastOverflow",
1641
- "inputs": []
1642
- },
1643
- {
1644
- "type": "error",
1645
- "name": "UpgradeGateCannotBeZeroAddress",
1646
- "inputs": []
1647
- },
1648
- {
1649
- "type": "error",
1650
- "name": "UpgradePathNotRegistered",
1651
- "inputs": [
1652
- {
1653
- "name": "oldHook",
1654
- "type": "address",
1655
- "internalType": "address"
1656
- },
1657
- {
1658
- "name": "newHook",
1659
- "type": "address",
1660
- "internalType": "address"
1661
- }
1662
- ]
1663
- }
1664
- ]