@zoralabs/coins 2.5.0 → 2.6.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 (48) hide show
  1. package/.turbo/turbo-build$colon$js.log +136 -130
  2. package/CHANGELOG.md +28 -17
  3. package/abis/BaseCoin.json +5 -0
  4. package/abis/ContentCoin.json +5 -0
  5. package/abis/ICoin.json +5 -0
  6. package/abis/ICoinV3.json +5 -0
  7. package/abis/ITrendCoin.json +140 -0
  8. package/abis/ITrendCoinErrors.json +33 -0
  9. package/abis/IUniversalRouter.json +61 -0
  10. package/abis/IZoraFactory.json +237 -0
  11. package/abis/TrendCoin.json +2053 -0
  12. package/abis/ZoraFactoryImpl.json +242 -0
  13. package/dist/index.cjs +955 -138
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.js +953 -138
  16. package/dist/index.js.map +1 -1
  17. package/dist/wagmiGenerated.d.ts +1388 -149
  18. package/dist/wagmiGenerated.d.ts.map +1 -1
  19. package/foundry.toml +1 -0
  20. package/package/wagmiGenerated.ts +962 -139
  21. package/package.json +2 -2
  22. package/src/BaseCoin.sol +12 -12
  23. package/src/ContentCoin.sol +20 -1
  24. package/src/CreatorCoin.sol +3 -0
  25. package/src/TrendCoin.sol +117 -0
  26. package/src/ZoraFactoryImpl.sol +142 -1
  27. package/src/hooks/ZoraV4CoinHook.sol +17 -7
  28. package/src/interfaces/ICoin.sol +5 -1
  29. package/src/interfaces/ICreatorCoin.sol +0 -3
  30. package/src/interfaces/IPoolManager.sol +13 -0
  31. package/src/interfaces/ITrendCoin.sol +26 -0
  32. package/src/interfaces/ITrendCoinErrors.sol +24 -0
  33. package/src/interfaces/IZoraFactory.sol +60 -1
  34. package/src/libs/CoinConstants.sol +13 -1
  35. package/src/libs/CoinRewardsV4.sol +82 -21
  36. package/src/libs/TickerUtils.sol +66 -0
  37. package/src/libs/UniV4SwapToCurrency.sol +2 -1
  38. package/src/version/ContractVersionBase.sol +1 -1
  39. package/test/CoinRewardsV4.t.sol +48 -0
  40. package/test/CreatorCoin.t.sol +2 -1
  41. package/test/Factory.t.sol +31 -5
  42. package/test/LaunchFee.t.sol +0 -2
  43. package/test/LiquidityMigration.t.sol +0 -2
  44. package/test/TrendCoin.t.sol +1128 -0
  45. package/test/Upgrades.t.sol +16 -3
  46. package/test/utils/FeeEstimatorHook.sol +36 -10
  47. package/test/utils/V4TestSetup.sol +36 -4
  48. package/wagmi.config.ts +2 -0
