@zoralabs/coins 1.1.2 → 2.1.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 (78) hide show
  1. package/.turbo/turbo-build.log +107 -110
  2. package/CHANGELOG.md +50 -0
  3. package/README.md +48 -1
  4. package/abis/BaseCoin.json +442 -0
  5. package/abis/BaseZoraV4CoinHook.json +6 -2
  6. package/abis/CoinTest.json +3 -246
  7. package/abis/CoinUniV4Test.json +20 -0
  8. package/abis/ContentCoinHook.json +6 -2
  9. package/abis/CreatorCoinHook.json +6 -2
  10. package/abis/FactoryTest.json +8 -133
  11. package/abis/FeeEstimatorHook.json +6 -2
  12. package/abis/HooksTest.json +0 -26
  13. package/abis/ICoin.json +378 -0
  14. package/abis/ICoinV3.json +378 -0
  15. package/abis/IZoraFactory.json +0 -18
  16. package/abis/IZoraV4CoinHook.json +2 -2
  17. package/abis/LiquidityMigrationTest.json +101 -0
  18. package/abis/MockBadFactory.json +15 -0
  19. package/abis/Ownable2StepUpgradeable.json +138 -0
  20. package/abis/ZoraFactoryImpl.json +38 -65
  21. package/addresses/8453.json +5 -5
  22. package/dist/index.cjs +272 -268
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.js +270 -266
  25. package/dist/index.js.map +1 -1
  26. package/dist/wagmiGenerated.d.ts +397 -470
  27. package/dist/wagmiGenerated.d.ts.map +1 -1
  28. package/package/wagmiGenerated.ts +275 -271
  29. package/package.json +3 -3
  30. package/script/DeployPostDeploymentHooks.s.sol +2 -2
  31. package/script/TestBackingCoinSwap.s.sol +9 -9
  32. package/script/TestV4Swap.s.sol +9 -9
  33. package/script/UpgradeFactoryImpl.s.sol +0 -1
  34. package/src/BaseCoin.sol +109 -6
  35. package/src/ContentCoin.sol +45 -0
  36. package/src/CreatorCoin.sol +7 -5
  37. package/src/ZoraFactoryImpl.sol +12 -95
  38. package/src/deployment/CoinsDeployerBase.sol +13 -30
  39. package/src/hooks/BaseZoraV4CoinHook.sol +8 -6
  40. package/src/hooks/deployment/BuySupplyWithSwapRouterHook.sol +4 -5
  41. package/src/interfaces/ICoin.sol +67 -1
  42. package/src/interfaces/ICreatorCoin.sol +2 -2
  43. package/src/interfaces/IZoraFactory.sol +0 -5
  44. package/src/interfaces/IZoraV4CoinHook.sol +1 -1
  45. package/src/libs/CoinConfigurationVersions.sol +1 -39
  46. package/src/libs/CoinRewardsV4.sol +2 -2
  47. package/src/libs/CoinSetup.sol +1 -4
  48. package/src/libs/UniV4SwapHelper.sol +1 -1
  49. package/src/libs/UniV4SwapToCurrency.sol +2 -2
  50. package/src/libs/V4Liquidity.sol +1 -1
  51. package/src/version/ContractVersionBase.sol +1 -1
  52. package/test/Coin.t.sol +112 -535
  53. package/test/CoinUniV4.t.sol +66 -10
  54. package/test/DeploymentHooks.t.sol +5 -102
  55. package/test/Factory.t.sol +49 -291
  56. package/test/LiquidityMigration.t.sol +160 -2
  57. package/test/MultiOwnable.t.sol +36 -36
  58. package/test/Upgrades.t.sol +23 -42
  59. package/test/utils/BaseTest.sol +39 -84
  60. package/test/utils/FeeEstimatorHook.sol +3 -3
  61. package/wagmi.config.ts +2 -2
  62. package/abis/Coin.json +0 -1912
  63. package/abis/DopplerUniswapV3Test.json +0 -800
  64. package/abis/ICoinV4.json +0 -1048
  65. package/abis/Simulate.json +0 -29
  66. package/abis/UniV3BuySell.json +0 -12
  67. package/abis/UniV3Errors.json +0 -32
  68. package/script/Simulate.s.sol +0 -59
  69. package/src/Coin.sol +0 -236
  70. package/src/CoinV4.sol +0 -151
  71. package/src/interfaces/ICoinV4.sol +0 -74
  72. package/src/libs/CoinDopplerUniV3.sol +0 -50
  73. package/src/libs/CoinRewards.sol +0 -201
  74. package/src/libs/CoinSetupV3.sol +0 -50
  75. package/src/libs/UniV3BuySell.sol +0 -231
  76. package/src/libs/UniV3Errors.sol +0 -11
  77. package/test/CoinDopplerUniV3.t.sol +0 -310
  78. /package/abis/{CoinV4.json → ContentCoin.json} +0 -0
