@zoralabs/coins 2.4.1 → 2.6.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 (55) hide show
  1. package/.abi-stability +923 -0
  2. package/.turbo/turbo-build$colon$js.log +143 -129
  3. package/CHANGELOG.md +38 -16
  4. package/abis/BaseCoin.json +23 -0
  5. package/abis/ContentCoin.json +23 -0
  6. package/abis/CreatorCoin.json +18 -0
  7. package/abis/ICoin.json +5 -0
  8. package/abis/ICoinV3.json +5 -0
  9. package/abis/IHasCreationInfo.json +20 -0
  10. package/abis/ITrendCoin.json +130 -0
  11. package/abis/ITrendCoinErrors.json +23 -0
  12. package/abis/IUniversalRouter.json +61 -0
  13. package/abis/IZoraFactory.json +227 -0
  14. package/abis/TrendCoin.json +2043 -0
  15. package/abis/ZoraFactoryImpl.json +232 -0
  16. package/dist/index.cjs +962 -117
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.js +960 -117
  19. package/dist/index.js.map +1 -1
  20. package/dist/wagmiGenerated.d.ts +1404 -131
  21. package/dist/wagmiGenerated.d.ts.map +1 -1
  22. package/package/wagmiGenerated.ts +970 -119
  23. package/package.json +4 -2
  24. package/src/BaseCoin.sol +44 -14
  25. package/src/ContentCoin.sol +20 -1
  26. package/src/CreatorCoin.sol +3 -0
  27. package/src/TrendCoin.sol +117 -0
  28. package/src/ZoraFactoryImpl.sol +142 -1
  29. package/src/hooks/ZoraV4CoinHook.sol +73 -8
  30. package/src/interfaces/ICoin.sol +5 -1
  31. package/src/interfaces/ICreatorCoin.sol +0 -3
  32. package/src/interfaces/IHasCreationInfo.sol +12 -0
  33. package/src/interfaces/IPoolManager.sol +13 -0
  34. package/src/interfaces/ITrendCoin.sol +26 -0
  35. package/src/interfaces/ITrendCoinErrors.sol +18 -0
  36. package/src/interfaces/IZoraFactory.sol +60 -1
  37. package/src/libs/CoinConstants.sol +25 -1
  38. package/src/libs/CoinRewardsV4.sol +67 -19
  39. package/src/libs/CoinSetup.sol +7 -1
  40. package/src/libs/TickerUtils.sol +84 -0
  41. package/src/libs/UniV4SwapToCurrency.sol +2 -1
  42. package/src/libs/V3ToV4SwapLib.sol +7 -3
  43. package/src/version/ContractVersionBase.sol +1 -1
  44. package/test/CoinUniV4.t.sol +4 -0
  45. package/test/ContentCoinRewards.t.sol +1 -0
  46. package/test/CreatorCoin.t.sol +2 -1
  47. package/test/CreatorCoinRewards.t.sol +1 -0
  48. package/test/Factory.t.sol +31 -5
  49. package/test/LaunchFee.t.sol +284 -0
  50. package/test/LiquidityMigration.t.sol +0 -2
  51. package/test/TrendCoin.t.sol +1077 -0
  52. package/test/Upgrades.t.sol +16 -3
  53. package/test/utils/FeeEstimatorHook.sol +33 -8
  54. package/test/utils/V4TestSetup.sol +36 -4
  55. package/wagmi.config.ts +2 -0
@@ -1,18 +1,24 @@
1
1
 
2
- > @zoralabs/coins@2.4.1 build:js /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
2
+ > @zoralabs/coins@2.6.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.4.1 wagmi:generate /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
6
+ > @zoralabs/coins@2.6.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.4.1 build:contracts:minimal /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
10
+ > @zoralabs/coins@2.6.0 build:contracts:minimal /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
11
11
  > forge build src/ --no-metadata
12
12
 