@@ -0,0 +1,140 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "initializeTrendCoin",
5
+ "inputs": [
6
+ {
7
+ "name": "owners_",
8
+ "type": "address[]",
9
+ "internalType": "address[]"
10
+ },
11
+ {
12
+ "name": "symbol_",
13
+ "type": "string",
14
+ "internalType": "string"
15
+ },
16
+ {
17
+ "name": "poolKey_",
18
+ "type": "tuple",
19
+ "internalType": "struct PoolKey",
20
+ "components": [
21
+ {
22
+ "name": "currency0",
23
+ "type": "address",
24
+ "internalType": "Currency"
25
+ },
26
+ {
27
+ "name": "currency1",
28
+ "type": "address",
29
+ "internalType": "Currency"
30
+ },
31
+ {
32
+ "name": "fee",
33
+ "type": "uint24",
34
+ "internalType": "uint24"
35
+ },
36
+ {
37
+ "name": "tickSpacing",
38
+ "type": "int24",
39
+ "internalType": "int24"
40
+ },
41
+ {
42
+ "name": "hooks",
43
+ "type": "address",
44
+ "internalType": "contract IHooks"
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ "name": "sqrtPriceX96",
50
+ "type": "uint160",
51
+ "internalType": "uint160"
52
+ },
53
+ {
54
+ "name": "poolConfiguration_",
55
+ "type": "tuple",
56
+ "internalType": "struct PoolConfiguration",
57
+ "components": [
58
+ {
59
+ "name": "version",
60
+ "type": "uint8",
61
+ "internalType": "uint8"
62
+ },
63
+ {
64
+ "name": "numPositions",
65
+ "type": "uint16",
66
+ "internalType": "uint16"
67
+ },
68
+ {
69
+ "name": "fee",
70
+ "type": "uint24",
71
+ "internalType": "uint24"
72
+ },
73
+ {
74
+ "name": "tickSpacing",
75
+ "type": "int24",
76
+ "internalType": "int24"
77
+ },
78
+ {
79
+ "name": "numDiscoveryPositions",
80
+ "type": "uint16[]",
81
+ "internalType": "uint16[]"
82
+ },
83
+ {
84
+ "name": "tickLower",
85
+ "type": "int24[]",
86
+ "internalType": "int24[]"
87
+ },
88
+ {
89
+ "name": "tickUpper",
90
+ "type": "int24[]",
91
+ "internalType": "int24[]"
92
+ },
93
+ {
94
+ "name": "maxDiscoverySupplyShare",
95
+ "type": "uint256[]",
96
+ "internalType": "uint256[]"
97
+ }
98
+ ]
99
+ }
100
+ ],
101
+ "outputs": [],
102
+ "stateMutability": "nonpayable"
103
+ },
104
+ {
105
+ "type": "error",
106
+ "name": "OnlyMetadataManager",
107
+ "inputs": []
108
+ },
109
+ {
110
+ "type": "error",
111
+ "name": "TickerAlreadyUsed",
112
+ "inputs": [
113
+ {
114
+ "name": "symbol",
115
+ "type": "string",
116
+ "internalType": "string"
117
+ }
118
+ ]
119
+ },
120
+ {
121
+ "type": "error",
122
+ "name": "TickerInvalidCharacters",
123
+ "inputs": []
124
+ },
125
+ {
126
+ "type": "error",
127
+ "name": "TickerTooLong",
128
+ "inputs": []
129
+ },
130
+ {
131
+ "type": "error",
132
+ "name": "TickerTooShort",
133
+ "inputs": []
134
+ },
135
+ {
136
+ "type": "error",
137
+ "name": "UseSpecificTrendCoinInitialize",
138
+ "inputs": []
139
+ }
140
+ ]
@@ -0,0 +1,33 @@
1
+ [
2
+ {
3
+ "type": "error",
4
+ "name": "TickerAlreadyUsed",
5
+ "inputs": [
6
+ {
7
+ "name": "symbol",
8
+ "type": "string",
9
+ "internalType": "string"
10
+ }
11
+ ]
12
+ },
13
+ {
14
+ "type": "error",
15
+ "name": "TickerInvalidCharacters",
16
+ "inputs": []
17
+ },
18
+ {
19
+ "type": "error",
20
+ "name": "TickerTooLong",
21
+ "inputs": []
22
+ },
23
+ {
24
+ "type": "error",
25
+ "name": "TickerTooShort",
26
+ "inputs": []
27
+ },
28
+ {
29
+ "type": "error",
30
+ "name": "UseSpecificTrendCoinInitialize",
31
+ "inputs": []
32
+ }
33
+ ]
@@ -0,0 +1,61 @@
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
+ ]
@@ -320,6 +320,40 @@
320
320
  ],
321
321
  "stateMutability": "payable"
322
322
  },
323
+ {
324
+ "type": "function",
325
+ "name": "deployTrendCoin",
326
+ "inputs": [
327
+ {
328
+ "name": "symbol",
329
+ "type": "string",
330
+ "internalType": "string"
331
+ },
332
+ {
333
+ "name": "postDeployHook",
334
+ "type": "address",
335
+ "internalType": "address"
336
+ },
337
+ {
338
+ "name": "postDeployHookData",
339
+ "type": "bytes",
340
+ "internalType": "bytes"
341
+ }
342
+ ],
343
+ "outputs": [
344
+ {
345
+ "name": "coin",
346
+ "type": "address",
347
+ "internalType": "address"
348
+ },
349
+ {
350
+ "name": "postDeployHookDataOut",
351
+ "type": "bytes",
352
+ "internalType": "bytes"
353
+ }
354
+ ],
355
+ "stateMutability": "payable"
356
+ },
323
357
  {
324
358
  "type": "function",
325
359
  "name": "deployWithHook",
@@ -429,6 +463,84 @@
429
463
  ],
430
464
  "stateMutability": "view"
431
465
  },
466
+ {
467
+ "type": "function",
468
+ "name": "setTrendCoinPoolConfig",
469
+ "inputs": [
470
+ {
471
+ "name": "currency",
472
+ "type": "address",
473
+ "internalType": "address"
474
+ },
475
+ {
476
+ "name": "tickLower",
477
+ "type": "int24[]",
478
+ "internalType": "int24[]"
479
+ },
480
+ {
481
+ "name": "tickUpper",
482
+ "type": "int24[]",
483
+ "internalType": "int24[]"
484
+ },
485
+ {
486
+ "name": "numDiscoveryPositions",
487
+ "type": "uint16[]",
488
+ "internalType": "uint16[]"
489
+ },
490
+ {
491
+ "name": "maxDiscoverySupplyShare",
492
+ "type": "uint256[]",
493
+ "internalType": "uint256[]"
494
+ }
495
+ ],
496
+ "outputs": [],
497
+ "stateMutability": "nonpayable"
498
+ },
499
+ {
500
+ "type": "function",
501
+ "name": "trendCoinAddress",
502
+ "inputs": [
503
+ {
504
+ "name": "symbol",
505
+ "type": "string",
506
+ "internalType": "string"
507
+ }
508
+ ],
509
+ "outputs": [
510
+ {
511
+ "name": "",
512
+ "type": "address",
513
+ "internalType": "address"
514
+ }
515
+ ],
516
+ "stateMutability": "view"
517
+ },
518
+ {
519
+ "type": "function",
520
+ "name": "trendCoinImpl",
521
+ "inputs": [],
522
+ "outputs": [
523
+ {
524
+ "name": "",
525
+ "type": "address",
526
+ "internalType": "address"
527
+ }
528
+ ],
529
+ "stateMutability": "view"
530
+ },
531
+ {
532
+ "type": "function",
533
+ "name": "trendCoinPoolConfig",
534
+ "inputs": [],
535
+ "outputs": [
536
+ {
537
+ "name": "",
538
+ "type": "bytes",
539
+ "internalType": "bytes"
540
+ }
541
+ ],
542
+ "stateMutability": "view"
543
+ },
432
544
  {
433
545
  "type": "function",
434
546
  "name": "zoraHookRegistry",
@@ -709,6 +821,95 @@
709
821
  ],
