@zoralabs/coins 2.2.1 → 2.3.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 (88) hide show
  1. package/.turbo/turbo-build$colon$js.log +125 -106
  2. package/CHANGELOG.md +50 -5
  3. package/README.md +5 -0
  4. package/abis/AddressConstants.json +7 -0
  5. package/abis/BaseCoin.json +0 -5
  6. package/abis/BaseTest.json +62 -0
  7. package/abis/BuySupplyWithV4SwapHook.json +429 -0
  8. package/abis/ContentCoin.json +0 -5
  9. package/abis/CreatorCoin.json +0 -5
  10. package/abis/FeeEstimatorHook.json +94 -1
  11. package/abis/IUniswapV4Router04.json +484 -0
  12. package/abis/IUpgradeableDestinationV4HookWithUpdateableFee.json +95 -0
  13. package/abis/IZoraFactory.json +69 -0
  14. package/abis/MockAirlock.json +39 -0
  15. package/abis/SimpleERC20.json +326 -0
  16. package/abis/ZoraFactoryImpl.json +69 -0
  17. package/abis/ZoraV4CoinHook.json +94 -1
  18. package/addresses/8453.json +8 -10
  19. package/audits/report-cantinacode-zora-0827.pdf +3498 -4
  20. package/audits/report-cantinacode-zora-1021.pdf +0 -0
  21. package/dist/index.cjs +161 -22
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.js +160 -21
  24. package/dist/index.js.map +1 -1
  25. package/dist/wagmiGenerated.d.ts +259 -40
  26. package/dist/wagmiGenerated.d.ts.map +1 -1
  27. package/foundry.toml +3 -3
  28. package/package/wagmiGenerated.ts +160 -21
  29. package/package.json +1 -1
  30. package/script/DeployPostDeploymentHooks.s.sol +1 -3
  31. package/script/TestBackingCoinSwap.s.sol +0 -2
  32. package/script/TestV4Swap.s.sol +0 -2
  33. package/src/BaseCoin.sol +4 -12
  34. package/src/ContentCoin.sol +3 -4
  35. package/src/CreatorCoin.sol +8 -10
  36. package/src/ZoraFactoryImpl.sol +115 -83
  37. package/src/deployment/CoinsDeployerBase.sol +9 -8
  38. package/src/hook-registry/ZoraHookRegistry.sol +4 -0
  39. package/src/hooks/ZoraV4CoinHook.sol +66 -9
  40. package/src/hooks/deployment/BuySupplyWithV4SwapHook.sol +310 -0
  41. package/src/interfaces/IUpgradeableV4Hook.sol +18 -0
  42. package/src/interfaces/IZoraFactory.sol +21 -2
  43. package/src/libs/CoinConstants.sol +51 -8
  44. package/src/libs/CoinDopplerMultiCurve.sol +11 -11
  45. package/src/libs/CoinRewardsV4.sol +26 -33
  46. package/src/libs/CoinSetup.sol +2 -9
  47. package/src/libs/DopplerMath.sol +2 -2
  48. package/src/libs/V4Liquidity.sol +79 -15
  49. package/src/utils/AutoSwapper.sol +1 -1
  50. package/src/version/ContractVersionBase.sol +1 -1
  51. package/test/BuySupplyWithV4SwapHook.t.sol +509 -0
  52. package/test/Coin.t.sol +26 -14
  53. package/test/CoinRewardsV4.t.sol +33 -0
  54. package/test/CoinUniV4.t.sol +3 -5
  55. package/test/ContentCoinRewards.t.sol +44 -3
  56. package/test/CreatorCoin.t.sol +54 -33
  57. package/test/CreatorCoinRewards.t.sol +1 -3
  58. package/test/DeploymentHooks.t.sol +54 -2
  59. package/test/Factory.t.sol +3 -3
  60. package/test/LiquidityMigration.t.sol +145 -7
  61. package/test/MultiOwnable.t.sol +4 -4
  62. package/test/Upgrades.t.sol +26 -17
  63. package/test/V4Liquidity.t.sol +178 -0
  64. package/test/ZoraHookRegistry.t.sol +19 -9
  65. package/test/mocks/MockAirlock.sol +22 -0
  66. package/test/mocks/SimpleERC20.sol +8 -0
  67. package/test/utils/BaseTest.sol +155 -3
  68. package/test/utils/RewardTestHelpers.sol +4 -4
  69. package/test/utils/hookmate/README.md +50 -0
  70. package/test/utils/hookmate/artifacts/DeployHelper.sol +20 -0
  71. package/test/utils/hookmate/artifacts/Permit2.sol +16 -0
  72. package/test/utils/hookmate/artifacts/UniversalRouter.sol +29 -0
  73. package/test/utils/hookmate/artifacts/V4PoolManager.sol +17 -0
  74. package/test/utils/hookmate/artifacts/V4PositionManager.sol +23 -0
  75. package/test/utils/hookmate/artifacts/V4Quoter.sol +17 -0
  76. package/test/utils/hookmate/artifacts/V4Router.sol +18 -0
  77. package/test/utils/hookmate/constants/AddressConstants.sol +193 -0
  78. package/test/utils/hookmate/interfaces/router/IUniswapV4Router04.sol +173 -0
  79. package/test/utils/hookmate/interfaces/router/PathKey.sol +34 -0
  80. package/test/utils/hookmate/test/utils/SwapFeeEventAsserter.sol +24 -0
  81. package/wagmi.config.ts +1 -1
  82. package/abis/CoinConstants.json +0 -54
  83. package/abis/CoinRewardsV4.json +0 -67
  84. package/src/libs/CreatorCoinConstants.sol +0 -15
  85. package/src/libs/MarketConstants.sol +0 -23
  86. package/src/utils/uniswap/BytesLib.sol +0 -35
  87. package/src/utils/uniswap/Path.sol +0 -31
  88. /package/abis/{VmContractHelper227.json → VmContractHelper239.json} +0 -0
