@zoralabs/coins 2.2.1 → 2.3.0

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 (54) hide show
  1. package/.turbo/turbo-build$colon$js.log +99 -99
  2. package/CHANGELOG.md +44 -5
  3. package/README.md +4 -0
  4. package/abis/BaseCoin.json +0 -5
  5. package/abis/ContentCoin.json +0 -5
  6. package/abis/CreatorCoin.json +0 -5
  7. package/abis/FeeEstimatorHook.json +94 -1
  8. package/abis/IUpgradeableDestinationV4HookWithUpdateableFee.json +95 -0
  9. package/abis/IZoraFactory.json +69 -0
  10. package/abis/ZoraFactoryImpl.json +69 -0
  11. package/abis/ZoraV4CoinHook.json +94 -1
  12. package/addresses/8453.json +6 -6
  13. package/audits/report-cantinacode-zora-0827.pdf +3498 -4
  14. package/dist/index.cjs +21 -3
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.js +21 -3
  17. package/dist/index.js.map +1 -1
  18. package/dist/wagmiGenerated.d.ts +54 -12
  19. package/dist/wagmiGenerated.d.ts.map +1 -1
  20. package/foundry.toml +3 -3
  21. package/package/wagmiGenerated.ts +21 -3
  22. package/package.json +1 -1
  23. package/script/TestBackingCoinSwap.s.sol +0 -2
  24. package/script/TestV4Swap.s.sol +0 -2
  25. package/src/BaseCoin.sol +4 -12
  26. package/src/ContentCoin.sol +3 -4
  27. package/src/CreatorCoin.sol +8 -10
  28. package/src/ZoraFactoryImpl.sol +115 -83
  29. package/src/hook-registry/ZoraHookRegistry.sol +4 -0
  30. package/src/hooks/ZoraV4CoinHook.sol +66 -9
  31. package/src/interfaces/IUpgradeableV4Hook.sol +18 -0
  32. package/src/interfaces/IZoraFactory.sol +21 -2
  33. package/src/libs/CoinConstants.sol +51 -8
  34. package/src/libs/CoinDopplerMultiCurve.sol +11 -11
  35. package/src/libs/CoinRewardsV4.sol +26 -33
  36. package/src/libs/CoinSetup.sol +2 -9
  37. package/src/libs/DopplerMath.sol +2 -2
  38. package/src/libs/V4Liquidity.sol +79 -15
  39. package/src/version/ContractVersionBase.sol +1 -1
  40. package/test/Coin.t.sol +5 -5
  41. package/test/CoinRewardsV4.t.sol +33 -0
  42. package/test/CoinUniV4.t.sol +2 -3
  43. package/test/ContentCoinRewards.t.sol +43 -0
  44. package/test/CreatorCoin.t.sol +53 -29
  45. package/test/DeploymentHooks.t.sol +54 -2
  46. package/test/LiquidityMigration.t.sol +145 -7
  47. package/test/V4Liquidity.t.sol +178 -0
  48. package/test/utils/BaseTest.sol +0 -1
  49. package/test/utils/RewardTestHelpers.sol +4 -4
  50. package/abis/CoinConstants.json +0 -54
  51. package/abis/CoinRewardsV4.json +0 -67
  52. package/src/libs/CreatorCoinConstants.sol +0 -15
  53. package/src/libs/MarketConstants.sol +0 -23
  54. /package/abis/{VmContractHelper227.json → VmContractHelper226.json} +0 -0
@@ -1,17 +1,17 @@
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.0 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.0 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.0 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
13
+ Compiling 210 files with Solc 0.8.28
14
+ Solc 0.8.28 finished in 76.74s
15
15
  Compiler run successful!
16
16
  - Validating plugins
17
17
  ✔ Validating plugins
@@ -26,116 +26,116 @@ Compiler run successful!
26
26
  ✅ Updated ./package/wagmiGenerated.ts (10 replacements)
27
27
  ✨ All files processed successfully!
28
28
 
29
- > @zoralabs/coins@2.2.1 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
29
+ > @zoralabs/coins@2.3.0 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
30
30
  > pnpm exec bundle-abis
31
31
 
32
32
 
