@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
@@ -1,17 +1,17 @@
1
1
 
2
- > @zoralabs/coins@2.5.0 build:js /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
2
+ > @zoralabs/coins@2.6.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.5.0 wagmi:generate /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
6
+ > @zoralabs/coins@2.6.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.5.0 build:contracts:minimal /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
10
+ > @zoralabs/coins@2.6.1 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 184 files with Solc 0.8.28
14
- Solc 0.8.28 finished in 46.32s
13
+ Compiling 190 files with Solc 0.8.28
14
+ Solc 0.8.28 finished in 55.00s
15
15
  Compiler run successful!
16
16
  - Validating plugins
17
17
  ✔ Validating plugins
@@ -23,142 +23,148 @@ Compiler run successful!
23
23
  ✔ Writing to package/wagmiGenerated.ts
24
24
  🔄 Processing 1 file(s) to replace 'Abi' with 'ABI'...
25
25
  📝 Processing ./package/wagmiGenerated.ts...
26
- ✅ Updated ./package/wagmiGenerated.ts (10 replacements)
26
+ ✅ Updated ./package/wagmiGenerated.ts (12 replacements)
27
27
  ✨ All files processed successfully!
28
28
 
29
- > @zoralabs/coins@2.5.0 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
29
+ > @zoralabs/coins@2.6.1 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.5.0 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
33
+ > @zoralabs/coins@2.6.1 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
34
34
  > prettier --write 'src/**/*.sol' 'test/**/*.sol'
35
35
 