13
- Compiling 183 files with Solc 0.8.28
14
- Solc 0.8.28 finished in 48.05s
15
- Compiler run successful!
13
+ Compiling 190 files with Solc 0.8.28
14
+ Solc 0.8.28 finished in 61.05s
15
+ Compiler run successful with warnings:
16
+ Warning (2018): Function state mutability can be restricted to pure
17
+ --> src/TrendCoin.sol:90:5:
18
+ |
19
+ 90 | function initialize(
20
+ | ^ (Relevant source part starts here and spans across multiple lines).
21
+
16
22
  - Validating plugins
17
23
  ✔ Validating plugins
18
24
  - Resolving contracts
@@ -23,140 +29,148 @@ Compiler run successful!
23
29
  ✔ Writing to package/wagmiGenerated.ts
24
30
  🔄 Processing 1 file(s) to replace 'Abi' with 'ABI'...
25
31
  📝 Processing ./package/wagmiGenerated.ts...
26
- ✅ Updated ./package/wagmiGenerated.ts (10 replacements)
32
+ ✅ Updated ./package/wagmiGenerated.ts (12 replacements)
27
33
  ✨ All files processed successfully!
28
34
 
29
- > @zoralabs/coins@2.4.1 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
35
+ > @zoralabs/coins@2.6.0 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.4.1 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
39
+ > @zoralabs/coins@2.6.0 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
34
40
  > prettier --write 'src/**/*.sol' 'test/**/*.sol'
35
41
 
36
- src/BaseCoin.sol 1004ms (unchanged)
37
- src/ContentCoin.sol 104ms (unchanged)
38
- src/CreatorCoin.sol 146ms (unchanged)
39
- src/deployment/ForkedCoinsAddresses.sol 27ms (unchanged)
40
- src/hook-registry/ZoraHookRegistry.sol 265ms (unchanged)
41
- src/hooks/deployment/BaseCoinDeployHook.sol 73ms (unchanged)
42
- src/hooks/deployment/BuySupplyWithSwapRouterHook.sol 479ms (unchanged)
43
- src/hooks/deployment/BuySupplyWithV4SwapHook.sol 289ms (unchanged)
44
- src/hooks/HookUpgradeGate.sol 66ms (unchanged)
45
- src/hooks/ZoraV4CoinHook.sol 499ms
46
- src/interfaces/IAirlock.sol 2ms (unchanged)
47
- src/interfaces/ICoin.sol 44ms (unchanged)
48
- src/interfaces/ICoinComments.sol 2ms (unchanged)
49
- src/interfaces/ICoinDeployHook.sol 3ms (unchanged)
50
- src/interfaces/ICoinV3.sol 10ms (unchanged)
51
- src/interfaces/ICreatorCoin.sol 2ms (unchanged)
52
- src/interfaces/ICreatorCoinHook.sol 2ms (unchanged)
53
- src/interfaces/IDeployedCoinVersionLookup.sol 2ms (unchanged)
54
- src/interfaces/IDopplerErrors.sol 2ms (unchanged)
55
- src/interfaces/IERC7572.sol 2ms (unchanged)
56
- src/interfaces/IHasRewardsRecipients.sol 2ms (unchanged)
57
- src/interfaces/IHooksUpgradeGate.sol 5ms (unchanged)
58
- src/interfaces/IMsgSender.sol 2ms (unchanged)
59
- src/interfaces/INonfungiblePositionManager.sol 13ms (unchanged)
60
- src/interfaces/IPoolConfigEncoding.sol 2ms (unchanged)
61
- src/interfaces/IProtocolRewards.sol 8ms (unchanged)
62
- src/interfaces/ISupportsLimitOrderFill.sol 4ms (unchanged)
63
- src/interfaces/ISwapPathRouter.sol 2ms (unchanged)
64
- src/interfaces/ISwapRouter.sol 1ms (unchanged)
65
- src/interfaces/ITrustedMsgSenderProviderLookup.sol 2ms (unchanged)
66
- src/interfaces/IUniswapV3Factory.sol 11ms (unchanged)
67
- src/interfaces/IUniswapV3Pool.sol 9ms (unchanged)
68
- src/interfaces/IUniswapV3SwapCallback.sol 3ms (unchanged)
69
- src/interfaces/IUpgradeableV4Hook.sol 4ms (unchanged)
70
- src/interfaces/IWETH.sol 2ms (unchanged)
71
- src/interfaces/IZoraFactory.sol 31ms (unchanged)
72
- src/interfaces/IZoraHookRegistry.sol 9ms (unchanged)
73
- src/interfaces/IZoraLimitOrderBookCoinsInterface.sol 4ms (unchanged)
74
- src/interfaces/IZoraV4CoinHook.sol 13ms (unchanged)
75
- src/libs/CoinCommon.sol 13ms (unchanged)
76
- src/libs/CoinConfigurationVersions.sol 116ms (unchanged)
77
- src/libs/CoinConstants.sol 18ms (unchanged)
78
- src/libs/CoinDopplerMultiCurve.sol 309ms (unchanged)
79
- src/libs/CoinRewardsV4.sol 327ms (unchanged)
80
- src/libs/CoinSetup.sol 78ms (unchanged)
81
- src/libs/DopplerMath.sol 287ms (unchanged)
82
- src/libs/HooksDeployment.sol 247ms (unchanged)
83
- src/libs/PoolStateReader.sol 6ms (unchanged)
84
- src/libs/UniV4SwapHelper.sol 187ms (unchanged)
85
- src/libs/UniV4SwapToCurrency.sol 99ms (unchanged)
86
- src/libs/V3ToV4SwapLib.sol 200ms (unchanged)
87
- src/libs/V4Liquidity.sol 577ms (unchanged)
88
- src/proxy/ZoraFactory.sol 17ms (unchanged)
89
- src/types/LpPosition.sol 1ms (unchanged)
90
- src/types/PoolConfiguration.sol 1ms (unchanged)
91
- src/types/PoolState.sol 2ms (unchanged)
92
- src/utils/AutoSwapper.sol 59ms (unchanged)
93
- src/utils/DeployedCoinVersionLookup.sol 17ms (unchanged)
94
- src/utils/MultiOwnable.sol 132ms (unchanged)
95
- src/utils/ProxyShim.sol 10ms (unchanged)
96
- src/utils/TrustedMsgSenderProviderLookup.sol 76ms (unchanged)
97
- src/utils/uniswap/BitMath.sol 18ms (unchanged)
98
- src/utils/uniswap/CustomRevert.sol 102ms (unchanged)
99
- src/utils/uniswap/FixedPoint96.sol 2ms (unchanged)
100
- src/utils/uniswap/FullMath.sol 71ms (unchanged)
101
- src/utils/uniswap/LiquidityAmounts.sol 156ms (unchanged)
102
- src/utils/uniswap/SafeCast.sol 44ms (unchanged)
103
- src/utils/uniswap/SqrtPriceMath.sol 199ms (unchanged)
104
- src/utils/uniswap/TickMath.sol 166ms (unchanged)
105
- src/utils/uniswap/UnsafeMath.sol 5ms (unchanged)
106
- src/version/ContractVersionBase.sol 2ms (unchanged)
107
- src/ZoraFactoryImpl.sol 328ms (unchanged)
108
- test/AutoSwapper.t.sol 113ms (unchanged)
109
- test/BuySupplyWithV4SwapHook.t.sol 409ms (unchanged)
110
- test/Coin.t.sol 430ms (unchanged)
111
- test/CoinRewardsV4.t.sol 33ms (unchanged)
112
- test/CoinUniV4.t.sol 1210ms (unchanged)
113
- test/ContentCoinRewards.t.sol 337ms (unchanged)
114
- test/CreatorCoin.t.sol 550ms (unchanged)
115
- test/CreatorCoinRewards.t.sol 363ms (unchanged)
116
- test/DeploymentHooks.t.sol 305ms (unchanged)
117
- test/Factory.t.sol 422ms (unchanged)
118
- test/HooksDeployment.t.sol 211ms (unchanged)
119
- test/LiquidityMigration.t.sol 400ms (unchanged)
120
- test/mocks/MockAirlock.sol 5ms (unchanged)
121
- test/mocks/MockERC20.sol 3ms (unchanged)
122
- test/mocks/MockSwapRouter.sol 4ms (unchanged)
123
- test/mocks/MockZoraLimitOrderBook.sol 2ms (unchanged)
124
- test/mocks/SimpleERC20.sol 5ms (unchanged)
125
- test/MultiOwnable.t.sol 147ms (unchanged)
126
- test/TrustedMsgSenderProviderLookup.t.sol 83ms (unchanged)
127
- test/Upgrades.t.sol 141ms (unchanged)
128
- test/utils/BaseTest.sol 33ms (unchanged)
129
- test/utils/ContractAddresses.sol 3ms (unchanged)
130
- test/utils/DeployedCoinVersionLookup.t.sol 63ms (unchanged)
131
- test/utils/FeeEstimatorHook.sol 47ms (unchanged)
132
- test/utils/hookmate/artifacts/DeployHelper.sol 10ms (unchanged)
133
- test/utils/hookmate/artifacts/Permit2.sol 8ms (unchanged)
134
- test/utils/hookmate/artifacts/UniversalRouter.sol 7ms (unchanged)
135
- test/utils/hookmate/artifacts/V4PoolManager.sol 14ms (unchanged)
136
- test/utils/hookmate/artifacts/V4PositionManager.sol 13ms (unchanged)
137
- test/utils/hookmate/artifacts/V4Quoter.sol 6ms (unchanged)
138
- test/utils/hookmate/artifacts/V4Router.sol 7ms (unchanged)
139
- test/utils/hookmate/constants/AddressConstants.sol 74ms (unchanged)
140
- test/utils/hookmate/interfaces/router/IUniswapV4Router04.sol 9ms (unchanged)
141
- test/utils/hookmate/interfaces/router/PathKey.sol 17ms (unchanged)
142
- test/utils/hookmate/test/utils/SwapFeeEventAsserter.sol 18ms (unchanged)
143
- test/utils/ProtocolRewards.sol 480ms (unchanged)
144
- test/utils/RewardTestHelpers.sol 87ms (unchanged)
145
- test/utils/TrustedSenderTestHelper.sol 4ms (unchanged)
146
- test/utils/V4TestSetup.sol 422ms (unchanged)
147
- test/V4Liquidity.t.sol 112ms (unchanged)
148
- test/ZoraHookRegistry.t.sol 243ms (unchanged)
42
+ src/BaseCoin.sol 1133ms (unchanged)
43
+ src/ContentCoin.sol 175ms (unchanged)
44
+ src/CreatorCoin.sol 156ms (unchanged)
45
+ src/deployment/ForkedCoinsAddresses.sol 34ms (unchanged)
46
+ src/hook-registry/ZoraHookRegistry.sol 178ms (unchanged)
47
+ src/hooks/deployment/BaseCoinDeployHook.sol 69ms (unchanged)
48
+ src/hooks/deployment/BuySupplyWithSwapRouterHook.sol 265ms (unchanged)
49
+ src/hooks/deployment/BuySupplyWithV4SwapHook.sol 154ms (unchanged)
50
+ src/hooks/HookUpgradeGate.sol 40ms (unchanged)
51
+ src/hooks/ZoraV4CoinHook.sol 323ms
52
+ src/interfaces/IAirlock.sol 4ms (unchanged)
53
+ src/interfaces/ICoin.sol 22ms (unchanged)
54
+ src/interfaces/ICoinComments.sol 3ms (unchanged)
55
+ src/interfaces/ICoinDeployHook.sol 2ms (unchanged)
56
+ src/interfaces/ICoinV3.sol 8ms (unchanged)
57
+ src/interfaces/ICreatorCoin.sol 5ms (unchanged)
58
+ src/interfaces/ICreatorCoinHook.sol 4ms (unchanged)
59
+ src/interfaces/IDeployedCoinVersionLookup.sol 2ms (unchanged)
60
+ src/interfaces/IDopplerErrors.sol 2ms (unchanged)
61
+ src/interfaces/IERC7572.sol 1ms (unchanged)
62
+ src/interfaces/IHasCreationInfo.sol 1ms (unchanged)
63
+ src/interfaces/IHasRewardsRecipients.sol 2ms (unchanged)
64
+ src/interfaces/IHooksUpgradeGate.sol 4ms (unchanged)
65
+ src/interfaces/IMsgSender.sol 1ms (unchanged)
66
+ src/interfaces/INonfungiblePositionManager.sol 8ms (unchanged)
67
+ src/interfaces/IPoolConfigEncoding.sol 2ms (unchanged)
68
+ src/interfaces/IPoolManager.sol 1ms (unchanged)
69
+ src/interfaces/IProtocolRewards.sol 5ms (unchanged)
70
+ src/interfaces/ISupportsLimitOrderFill.sol 1ms (unchanged)
71
+ src/interfaces/ISwapPathRouter.sol 2ms (unchanged)
72
+ src/interfaces/ISwapRouter.sol 1ms (unchanged)
73
+ src/interfaces/ITrendCoin.sol 2ms (unchanged)
74
+ src/interfaces/ITrendCoinErrors.sol 1ms (unchanged)
75
+ src/interfaces/ITrustedMsgSenderProviderLookup.sol 2ms (unchanged)
76
+ src/interfaces/IUniswapV3Factory.sol 5ms (unchanged)
77
+ src/interfaces/IUniswapV3Pool.sol 12ms (unchanged)
78
+ src/interfaces/IUniswapV3SwapCallback.sol 2ms (unchanged)
79
+ src/interfaces/IUpgradeableV4Hook.sol 4ms (unchanged)
80
+ src/interfaces/IWETH.sol 6ms (unchanged)
81
+ src/interfaces/IZoraFactory.sol 27ms (unchanged)
82
+ src/interfaces/IZoraHookRegistry.sol 4ms (unchanged)
83
+ src/interfaces/IZoraLimitOrderBookCoinsInterface.sol 2ms (unchanged)
84
+ src/interfaces/IZoraV4CoinHook.sol 16ms (unchanged)
85
+ src/libs/CoinCommon.sol 17ms (unchanged)
86
+ src/libs/CoinConfigurationVersions.sol 84ms (unchanged)
87
+ src/libs/CoinConstants.sol 37ms (unchanged)
88
+ src/libs/CoinDopplerMultiCurve.sol 184ms (unchanged)
89
+ src/libs/CoinRewardsV4.sol 211ms
90
+ src/libs/CoinSetup.sol 44ms (unchanged)
91
+ src/libs/DopplerMath.sol 167ms (unchanged)
92
+ src/libs/HooksDeployment.sol 128ms (unchanged)
93
+ src/libs/PoolStateReader.sol 6ms (unchanged)
94
+ src/libs/TickerUtils.sol 44ms
95
+ src/libs/UniV4SwapHelper.sol 138ms (unchanged)
96
+ src/libs/UniV4SwapToCurrency.sol 90ms
97
+ src/libs/V3ToV4SwapLib.sol 123ms (unchanged)
98
+ src/libs/V4Liquidity.sol 337ms (unchanged)
99
+ src/proxy/ZoraFactory.sol 10ms (unchanged)
100
+ src/TrendCoin.sol 39ms (unchanged)
101
+ src/types/LpPosition.sol 1ms (unchanged)
102
+ src/types/PoolConfiguration.sol 1ms (unchanged)
103
+ src/types/PoolState.sol 2ms (unchanged)
104
+ src/utils/AutoSwapper.sol 37ms (unchanged)
105
+ src/utils/DeployedCoinVersionLookup.sol 8ms (unchanged)
106
+ src/utils/MultiOwnable.sol 66ms (unchanged)
107
+ src/utils/ProxyShim.sol 5ms (unchanged)
108
+ src/utils/TrustedMsgSenderProviderLookup.sol 38ms (unchanged)
109
+ src/utils/uniswap/BitMath.sol 10ms (unchanged)
110
+ src/utils/uniswap/CustomRevert.sol 57ms (unchanged)
111
+ src/utils/uniswap/FixedPoint96.sol 2ms (unchanged)
112
+ src/utils/uniswap/FullMath.sol 34ms (unchanged)
113
+ src/utils/uniswap/LiquidityAmounts.sol 78ms (unchanged)
114
+ src/utils/uniswap/SafeCast.sol 20ms (unchanged)
115
+ src/utils/uniswap/SqrtPriceMath.sol 109ms (unchanged)
116
+ src/utils/uniswap/TickMath.sol 114ms (unchanged)
117
+ src/utils/uniswap/UnsafeMath.sol 3ms (unchanged)
118
+ src/version/ContractVersionBase.sol 2ms (unchanged)
119
+ src/ZoraFactoryImpl.sol 294ms (unchanged)
120
+ test/AutoSwapper.t.sol 68ms (unchanged)
121
+ test/BuySupplyWithV4SwapHook.t.sol 263ms (unchanged)
122
+ test/Coin.t.sol 252ms (unchanged)
123
+ test/CoinRewardsV4.t.sol 15ms (unchanged)
124
+ test/CoinUniV4.t.sol 688ms (unchanged)
125
+ test/ContentCoinRewards.t.sol 231ms (unchanged)
126
+ test/CreatorCoin.t.sol 255ms (unchanged)
127
+ test/CreatorCoinRewards.t.sol 193ms (unchanged)
128
+ test/DeploymentHooks.t.sol 145ms (unchanged)
129
+ test/Factory.t.sol 160ms
130
+ test/HooksDeployment.t.sol 102ms (unchanged)
131
+ test/LaunchFee.t.sol 189ms (unchanged)
132
+ test/LiquidityMigration.t.sol 375ms (unchanged)
133
+ test/mocks/MockAirlock.sol 6ms (unchanged)
134
+ test/mocks/MockERC20.sol 8ms (unchanged)
135
+ test/mocks/MockSwapRouter.sol 10ms (unchanged)
136
+ test/mocks/MockZoraLimitOrderBook.sol 2ms (unchanged)
137
+ test/mocks/SimpleERC20.sol 4ms (unchanged)
138
+ test/MultiOwnable.t.sol 156ms (unchanged)
139
+ test/TrendCoin.t.sol 740ms
140
+ test/TrustedMsgSenderProviderLookup.t.sol 95ms (unchanged)
141
+ test/Upgrades.t.sol 148ms
142
+ test/utils/BaseTest.sol 34ms (unchanged)
143
+ test/utils/ContractAddresses.sol 6ms (unchanged)
144
+ test/utils/DeployedCoinVersionLookup.t.sol 70ms (unchanged)
145
+ test/utils/FeeEstimatorHook.sol 68ms
146
+ test/utils/hookmate/artifacts/DeployHelper.sol 9ms (unchanged)
147
+ test/utils/hookmate/artifacts/Permit2.sol 6ms (unchanged)
148
+ test/utils/hookmate/artifacts/UniversalRouter.sol 8ms (unchanged)
149
+ test/utils/hookmate/artifacts/V4PoolManager.sol 8ms (unchanged)
150
+ test/utils/hookmate/artifacts/V4PositionManager.sol 12ms (unchanged)
151
+ test/utils/hookmate/artifacts/V4Quoter.sol 7ms (unchanged)
152
+ test/utils/hookmate/artifacts/V4Router.sol 8ms (unchanged)
153
+ test/utils/hookmate/constants/AddressConstants.sol 66ms (unchanged)
154
+ test/utils/hookmate/interfaces/router/IUniswapV4Router04.sol 10ms (unchanged)
155
+ test/utils/hookmate/interfaces/router/PathKey.sol 28ms (unchanged)
156
+ test/utils/hookmate/test/utils/SwapFeeEventAsserter.sol 17ms (unchanged)
157
+ test/utils/ProtocolRewards.sol 532ms (unchanged)
158
+ test/utils/RewardTestHelpers.sol 89ms (unchanged)
159
+ test/utils/TrustedSenderTestHelper.sol 6ms (unchanged)
160
+ test/utils/V4TestSetup.sol 452ms (unchanged)
161
+ test/V4Liquidity.t.sol 149ms (unchanged)
162
+ test/ZoraHookRegistry.t.sol 246ms (unchanged)
149
163
  CLI Building entry: package/index.ts
150
164
  CLI Using tsconfig: tsconfig.json
151
- CLI tsup v8.4.0
165
+ CLI tsup v8.5.1
152
166
  CLI Using tsup config: /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins/tsup.config.ts
153
167
  CLI Target: es2021
154
168
  CLI Cleaning output folder
155
169
  CJS Build start
156
170
  ESM Build start
157
- CJS dist/index.cjs 164.42 KB
158
- CJS dist/index.cjs.map 288.61 KB
159
- CJS ⚡️ Build success in 82ms
160
- ESM dist/index.js 163.01 KB
161
- ESM dist/index.js.map 288.46 KB
162
- ESM ⚡️ Build success in 83ms
171
+ ESM dist/index.js 186.86 KB
172
+ ESM dist/index.js.map 331.50 KB
173
+ ESM ⚡️ Build success in 96ms
174
+ CJS dist/index.cjs 188.36 KB
175
+ CJS dist/index.cjs.map 331.66 KB
176
+ CJS ⚡️ Build success in 96ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # @zoralabs/coins
2
2
 
3
+ ## 2.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 50134ebc: Add TrendCoin support
8
+ - New `TrendCoin` contract: 100% supply in liquidity pool, 0% swap fees
9
+ - `deployTrendCoin` factory method with ticker uniqueness enforcement and post-deploy hook support
10
+ - Owner-configurable pool parameters via `setTrendCoinPoolConfig()`
11
+ - Metadata manager role for updatable contract URIs
12
+ - Ticker validation and URI encoding for trend coin symbols
13
+
14
+ ## 2.5.1
15
+
16
+ ### Patch Changes
17
+
18
+ - 78dffbdc: Including uniswap v4 errors in lob and swap router abis, and including some uniswap v4 contracts and abis.
19
+ - 1ccca8ef: Fix swap fee distribution when price limits cause partial execution
20
+
21
+ When swapping large fee amounts, swaps can hit sqrtPriceLimit and only partially execute, leaving unsettled currency deltas. The hook now checks all currencies in the payout swap path (both the input currency and all intermediates) and takes/distributes any positive deltas as rewards. This ensures all collected fees are properly distributed even when swaps don't fully execute due to price constraints.
22
+
23
+ ## 2.5.0
24
+
25
+ ### Minor Changes
26
+
27
+ - 816ceb35: Add launch fee: time-based dynamic fee that decays from 99% to 1% over 10 seconds after coin creation
28
+ - New coins record creation timestamp and expose it via `IHasCreationInfo` interface
29
+ - Hook calculates dynamic fee based on elapsed time since creation
30
+ - Initial supply purchase bypasses the fee via transient storage flag
31
+ - Legacy coins without the interface receive normal 1% LP fee
32
+
33
+ ## 2.4.2
34
+
35
+ ### Patch Changes
36
+
37
+ - 479df7f0: Fix ETH settlement by adding missing sync before settle in V3ToV4SwapLib
38
+
39
+ Added a `poolManager.sync(inputCurrency)` call before settling when the input currency is ETH. This ensures the pool state is properly synchronized before the settlement occurs, making the behavior consistent with the ERC20 handling path which already includes this sync step.
40
+
3
41
  ## 2.4.1
4
42
 
5
43
  ### Patch Changes
@@ -21,7 +59,6 @@
21
59
  Previously, the `burnPositions()` function was incorrectly adding `feesAccrued` to `callerDelta` when recording burned position amounts. Since `callerDelta` already includes accrued fees, this caused fees to be double-counted. This resulted in inflated token amounts being recorded in `BurnedPosition` structs, which could lead to `ERC20InsufficientBalance` errors when attempting to mint positions on a new hook during migration.
22
60
 
23
61
  The fix:
24
-
25
62
  - Use only `callerDelta` values directly without adding `feesAccrued`
26
63
  - Add defensive balance checking in `mintPositions()` to cap liquidity at available token amounts
27
64
  - Prevents migration failures from any remaining rounding discrepancies between burn and mint operations
@@ -41,7 +78,6 @@
41
78
  ### Minor Changes
42
79
 
43
80
  - 7df94915: Enable buying initial supply when deploying creator coin and refactor factory internals
44
-
45
81
  - Add new `deployCreatorCoin` overload with `postDeployHook` parameter that supports ETH transfers
46
82
  - Refactored internal factory implementation to share more code between deployment methods
47
83
  - Enables buying initial supply during creator coin deployment via post-deploy hooks
@@ -51,7 +87,6 @@
51
87
  - 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.
52
88
  - 5093c5ef: Add bounds checking to prevent risky forced downcasting of currency deltas
53
89
  - 9c6d241a: Fix ETH transfer failures in reward distribution when platform referrers cannot accept ETH
54
-
55
90
  - Prevent swaps from reverting when platform referrers cannot accept ETH - in this case, the rewards are redirected to the protocol recipient as backup.
56
91
  - Ensures coin functionality remains intact even with ETH-incompatible platform referrers
57
92
 
@@ -60,12 +95,10 @@
60
95
  Consolidates multiple hook contracts into a single unified hook for simplified architecture and better maintainability.
61
96
 
62
97
  - d3808d55: Adjust creator coin vesting duration to account for leap years
63
-
64
98
  - Changed CREATOR*VESTING_DURATION from 5 * 365 days to 5 \_ 365.25 days
65
99
  - Addresses Cantina audit finding about 1.25 day shortfall in 5-year vesting period
66
100
 
67
101
  - b571fe54: Consolidate and clarify coin constants
68
-
69
102
  - Renamed `CREATOR_LAUNCH_REWARD` to `CONTENT_COIN_INITIAL_CREATOR_SUPPLY` for clarity
70
103
  - Renamed `CREATOR_VESTING_SUPPLY` to `CREATOR_COIN_CREATOR_VESTING_SUPPLY` for consistency
71
104
  - Removed redundant `POOL_LAUNCH_SUPPLY` constant (use `CONTENT_COIN_MARKET_SUPPLY` instead)
@@ -92,7 +125,6 @@
92
125
  - adf98059: Adds platform referral and trade referral functionality to creator coins, and unifies the fee structure between content and creator coins with a simplified 1% total fee.
93
126
 
94
127
  ## New Features:
95
-
96
128
  - Platform referral and trade referral functionality for creator coins (previously only supported on content coins)
97
129
  - Unified fee structure: Both content and creator coins use identical 1% fee distribution
98
130
 
@@ -121,11 +153,9 @@
121
153
  | LP Rewards | 33.33% | 20% |
122
154
 
123
155
  **Implementation Changes:**
124
-
125
156
  - Consolidated reward logic into `CoinRewardsV4.distributeMarketRewards()`
126
157
 
127
158
  **Backwards Compatibility:**
128
-
129
159
  - Existing `CreatorCoinRewards` event is still emitted for backwards compatibility when rewards are distributed for a CreatorCoin
130
160
  - Additionally, when market rewards are distributed for a CreatorCoin, the same `CoinMarketRewardsV4` event that is already emitted for ContentCoins is now also emitted
131
161
 
@@ -148,7 +178,6 @@
148
178
  - dac72691: Remove Uniswap V3 support and refactor coin architecture
149
179
 
150
180
  **Removal of V3 Support:**
151
-
152
181
  - Removed support for creating coins based on Uniswap V3 - only V4 coins are supported
153
182
  - Default coin deployment now creates Uniswap V4 coins when no config is provided (previously created V3)
154
183
  - Removed V3-specific test files and utilities
@@ -157,7 +186,6 @@
157
186
  - Added revert logic for V3 deployment attempts in factory deploy functions
158
187
 
159
188
  **Architecture Refactoring:**
160
-
161
189
  - Merged BaseCoinV4 functionality into BaseCoin.sol to consolidate Uniswap V4 integration
162
190
  - Combined ICoinV4 interface with ICoin interface to simplify the interface hierarchy
163
191
  - Updated ContentCoin and CreatorCoin to inherit directly from BaseCoin
@@ -178,7 +206,6 @@
178
206
  This change updates the factory contract to use Ownable2StepUpgradeable instead of OwnableUpgradeable. The change maintains storage slot compatibility while adding the two-step ownership transfer pattern for enhanced security.
179
207
 
180
208
  Key changes:
181
-
182
209
  - ZoraFactoryImpl now inherits from Ownable2StepUpgradeable
183
210
  - Adds pendingOwner() function
184
211
  - Requires acceptOwnership() call to complete ownership transfers
@@ -231,7 +258,6 @@
231
258
  - 73e95f69: Upgraded coins to use Uniswap V4:
232
259
 
233
260
  **New CoinV4 Implementation:**
234
-
235
261
  - Migrated from Uniswap V3 to Uniswap V4, with logic moved into a hook.
236
262
  - Automatic LP fee collection and multi-hop reward distribution on every swap
237
263
  - New `ZoraV4CoinHook` handles afterSwap operations
@@ -239,25 +265,21 @@
239
265
  - Multi-hop fee swapping through intermediate currencies (e.g., ContentCoin → BackingCoin → Zora)
240
266
 
241
267
  **Factory Updates:**
242
-
243
268
  - Updated `deploy()` function signature with new `poolConfig`, `message`, and `salt` parameters
244
269
  - Automatic V3/V4 version selection based on pool configuration
245
270
  - Deterministic coin deployment with salt support
246
271
  - New `CoinCreatedV4` event for V4 coin deployments
247
272
 
248
273
  **Reward System Changes:**
249
-
250
274
  - Increased trade referral rewards from 10% to 15% (1500 basis points)
251
275
  - Automatic reward distribution in single backing currency
252
276
 
253
277
  **New Interfaces and Events:**
254
-
255
278
  - Added `IHasPoolKey` and `IHasSwapPath` interfaces for V4 functionality
256
279
  - New `Swapped` event with detailed swap and price information
257
280
  - New `CoinMarketRewardsV4` event for reward distribution tracking
258
281
 
259
282
  **Breaking Changes:**
260
-
261
283
  - New deterministic factory deploy function with salt
262
284
 
263
285
  ### Patch Changes
@@ -170,6 +170,24 @@
170
170
  ],