33
- > @zoralabs/coins@2.2.1 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
33
+ > @zoralabs/coins@2.3.0 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
34
34
  > prettier --write 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'
35
35
 
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)
41
- src/hooks/deployment/BaseCoinDeployHook.sol 40ms (unchanged)
42
- src/hooks/deployment/BuySupplyWithSwapRouterHook.sol 257ms (unchanged)
43
- src/hooks/HookUpgradeGate.sol 33ms (unchanged)
36
+ src/BaseCoin.sol 805ms (unchanged)
37
+ src/ContentCoin.sol 67ms (unchanged)
38
+ src/CreatorCoin.sol 99ms (unchanged)
39
+ src/deployment/CoinsDeployerBase.sol 324ms (unchanged)
40
+ src/hook-registry/ZoraHookRegistry.sol 136ms (unchanged)
41
+ src/hooks/deployment/BaseCoinDeployHook.sol 28ms (unchanged)
42
+ src/hooks/deployment/BuySupplyWithSwapRouterHook.sol 256ms (unchanged)
43
+ src/hooks/HookUpgradeGate.sol 27ms (unchanged)
44
44
  src/hooks/ZoraV4CoinHook.sol 250ms (unchanged)
45
45
  src/interfaces/IAirlock.sol 4ms (unchanged)
46
- src/interfaces/ICoin.sol 27ms (unchanged)
46
+ src/interfaces/ICoin.sol 40ms (unchanged)
47
47
  src/interfaces/ICoinComments.sol 5ms (unchanged)
48
- src/interfaces/ICoinDeployHook.sol 1ms (unchanged)
49
- src/interfaces/ICoinV3.sol 9ms (unchanged)
48
+ src/interfaces/ICoinDeployHook.sol 5ms (unchanged)
49
+ src/interfaces/ICoinV3.sol 8ms (unchanged)
50
50
  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)
51
+ src/interfaces/ICreatorCoinHook.sol 1ms (unchanged)
52
+ src/interfaces/IDeployedCoinVersionLookup.sol 1ms (unchanged)
53
+ src/interfaces/IDopplerErrors.sol 1ms (unchanged)
54
+ src/interfaces/IERC7572.sol 1ms (unchanged)
55
+ src/interfaces/IHasRewardsRecipients.sol 2ms (unchanged)
56
56
  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)
57
+ src/interfaces/IMsgSender.sol 1ms (unchanged)
58
+ src/interfaces/INonfungiblePositionManager.sol 7ms (unchanged)
59
+ src/interfaces/IPoolConfigEncoding.sol 2ms (unchanged)
60
+ src/interfaces/IProtocolRewards.sol 15ms (unchanged)
61
+ src/interfaces/ISwapPathRouter.sol 2ms (unchanged)
62
+ src/interfaces/ISwapRouter.sol 1ms (unchanged)
63
63
  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)
64
+ src/interfaces/IUniswapV3Pool.sol 6ms (unchanged)
65
+ src/interfaces/IUniswapV3SwapCallback.sol 5ms (unchanged)
66
+ src/interfaces/IUpgradeableV4Hook.sol 4ms (unchanged)
67
+ src/interfaces/IWETH.sol 6ms (unchanged)
68
+ src/interfaces/IZoraFactory.sol 23ms (unchanged)
69
+ src/interfaces/IZoraHookRegistry.sol 5ms (unchanged)
70
+ src/interfaces/IZoraV4CoinHook.sol 11ms (unchanged)
71
+ src/libs/CoinCommon.sol 12ms (unchanged)
72
+ src/libs/CoinConfigurationVersions.sol 66ms (unchanged)
73
+ src/libs/CoinConstants.sol 15ms (unchanged)
74
+ src/libs/CoinDopplerMultiCurve.sol 196ms (unchanged)
75
+ src/libs/CoinRewardsV4.sol 202ms (unchanged)
76
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)
77
+ src/libs/DopplerMath.sol 187ms (unchanged)
78
+ src/libs/HooksDeployment.sol 127ms (unchanged)
79
+ src/libs/PoolStateReader.sol 5ms (unchanged)
80
+ src/libs/UniV4SwapHelper.sol 40ms (unchanged)
81
+ src/libs/UniV4SwapToCurrency.sol 85ms (unchanged)
82
+ src/libs/V4Liquidity.sol 305ms (unchanged)
83
+ src/proxy/ZoraFactory.sol 23ms (unchanged)
86
84
  src/types/LpPosition.sol 1ms (unchanged)