36
- src/BaseCoin.sol 796ms (unchanged)
37
- src/ContentCoin.sol 73ms (unchanged)
38
- src/CreatorCoin.sol 86ms (unchanged)
39
- src/deployment/ForkedCoinsAddresses.sol 29ms (unchanged)
40
- src/hook-registry/ZoraHookRegistry.sol 153ms (unchanged)
41
- src/hooks/deployment/BaseCoinDeployHook.sol 57ms (unchanged)
42
- src/hooks/deployment/BuySupplyWithSwapRouterHook.sol 249ms (unchanged)
43
- src/hooks/deployment/BuySupplyWithV4SwapHook.sol 138ms (unchanged)
44
- src/hooks/HookUpgradeGate.sol 35ms (unchanged)
45
- src/hooks/ZoraV4CoinHook.sol 317ms (unchanged)
46
- src/interfaces/IAirlock.sol 1ms (unchanged)
47
- src/interfaces/ICoin.sol 38ms (unchanged)
48
- src/interfaces/ICoinComments.sol 2ms (unchanged)
49
- src/interfaces/ICoinDeployHook.sol 1ms (unchanged)
50
- src/interfaces/ICoinV3.sol 5ms (unchanged)
51
- src/interfaces/ICreatorCoin.sol 2ms (unchanged)
52
- src/interfaces/ICreatorCoinHook.sol 2ms (unchanged)
53
- src/interfaces/IDeployedCoinVersionLookup.sol 1ms (unchanged)
54
- src/interfaces/IDopplerErrors.sol 2ms (unchanged)
55
- src/interfaces/IERC7572.sol 1ms (unchanged)
56
- src/interfaces/IHasCreationInfo.sol 1ms (unchanged)
57
- src/interfaces/IHasRewardsRecipients.sol 2ms (unchanged)
58
- src/interfaces/IHooksUpgradeGate.sol 2ms (unchanged)
59
- src/interfaces/IMsgSender.sol 1ms (unchanged)
60
- src/interfaces/INonfungiblePositionManager.sol 16ms (unchanged)
61
- src/interfaces/IPoolConfigEncoding.sol 1ms (unchanged)
62
- src/interfaces/IProtocolRewards.sol 8ms (unchanged)
63
- src/interfaces/ISupportsLimitOrderFill.sol 1ms (unchanged)
64
- src/interfaces/ISwapPathRouter.sol 2ms (unchanged)
65
- src/interfaces/ISwapRouter.sol 1ms (unchanged)
66
- src/interfaces/ITrustedMsgSenderProviderLookup.sol 1ms (unchanged)
67
- src/interfaces/IUniswapV3Factory.sol 5ms (unchanged)
68
- src/interfaces/IUniswapV3Pool.sol 6ms (unchanged)
69
- src/interfaces/IUniswapV3SwapCallback.sol 1ms (unchanged)
70
- src/interfaces/IUpgradeableV4Hook.sol 4ms (unchanged)
71
- src/interfaces/IWETH.sol 4ms (unchanged)
72
- src/interfaces/IZoraFactory.sol 16ms (unchanged)
73
- src/interfaces/IZoraHookRegistry.sol 4ms (unchanged)
74
- src/interfaces/IZoraLimitOrderBookCoinsInterface.sol 2ms (unchanged)
75
- src/interfaces/IZoraV4CoinHook.sol 5ms (unchanged)
76
- src/libs/CoinCommon.sol 9ms (unchanged)
77
- src/libs/CoinConfigurationVersions.sol 71ms (unchanged)
78
- src/libs/CoinConstants.sol 9ms (unchanged)
79
- src/libs/CoinDopplerMultiCurve.sol 172ms (unchanged)
80
- src/libs/CoinRewardsV4.sol 198ms (unchanged)
81
- src/libs/CoinSetup.sol 44ms
82
- src/libs/DopplerMath.sol 164ms (unchanged)
83
- src/libs/HooksDeployment.sol 125ms (unchanged)
84
- src/libs/PoolStateReader.sol 5ms (unchanged)
85
- src/libs/UniV4SwapHelper.sol 131ms (unchanged)
86
- src/libs/UniV4SwapToCurrency.sol 80ms (unchanged)
87
- src/libs/V3ToV4SwapLib.sol 111ms (unchanged)
88
- src/libs/V4Liquidity.sol 321ms (unchanged)
89
- src/proxy/ZoraFactory.sol 8ms (unchanged)
90
- src/types/LpPosition.sol 1ms (unchanged)
91
- src/types/PoolConfiguration.sol 2ms (unchanged)
92
- src/types/PoolState.sol 1ms (unchanged)
93
- src/utils/AutoSwapper.sol 32ms (unchanged)
94
- src/utils/DeployedCoinVersionLookup.sol 7ms (unchanged)
95
- src/utils/MultiOwnable.sol 71ms (unchanged)
96
- src/utils/ProxyShim.sol 4ms (unchanged)
97
- src/utils/TrustedMsgSenderProviderLookup.sol 38ms (unchanged)
98
- src/utils/uniswap/BitMath.sol 18ms (unchanged)
99
- src/utils/uniswap/CustomRevert.sol 57ms (unchanged)
100
- src/utils/uniswap/FixedPoint96.sol 2ms (unchanged)
101
- src/utils/uniswap/FullMath.sol 31ms (unchanged)
102
- src/utils/uniswap/LiquidityAmounts.sol 75ms (unchanged)
103
- src/utils/uniswap/SafeCast.sol 20ms (unchanged)
104
- src/utils/uniswap/SqrtPriceMath.sol 107ms (unchanged)
105
- src/utils/uniswap/TickMath.sol 122ms (unchanged)
106
- src/utils/uniswap/UnsafeMath.sol 4ms (unchanged)
107
- src/version/ContractVersionBase.sol 2ms (unchanged)
108
- src/ZoraFactoryImpl.sol 205ms (unchanged)
109
- test/AutoSwapper.t.sol 62ms (unchanged)
110
- test/BuySupplyWithV4SwapHook.t.sol 246ms (unchanged)
111
- test/Coin.t.sol 227ms (unchanged)
112
- test/CoinRewardsV4.t.sol 14ms (unchanged)
113
- test/CoinUniV4.t.sol 631ms (unchanged)
114
- test/ContentCoinRewards.t.sol 218ms (unchanged)
115
- test/CreatorCoin.t.sol 248ms (unchanged)
116
- test/CreatorCoinRewards.t.sol 172ms (unchanged)
117
- test/DeploymentHooks.t.sol 134ms (unchanged)
118
- test/Factory.t.sol 154ms (unchanged)
119
- test/HooksDeployment.t.sol 86ms (unchanged)
120
- test/LaunchFee.t.sol 161ms (unchanged)
121
- test/LiquidityMigration.t.sol 361ms (unchanged)
122
- test/mocks/MockAirlock.sol 9ms (unchanged)
123
- test/mocks/MockERC20.sol 4ms (unchanged)
124
- test/mocks/MockSwapRouter.sol 16ms (unchanged)
125
- test/mocks/MockZoraLimitOrderBook.sol 1ms (unchanged)
126
- test/mocks/SimpleERC20.sol 4ms (unchanged)
127
- test/MultiOwnable.t.sol 138ms (unchanged)
128
- test/TrustedMsgSenderProviderLookup.t.sol 86ms (unchanged)
129
- test/Upgrades.t.sol 127ms (unchanged)
130
- test/utils/BaseTest.sol 32ms (unchanged)
131
- test/utils/ContractAddresses.sol 5ms (unchanged)
132
- test/utils/DeployedCoinVersionLookup.t.sol 67ms (unchanged)
133
- test/utils/FeeEstimatorHook.sol 45ms (unchanged)
134
- test/utils/hookmate/artifacts/DeployHelper.sol 9ms (unchanged)
135
- test/utils/hookmate/artifacts/Permit2.sol 5ms (unchanged)
136
- test/utils/hookmate/artifacts/UniversalRouter.sol 8ms (unchanged)
137
- test/utils/hookmate/artifacts/V4PoolManager.sol 7ms (unchanged)
138
- test/utils/hookmate/artifacts/V4PositionManager.sol 9ms (unchanged)
139
- test/utils/hookmate/artifacts/V4Quoter.sol 6ms (unchanged)
140
- test/utils/hookmate/artifacts/V4Router.sol 8ms (unchanged)
141
- test/utils/hookmate/constants/AddressConstants.sol 60ms (unchanged)
142
- test/utils/hookmate/interfaces/router/IUniswapV4Router04.sol 13ms (unchanged)
143
- test/utils/hookmate/interfaces/router/PathKey.sol 19ms (unchanged)
144
- test/utils/hookmate/test/utils/SwapFeeEventAsserter.sol 18ms (unchanged)
145
- test/utils/ProtocolRewards.sol 542ms (unchanged)
146
- test/utils/RewardTestHelpers.sol 82ms (unchanged)
147
- test/utils/TrustedSenderTestHelper.sol 4ms (unchanged)
148
- test/utils/V4TestSetup.sol 418ms (unchanged)
149
- test/V4Liquidity.t.sol 145ms (unchanged)
150
- test/ZoraHookRegistry.t.sol 226ms (unchanged)
36
+ src/BaseCoin.sol 1071ms (unchanged)
37
+ src/ContentCoin.sol 198ms (unchanged)
38
+ src/CreatorCoin.sol 203ms (unchanged)
39
+ src/deployment/ForkedCoinsAddresses.sol 62ms (unchanged)
40
+ src/hook-registry/ZoraHookRegistry.sol 314ms (unchanged)
41
+ src/hooks/deployment/BaseCoinDeployHook.sol 73ms (unchanged)
42
+ src/hooks/deployment/BuySupplyWithSwapRouterHook.sol 539ms (unchanged)
43
+ src/hooks/deployment/BuySupplyWithV4SwapHook.sol 262ms (unchanged)
44
+ src/hooks/HookUpgradeGate.sol 73ms (unchanged)
45
+ src/hooks/ZoraV4CoinHook.sol 713ms (unchanged)
46
+ src/interfaces/IAirlock.sol 8ms (unchanged)
47
+ src/interfaces/ICoin.sol 43ms (unchanged)
48
+ src/interfaces/ICoinComments.sol 4ms (unchanged)
49
+ src/interfaces/ICoinDeployHook.sol 3ms (unchanged)
50
+ src/interfaces/ICoinV3.sol 9ms (unchanged)
51
+ src/interfaces/ICreatorCoin.sol 4ms (unchanged)
52
+ src/interfaces/ICreatorCoinHook.sol 2ms (unchanged)
53
+ src/interfaces/IDeployedCoinVersionLookup.sol 1ms (unchanged)
54
+ src/interfaces/IDopplerErrors.sol 1ms (unchanged)
55
+ src/interfaces/IERC7572.sol 1ms (unchanged)
56
+ src/interfaces/IHasCreationInfo.sol 1ms (unchanged)
57
+ src/interfaces/IHasRewardsRecipients.sol 2ms (unchanged)
58
+ src/interfaces/IHooksUpgradeGate.sol 3ms (unchanged)
59
+ src/interfaces/IMsgSender.sol 1ms (unchanged)
60
+ src/interfaces/INonfungiblePositionManager.sol 15ms (unchanged)
61
+ src/interfaces/IPoolConfigEncoding.sol 1ms (unchanged)
62
+ src/interfaces/IPoolManager.sol 1ms (unchanged)
63
+ src/interfaces/IProtocolRewards.sol 4ms (unchanged)
64
+ src/interfaces/ISupportsLimitOrderFill.sol 1ms (unchanged)
65
+ src/interfaces/ISwapPathRouter.sol 1ms (unchanged)
66
+ src/interfaces/ISwapRouter.sol 1ms (unchanged)
67
+ src/interfaces/ITrendCoin.sol 2ms (unchanged)
68
+ src/interfaces/ITrendCoinErrors.sol 1ms (unchanged)
69
+ src/interfaces/ITrustedMsgSenderProviderLookup.sol 2ms (unchanged)
70
+ src/interfaces/IUniswapV3Factory.sol 4ms (unchanged)
71
+ src/interfaces/IUniswapV3Pool.sol 5ms (unchanged)
72
+ src/interfaces/IUniswapV3SwapCallback.sol 2ms (unchanged)
73
+ src/interfaces/IUpgradeableV4Hook.sol 3ms (unchanged)
74
+ src/interfaces/IWETH.sol 2ms (unchanged)
75
+ src/interfaces/IZoraFactory.sol 19ms (unchanged)
76
+ src/interfaces/IZoraHookRegistry.sol 4ms (unchanged)
77
+ src/interfaces/IZoraLimitOrderBookCoinsInterface.sol 2ms (unchanged)
78
+ src/interfaces/IZoraV4CoinHook.sol 9ms (unchanged)
79
+ src/libs/CoinCommon.sol 7ms (unchanged)
80
+ src/libs/CoinConfigurationVersions.sol 66ms (unchanged)
81
+ src/libs/CoinConstants.sol 27ms (unchanged)
82
+ src/libs/CoinDopplerMultiCurve.sol 160ms (unchanged)
83
+ src/libs/CoinRewardsV4.sol 203ms (unchanged)
84
+ src/libs/CoinSetup.sol 54ms (unchanged)
85
+ src/libs/DopplerMath.sol 175ms (unchanged)
86
+ src/libs/HooksDeployment.sol 120ms (unchanged)
87
+ src/libs/PoolStateReader.sol 8ms (unchanged)
88
+ src/libs/TickerUtils.sol 30ms (unchanged)
89
+ src/libs/UniV4SwapHelper.sol 116ms (unchanged)
90
+ src/libs/UniV4SwapToCurrency.sol 108ms (unchanged)
91
+ src/libs/V3ToV4SwapLib.sol 113ms (unchanged)
92
+ src/libs/V4Liquidity.sol 300ms (unchanged)
93
+ src/proxy/ZoraFactory.sol 7ms (unchanged)
94
+ src/TrendCoin.sol 32ms (unchanged)
95
+ src/types/LpPosition.sol 2ms (unchanged)
96
+ src/types/PoolConfiguration.sol 1ms (unchanged)
97
+ src/types/PoolState.sol 2ms (unchanged)
98
+ src/utils/AutoSwapper.sol 31ms (unchanged)
99
+ src/utils/DeployedCoinVersionLookup.sol 7ms (unchanged)
100
+ src/utils/MultiOwnable.sol 57ms (unchanged)
101
+ src/utils/ProxyShim.sol 4ms (unchanged)
102
+ src/utils/TrustedMsgSenderProviderLookup.sol 33ms (unchanged)
103
+ src/utils/uniswap/BitMath.sol 8ms (unchanged)
104
+ src/utils/uniswap/CustomRevert.sol 48ms (unchanged)
105
+ src/utils/uniswap/FixedPoint96.sol 1ms (unchanged)
106
+ src/utils/uniswap/FullMath.sol 30ms (unchanged)
107
+ src/utils/uniswap/LiquidityAmounts.sol 69ms (unchanged)
108
+ src/utils/uniswap/SafeCast.sol 17ms (unchanged)
109
+ src/utils/uniswap/SqrtPriceMath.sol 95ms (unchanged)
110
+ src/utils/uniswap/TickMath.sol 107ms (unchanged)
111
+ src/utils/uniswap/UnsafeMath.sol 3ms (unchanged)
112
+ src/version/ContractVersionBase.sol 2ms (unchanged)
113
+ src/ZoraFactoryImpl.sol 250ms (unchanged)
114
+ test/AutoSwapper.t.sol 56ms (unchanged)
115
+ test/BuySupplyWithV4SwapHook.t.sol 217ms (unchanged)
116
+ test/Coin.t.sol 207ms (unchanged)
117
+ test/CoinRewardsV4.t.sol 45ms (unchanged)
118
+ test/CoinUniV4.t.sol 591ms (unchanged)
119
+ test/ContentCoinRewards.t.sol 195ms (unchanged)
120
+ test/CreatorCoin.t.sol 222ms (unchanged)
121
+ test/CreatorCoinRewards.t.sol 158ms (unchanged)
122
+ test/DeploymentHooks.t.sol 130ms (unchanged)
123
+ test/Factory.t.sol 146ms (unchanged)
124
+ test/HooksDeployment.t.sol 81ms (unchanged)
125
+ test/LaunchFee.t.sol 158ms (unchanged)
126
+ test/LiquidityMigration.t.sol 294ms (unchanged)
127
+ test/mocks/MockAirlock.sol 5ms (unchanged)
128
+ test/mocks/MockERC20.sol 3ms (unchanged)
129
+ test/mocks/MockSwapRouter.sol 5ms (unchanged)
130
+ test/mocks/MockZoraLimitOrderBook.sol 2ms (unchanged)
131
+ test/mocks/SimpleERC20.sol 2ms (unchanged)
132
+ test/MultiOwnable.t.sol 134ms (unchanged)
133
+ test/TrendCoin.t.sol 643ms (unchanged)
134
+ test/TrustedMsgSenderProviderLookup.t.sol 78ms (unchanged)
135
+ test/Upgrades.t.sol 128ms (unchanged)
136
+ test/utils/BaseTest.sol 31ms (unchanged)
137
+ test/utils/ContractAddresses.sol 3ms (unchanged)
138
+ test/utils/DeployedCoinVersionLookup.t.sol 55ms (unchanged)
139
+ test/utils/FeeEstimatorHook.sol 55ms (unchanged)
140
+ test/utils/hookmate/artifacts/DeployHelper.sol 8ms (unchanged)
141
+ test/utils/hookmate/artifacts/Permit2.sol 5ms (unchanged)
142
+ test/utils/hookmate/artifacts/UniversalRouter.sol 7ms (unchanged)
143
+ test/utils/hookmate/artifacts/V4PoolManager.sol 7ms (unchanged)
144
+ test/utils/hookmate/artifacts/V4PositionManager.sol 9ms (unchanged)
145
+ test/utils/hookmate/artifacts/V4Quoter.sol 7ms (unchanged)
146
+ test/utils/hookmate/artifacts/V4Router.sol 7ms (unchanged)
147
+ test/utils/hookmate/constants/AddressConstants.sol 53ms (unchanged)
148
+ test/utils/hookmate/interfaces/router/IUniswapV4Router04.sol 20ms (unchanged)
149
+ test/utils/hookmate/interfaces/router/PathKey.sol 18ms (unchanged)
150
+ test/utils/hookmate/test/utils/SwapFeeEventAsserter.sol 17ms (unchanged)
151
+ test/utils/ProtocolRewards.sol 453ms (unchanged)
152
+ test/utils/RewardTestHelpers.sol 86ms (unchanged)
153
+ test/utils/TrustedSenderTestHelper.sol 4ms (unchanged)
154
+ test/utils/V4TestSetup.sol 394ms (unchanged)
155
+ test/V4Liquidity.t.sol 132ms (unchanged)
156
+ test/ZoraHookRegistry.t.sol 201ms (unchanged)
151
157
  CLI Building entry: package/index.ts