710
822
  "anonymous": false
711
823
  },
824
+ {
825
+ "type": "event",
826
+ "name": "TrendCoinCreated",
827
+ "inputs": [
828
+ {
829
+ "name": "caller",
830
+ "type": "address",
831
+ "indexed": true,
832
+ "internalType": "address"
833
+ },
834
+ {
835
+ "name": "symbol",
836
+ "type": "string",
837
+ "indexed": false,
838
+ "internalType": "string"
839
+ },
840
+ {
841
+ "name": "coin",
842
+ "type": "address",
843
+ "indexed": false,
844
+ "internalType": "address"
845
+ },
846
+ {
847
+ "name": "poolKey",
848
+ "type": "tuple",
849
+ "indexed": false,
850
+ "internalType": "struct PoolKey",
851
+ "components": [
852
+ {
853
+ "name": "currency0",
854
+ "type": "address",
855
+ "internalType": "Currency"
856
+ },
857
+ {
858
+ "name": "currency1",
859
+ "type": "address",
860
+ "internalType": "Currency"
861
+ },
862
+ {
863
+ "name": "fee",
864
+ "type": "uint24",
865
+ "internalType": "uint24"
866
+ },
867
+ {
868
+ "name": "tickSpacing",
869
+ "type": "int24",
870
+ "internalType": "int24"
871
+ },
872
+ {
873
+ "name": "hooks",
874
+ "type": "address",
875
+ "internalType": "contract IHooks"
876
+ }
877
+ ]
878
+ },
879
+ {
880
+ "name": "poolKeyHash",
881
+ "type": "bytes32",
882
+ "indexed": false,
883
+ "internalType": "bytes32"
884
+ },
885
+ {
886
+ "name": "poolConfig",
887
+ "type": "bytes",
888
+ "indexed": false,
889
+ "internalType": "bytes"
890
+ },
891
+ {
892
+ "name": "version",
893
+ "type": "string",
894
+ "indexed": false,
895
+ "internalType": "string"
896
+ }
897
+ ],
898
+ "anonymous": false
899
+ },
900
+ {
901
+ "type": "event",
902
+ "name": "TrendCoinPoolConfigUpdated",
903
+ "inputs": [
904
+ {
905
+ "name": "poolConfig",
906
+ "type": "bytes",
907
+ "indexed": false,
908
+ "internalType": "bytes"
909
+ }
910
+ ],
911
+ "anonymous": false
912
+ },
712
913
  {
713
914
  "type": "error",
714
915
  "name": "Deprecated",
@@ -729,6 +930,37 @@
729
930
  "name": "InvalidHook",
730
931
  "inputs": []
731
932
  },
933
+ {
934
+ "type": "error",
935
+ "name": "TickerAlreadyUsed",
936
+ "inputs": [
937
+ {
938
+ "name": "symbol",
939
+ "type": "string",
940
+ "internalType": "string"
941
+ }
942
+ ]
943
+ },
944
+ {
945
+ "type": "error",
946
+ "name": "TickerInvalidCharacters",
947
+ "inputs": []
948
+ },
949
+ {
950
+ "type": "error",
951
+ "name": "TickerTooLong",
952
+ "inputs": []
953
+ },
954
+ {
955
+ "type": "error",
956
+ "name": "TickerTooShort",
957
+ "inputs": []
958
+ },
959
+ {
960
+ "type": "error",
961
+ "name": "TrendCoinPoolConfigNotSet",
962
+ "inputs": []
963
+ },
732
964
  {
733
965
  "type": "error",
734
966
  "name": "UpgradeToMismatchedContractName",
@@ -744,5 +976,10 @@
744
976
  "internalType": "string"
745
977
  }
746
978
  ]
979
+ },
980
+ {
981
+ "type": "error",
982
+ "name": "UseSpecificTrendCoinInitialize",
983
+ "inputs": []
747
984
  }
748
985
  ]