87
- src/types/PoolConfiguration.sol 3ms (unchanged)
88
- src/types/PoolState.sol 4ms (unchanged)
89
- src/utils/AutoSwapper.sol 29ms (unchanged)
85
+ src/types/PoolConfiguration.sol 2ms (unchanged)
86
+ src/types/PoolState.sol 3ms (unchanged)
87
+ src/utils/AutoSwapper.sol 40ms (unchanged)
90
88
  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)
89
+ src/utils/MultiOwnable.sol 64ms (unchanged)
90
+ src/utils/uniswap/BitMath.sol 10ms (unchanged)
91
+ src/utils/uniswap/BytesLib.sol 11ms (unchanged)
94
92
  src/utils/uniswap/CustomRevert.sol 55ms (unchanged)
95
- src/utils/uniswap/FixedPoint96.sol 2ms (unchanged)
96
- src/utils/uniswap/FullMath.sol 35ms (unchanged)
97
- src/utils/uniswap/LiquidityAmounts.sol 94ms (unchanged)
93
+ src/utils/uniswap/FixedPoint96.sol 1ms (unchanged)
94
+ src/utils/uniswap/FullMath.sol 36ms (unchanged)
95
+ src/utils/uniswap/LiquidityAmounts.sol 85ms (unchanged)
98
96
  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)
97
+ src/utils/uniswap/SafeCast.sol 20ms (unchanged)
98
+ src/utils/uniswap/SqrtPriceMath.sol 116ms (unchanged)
99
+ src/utils/uniswap/TickMath.sol 117ms (unchanged)
100
+ src/utils/uniswap/UnsafeMath.sol 3ms (unchanged)
103
101
  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)
102
+ src/ZoraFactoryImpl.sol 198ms (unchanged)
103
+ test/AutoSwapper.t.sol 87ms (unchanged)
104
+ test/Coin.t.sol 178ms (unchanged)
105
+ test/CoinRewardsV4.t.sol 15ms (unchanged)
106
+ test/CoinUniV4.t.sol 618ms (unchanged)
107
+ test/ContentCoinRewards.t.sol 216ms (unchanged)
108
+ test/CreatorCoin.t.sol 262ms (unchanged)
109
+ test/CreatorCoinRewards.t.sol 178ms (unchanged)
110
+ test/DeploymentHooks.t.sol 152ms (unchanged)
111
+ test/Factory.t.sol 150ms (unchanged)
112
+ test/HooksDeployment.t.sol 46ms (unchanged)
113
+ test/LiquidityMigration.t.sol 363ms (unchanged)
114
+ test/mocks/MockERC20.sol 6ms (unchanged)
115
+ test/MultiOwnable.t.sol 153ms (unchanged)
116
+ test/Upgrades.t.sol 176ms (unchanged)
117
+ test/utils/BaseTest.sol 263ms (unchanged)
118
+ test/utils/ContractAddresses.sol 3ms (unchanged)
119
+ test/utils/DeployedCoinVersionLookup.t.sol 70ms (unchanged)
120
+ test/utils/FeeEstimatorHook.sol 48ms (unchanged)
121
+ test/utils/ProtocolRewards.sol 561ms (unchanged)
122
+ test/utils/ProxyShim.sol 12ms (unchanged)
123
+ test/utils/RewardTestHelpers.sol 76ms (unchanged)
124
+ test/V4Liquidity.t.sol 132ms (unchanged)
125
+ test/ZoraHookRegistry.t.sol 237ms (unchanged)
126
126
  script/Deploy.s.sol 8ms (unchanged)
127
- script/DeployAutoSwapper.s.sol 12ms (unchanged)
128
- script/DeployDevFactory.s.sol 4ms (unchanged)
127
+ script/DeployAutoSwapper.s.sol 16ms (unchanged)
128
+ script/DeployDevFactory.s.sol 5ms (unchanged)
129
129
  script/DeployPostDeploymentHooks.s.sol 4ms (unchanged)