152
158
  CLI Using tsconfig: tsconfig.json
153
- CLI tsup v8.4.0
159
+ CLI tsup v8.5.1
154
160
  CLI Using tsup config: /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins/tsup.config.ts
155
161
  CLI Target: es2021
156
162
  CLI Cleaning output folder
157
163
  CJS Build start
158
164
  ESM Build start
159
- ESM dist/index.js 163.80 KB
160
- ESM dist/index.js.map 289.89 KB
161
- ESM ⚡️ Build success in 91ms
162
- CJS dist/index.cjs 165.21 KB
163
- CJS dist/index.cjs.map 290.04 KB
164
- CJS ⚡️ Build success in 92ms
165
+ CJS dist/index.cjs 188.47 KB
166
+ CJS dist/index.cjs.map 331.87 KB
167
+ CJS ⚡️ Build success in 94ms
168
+ ESM dist/index.js 186.97 KB
169
+ ESM dist/index.js.map 331.71 KB
170
+ ESM ⚡️ Build success in 94ms
package/CHANGELOG.md CHANGED
@@ -1,11 +1,38 @@
1
1
  # @zoralabs/coins
2
2
 
3
+ ## 2.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - fbb389583: Bump viem to 2.53.1
8
+
9
+ Raise the pinned viem version from 2.22.12 to 2.53.1 across the monorepo to pick up newer chain definitions and support the latest x402 v2 client packages.
10
+
11
+ ## 2.6.0
12
+
13
+ ### Minor Changes
14
+
15
+ - 50134ebc: Add TrendCoin support
16
+ - New `TrendCoin` contract: 100% supply in liquidity pool, 0% swap fees
17
+ - `deployTrendCoin` factory method with ticker uniqueness enforcement and post-deploy hook support
18
+ - Owner-configurable pool parameters via `setTrendCoinPoolConfig()`
19
+ - Metadata manager role for updatable contract URIs
20
+ - Ticker validation and URI encoding for trend coin symbols
21
+
22
+ ## 2.5.1
23
+
24
+ ### Patch Changes
25
+
26
+ - 78dffbdc: Including uniswap v4 errors in lob and swap router abis, and including some uniswap v4 contracts and abis.
27
+ - 1ccca8ef: Fix swap fee distribution when price limits cause partial execution
28
+
29
+ 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.
30
+
3
31
  ## 2.5.0