@@ -1,33 +1,39 @@
1
1
 
2
- > @zoralabs/coins@1.1.2 build /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
2
+ > @zoralabs/coins@2.1.0 build /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@1.1.2 wagmi:generate /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
6
+ > @zoralabs/coins@2.1.0 wagmi:generate /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
7
7
  > FOUNDRY_PROFILE=dev forge build && wagmi generate && pnpm exec rename-generated-abi-casing ./package/wagmiGenerated.ts
8
8
 
9
- Compiling 244 files with Solc 0.8.28
10
- Solc 0.8.28 finished in 253.65s
9
+ Compiling 236 files with Solc 0.8.28
10
+ Solc 0.8.28 finished in 186.86s
11
11
  Compiler run successful with warnings:
12
12
  Warning (3420): Source file does not specify required compiler version! Consider adding "pragma solidity ^0.8.28;"
13
13
  --> src/BaseCoin.sol
14
14
 
15
15
  Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
16
- --> src/deployment/CoinsDeployerBase.sol:117:31:
16
+ --> src/ZoraFactoryImpl.sol:214:9:
17
17
  |
18
- 117 | function deployCoinV4Impl(address zoraV4CoinHook) internal returns (CoinV4) {
18
+ 214 | uint256 orderSize
19
+ | ^^^^^^^^^^^^^^^^^
20
+
21
+ Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
22
+ --> src/deployment/CoinsDeployerBase.sol:104:31:
23
+ |
24
+ 104 | function deployCoinV4Impl(address zoraV4CoinHook) internal returns (ContentCoin) {
19
25
  | ^^^^^^^^^^^^^^^^^^^^^^
20
26
 
21
27
  Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
22
- --> src/deployment/CoinsDeployerBase.sol:127:36:
28
+ --> src/deployment/CoinsDeployerBase.sol:114:36:
23
29
  |
24
- 127 | function deployCreatorCoinImpl(address creatorCoinHook) internal returns (CreatorCoin) {
30
+ 114 | function deployCreatorCoinImpl(address creatorCoinHook) internal returns (CreatorCoin) {
25
31
  | ^^^^^^^^^^^^^^^^^^^^^^^
26
32
 
27
33
  Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
28
- --> src/deployment/CoinsDeployerBase.sol:290:84:
34
+ --> src/deployment/CoinsDeployerBase.sol:273:84:
29
35
  |
30
- 290 | function deployDevFactory(CoinsDeployment memory deployment) internal returns (ZoraFactory devFactory) {
36
+ 273 | function deployDevFactory(CoinsDeployment memory deployment) internal returns (ZoraFactory devFactory) {
31
37
  | ^^^^^^^^^^^^^^^^^^^^^^
32
38
 
33
39
  Warning (2072): Unused local variable.
@@ -49,15 +55,15 @@ Warning (2072): Unused local variable.
49
55
  | ^^^^^^^^^^^^^^^^^^^^^^
50
56
 
51
57
  Warning (2072): Unused local variable.
52
- --> test/LiquidityMigration.t.sol:186:9:
58
+ --> test/LiquidityMigration.t.sol:188:9:
53
59
  |
54
- 186 | address originalHook = address(contentCoinHook);
60
+ 188 | address originalHook = address(contentCoinHook);
55
61
  | ^^^^^^^^^^^^^^^^^^^^
56
62
 
57
63
  Warning (2072): Unused local variable.
58
- --> test/LiquidityMigration.t.sol:208:9:
64
+ --> test/LiquidityMigration.t.sol:210:9:
59
65
  |
60
- 208 | PoolKey memory poolKey = coinV4.getPoolKey();
66
+ 210 | PoolKey memory poolKey = coinV4.getPoolKey();
61
67
  | ^^^^^^^^^^^^^^^^^^^^^^
62
68
 
63
69
  - Validating plugins
@@ -73,122 +79,113 @@ Warning (2072): Unused local variable.
73
79
  ✅ Updated ./package/wagmiGenerated.ts (10 replacements)
74
80
  ✨ All files processed successfully!
75
81
 
76
- > @zoralabs/coins@1.1.2 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
82
+ > @zoralabs/coins@2.1.0 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
77
83
  > pnpm exec bundle-abis
78
84
 
79
85
 
80
- > @zoralabs/coins@1.1.2 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
86
+ > @zoralabs/coins@2.1.0 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
81
87
  > prettier --write 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'
82
88
 
83
- src/BaseCoin.sol 347ms (unchanged)
84
- src/Coin.sol 156ms (unchanged)
85
- src/CoinV4.sol 114ms (unchanged)
86
- src/CreatorCoin.sol 51ms (unchanged)
87
- src/deployment/CoinsDeployerBase.sol 211ms (unchanged)
88
- src/hooks/BaseZoraV4CoinHook.sol 181ms (unchanged)
89
- src/hooks/ContentCoinHook.sol 8ms (unchanged)
90
- src/hooks/CreatorCoinHook.sol 6ms (unchanged)
91
- src/hooks/deployment/BaseCoinDeployHook.sol 13ms (unchanged)
92
- src/hooks/deployment/BuySupplyWithSwapRouterHook.sol 131ms (unchanged)
93
- src/hooks/HookUpgradeGate.sol 23ms (unchanged)
89
+ src/BaseCoin.sol 423ms (unchanged)
90
+ src/ContentCoin.sol 34ms (unchanged)
91
+ src/CreatorCoin.sol 63ms (unchanged)
92
+ src/deployment/CoinsDeployerBase.sol 216ms (unchanged)
93
+ src/hooks/BaseZoraV4CoinHook.sol 180ms (unchanged)
94
+ src/hooks/ContentCoinHook.sol 7ms (unchanged)
95
+ src/hooks/CreatorCoinHook.sol 7ms (unchanged)
96
+ src/hooks/deployment/BaseCoinDeployHook.sol 20ms (unchanged)
97
+ src/hooks/deployment/BuySupplyWithSwapRouterHook.sol 118ms (unchanged)
98
+ src/hooks/HookUpgradeGate.sol 22ms (unchanged)
94
99
  src/interfaces/IAirlock.sol 1ms (unchanged)
95
- src/interfaces/ICoin.sol 9ms (unchanged)
100
+ src/interfaces/ICoin.sol 13ms (unchanged)
96
101
  src/interfaces/ICoinComments.sol 1ms (unchanged)
97
- src/interfaces/ICoinDeployHook.sol 2ms (unchanged)
98
- src/interfaces/ICoinV3.sol 4ms (unchanged)
99
- src/interfaces/ICoinV4.sol 3ms (unchanged)
102
+ src/interfaces/ICoinDeployHook.sol 1ms (unchanged)
103
+ src/interfaces/ICoinV3.sol 3ms (unchanged)
100
104
  src/interfaces/ICreatorCoin.sol 2ms (unchanged)
101
- src/interfaces/ICreatorCoinHook.sol 1ms (unchanged)
105
+ src/interfaces/ICreatorCoinHook.sol 2ms (unchanged)
102
106
  src/interfaces/IDeployedCoinVersionLookup.sol 1ms (unchanged)
103
107
  src/interfaces/IDopplerErrors.sol 1ms (unchanged)
104
- src/interfaces/IERC7572.sol 1ms (unchanged)
108
+ src/interfaces/IERC7572.sol 0ms (unchanged)
105
109
  src/interfaces/IHasRewardsRecipients.sol 1ms (unchanged)
106
- src/interfaces/IHooksUpgradeGate.sol 2ms (unchanged)
107
- src/interfaces/IMsgSender.sol 2ms (unchanged)
108
- src/interfaces/INonfungiblePositionManager.sol 5ms (unchanged)
110
+ src/interfaces/IHooksUpgradeGate.sol 1ms (unchanged)
111
+ src/interfaces/IMsgSender.sol 1ms (unchanged)
112
+ src/interfaces/INonfungiblePositionManager.sol 4ms (unchanged)
109
113
  src/interfaces/IPoolConfigEncoding.sol 2ms (unchanged)
110
- src/interfaces/IProtocolRewards.sol 4ms (unchanged)
111
- src/interfaces/ISwapPathRouter.sol 2ms (unchanged)
112
- src/interfaces/ISwapRouter.sol 0ms (unchanged)
113
- src/interfaces/IUniswapV3Factory.sol 4ms (unchanged)
114
- src/interfaces/IUniswapV3Pool.sol 4ms (unchanged)
115
- src/interfaces/IUniswapV3SwapCallback.sol 2ms (unchanged)
114
+ src/interfaces/IProtocolRewards.sol 2ms (unchanged)
115
+ src/interfaces/ISwapPathRouter.sol 1ms (unchanged)
116
+ src/interfaces/ISwapRouter.sol 1ms (unchanged)
117
+ src/interfaces/IUniswapV3Factory.sol 5ms (unchanged)
118
+ src/interfaces/IUniswapV3Pool.sol 3ms (unchanged)
119
+ src/interfaces/IUniswapV3SwapCallback.sol 1ms (unchanged)
116
120
  src/interfaces/IUpgradeableV4Hook.sol 2ms (unchanged)
117
- src/interfaces/IWETH.sol 2ms (unchanged)
118
- src/interfaces/IZoraFactory.sol 7ms (unchanged)
119
- src/interfaces/IZoraV4CoinHook.sol 8ms (unchanged)
121
+ src/interfaces/IWETH.sol 1ms (unchanged)
122
+ src/interfaces/IZoraFactory.sol 12ms (unchanged)
123
+ src/interfaces/IZoraV4CoinHook.sol 6ms (unchanged)
120
124
  src/libs/CoinCommon.sol 4ms (unchanged)
121
- src/libs/CoinConfigurationVersions.sol 83ms (unchanged)
125
+ src/libs/CoinConfigurationVersions.sol 46ms (unchanged)
122
126
  src/libs/CoinConstants.sol 4ms (unchanged)
123
- src/libs/CoinDopplerMultiCurve.sol 105ms (unchanged)
124
- src/libs/CoinDopplerUniV3.sol 29ms (unchanged)
125
- src/libs/CoinRewards.sol 118ms (unchanged)
127
+ src/libs/CoinDopplerMultiCurve.sol 103ms (unchanged)
126
128
  src/libs/CoinRewardsV4.sol 99ms (unchanged)
127
- src/libs/CoinSetup.sol 20ms (unchanged)
128
- src/libs/CoinSetupV3.sol 17ms (unchanged)
129
+ src/libs/CoinSetup.sol 26ms (unchanged)
129
130
  src/libs/CreatorCoinConstants.sol 2ms (unchanged)
130
- src/libs/CreatorCoinRewards.sol 11ms (unchanged)
131
- src/libs/DopplerMath.sol 81ms (unchanged)
132
- src/libs/HooksDeployment.sol 95ms (unchanged)
133
- src/libs/MarketConstants.sol 1ms (unchanged)
131
+ src/libs/CreatorCoinRewards.sol 18ms (unchanged)
132
+ src/libs/DopplerMath.sol 88ms (unchanged)
133
+ src/libs/HooksDeployment.sol 79ms (unchanged)
134
+ src/libs/MarketConstants.sol 2ms (unchanged)
134
135
  src/libs/PoolStateReader.sol 6ms (unchanged)
135
- src/libs/UniV3BuySell.sol 84ms (unchanged)
136
- src/libs/UniV3Errors.sol 2ms (unchanged)
137
- src/libs/UniV4SwapHelper.sol 28ms (unchanged)
138
- src/libs/UniV4SwapToCurrency.sol 56ms (unchanged)
139
- src/libs/V4Liquidity.sol 148ms (unchanged)
140
- src/proxy/ZoraFactory.sol 6ms (unchanged)
136
+ src/libs/UniV4SwapHelper.sol 29ms (unchanged)
137
+ src/libs/UniV4SwapToCurrency.sol 48ms (unchanged)
138
+ src/libs/V4Liquidity.sol 131ms (unchanged)
139
+ src/proxy/ZoraFactory.sol 5ms (unchanged)
141
140
  src/types/LpPosition.sol 1ms (unchanged)
142
- src/types/PoolConfiguration.sol 1ms (unchanged)
143
- src/types/PoolState.sol 2ms (unchanged)
144
- src/utils/AutoSwapper.sol 17ms (unchanged)
145
- src/utils/DeployedCoinVersionLookup.sol 9ms (unchanged)
146
- src/utils/MultiOwnable.sol 41ms (unchanged)
147
- src/utils/uniswap/BitMath.sol 12ms (unchanged)
148
- src/utils/uniswap/BytesLib.sol 12ms (unchanged)
149
- src/utils/uniswap/CustomRevert.sol 36ms (unchanged)
150
- src/utils/uniswap/FixedPoint96.sol 2ms (unchanged)
151
- src/utils/uniswap/FullMath.sol 21ms (unchanged)
152
- src/utils/uniswap/LiquidityAmounts.sol 43ms (unchanged)
141
+ src/types/PoolConfiguration.sol 3ms (unchanged)
142
+ src/types/PoolState.sol 1ms (unchanged)
143
+ src/utils/AutoSwapper.sol 20ms (unchanged)
144
+ src/utils/DeployedCoinVersionLookup.sol 4ms (unchanged)
145
+ src/utils/MultiOwnable.sol 45ms (unchanged)
146
+ src/utils/uniswap/BitMath.sol 10ms (unchanged)
147
+ src/utils/uniswap/BytesLib.sol 17ms (unchanged)
148
+ src/utils/uniswap/CustomRevert.sol 41ms (unchanged)
149
+ src/utils/uniswap/FixedPoint96.sol 1ms (unchanged)
150
+ src/utils/uniswap/FullMath.sol 20ms (unchanged)
151
+ src/utils/uniswap/LiquidityAmounts.sol 46ms (unchanged)
153
152
  src/utils/uniswap/Path.sol 5ms (unchanged)
154
153
  src/utils/uniswap/SafeCast.sol 11ms (unchanged)
155
- src/utils/uniswap/SqrtPriceMath.sol 66ms (unchanged)
156
- src/utils/uniswap/TickMath.sol 67ms (unchanged)
154
+ src/utils/uniswap/SqrtPriceMath.sol 64ms (unchanged)
155
+ src/utils/uniswap/TickMath.sol 68ms (unchanged)
157
156
  src/utils/uniswap/UnsafeMath.sol 2ms (unchanged)
158
157
  src/version/ContractVersionBase.sol 1ms (unchanged)
159
- src/ZoraFactoryImpl.sol 162ms (unchanged)
160
- test/AutoSwapper.t.sol 36ms (unchanged)
161
- test/Coin.t.sol 327ms (unchanged)
162
- test/CoinDopplerUniV3.t.sol 122ms (unchanged)
163
- test/CoinUniV4.t.sol 334ms (unchanged)
164
- test/CreatorCoin.t.sol 149ms (unchanged)
165
- test/DeploymentHooks.t.sol 102ms (unchanged)
166
- test/Factory.t.sol 179ms (unchanged)
167
- test/HooksDeployment.t.sol 28ms (unchanged)
168
- test/LiquidityMigration.t.sol 91ms (unchanged)
169
- test/mocks/MockERC20.sol 4ms (unchanged)
170
- test/MultiOwnable.t.sol 82ms (unchanged)
171
- test/Upgrades.t.sol 127ms (unchanged)
172
- test/utils/BaseTest.sol 172ms (unchanged)
173
- test/utils/ContractAddresses.sol 4ms (unchanged)
174
- test/utils/DeployedCoinVersionLookup.t.sol 41ms (unchanged)
175
- test/utils/FeeEstimatorHook.sol 27ms (unchanged)
176
- test/utils/ProtocolRewards.sol 323ms (unchanged)
158
+ src/ZoraFactoryImpl.sol 106ms (unchanged)
159
+ test/AutoSwapper.t.sol 34ms (unchanged)
160
+ test/Coin.t.sol 110ms (unchanged)
161
+ test/CoinUniV4.t.sol 336ms (unchanged)
162
+ test/CreatorCoin.t.sol 130ms (unchanged)
163
+ test/DeploymentHooks.t.sol 66ms (unchanged)
164
+ test/Factory.t.sol 76ms (unchanged)
165
+ test/HooksDeployment.t.sol 25ms (unchanged)
166
+ test/LiquidityMigration.t.sol 155ms (unchanged)
167
+ test/mocks/MockERC20.sol 2ms (unchanged)
168
+ test/MultiOwnable.t.sol 80ms (unchanged)
169
+ test/Upgrades.t.sol 107ms (unchanged)
170
+ test/utils/BaseTest.sol 154ms (unchanged)
171
+ test/utils/ContractAddresses.sol 2ms (unchanged)
172
+ test/utils/DeployedCoinVersionLookup.t.sol 38ms (unchanged)
173
+ test/utils/FeeEstimatorHook.sol 26ms (unchanged)
174
+ test/utils/ProtocolRewards.sol 281ms (unchanged)
177
175
  test/utils/ProxyShim.sol 6ms (unchanged)
178
- script/Deploy.s.sol 4ms (unchanged)
179
- script/DeployAutoSwapper.s.sol 8ms (unchanged)
180
- script/DeployDevFactory.s.sol 5ms (unchanged)
181
- script/DeployPostDeploymentHooks.s.sol 4ms (unchanged)
182
- script/DeployUpgradeGate.s.sol 6ms (unchanged)
183
- script/GenerateDeterministicParams.s.sol 14ms (unchanged)
184
- script/PrintRegisterUpgradePath.s.sol 13ms (unchanged)
176
+ script/Deploy.s.sol 3ms (unchanged)
177
+ script/DeployAutoSwapper.s.sol 13ms (unchanged)
178
+ script/DeployDevFactory.s.sol 3ms (unchanged)
179
+ script/DeployPostDeploymentHooks.s.sol 2ms (unchanged)
180
+ script/DeployUpgradeGate.s.sol 3ms (unchanged)
181
+ script/GenerateDeterministicParams.s.sol 12ms (unchanged)
182
+ script/PrintRegisterUpgradePath.s.sol 9ms (unchanged)
185
183
  script/PrintUpgradeCommand.s.sol 2ms (unchanged)
186
- script/Simulate.s.sol 12ms (unchanged)
187
- script/TestBackingCoinSwap.s.sol 38ms (unchanged)
188
- script/TestV4Swap.s.sol 35ms (unchanged)
184
+ script/TestBackingCoinSwap.s.sol 31ms (unchanged)
185
+ script/TestV4Swap.s.sol 30ms (unchanged)
189
186
  script/UpgradeCoinImpl.sol 5ms (unchanged)
190
- script/UpgradeFactoryImpl.s.sol 8ms (unchanged)
191
- script/UpgradeHooks.s.sol 4ms (unchanged)
187
+ script/UpgradeFactoryImpl.s.sol 5ms (unchanged)
188
+ script/UpgradeHooks.s.sol 6ms (unchanged)
192
189
  CLI Building entry: package/index.ts
193
190
  CLI Using tsconfig: tsconfig.json
194
191
  CLI tsup v8.4.0
@@ -197,9 +194,9 @@ script/UpgradeHooks.s.sol 4ms (unchanged)
197
194
  CLI Cleaning output folder
198
195
  CJS Build start
199
196
  ESM Build start
200
- CJS dist/index.cjs 130.34 KB
201
- CJS dist/index.cjs.map 231.16 KB
202
- CJS ⚡️ Build success in 43ms
203
- ESM dist/index.js 128.93 KB
204
- ESM dist/index.js.map 231.01 KB
205
- ESM ⚡️ Build success in 42ms
197
+ ESM dist/index.js 128.58 KB
198
+ ESM dist/index.js.map 229.86 KB
199
+ ESM ⚡️ Build success in 44ms
200
+ CJS dist/index.cjs 130.00 KB
201
+ CJS dist/index.cjs.map 230.01 KB
202
+ CJS ⚡️ Build success in 44ms
package/CHANGELOG.md CHANGED
@@ -1,10 +1,60 @@
1
1
  # @zoralabs/coins
2
2
 
3
+ ## 2.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - dac72691: Remove Uniswap V3 support and refactor coin architecture
8
+
9
+ **Removal of V3 Support:**
10
+
11
+ - Removed support for creating coins based on Uniswap V3 - only V4 coins are supported
12
+ - Default coin deployment now creates Uniswap V4 coins when no config is provided (previously created V3)
13
+ - Removed V3-specific test files and utilities
14
+ - Updated remaining tests to use V4 deployment methods
15
+ - Removed V3 configuration functions and encoders
16
+ - Added revert logic for V3 deployment attempts in factory deploy functions
17
+
18
+ **Architecture Refactoring:**
19
+
20
+ - Merged BaseCoinV4 functionality into BaseCoin.sol to consolidate Uniswap V4 integration
21
+ - Combined ICoinV4 interface with ICoin interface to simplify the interface hierarchy
22
+ - Updated ContentCoin and CreatorCoin to inherit directly from BaseCoin
23
+ - Removed duplicate files: BaseCoinV4.sol and ICoinV4.sol
24
+ - Updated all imports and references throughout the codebase
25
+ - This is an internal refactoring that doesn't change external functionality
26
+
27
+ ### Patch Changes
28
+
29
+ - deb9175b: Enforce 32 bytes for decoding trade referral address from hook data
30
+
31
+ ## 2.0.0
32
+
33
+ ### Major Changes
34
+
35
+ - acb9ff94: Move ZoraFactoryImpl to 2-step ownable with same storage slots
36
+
37
+ 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.
38
+
39
+ Key changes:
40
+
41
+ - ZoraFactoryImpl now inherits from Ownable2StepUpgradeable
42
+ - Adds pendingOwner() function
43
+ - Requires acceptOwnership() call to complete ownership transfers
44
+ - Maintains storage slot compatibility for upgrades
45
+
46
+ ### Patch Changes
47
+
48
+ - 65d36dbb: Refactor coinv4 into basecoinv4 and content coin
49
+
50
+ This refactoring splits the coinv4 implementation into a base coin contract and content coin contract for better modularity and separation of concerns.
51
+
3
52
  ## 1.1.2
4
53
 
5
54
  ### Patch Changes
6
55
 
7
56
  - 522a7c33: Update LICENSE for coins
57
+ - 5c561b01: Fixed bug where hooks could not receive taken eth for paying out rewards
8
58
 
9
59
  ## 1.1.1
10
60
 
package/README.md CHANGED
@@ -1,6 +1,53 @@
1
1
  # Coins
2
2
 
3
- ## Deployment
3
+ A protocol for creating and trading creator and content coins with automatic rewards distribution on top of Uniswap V4 hooks.
4
+
5
+ ## 📖 Documentation
6
+
7
+ For comprehensive documentation including architecture details, contract specifications, and usage guides, visit:
8
+
9
+ **[Coins Documentation](https://docs.zora.co/docs/coins)**
10
+
11
+ ## Quick Start
12
+
13
+ This package contains the core smart contracts for the Zora Coins protocol. For end-user guides and detailed explanations, see the documentation link above.
14
+
15
+ ### Development Setup
16
+
17
+ 1. **Install dependencies**:
18
+
19
+ ```bash
20
+ pnpm install
21
+ ```
22
+
23
+ 2. **Environment setup**:
24
+
25
+ ```bash
26
+ cp .env.example .env
27
+ # Edit .env with your configuration
28
+ ```
29
+
30
+ 3. **Build contracts**:
31
+
32
+ ```bash
33
+ forge build
34
+ ```
35
+
36
+ 4. **Run tests**:
37
+ ```bash
38
+ forge test -vvv
39
+ ```
40
+
41
+ ### Testing
42
+
43
+ For individual packages:
44
+
45
+ - `forge test -vvv` - Run Solidity tests with verbose output
46
+ - `forge test --watch -vvv` - Run tests in watch mode
47
+ - `forge test -vvv --match-test {test_name}` - Run specific test
48
+ - `pnpm test` - Run JavaScript/TypeScript tests
49
+
50
+ ### Deployment
4
51
 
5
52
  The `ZoraFactory` contract is deployed deterministically using a turnkey account. The deployment process uses a helper contract, [DeterministicDeployerAndCaller](../../packages/shared-contracts/src/deployment/DeterministicDeployerAndCaller.sol).
6
53