171
171
  "stateMutability": "pure"
172
172
  },
173
+ {
174
+ "type": "function",
175
+ "name": "creationInfo",
176
+ "inputs": [],
177
+ "outputs": [
178
+ {
179
+ "name": "creationTimestamp",
180
+ "type": "uint256",
181
+ "internalType": "uint256"
182
+ },
183
+ {
184
+ "name": "isDeploying",
185
+ "type": "bool",
186
+ "internalType": "bool"
187
+ }
188
+ ],
189
+ "stateMutability": "view"
190
+ },
173
191
  {
174
192
  "type": "function",
175
193
  "name": "currency",
@@ -1720,6 +1738,11 @@
1720
1738
  }
1721
1739
  ]
1722
1740
  },
1741
+ {
1742
+ "type": "error",
1743
+ "name": "InvalidCurrency",
1744
+ "inputs": []
1745
+ },
1723
1746
  {
1724
1747
  "type": "error",
1725
1748
  "name": "InvalidCurrencyLowerTick",
@@ -196,6 +196,24 @@
196
196
  ],
197
197
  "stateMutability": "pure"
198
198
  },
199
+ {
200
+ "type": "function",
201
+ "name": "creationInfo",
202
+ "inputs": [],
203
+ "outputs": [
204
+ {
205
+ "name": "creationTimestamp",
206
+ "type": "uint256",
207
+ "internalType": "uint256"
208
+ },
209
+ {
210
+ "name": "isDeploying",
211
+ "type": "bool",
212
+ "internalType": "bool"
213
+ }
214
+ ],
215
+ "stateMutability": "view"
216
+ },
199
217
  {
200
218
  "type": "function",
201
219
  "name": "currency",
@@ -1746,6 +1764,11 @@
1746
1764
  }