4
32
 
5
33
  ### Minor Changes
6
34
 
7
35
  - 816ceb35: Add launch fee: time-based dynamic fee that decays from 99% to 1% over 10 seconds after coin creation
8
-
9
36
  - New coins record creation timestamp and expose it via `IHasCreationInfo` interface
10
37
  - Hook calculates dynamic fee based on elapsed time since creation
11
38
  - Initial supply purchase bypasses the fee via transient storage flag
@@ -40,7 +67,6 @@
40
67
  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.
41
68
 
42
69
  The fix:
43
-
44
70
  - Use only `callerDelta` values directly without adding `feesAccrued`
45
71
  - Add defensive balance checking in `mintPositions()` to cap liquidity at available token amounts
46
72
  - Prevents migration failures from any remaining rounding discrepancies between burn and mint operations
@@ -60,7 +86,6 @@
60
86
  ### Minor Changes
61
87
 
62
88
  - 7df94915: Enable buying initial supply when deploying creator coin and refactor factory internals
63
-
64
89
  - Add new `deployCreatorCoin` overload with `postDeployHook` parameter that supports ETH transfers
65
90
  - Refactored internal factory implementation to share more code between deployment methods
66
91
  - Enables buying initial supply during creator coin deployment via post-deploy hooks
@@ -70,7 +95,6 @@
70
95
  - 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.