130
130
  script/DeployUpgradeGate.s.sol 5ms (unchanged)
131
131
  script/GenerateDeterministicParams.s.sol 20ms (unchanged)
132
- script/PrintRegisterUpgradePath.s.sol 13ms (unchanged)
133
- script/PrintUpgradeCommand.s.sol 5ms (unchanged)
134
- script/TestBackingCoinSwap.s.sol 63ms (unchanged)
135
- script/TestV4Swap.s.sol 65ms (unchanged)
132
+ script/PrintRegisterUpgradePath.s.sol 11ms (unchanged)
133
+ script/PrintUpgradeCommand.s.sol 3ms (unchanged)
134
+ script/TestBackingCoinSwap.s.sol 72ms (unchanged)
135
+ script/TestV4Swap.s.sol 67ms (unchanged)
136
136
  script/UpgradeCoinImpl.sol 7ms (unchanged)
137
- script/UpgradeFactoryImpl.s.sol 10ms (unchanged)
138
- script/UpgradeHooks.s.sol 7ms (unchanged)
137
+ script/UpgradeFactoryImpl.s.sol 9ms (unchanged)
138
+ script/UpgradeHooks.s.sol 6ms (unchanged)
139
139
  CLI Building entry: package/index.ts
140
140
  CLI Using tsconfig: tsconfig.json
141
141
  CLI tsup v8.4.0
@@ -144,9 +144,9 @@ script/UpgradeHooks.s.sol 7ms (unchanged)
144
144
  CLI Cleaning output folder
145
145
  CJS Build start
146
146
  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
147
+ ESM dist/index.js 130.77 KB
148
+ ESM dist/index.js.map 233.85 KB
149
+ ESM ⚡️ Build success in 86ms
150
+ CJS dist/index.cjs 132.20 KB
151
+ CJS dist/index.cjs.map 234.00 KB
152
+ CJS ⚡️ Build success in 88ms
package/CHANGELOG.md CHANGED
@@ -1,14 +1,53 @@
1
1
  # @zoralabs/coins
2
2
 
3
- ## 2.2.1
3
+ ## 2.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 7df94915: Enable buying initial supply when deploying creator coin and refactor factory internals
8
+
9
+ - Add new `deployCreatorCoin` overload with `postDeployHook` parameter that supports ETH transfers
10
+ - Refactored internal factory implementation to share more code between deployment methods
11
+ - Enables buying initial supply during creator coin deployment via post-deploy hooks
4
12
 
5
13
  ### Patch Changes
6
14
 
7
- - 7ec6134b: Flatten hooks into single hook implementation
15
+ - 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.
16
+ - 5093c5ef: Add bounds checking to prevent risky forced downcasting of currency deltas
17
+ - 9c6d241a: Fix ETH transfer failures in reward distribution when platform referrers cannot accept ETH
18
+
19
+ - Prevent swaps from reverting when platform referrers cannot accept ETH - in this case, the rewards are redirected to the protocol recipient as backup.
20
+ - Ensures coin functionality remains intact even with ETH-incompatible platform referrers
21
+
22
+ - 44a179b0: Flatten hooks into single hook implementation
8
23
 
9
24
  Consolidates multiple hook contracts into a single unified hook for simplified architecture and better maintainability.
10
25
 
11
- - ae9424ab: Ignore collecting from liquidity positions with empty fee growth
26
+ - d3808d55: Adjust creator coin vesting duration to account for leap years
27
+
28
+ - Changed CREATOR_VESTING_DURATION from 5 _ 365 days to 5 _ 365.25 days
29
+ - Addresses Cantina audit finding about 1.25 day shortfall in 5-year vesting period
30
+
31
+ - b571fe54: Consolidate and clarify coin constants
32
+
33
+ - Renamed `CREATOR_LAUNCH_REWARD` to `CONTENT_COIN_INITIAL_CREATOR_SUPPLY` for clarity
34
+ - Renamed `CREATOR_VESTING_SUPPLY` to `CREATOR_COIN_CREATOR_VESTING_SUPPLY` for consistency
35
+ - Removed redundant `POOL_LAUNCH_SUPPLY` constant (use `CONTENT_COIN_MARKET_SUPPLY` instead)
36
+ - Changed library constants from `public` to `internal`
37
+ - Made supply constants derived from calculations to show relationships clearly
38
+
39
+ - 32d683d6: Fix stale PoolKey mapping after migration in ZoraV4CoinHook
40
+
41
+ Delete the old pool key from the poolCoins mapping after successful liquidity migration to prevent future operations on migrated pools.
42
+
43
+ - 44a179b0: Ignore collecting from liquidity positions with empty fee growth
44
+ - 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.
45
+
46
+ ## 2.2.1
47
+
48
+ ### Patch Changes
49
+
50
+ - c96e0c5e: Fix bug where liquidity cannot be migrated if there is a position with 0 liquidity
12
51
 
