@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.
- package/.turbo/turbo-build$colon$js.log +99 -99
- package/CHANGELOG.md +44 -5
- package/README.md +4 -0
- package/abis/BaseCoin.json +0 -5
- package/abis/ContentCoin.json +0 -5
- package/abis/CreatorCoin.json +0 -5
- package/abis/FeeEstimatorHook.json +94 -1
- package/abis/IUpgradeableDestinationV4HookWithUpdateableFee.json +95 -0
- package/abis/IZoraFactory.json +69 -0
- package/abis/ZoraFactoryImpl.json +69 -0
- package/abis/ZoraV4CoinHook.json +94 -1
- package/addresses/8453.json +6 -6
- package/audits/report-cantinacode-zora-0827.pdf +3498 -4
- package/dist/index.cjs +21 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -3
- package/dist/index.js.map +1 -1
- package/dist/wagmiGenerated.d.ts +54 -12
- package/dist/wagmiGenerated.d.ts.map +1 -1
- package/foundry.toml +3 -3
- package/package/wagmiGenerated.ts +21 -3
- package/package.json +1 -1
- package/script/TestBackingCoinSwap.s.sol +0 -2
- package/script/TestV4Swap.s.sol +0 -2
- package/src/BaseCoin.sol +4 -12
- package/src/ContentCoin.sol +3 -4
- package/src/CreatorCoin.sol +8 -10
- package/src/ZoraFactoryImpl.sol +115 -83
- package/src/hook-registry/ZoraHookRegistry.sol +4 -0
- package/src/hooks/ZoraV4CoinHook.sol +66 -9
- package/src/interfaces/IUpgradeableV4Hook.sol +18 -0
- package/src/interfaces/IZoraFactory.sol +21 -2
- package/src/libs/CoinConstants.sol +51 -8
- package/src/libs/CoinDopplerMultiCurve.sol +11 -11
- package/src/libs/CoinRewardsV4.sol +26 -33
- package/src/libs/CoinSetup.sol +2 -9
- package/src/libs/DopplerMath.sol +2 -2
- package/src/libs/V4Liquidity.sol +79 -15
- package/src/version/ContractVersionBase.sol +1 -1
- package/test/Coin.t.sol +5 -5
- package/test/CoinRewardsV4.t.sol +33 -0
- package/test/CoinUniV4.t.sol +2 -3
- package/test/ContentCoinRewards.t.sol +43 -0
- package/test/CreatorCoin.t.sol +53 -29
- package/test/DeploymentHooks.t.sol +54 -2
- package/test/LiquidityMigration.t.sol +145 -7
- package/test/V4Liquidity.t.sol +178 -0
- package/test/utils/BaseTest.sol +0 -1
- package/test/utils/RewardTestHelpers.sol +4 -4
- package/abis/CoinConstants.json +0 -54
- package/abis/CoinRewardsV4.json +0 -67
- package/src/libs/CreatorCoinConstants.sol +0 -15
- package/src/libs/MarketConstants.sol +0 -23
- /package/abis/{VmContractHelper227.json → VmContractHelper226.json} +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
> @zoralabs/coins@2.
|
|
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.
|
|
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.
|
|
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
|
|
14
|
-
Solc 0.8.28 finished in
|
|
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
|
[33m-[39m Validating plugins
|
|
17
17
|
[32m✔[39m 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.
|
|
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.
|
|
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
|
|
37
|
-
src/ContentCoin.sol
|
|
38
|
-
src/CreatorCoin.sol
|
|
39
|
-
src/deployment/CoinsDeployerBase.sol
|
|
40
|
-
src/hook-registry/ZoraHookRegistry.sol
|
|
41
|
-
src/hooks/deployment/BaseCoinDeployHook.sol
|
|
42
|
-
src/hooks/deployment/BuySupplyWithSwapRouterHook.sol
|
|
43
|
-
src/hooks/HookUpgradeGate.sol
|
|
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
|
|
46
|
+
src/interfaces/ICoin.sol 40ms (unchanged)
|
|
47
47
|
src/interfaces/ICoinComments.sol 5ms (unchanged)
|
|
48
|
-
src/interfaces/ICoinDeployHook.sol
|
|
49
|
-
src/interfaces/ICoinV3.sol
|
|
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
|
|
52
|
-
src/interfaces/IDeployedCoinVersionLookup.sol
|
|
53
|
-
src/interfaces/IDopplerErrors.sol
|
|
54
|
-
src/interfaces/IERC7572.sol
|
|
55
|
-
src/interfaces/IHasRewardsRecipients.sol
|
|
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
|
|
58
|
-
src/interfaces/INonfungiblePositionManager.sol
|
|
59
|
-
src/interfaces/IPoolConfigEncoding.sol
|
|
60
|
-
src/interfaces/IProtocolRewards.sol
|
|
61
|
-
src/interfaces/ISwapPathRouter.sol
|
|
62
|
-
src/interfaces/ISwapRouter.sol
|
|
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
|
|
65
|
-
src/interfaces/IUniswapV3SwapCallback.sol
|
|
66
|
-
src/interfaces/IUpgradeableV4Hook.sol
|
|
67
|
-
src/interfaces/IWETH.sol
|
|
68
|
-
src/interfaces/IZoraFactory.sol
|
|
69
|
-
src/interfaces/IZoraHookRegistry.sol
|
|
70
|
-
src/interfaces/IZoraV4CoinHook.sol
|
|
71
|
-
src/libs/CoinCommon.sol
|
|
72
|
-
src/libs/CoinConfigurationVersions.sol
|
|
73
|
-
src/libs/CoinConstants.sol
|
|
74
|
-
src/libs/CoinDopplerMultiCurve.sol
|
|
75
|
-
src/libs/CoinRewardsV4.sol
|
|
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/
|
|
78
|
-
src/libs/
|
|
79
|
-
src/libs/
|
|
80
|
-
src/libs/
|
|
81
|
-
src/libs/
|
|
82
|
-
src/libs/
|
|
83
|
-
src/
|
|
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
|
|
88
|
-
src/types/PoolState.sol
|
|
89
|
-
src/utils/AutoSwapper.sol
|
|
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
|
|
92
|
-
src/utils/uniswap/BitMath.sol
|
|
93
|
-
src/utils/uniswap/BytesLib.sol
|
|
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
|
|
96
|
-
src/utils/uniswap/FullMath.sol
|
|
97
|
-
src/utils/uniswap/LiquidityAmounts.sol
|
|
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
|
|
100
|
-
src/utils/uniswap/SqrtPriceMath.sol
|
|
101
|
-
src/utils/uniswap/TickMath.sol
|
|
102
|
-
src/utils/uniswap/UnsafeMath.sol
|
|
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
|
|
105
|
-
test/AutoSwapper.t.sol
|
|
106
|
-
test/Coin.t.sol
|
|
107
|
-
test/
|
|
108
|
-
test/
|
|
109
|
-
test/
|
|
110
|
-
test/
|
|
111
|
-
test/
|
|
112
|
-
test/
|
|
113
|
-
test/
|
|
114
|
-
test/
|
|
115
|
-
test/
|
|
116
|
-
test/
|
|
117
|
-
test/
|
|
118
|
-
test/
|
|
119
|
-
test/utils/
|
|
120
|
-
test/utils/
|
|
121
|
-
test/utils/
|
|
122
|
-
test/utils/
|
|
123
|
-
test/utils/
|
|
124
|
-
test/utils/
|
|
125
|
-
test/
|
|
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
|
|
128
|
-
script/DeployDevFactory.s.sol
|
|
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
|
|
133
|
-
script/PrintUpgradeCommand.s.sol
|
|
134
|
-
script/TestBackingCoinSwap.s.sol
|
|
135
|
-
script/TestV4Swap.s.sol
|
|
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
|
|
138
|
-
script/UpgradeHooks.s.sol
|
|
137
|
+
script/UpgradeFactoryImpl.s.sol 9ms (unchanged)
|
|
138
|
+
script/UpgradeHooks.s.sol 6ms (unchanged)
|
|
139
139
|
[34mCLI[39m Building entry: package/index.ts
|
|
140
140
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
141
141
|
[34mCLI[39m tsup v8.4.0
|
|
@@ -144,9 +144,9 @@ script/UpgradeHooks.s.sol 7ms (unchanged)
|
|
|
144
144
|
[34mCLI[39m Cleaning output folder
|
|
145
145
|
[34mCJS[39m Build start
|
|
146
146
|
[34mESM[39m Build start
|
|
147
|
-
[32mESM[39m [1mdist/index.js [22m[32m130.
|
|
148
|
-
[32mESM[39m [1mdist/index.js.map [22m[
|
|
149
|
-
[32mESM[39m ⚡️ Build success in
|
|
150
|
-
[32mCJS[39m [1mdist/index.cjs [22m[
|
|
151
|
-
[32mCJS[39m [1mdist/index.cjs.map [22m[
|
|
152
|
-
[32mCJS[39m ⚡️ Build success in
|
|
147
|
+
[32mESM[39m [1mdist/index.js [22m[32m130.77 KB[39m
|
|
148
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m233.85 KB[39m
|
|
149
|
+
[32mESM[39m ⚡️ Build success in 86ms
|
|
150
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m132.20 KB[39m
|
|
151
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m234.00 KB[39m
|
|
152
|
+
[32mCJS[39m ⚡️ Build success in 88ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,53 @@
|
|
|
1
1
|
# @zoralabs/coins
|
|
2
2
|
|
|
3
|
-
## 2.
|
|
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
|
-
-
|
|
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
|
-
-
|
|
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
|
|
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
|
|
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)
|
package/abis/BaseCoin.json
CHANGED
package/abis/ContentCoin.json
CHANGED
package/abis/CreatorCoin.json
CHANGED
|
@@ -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
|
+
]
|
package/abis/IZoraFactory.json
CHANGED
|
@@ -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",
|