71
96
  - 5093c5ef: Add bounds checking to prevent risky forced downcasting of currency deltas
72
97
  - 9c6d241a: Fix ETH transfer failures in reward distribution when platform referrers cannot accept ETH
73
-
74
98
  - Prevent swaps from reverting when platform referrers cannot accept ETH - in this case, the rewards are redirected to the protocol recipient as backup.
75
99
  - Ensures coin functionality remains intact even with ETH-incompatible platform referrers
76
100
 
@@ -79,12 +103,10 @@
79
103
  Consolidates multiple hook contracts into a single unified hook for simplified architecture and better maintainability.
80
104
 
81
105
  - d3808d55: Adjust creator coin vesting duration to account for leap years
82
-
83
106
  - Changed CREATOR*VESTING_DURATION from 5 * 365 days to 5 \_ 365.25 days
84
107
  - Addresses Cantina audit finding about 1.25 day shortfall in 5-year vesting period
85
108
 
86
109
  - b571fe54: Consolidate and clarify coin constants
87
-
88
110
  - Renamed `CREATOR_LAUNCH_REWARD` to `CONTENT_COIN_INITIAL_CREATOR_SUPPLY` for clarity
89
111
  - Renamed `CREATOR_VESTING_SUPPLY` to `CREATOR_COIN_CREATOR_VESTING_SUPPLY` for consistency