13
52
  ## 2.2.0
14
53
 
@@ -25,7 +64,7 @@
25
64
 
26
65
  | Recipient | Before (3% total fee) | After (1% total fee) |
27
66
  | ----------------- | --------------------- | -------------------- |
28
- | | % of Fee | % of Fee |
67
+ | | % of Fee | % of Fee |
29
68
  | Creator | 33.33% | 50% |
30
69
  | Platform Referral | 10% | 20% |
31
70
  | Trade Referral | 10% | 4% |
@@ -37,7 +76,7 @@
37
76
 
38
77
  | Recipient | Before (3% total fee) | After (1% total fee) |
39
78
  | ----------------- | --------------------- | -------------------- |
40
- | | % of Fee | % of Fee |
79
+ | | % of Fee | % of Fee |
41
80
  | Creator | 33.33% | 50% |
42
81
  | Platform Referral | - | 20% |
43
82
  | Trade Referral | - | 4% |
package/README.md CHANGED
@@ -74,3 +74,7 @@ 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)
@@ -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",
@@ -1874,11 +1874,6 @@
1874
1874
  "name": "OwnerCannotBeAddressZero",
1875
1875
  "inputs": []
1876
1876
  },
1877
- {
1878
- "type": "error",
1879
- "name": "ReentrancyGuardReentrantCall",
1880
- "inputs": []
1881
- },
1882
1877
  {
1883
1878
  "type": "error",
1884
1879
  "name": "SlippageBoundsExceeded",
@@ -1981,11 +1981,6 @@
1981
1981
  "name": "OwnerCannotBeAddressZero",
1982
1982
  "inputs": []
1983
1983
  },
1984
- {
1985
- "type": "error",
1986
- "name": "ReentrancyGuardReentrantCall",
1987
- "inputs": []
1988
- },
1989
1984
  {
1990
1985
  "type": "error",
1991
1986
  "name": "SlippageBoundsExceeded",
@@ -1243,7 +1243,7 @@
1243
1243
  ]
1244
1244
  },
1245
1245
  {
1246
- "name": "",
1246
+ "name": "additionalData",
1247
1247
  "type": "bytes",
1248
1248
  "internalType": "bytes"
1249
1249
  }
@@ -1251,6 +1251,99 @@
1251
1251
  "outputs": [],
1252
1252
  "stateMutability": "nonpayable"
1253
1253
  },