@@ -1,18 +1,24 @@
1
1
 
2
- > @zoralabs/coins@2.2.1 build:js /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
2
+ > @zoralabs/coins@2.3.1 build:js /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
3
3
  > pnpm run wagmi:generate && pnpm run copy-abis && pnpm run prettier:write && tsup
4
4
 
5
5
 
6
- > @zoralabs/coins@2.2.1 wagmi:generate /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
6
+ > @zoralabs/coins@2.3.1 wagmi:generate /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
7
7
  > pnpm run build:contracts:minimal && wagmi generate && pnpm exec rename-generated-abi-casing ./package/wagmiGenerated.ts
8
8
 
9
9
 
10
- > @zoralabs/coins@2.2.1 build:contracts:minimal /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
10
+ > @zoralabs/coins@2.3.1 build:contracts:minimal /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
11
11
  > forge build --skip test --skip script --no-metadata
12
12
 
13
- Compiling 212 files with Solc 0.8.28
14
- Solc 0.8.28 finished in 80.04s
15
- Compiler run successful!
13
+ Compiling 224 files with Solc 0.8.28
14
+ Solc 0.8.28 finished in 97.96s
15
+ Compiler run successful with warnings:
16
+ Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
17
+ --> test/utils/BaseTest.sol:440:36:
18
+ |
19
+ 440 | function _deployHooksNonForked(address airlockAddress) internal {
20
+ | ^^^^^^^^^^^^^^^^^^^^^^
21
+
16
22
  - Validating plugins
17
23
  ✔ Validating plugins
18
24
  - Resolving contracts
@@ -26,116 +32,129 @@ Compiler run successful!
26
32
  ✅ Updated ./package/wagmiGenerated.ts (10 replacements)
27
33
  ✨ All files processed successfully!
28
34
 
29
- > @zoralabs/coins@2.2.1 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
35
+ > @zoralabs/coins@2.3.1 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
30
36
  > pnpm exec bundle-abis
31
37
 
32
38
 
33
- > @zoralabs/coins@2.2.1 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
39
+ > @zoralabs/coins@2.3.1 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
34
40
  > prettier --write 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'
35
41
 
36
- src/BaseCoin.sol 780ms (unchanged)
37
- src/ContentCoin.sol 81ms (unchanged)
38
- src/CreatorCoin.sol 95ms (unchanged)
39
- src/deployment/CoinsDeployerBase.sol 344ms (unchanged)
40
- src/hook-registry/ZoraHookRegistry.sol 142ms (unchanged)
42
+ src/BaseCoin.sol 772ms (unchanged)
43
+ src/ContentCoin.sol 61ms (unchanged)
44
+ src/CreatorCoin.sol 103ms (unchanged)
45
+ src/deployment/CoinsDeployerBase.sol 373ms (unchanged)
46
+ src/hook-registry/ZoraHookRegistry.sol 156ms (unchanged)
41
47
  src/hooks/deployment/BaseCoinDeployHook.sol 40ms (unchanged)
42
- src/hooks/deployment/BuySupplyWithSwapRouterHook.sol 257ms (unchanged)
43
- src/hooks/HookUpgradeGate.sol 33ms (unchanged)
44
- src/hooks/ZoraV4CoinHook.sol 250ms (unchanged)
45
- src/interfaces/IAirlock.sol 4ms (unchanged)
48
+ src/hooks/deployment/BuySupplyWithSwapRouterHook.sol 293ms (unchanged)
49
+ src/hooks/deployment/BuySupplyWithV4SwapHook.sol 256ms (unchanged)
50
+ src/hooks/HookUpgradeGate.sol 32ms (unchanged)
51
+ src/hooks/ZoraV4CoinHook.sol 269ms (unchanged)
52
+ src/interfaces/IAirlock.sol 2ms (unchanged)
46
53
  src/interfaces/ICoin.sol 27ms (unchanged)
47
- src/interfaces/ICoinComments.sol 5ms (unchanged)
48
- src/interfaces/ICoinDeployHook.sol 1ms (unchanged)
49
- src/interfaces/ICoinV3.sol 9ms (unchanged)
54
+ src/interfaces/ICoinComments.sol 4ms (unchanged)
55
+ src/interfaces/ICoinDeployHook.sol 2ms (unchanged)
56
+ src/interfaces/ICoinV3.sol 5ms (unchanged)
50
57
  src/interfaces/ICreatorCoin.sol 2ms (unchanged)
51
- src/interfaces/ICreatorCoinHook.sol 2ms (unchanged)
52
- src/interfaces/IDeployedCoinVersionLookup.sol 3ms (unchanged)
53
- src/interfaces/IDopplerErrors.sol 2ms (unchanged)
54
- src/interfaces/IERC7572.sol 3ms (unchanged)
55
- src/interfaces/IHasRewardsRecipients.sol 3ms (unchanged)
58
+ src/interfaces/ICreatorCoinHook.sol 1ms (unchanged)
59
+ src/interfaces/IDeployedCoinVersionLookup.sol 1ms (unchanged)
60
+ src/interfaces/IDopplerErrors.sol 1ms (unchanged)
61
+ src/interfaces/IERC7572.sol 1ms (unchanged)
62
+ src/interfaces/IHasRewardsRecipients.sol 1ms (unchanged)
56
63
  src/interfaces/IHooksUpgradeGate.sol 3ms (unchanged)
57
- src/interfaces/IMsgSender.sol 2ms (unchanged)
58
- src/interfaces/INonfungiblePositionManager.sol 8ms (unchanged)
59
- src/interfaces/IPoolConfigEncoding.sol 1ms (unchanged)
60
- src/interfaces/IProtocolRewards.sol 6ms (unchanged)
61
- src/interfaces/ISwapPathRouter.sol 3ms (unchanged)
62
- src/interfaces/ISwapRouter.sol 3ms (unchanged)
64
+ src/interfaces/IMsgSender.sol 1ms (unchanged)
65
+ src/interfaces/INonfungiblePositionManager.sol 16ms (unchanged)
66
+ src/interfaces/IPoolConfigEncoding.sol 2ms (unchanged)
67
+ src/interfaces/IProtocolRewards.sol 4ms (unchanged)
68
+ src/interfaces/ISwapPathRouter.sol 1ms (unchanged)
69
+ src/interfaces/ISwapRouter.sol 1ms (unchanged)
63
70
  src/interfaces/IUniswapV3Factory.sol 9ms (unchanged)
64
- src/interfaces/IUniswapV3Pool.sol 5ms (unchanged)
65
- src/interfaces/IUniswapV3SwapCallback.sol 3ms (unchanged)
66
- src/interfaces/IUpgradeableV4Hook.sol 3ms (unchanged)
67
- src/interfaces/IWETH.sol 9ms (unchanged)
68
- src/interfaces/IZoraFactory.sol 25ms (unchanged)
69
- src/interfaces/IZoraHookRegistry.sol 11ms (unchanged)
70
- src/interfaces/IZoraV4CoinHook.sol 15ms (unchanged)
71
- src/libs/CoinCommon.sol 8ms (unchanged)
72
- src/libs/CoinConfigurationVersions.sol 69ms (unchanged)
73
- src/libs/CoinConstants.sol 4ms (unchanged)
74
- src/libs/CoinDopplerMultiCurve.sol 186ms (unchanged)
75
- src/libs/CoinRewardsV4.sol 189ms (unchanged)
76
- src/libs/CoinSetup.sol 53ms (unchanged)
77
- src/libs/CreatorCoinConstants.sol 4ms (unchanged)
78
- src/libs/DopplerMath.sol 161ms (unchanged)
79
- src/libs/HooksDeployment.sol 128ms (unchanged)
80
- src/libs/MarketConstants.sol 5ms (unchanged)
81
- src/libs/PoolStateReader.sol 6ms (unchanged)
82
- src/libs/UniV4SwapHelper.sol 47ms (unchanged)
83
- src/libs/UniV4SwapToCurrency.sol 82ms (unchanged)
84
- src/libs/V4Liquidity.sol 250ms (unchanged)
85
- src/proxy/ZoraFactory.sol 20ms (unchanged)
71
+ src/interfaces/IUniswapV3Pool.sol 7ms (unchanged)
72
+ src/interfaces/IUniswapV3SwapCallback.sol 4ms (unchanged)
73
+ src/interfaces/IUpgradeableV4Hook.sol 6ms (unchanged)
74
+ src/interfaces/IWETH.sol 3ms (unchanged)
75
+ src/interfaces/IZoraFactory.sol 12ms (unchanged)
76
+ src/interfaces/IZoraHookRegistry.sol 7ms (unchanged)
77
+ src/interfaces/IZoraV4CoinHook.sol 6ms (unchanged)
78
+ src/libs/CoinCommon.sol 5ms (unchanged)
79
+ src/libs/CoinConfigurationVersions.sol 62ms (unchanged)
80
+ src/libs/CoinConstants.sol 8ms (unchanged)
81
+ src/libs/CoinDopplerMultiCurve.sol 167ms (unchanged)
82
+ src/libs/CoinRewardsV4.sol 228ms (unchanged)
83
+ src/libs/CoinSetup.sol 50ms (unchanged)
84
+ src/libs/DopplerMath.sol 159ms (unchanged)
85
+ src/libs/HooksDeployment.sol 129ms (unchanged)
86
+ src/libs/PoolStateReader.sol 5ms (unchanged)
87
+ src/libs/UniV4SwapHelper.sol 49ms (unchanged)
88
+ src/libs/UniV4SwapToCurrency.sol 83ms (unchanged)
89
+ src/libs/V4Liquidity.sol 303ms (unchanged)
90
+ src/proxy/ZoraFactory.sol 9ms (unchanged)
86
91
  src/types/LpPosition.sol 1ms (unchanged)
87
- src/types/PoolConfiguration.sol 3ms (unchanged)
92
+ src/types/PoolConfiguration.sol 1ms (unchanged)
88
93
  src/types/PoolState.sol 4ms (unchanged)
89
- src/utils/AutoSwapper.sol 29ms (unchanged)
90
- src/utils/DeployedCoinVersionLookup.sol 8ms (unchanged)
91
- src/utils/MultiOwnable.sol 66ms (unchanged)
92
- src/utils/uniswap/BitMath.sol 23ms (unchanged)
93
- src/utils/uniswap/BytesLib.sol 13ms (unchanged)
94
- src/utils/uniswap/CustomRevert.sol 55ms (unchanged)
95
- src/utils/uniswap/FixedPoint96.sol 2ms (unchanged)
94
+ src/utils/AutoSwapper.sol 33ms (unchanged)
95
+ src/utils/DeployedCoinVersionLookup.sol 7ms (unchanged)
96
+ src/utils/MultiOwnable.sol 72ms (unchanged)
97
+ src/utils/uniswap/BitMath.sol 9ms (unchanged)
98
+ src/utils/uniswap/CustomRevert.sol 54ms (unchanged)
99
+ src/utils/uniswap/FixedPoint96.sol 1ms (unchanged)
96
100
  src/utils/uniswap/FullMath.sol 35ms (unchanged)
97
- src/utils/uniswap/LiquidityAmounts.sol 94ms (unchanged)
98
- src/utils/uniswap/Path.sol 8ms (unchanged)
99
- src/utils/uniswap/SafeCast.sol 19ms (unchanged)
100
- src/utils/uniswap/SqrtPriceMath.sol 118ms (unchanged)
101
- src/utils/uniswap/TickMath.sol 142ms (unchanged)
102
- src/utils/uniswap/UnsafeMath.sol 6ms (unchanged)
101
+ src/utils/uniswap/LiquidityAmounts.sol 83ms (unchanged)
102
+ src/utils/uniswap/SafeCast.sol 26ms (unchanged)
103
+ src/utils/uniswap/SqrtPriceMath.sol 115ms (unchanged)
104
+ src/utils/uniswap/TickMath.sol 118ms (unchanged)
105
+ src/utils/uniswap/UnsafeMath.sol 3ms (unchanged)
103
106
  src/version/ContractVersionBase.sol 1ms (unchanged)
104
- src/ZoraFactoryImpl.sol 205ms (unchanged)
105
- test/AutoSwapper.t.sol 64ms (unchanged)
106
- test/Coin.t.sol 200ms (unchanged)
107
- test/CoinUniV4.t.sol 633ms (unchanged)
108
- test/ContentCoinRewards.t.sol 190ms (unchanged)
109
- test/CreatorCoin.t.sol 237ms (unchanged)
110
- test/CreatorCoinRewards.t.sol 159ms (unchanged)
111
- test/DeploymentHooks.t.sol 131ms (unchanged)
112
- test/Factory.t.sol 161ms (unchanged)
113
- test/HooksDeployment.t.sol 43ms (unchanged)
114
- test/LiquidityMigration.t.sol 263ms (unchanged)
115
- test/mocks/MockERC20.sol 4ms (unchanged)
116
- test/MultiOwnable.t.sol 138ms (unchanged)
117
- test/Upgrades.t.sol 191ms (unchanged)
118
- test/utils/BaseTest.sol 272ms (unchanged)
119
- test/utils/ContractAddresses.sol 4ms (unchanged)
120
- test/utils/DeployedCoinVersionLookup.t.sol 73ms (unchanged)
121
- test/utils/FeeEstimatorHook.sol 44ms (unchanged)
122
- test/utils/ProtocolRewards.sol 480ms (unchanged)
123
- test/utils/ProxyShim.sol 5ms (unchanged)
124
- test/utils/RewardTestHelpers.sol 94ms (unchanged)
125
- test/ZoraHookRegistry.t.sol 221ms (unchanged)
126
- script/Deploy.s.sol 8ms (unchanged)
127
- script/DeployAutoSwapper.s.sol 12ms (unchanged)
128
- script/DeployDevFactory.s.sol 4ms (unchanged)
129
- script/DeployPostDeploymentHooks.s.sol 4ms (unchanged)
130
- script/DeployUpgradeGate.s.sol 5ms (unchanged)
131
- script/GenerateDeterministicParams.s.sol 20ms (unchanged)
132
- script/PrintRegisterUpgradePath.s.sol 13ms (unchanged)
107
+ src/ZoraFactoryImpl.sol 213ms (unchanged)
108
+ test/AutoSwapper.t.sol 92ms (unchanged)
109
+ test/BuySupplyWithV4SwapHook.t.sol 254ms (unchanged)
110
+ test/Coin.t.sol 217ms (unchanged)
111
+ test/CoinRewardsV4.t.sol 16ms (unchanged)
112
+ test/CoinUniV4.t.sol 618ms (unchanged)
113
+ test/ContentCoinRewards.t.sol 219ms (unchanged)
114
+ test/CreatorCoin.t.sol 275ms (unchanged)
115
+ test/CreatorCoinRewards.t.sol 188ms (unchanged)
116
+ test/DeploymentHooks.t.sol 147ms (unchanged)
117
+ test/Factory.t.sol 148ms (unchanged)
118
+ test/HooksDeployment.t.sol 49ms (unchanged)
119
+ test/LiquidityMigration.t.sol 406ms (unchanged)
120
+ test/mocks/MockAirlock.sol 4ms (unchanged)
121
+ test/mocks/MockERC20.sol 3ms (unchanged)
122
+ test/mocks/SimpleERC20.sol 2ms (unchanged)
123
+ test/MultiOwnable.t.sol 140ms (unchanged)
124
+ test/Upgrades.t.sol 175ms (unchanged)
125
+ test/utils/BaseTest.sol 392ms (unchanged)
126
+ test/utils/ContractAddresses.sol 3ms (unchanged)
127
+ test/utils/DeployedCoinVersionLookup.t.sol 70ms (unchanged)
128
+ test/utils/FeeEstimatorHook.sol 45ms (unchanged)
129
+ test/utils/hookmate/artifacts/DeployHelper.sol 12ms (unchanged)
130
+ test/utils/hookmate/artifacts/Permit2.sol 13ms (unchanged)
131
+ test/utils/hookmate/artifacts/UniversalRouter.sol 16ms (unchanged)
132
+ test/utils/hookmate/artifacts/V4PoolManager.sol 7ms (unchanged)
133
+ test/utils/hookmate/artifacts/V4PositionManager.sol 10ms (unchanged)
134
+ test/utils/hookmate/artifacts/V4Quoter.sol 7ms (unchanged)
135
+ test/utils/hookmate/artifacts/V4Router.sol 7ms (unchanged)
136
+ test/utils/hookmate/constants/AddressConstants.sol 69ms (unchanged)
137
+ test/utils/hookmate/interfaces/router/IUniswapV4Router04.sol 25ms (unchanged)
138
+ test/utils/hookmate/interfaces/router/PathKey.sol 17ms (unchanged)
139
+ test/utils/hookmate/test/utils/SwapFeeEventAsserter.sol 20ms (unchanged)
140
+ test/utils/ProtocolRewards.sol 451ms (unchanged)
141
+ test/utils/ProxyShim.sol 10ms (unchanged)
142
+ test/utils/RewardTestHelpers.sol 76ms (unchanged)
143
+ test/V4Liquidity.t.sol 116ms (unchanged)
144
+ test/ZoraHookRegistry.t.sol 223ms (unchanged)
145
+ script/Deploy.s.sol 15ms (unchanged)
146
+ script/DeployAutoSwapper.s.sol 13ms (unchanged)
147
+ script/DeployDevFactory.s.sol 6ms (unchanged)
148
+ script/DeployPostDeploymentHooks.s.sol 11ms (unchanged)
149
+ script/DeployUpgradeGate.s.sol 6ms (unchanged)
150
+ script/GenerateDeterministicParams.s.sol 27ms (unchanged)
151
+ script/PrintRegisterUpgradePath.s.sol 17ms (unchanged)
133
152
  script/PrintUpgradeCommand.s.sol 5ms (unchanged)
134
- script/TestBackingCoinSwap.s.sol 63ms (unchanged)
135
- script/TestV4Swap.s.sol 65ms (unchanged)
136
- script/UpgradeCoinImpl.sol 7ms (unchanged)
153
+ script/TestBackingCoinSwap.s.sol 87ms (unchanged)
154
+ script/TestV4Swap.s.sol 67ms (unchanged)
155
+ script/UpgradeCoinImpl.sol 8ms (unchanged)
137
156
  script/UpgradeFactoryImpl.s.sol 10ms (unchanged)
138
- script/UpgradeHooks.s.sol 7ms (unchanged)
157
+ script/UpgradeHooks.s.sol 8ms (unchanged)
139
158
  CLI Building entry: package/index.ts
140
159
  CLI Using tsconfig: tsconfig.json
141
160
  CLI tsup v8.4.0
@@ -144,9 +163,9 @@ script/UpgradeHooks.s.sol 7ms (unchanged)
144
163
  CLI Cleaning output folder
145
164
  CJS Build start
146
165
  ESM Build start
147
- ESM dist/index.js 130.01 KB
148
- ESM dist/index.js.map 232.56 KB
149
- ESM ⚡️ Build success in 77ms
150
- CJS dist/index.cjs 131.44 KB
151
- CJS dist/index.cjs.map 232.71 KB
152
- CJS ⚡️ Build success in 82ms
166
+ CJS dist/index.cjs 135.99 KB
167
+ CJS dist/index.cjs.map 240.37 KB
168
+ CJS ⚡️ Build success in 93ms
169
+ ESM dist/index.js 134.57 KB
170
+ ESM dist/index.js.map 240.22 KB
171
+ ESM ⚡️ Build success in 97ms
package/CHANGELOG.md CHANGED
@@ -1,14 +1,59 @@
1
1
  # @zoralabs/coins
2
2
 
3
- ## 2.2.1
3
+ ## 2.3.1
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - 7ec6134b: Flatten hooks into single hook implementation
7
+ - 3c274d9d: Created a buy supply with v4 hook, for buying initial supply of a creator coin, supporting doing a v3 and v4 swap to buy the creator coin. updated the encoding function for buying initial supply to work with the v3 to v4 swap
8
+
9
+ ## 2.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 7df94915: Enable buying initial supply when deploying creator coin and refactor factory internals
14
+
15
+ - Add new `deployCreatorCoin` overload with `postDeployHook` parameter that supports ETH transfers
16
+ - Refactored internal factory implementation to share more code between deployment methods
17
+ - Enables buying initial supply during creator coin deployment via post-deploy hooks
18
+
19
+ ### Patch Changes
20
+
21
+ - 6a7e2b7b: Fix LP position duplication when deploying coins. If two positions are created with the same tick ranges, they are merged and stored as one position. This reduces gas costs during swapping as there are less LP positions to iterate through when collecting fees.
22
+ - 5093c5ef: Add bounds checking to prevent risky forced downcasting of currency deltas
23
+ - 9c6d241a: Fix ETH transfer failures in reward distribution when platform referrers cannot accept ETH
24
+
25
+ - Prevent swaps from reverting when platform referrers cannot accept ETH - in this case, the rewards are redirected to the protocol recipient as backup.
26
+ - Ensures coin functionality remains intact even with ETH-incompatible platform referrers
27
+
28
+ - 44a179b0: Flatten hooks into single hook implementation
8
29
 
9
30
  Consolidates multiple hook contracts into a single unified hook for simplified architecture and better maintainability.
10
31
 
11
- - ae9424ab: Ignore collecting from liquidity positions with empty fee growth
32
+ - d3808d55: Adjust creator coin vesting duration to account for leap years
33
+
34
+ - Changed CREATOR*VESTING_DURATION from 5 * 365 days to 5 \_ 365.25 days
35
+ - Addresses Cantina audit finding about 1.25 day shortfall in 5-year vesting period
36
+
37
+ - b571fe54: Consolidate and clarify coin constants
38
+
39
+ - Renamed `CREATOR_LAUNCH_REWARD` to `CONTENT_COIN_INITIAL_CREATOR_SUPPLY` for clarity
40
+ - Renamed `CREATOR_VESTING_SUPPLY` to `CREATOR_COIN_CREATOR_VESTING_SUPPLY` for consistency
41
+ - Removed redundant `POOL_LAUNCH_SUPPLY` constant (use `CONTENT_COIN_MARKET_SUPPLY` instead)
42
+ - Changed library constants from `public` to `internal`
43
+ - Made supply constants derived from calculations to show relationships clearly
44
+
45
+ - 32d683d6: Fix stale PoolKey mapping after migration in ZoraV4CoinHook
46
+
47
+ Delete the old pool key from the poolCoins mapping after successful liquidity migration to prevent future operations on migrated pools.
48
+
49
+ - 44a179b0: Ignore collecting from liquidity positions with empty fee growth
50
+ - 00b982bb: Fix liquidity migration bug: when migrating liquidity to a hook with a different fee, the old fee was kept. This will now make sure that the new fee is used after migration. Also make sure to use the new tick spacing after migration.
51
+
52
+ ## 2.2.1
53
+
54
+ ### Patch Changes
55
+
56
+ - c96e0c5e: Fix bug where liquidity cannot be migrated if there is a position with 0 liquidity
12
57
 
13
58
  ## 2.2.0
14
59
 
@@ -25,7 +70,7 @@
25
70
 
26
71
  | Recipient | Before (3% total fee) | After (1% total fee) |
27
72
  | ----------------- | --------------------- | -------------------- |
28
- | | % of Fee | % of Fee |
73
+ | | % of Fee | % of Fee |
29
74
  | Creator | 33.33% | 50% |
30
75
  | Platform Referral | 10% | 20% |
31
76
  | Trade Referral | 10% | 4% |
@@ -37,7 +82,7 @@
37
82
 
38
83
  | Recipient | Before (3% total fee) | After (1% total fee) |
39
84
  | ----------------- | --------------------- | -------------------- |
40
- | | % of Fee | % of Fee |
85
+ | | % of Fee | % of Fee |
41
86
  | Creator | 33.33% | 50% |
42
87
  | Platform Referral | - | 20% |
43
88
  | Trade Referral | - | 4% |
package/README.md CHANGED
@@ -74,3 +74,8 @@ forge script script/Deploy.s.sol $(chains {chainName} --deploy) --broadcast --ve
74
74
  where `{chainName}` is the emdash name of the chain you want to deploy on.
75
75
 
76
76
  2. Verify the factory contract. Since it is deployed with create2, foundry won't always recognize the deployed contract; verification instructions will be printed out in the logs.
77
+
78
+ ## Audits
79
+
80
+ * Coins Aug 2025: [Cantina Audit Report](./audits/report-cantinacode-zora-0827.pdf)
81
+ * Coins Oct 2025: [Cantina Audit Report](./audits/report-cantinacode-zora-1021.pdf)
@@ -0,0 +1,7 @@
1
+ [
2
+ {
3
+ "type": "error",
4
+ "name": "UnsupportedChainId",
5
+ "inputs": []
6
+ }
7
+ ]
@@ -1848,11 +1848,6 @@
1848
1848
  "name": "OwnerCannotBeAddressZero",
1849
1849
  "inputs": []
1850
1850
  },