90
112
  - Removed redundant `POOL_LAUNCH_SUPPLY` constant (use `CONTENT_COIN_MARKET_SUPPLY` instead)
@@ -111,7 +133,6 @@
111
133
  - 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.
112
134
 
113
135
  ## New Features:
114
-
115
136
  - Platform referral and trade referral functionality for creator coins (previously only supported on content coins)
116
137
  - Unified fee structure: Both content and creator coins use identical 1% fee distribution
117
138
 
@@ -140,11 +161,9 @@
140
161
  | LP Rewards | 33.33% | 20% |
141
162
 
142
163
  **Implementation Changes:**
143
-
144
164
  - Consolidated reward logic into `CoinRewardsV4.distributeMarketRewards()`
145
165
 
146
166
  **Backwards Compatibility:**
147
-
148
167
  - Existing `CreatorCoinRewards` event is still emitted for backwards compatibility when rewards are distributed for a CreatorCoin
149
168
  - Additionally, when market rewards are distributed for a CreatorCoin, the same `CoinMarketRewardsV4` event that is already emitted for ContentCoins is now also emitted
150
169
 
@@ -167,7 +186,6 @@
167
186
  - dac72691: Remove Uniswap V3 support and refactor coin architecture
168
187
 
169
188
  **Removal of V3 Support:**