1254
+ {
1255
+ "type": "function",
1256
+ "name": "initializeFromMigrationWithUpdateableFee",
1257
+ "inputs": [
1258
+ {
1259
+ "name": "poolKey",
1260
+ "type": "tuple",
1261
+ "internalType": "struct PoolKey",
1262
+ "components": [
1263
+ {
1264
+ "name": "currency0",
1265
+ "type": "address",
1266
+ "internalType": "Currency"
1267
+ },
1268
+ {
1269
+ "name": "currency1",
1270
+ "type": "address",
1271
+ "internalType": "Currency"
1272
+ },
1273
+ {
1274
+ "name": "fee",
1275
+ "type": "uint24",
1276
+ "internalType": "uint24"
1277
+ },
1278
+ {
1279
+ "name": "tickSpacing",
1280
+ "type": "int24",
1281
+ "internalType": "int24"
1282
+ },
1283
+ {
1284
+ "name": "hooks",
1285
+ "type": "address",
1286
+ "internalType": "contract IHooks"
1287
+ }
1288
+ ]
1289
+ },
1290
+ {
1291
+ "name": "coin",
1292
+ "type": "address",
1293
+ "internalType": "address"
1294
+ },
1295
+ {
1296
+ "name": "sqrtPriceX96",
1297
+ "type": "uint160",
1298
+ "internalType": "uint160"
1299
+ },
1300
+ {
1301
+ "name": "migratedLiquidity",
1302
+ "type": "tuple[]",
1303
+ "internalType": "struct BurnedPosition[]",
1304
+ "components": [
1305
+ {
1306
+ "name": "tickLower",
1307
+ "type": "int24",
1308
+ "internalType": "int24"
1309
+ },
1310
+ {
1311
+ "name": "tickUpper",
1312
+ "type": "int24",
1313
+ "internalType": "int24"
1314
+ },
1315
+ {
1316
+ "name": "amount0Received",
1317
+ "type": "uint128",
1318
+ "internalType": "uint128"
1319
+ },
1320
+ {
1321
+ "name": "amount1Received",
1322
+ "type": "uint128",
1323
+ "internalType": "uint128"
1324
+ }
1325
+ ]
1326
+ },
1327
+ {
1328
+ "name": "additionalData",
1329
+ "type": "bytes",
1330
+ "internalType": "bytes"
1331
+ }
1332
+ ],
1333
+ "outputs": [
1334
+ {
1335
+ "name": "fee",
1336
+ "type": "uint24",
1337
+ "internalType": "uint24"
1338
+ },
1339
+ {
1340
+ "name": "tickSpacing",
1341
+ "type": "int24",
1342
+ "internalType": "int24"
1343
+ }
1344
+ ],
1345
+ "stateMutability": "nonpayable"
1346
+ },
1254
1347
  {
1255
1348
  "type": "function",
1256
1349
  "name": "isTrustedMessageSender",
@@ -0,0 +1,95 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "initializeFromMigrationWithUpdateableFee",
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
+ {
83
+ "name": "fee",
84
+ "type": "uint24",
85
+ "internalType": "uint24"
86
+ },
87
+ {
88
+ "name": "tickSpacing",
89
+ "type": "int24",
90
+ "internalType": "int24"
91
+ }
92
+ ],
93
+ "stateMutability": "nonpayable"
94
+ }
95
+ ]
@@ -251,6 +251,75 @@
251
251
  ],
252
252
  "stateMutability": "nonpayable"
253
253
  },
254
+ {
255
+ "type": "function",
256
+ "name": "deployCreatorCoin",
257
+ "inputs": [
258
+ {
259
+ "name": "payoutRecipient",
260
+ "type": "address",
261
+ "internalType": "address"
262
+ },
263
+ {
264
+ "name": "owners",
265
+ "type": "address[]",
266
+ "internalType": "address[]"
267
+ },
268
+ {
269
+ "name": "uri",
270
+ "type": "string",
271
+ "internalType": "string"
272
+ },
273
+ {
274
+ "name": "name",
275
+ "type": "string",
276
+ "internalType": "string"
277
+ },
278
+ {
279
+ "name": "symbol",
280
+ "type": "string",
281
+ "internalType": "string"
282
+ },
283
+ {
284
+ "name": "poolConfig",
285
+ "type": "bytes",
286
+ "internalType": "bytes"
287
+ },
288
+ {
289
+ "name": "platformReferrer",
290
+ "type": "address",
291
+ "internalType": "address"
292
+ },
293
+ {
294
+ "name": "postDeployHook",
295
+ "type": "address",
296
+ "internalType": "address"
297
+ },
298
+ {
299
+ "name": "postDeployHookData",
300
+ "type": "bytes",
301
+ "internalType": "bytes"
302
+ },
303
+ {
304
+ "name": "coinSalt",
305
+ "type": "bytes32",
306
+ "internalType": "bytes32"
307
+ }
308
+ ],
309
+ "outputs": [
310
+ {
311
+ "name": "coin",
312
+ "type": "address",
313
+ "internalType": "address"
314
+ },
315
+ {
316
+ "name": "postDeployHookDataOut",
317
+ "type": "bytes",
318
+ "internalType": "bytes"
319
+ }
320
+ ],
321
+ "stateMutability": "payable"
322
+ },
254
323
  {
255
324
  "type": "function",
256
325
  "name": "deployWithHook",