1851
- {
1852
- "type": "error",
1853
- "name": "ReentrancyGuardReentrantCall",
1854
- "inputs": []
1855
- },
1856
1851
  {
1857
1852
  "type": "error",
1858
1853
  "name": "SlippageBoundsExceeded",
@@ -115,6 +115,13 @@
115
115
  "outputs": [],
116
116
  "stateMutability": "nonpayable"
117
117
  },
118
+ {
119
+ "type": "function",
120
+ "name": "setUpNonForked",
121
+ "inputs": [],
122
+ "outputs": [],
123
+ "stateMutability": "nonpayable"
124
+ },
118
125
  {
119
126
  "type": "function",
120
127
  "name": "setUpWithBlockNumber",
@@ -242,6 +249,56 @@
242
249
  ],
243
250
  "stateMutability": "view"
244
251
  },
252
+ {
253
+ "type": "event",
254
+ "name": "SlotFound",
255
+ "inputs": [
256
+ {
257
+ "name": "who",
258
+ "type": "address",
259
+ "indexed": false,
260
+ "internalType": "address"
261
+ },
262
+ {
263
+ "name": "fsig",
264
+ "type": "bytes4",
265
+ "indexed": false,
266
+ "internalType": "bytes4"
267
+ },
268
+ {
269
+ "name": "keysHash",
270
+ "type": "bytes32",
271
+ "indexed": false,
272
+ "internalType": "bytes32"
273
+ },
274
+ {
275
+ "name": "slot",
276
+ "type": "uint256",
277
+ "indexed": false,
278
+ "internalType": "uint256"
279
+ }
280
+ ],
281
+ "anonymous": false
282
+ },
283
+ {
284
+ "type": "event",
285
+ "name": "WARNING_UninitedSlot",
286
+ "inputs": [
287
+ {
288
+ "name": "who",
289
+ "type": "address",
290
+ "indexed": false,
291
+ "internalType": "address"
292
+ },
293
+ {
294
+ "name": "slot",
295
+ "type": "uint256",
296
+ "indexed": false,
297
+ "internalType": "uint256"
298
+ }
299
+ ],
300
+ "anonymous": false
301
+ },
245
302
  {
246
303
  "type": "event",
247
304
  "name": "log",
@@ -652,5 +709,10 @@
652
709
  "internalType": "address"
653
710
  }
654
711
  ]
712
+ },
713
+ {
714
+ "type": "error",
715
+ "name": "UnsupportedChainId",
716
+ "inputs": []
655
717
  }
656
718
  ]