@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,21 +0,0 @@
1
- [
2
- {
3
- "type": "function",
4
- "name": "supportsInterface",
5
- "inputs": [
6
- {
7
- "name": "interfaceId",
8
- "type": "bytes4",
9
- "internalType": "bytes4"
10
- }
11
- ],
12
- "outputs": [
13
- {
14
- "name": "",
15
- "type": "bool",
16
- "internalType": "bool"
17
- }
18
- ],
19
- "stateMutability": "pure"
20
- }
21
- ]
@@ -1,103 +0,0 @@
1
- [
2
- {
3
- "type": "function",
4
- "name": "initializeFromMigration",
5
- "inputs": [
6
- {
7
- "name": "poolKey",
8
- "type": "tuple",
9
- "internalType": "struct PoolKey",
10
- "components": [
11
- {
12
- "name": "currency0",
13
- "type": "address",
14
- "internalType": "Currency"
15
- },
16
- {
17
- "name": "currency1",
18
- "type": "address",
19
- "internalType": "Currency"
20
- },
21
- {
22
- "name": "fee",
23
- "type": "uint24",
24
- "internalType": "uint24"
25
- },
26
- {
27
- "name": "tickSpacing",
28
- "type": "int24",
29
- "internalType": "int24"
30
- },
31
- {
32
- "name": "hooks",
33
- "type": "address",
34
- "internalType": "contract IHooks"
35
- }
36
- ]
37
- },
38
- {
39
- "name": "coin",
40
- "type": "address",
41
- "internalType": "address"
42
- },
43
- {
44
- "name": "sqrtPriceX96",
45
- "type": "uint160",
46
- "internalType": "uint160"
47
- },
48
- {
49
- "name": "migratedLiquidity",
50
- "type": "tuple[]",
51
- "internalType": "struct BurnedPosition[]",
52
- "components": [
53
- {
54
- "name": "tickLower",
55
- "type": "int24",
56
- "internalType": "int24"
57
- },
58
- {
59
- "name": "tickUpper",
60
- "type": "int24",
61
- "internalType": "int24"
62
- },
63
- {
64
- "name": "amount0Received",
65
- "type": "uint128",
66
- "internalType": "uint128"
67
- },
68
- {
69
- "name": "amount1Received",
70
- "type": "uint128",
71
- "internalType": "uint128"
72
- }
73
- ]
74
- },
75
- {
76
- "name": "additionalData",
77
- "type": "bytes",
78
- "internalType": "bytes"
79
- }
80
- ],
81
- "outputs": [],
82
- "stateMutability": "nonpayable"
83
- },
84
- {
85
- "type": "function",
86
- "name": "supportsInterface",
87
- "inputs": [
88
- {
89
- "name": "interfaceId",
90
- "type": "bytes4",
91
- "internalType": "bytes4"
92
- }
93
- ],
94
- "outputs": [
95
- {
96
- "name": "",
97
- "type": "bool",
98
- "internalType": "bool"
99
- }
100
- ],
101
- "stateMutability": "pure"
102
- }
103
- ]