1747
1765
  ]
1748
1766
  },
1767
+ {
1768
+ "type": "error",
1769
+ "name": "InvalidCurrency",
1770
+ "inputs": []
1771
+ },
1749
1772
  {
1750
1773
  "type": "error",
1751
1774
  "name": "InvalidCurrencyLowerTick",
@@ -209,6 +209,24 @@
209
209
  ],
210
210
  "stateMutability": "pure"
211
211
  },
212
+ {
213
+ "type": "function",
214
+ "name": "creationInfo",
215
+ "inputs": [],
216
+ "outputs": [
217
+ {
218
+ "name": "creationTimestamp",
219
+ "type": "uint256",
220
+ "internalType": "uint256"
221
+ },
222
+ {
223
+ "name": "isDeploying",
224
+ "type": "bool",
225
+ "internalType": "bool"
226
+ }
227
+ ],
228
+ "stateMutability": "view"
229
+ },
212
230
  {
213
231
  "type": "function",
214
232
  "name": "currency",
package/abis/ICoin.json CHANGED
@@ -968,6 +968,11 @@
968
968
  "name": "InsufficientLiquidity",
969
969
  "inputs": []
970
970
  },
971
+ {
972
+ "type": "error",
973
+ "name": "InvalidCurrency",
974
+ "inputs": []
975
+ },
971
976
  {
972
977
  "type": "error",
973
978
  "name": "InvalidCurrencyLowerTick",
package/abis/ICoinV3.json CHANGED
@@ -1225,6 +1225,11 @@
1225
1225
  "name": "InsufficientLiquidity",
1226
1226
  "inputs": []
1227
1227
  },
1228
+ {
1229
+ "type": "error",
1230
+ "name": "InvalidCurrency",
1231
+ "inputs": []
1232
+ },
1228
1233
  {
1229
1234
  "type": "error",
1230
1235
  "name": "InvalidCurrencyLowerTick",
@@ -0,0 +1,20 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "creationInfo",
5
+ "inputs": [],
6
+ "outputs": [
7
+ {
8
+ "name": "creationTimestamp",
9
+ "type": "uint256",
10
+ "internalType": "uint256"
11
+ },
12
+ {
13
+ "name": "isDeploying",
14
+ "type": "bool",
15
+ "internalType": "bool"
16
+ }
17
+ ],
18
+ "stateMutability": "view"
19
+ }
20
+ ]