170
-
171
189
  - Removed support for creating coins based on Uniswap V3 - only V4 coins are supported
172
190
  - Default coin deployment now creates Uniswap V4 coins when no config is provided (previously created V3)
173
191
  - Removed V3-specific test files and utilities
@@ -176,7 +194,6 @@
176
194
  - Added revert logic for V3 deployment attempts in factory deploy functions
177
195
 
178
196
  **Architecture Refactoring:**
179
-
180
197
  - Merged BaseCoinV4 functionality into BaseCoin.sol to consolidate Uniswap V4 integration
181
198
  - Combined ICoinV4 interface with ICoin interface to simplify the interface hierarchy
182
199
  - Updated ContentCoin and CreatorCoin to inherit directly from BaseCoin
@@ -197,7 +214,6 @@
197
214
  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.
198
215
 
199
216
  Key changes:
200
-
201
217
  - ZoraFactoryImpl now inherits from Ownable2StepUpgradeable
202
218
  - Adds pendingOwner() function
203
219
  - Requires acceptOwnership() call to complete ownership transfers
@@ -250,7 +266,6 @@
250
266
  - 73e95f69: Upgraded coins to use Uniswap V4:
251
267
 
252
268
  **New CoinV4 Implementation:**
253
-
254
269
  - Migrated from Uniswap V3 to Uniswap V4, with logic moved into a hook.
255
270
  - Automatic LP fee collection and multi-hop reward distribution on every swap
256
271
  - New `ZoraV4CoinHook` handles afterSwap operations
@@ -258,25 +273,21 @@
258
273
  - Multi-hop fee swapping through intermediate currencies (e.g., ContentCoin → BackingCoin → Zora)
259
274
 
260
275
  **Factory Updates:**
261
-
262
276
  - Updated `deploy()` function signature with new `poolConfig`, `message`, and `salt` parameters
263
277
  - Automatic V3/V4 version selection based on pool configuration
264
278
  - Deterministic coin deployment with salt support
265
279
  - New `CoinCreatedV4` event for V4 coin deployments
266
280
 
267
281
  **Reward System Changes:**
268
-
269
282
  - Increased trade referral rewards from 10% to 15% (1500 basis points)
270
283
  - Automatic reward distribution in single backing currency
271
284
 
272
285
  **New Interfaces and Events:**
273
-
274
286
  - Added `IHasPoolKey` and `IHasSwapPath` interfaces for V4 functionality
275
287
  - New `Swapped` event with detailed swap and price information
276
288
  - New `CoinMarketRewardsV4` event for reward distribution tracking
277
289
 
278
290
  **Breaking Changes:**
279
-
280
291
  - New deterministic factory deploy function with salt
281
292
 
282
293
  ### Patch Changes
@@ -1738,6 +1738,11 @@
1738
1738
  }
1739
1739
  ]
1740
1740
  },
1741
+ {
1742
+ "type": "error",
1743
+ "name": "InvalidCurrency",
1744
+ "inputs": []
1745
+ },
1741
1746
  {
1742
1747
  "type": "error",
1743
1748
  "name": "InvalidCurrencyLowerTick",
@@ -1764,6 +1764,11 @@
1764
1764
  }
1765
1765
  ]
1766
1766
  },
1767
+ {
1768
+ "type": "error",
1769
+ "name": "InvalidCurrency",
1770
+ "inputs": []
1771
+ },
1767
1772
  {
1768
1773
  "type": "error",
1769
1774
  "name": "InvalidCurrencyLowerTick",
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",