@zoralabs/coins 2.1.2 → 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 +152 -0
- package/CHANGELOG.md +93 -0
- package/README.md +4 -0
- package/abis/BaseCoin.json +26 -5
- package/abis/BaseTest.json +2 -7
- package/abis/ContentCoin.json +26 -5
- package/abis/CreatorCoin.json +30 -9
- package/abis/FeeEstimatorHook.json +94 -6
- package/abis/ICoin.json +26 -0
- package/abis/ICoinV3.json +26 -0
- package/abis/ICreatorCoin.json +39 -0
- package/abis/IERC721.json +36 -36
- package/abis/IHasCoinType.json +15 -0
- package/abis/IHasTotalSupplyForPositions.json +15 -0
- package/abis/{LiquidityMigrationReceiver.json → IUpgradeableDestinationV4HookWithUpdateableFee.json} +10 -18
- package/abis/IZoraFactory.json +121 -0
- package/abis/IZoraHookRegistry.json +188 -0
- package/abis/VmContractHelper226.json +233 -0
- package/abis/ZoraFactoryImpl.json +101 -6
- package/abis/ZoraHookRegistry.json +375 -0
- package/abis/{CreatorCoinHook.json → ZoraV4CoinHook.json} +95 -2
- package/addresses/8453.json +6 -5
- package/audits/report-cantinacode-zora-0827.pdf +3498 -4
- package/dist/index.cjs +93 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +93 -13
- package/dist/index.js.map +1 -1
- package/dist/wagmiGenerated.d.ts +144 -22
- package/dist/wagmiGenerated.d.ts.map +1 -1
- package/foundry.toml +4 -1
- package/package/wagmiGenerated.ts +93 -13
- package/package.json +6 -4
- package/script/PrintRegisterUpgradePath.s.sol +0 -7
- package/script/TestBackingCoinSwap.s.sol +0 -3
- package/script/TestV4Swap.s.sol +0 -3
- package/script/UpgradeFactoryImpl.s.sol +1 -1
- package/src/BaseCoin.sol +19 -24
- package/src/ContentCoin.sol +11 -2
- package/src/CreatorCoin.sol +34 -15
- package/src/ZoraFactoryImpl.sol +163 -92
- package/src/deployment/CoinsDeployerBase.sol +24 -58
- package/src/hook-registry/ZoraHookRegistry.sol +97 -0
- package/src/hooks/{BaseZoraV4CoinHook.sol → ZoraV4CoinHook.sol} +77 -15
- package/src/interfaces/ICoin.sol +19 -1
- package/src/interfaces/ICreatorCoin.sol +4 -0
- package/src/interfaces/IUpgradeableV4Hook.sol +18 -0
- package/src/interfaces/IZoraFactory.sol +51 -10
- package/src/interfaces/IZoraHookRegistry.sol +47 -0
- package/src/libs/CoinConstants.sol +43 -32
- package/src/libs/CoinDopplerMultiCurve.sol +11 -11
- package/src/libs/CoinRewardsV4.sol +68 -37
- package/src/libs/CoinSetup.sol +2 -9
- package/src/libs/DopplerMath.sol +2 -2
- package/src/libs/HooksDeployment.sol +13 -65
- package/src/libs/V4Liquidity.sol +109 -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 +32 -30
- package/test/ContentCoinRewards.t.sol +363 -0
- package/test/CreatorCoin.t.sol +53 -29
- package/test/CreatorCoinRewards.t.sol +375 -0
- package/test/DeploymentHooks.t.sol +64 -12
- package/test/Factory.t.sol +24 -7
- package/test/HooksDeployment.t.sol +4 -4
- package/test/LiquidityMigration.t.sol +149 -16
- package/test/Upgrades.t.sol +44 -48
- package/test/V4Liquidity.t.sol +178 -0
- package/test/ZoraHookRegistry.t.sol +266 -0
- package/test/utils/BaseTest.sol +25 -43
- package/test/utils/FeeEstimatorHook.sol +4 -6
- package/test/utils/RewardTestHelpers.sol +106 -0
- package/.turbo/turbo-build.log +0 -199
- package/abis/AutoSwapperTest.json +0 -618
- package/abis/BadImpl.json +0 -15
- package/abis/BaseZoraV4CoinHook.json +0 -1664
- package/abis/CoinConstants.json +0 -158
- package/abis/CoinRewardsV4.json +0 -67
- package/abis/CoinTest.json +0 -819
- package/abis/CoinUniV4Test.json +0 -1128
- package/abis/ContentCoinHook.json +0 -1733
- package/abis/CreatorCoinTest.json +0 -887
- package/abis/Deploy.json +0 -9
- package/abis/DeployHooks.json +0 -9
- package/abis/DeployScript.json +0 -35
- package/abis/DeployedCoinVersionLookupTest.json +0 -740
- package/abis/DifferentNamespaceVersionLookup.json +0 -39
- package/abis/FactoryTest.json +0 -748
- package/abis/FakeHookNoInterface.json +0 -21
- package/abis/GenerateDeterministicParams.json +0 -9
- package/abis/HooksDeploymentTest.json +0 -645
- package/abis/HooksTest.json +0 -709
- package/abis/InvalidLiquidityMigrationReceiver.json +0 -21
- package/abis/LiquidityMigrationTest.json +0 -889
- package/abis/MockBadFactory.json +0 -15
- package/abis/MultiOwnableTest.json +0 -766
- package/abis/PrintUpgradeCommand.json +0 -9
- package/abis/TestDeployedCoinVersionLookupImplementation.json +0 -39
- package/abis/TestV4Swap.json +0 -9
- package/abis/UpgradeFactoryImpl.json +0 -9
- package/abis/UpgradeHooks.json +0 -35
- package/abis/UpgradesTest.json +0 -723
- package/src/hooks/ContentCoinHook.sol +0 -27
- package/src/hooks/CreatorCoinHook.sol +0 -27
- package/src/libs/CreatorCoinConstants.sol +0 -16
- package/src/libs/CreatorCoinRewards.sol +0 -34
- package/src/libs/MarketConstants.sol +0 -15
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
|
|
2
|
+
> @zoralabs/coins@2.3.0 build:js /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
|
|
3
|
+
> pnpm run wagmi:generate && pnpm run copy-abis && pnpm run prettier:write && tsup
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
> @zoralabs/coins@2.3.0 wagmi:generate /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
|
|
7
|
+
> pnpm run build:contracts:minimal && wagmi generate && pnpm exec rename-generated-abi-casing ./package/wagmiGenerated.ts
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
> @zoralabs/coins@2.3.0 build:contracts:minimal /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
|
|
11
|
+
> forge build --skip test --skip script --no-metadata
|
|
12
|
+
|
|
13
|
+
Compiling 210 files with Solc 0.8.28
|
|
14
|
+
Solc 0.8.28 finished in 76.74s
|
|
15
|
+
Compiler run successful!
|
|
16
|
+
[33m-[39m Validating plugins
|
|
17
|
+
[32m✔[39m Validating plugins
|
|
18
|
+
[33m-[39m Resolving contracts
|
|
19
|
+
[32m✔[39m Resolving contracts
|
|
20
|
+
[33m-[39m Running plugins
|
|
21
|
+
[32m✔[39m Running plugins
|
|
22
|
+
[33m-[39m Writing to [90mpackage/wagmiGenerated.ts[39m
|
|
23
|
+
[32m✔[39m Writing to [90mpackage/wagmiGenerated.ts[39m
|
|
24
|
+
🔄 Processing 1 file(s) to replace 'Abi' with 'ABI'...
|
|
25
|
+
📝 Processing ./package/wagmiGenerated.ts...
|
|
26
|
+
✅ Updated ./package/wagmiGenerated.ts (10 replacements)
|
|
27
|
+
✨ All files processed successfully!
|
|
28
|
+
|
|
29
|
+
> @zoralabs/coins@2.3.0 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
|
|
30
|
+
> pnpm exec bundle-abis
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
> @zoralabs/coins@2.3.0 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
|
|
34
|
+
> prettier --write 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'
|
|
35
|
+
|
|
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
|
+
src/hooks/ZoraV4CoinHook.sol 250ms (unchanged)
|
|
45
|
+
src/interfaces/IAirlock.sol 4ms (unchanged)
|
|
46
|
+
src/interfaces/ICoin.sol 40ms (unchanged)
|
|
47
|
+
src/interfaces/ICoinComments.sol 5ms (unchanged)
|
|
48
|
+
src/interfaces/ICoinDeployHook.sol 5ms (unchanged)
|
|
49
|
+
src/interfaces/ICoinV3.sol 8ms (unchanged)
|
|
50
|
+
src/interfaces/ICreatorCoin.sol 2ms (unchanged)
|
|
51
|
+
src/interfaces/ICreatorCoinHook.sol 1ms (unchanged)
|
|
52
|
+
src/interfaces/IDeployedCoinVersionLookup.sol 1ms (unchanged)
|
|
53
|
+
src/interfaces/IDopplerErrors.sol 1ms (unchanged)
|
|
54
|
+
src/interfaces/IERC7572.sol 1ms (unchanged)
|
|
55
|
+
src/interfaces/IHasRewardsRecipients.sol 2ms (unchanged)
|
|
56
|
+
src/interfaces/IHooksUpgradeGate.sol 3ms (unchanged)
|
|
57
|
+
src/interfaces/IMsgSender.sol 1ms (unchanged)
|
|
58
|
+
src/interfaces/INonfungiblePositionManager.sol 7ms (unchanged)
|
|
59
|
+
src/interfaces/IPoolConfigEncoding.sol 2ms (unchanged)
|
|
60
|
+
src/interfaces/IProtocolRewards.sol 15ms (unchanged)
|
|
61
|
+
src/interfaces/ISwapPathRouter.sol 2ms (unchanged)
|
|
62
|
+
src/interfaces/ISwapRouter.sol 1ms (unchanged)
|
|
63
|
+
src/interfaces/IUniswapV3Factory.sol 9ms (unchanged)
|
|
64
|
+
src/interfaces/IUniswapV3Pool.sol 6ms (unchanged)
|
|
65
|
+
src/interfaces/IUniswapV3SwapCallback.sol 5ms (unchanged)
|
|
66
|
+
src/interfaces/IUpgradeableV4Hook.sol 4ms (unchanged)
|
|
67
|
+
src/interfaces/IWETH.sol 6ms (unchanged)
|
|
68
|
+
src/interfaces/IZoraFactory.sol 23ms (unchanged)
|
|
69
|
+
src/interfaces/IZoraHookRegistry.sol 5ms (unchanged)
|
|
70
|
+
src/interfaces/IZoraV4CoinHook.sol 11ms (unchanged)
|
|
71
|
+
src/libs/CoinCommon.sol 12ms (unchanged)
|
|
72
|
+
src/libs/CoinConfigurationVersions.sol 66ms (unchanged)
|
|
73
|
+
src/libs/CoinConstants.sol 15ms (unchanged)
|
|
74
|
+
src/libs/CoinDopplerMultiCurve.sol 196ms (unchanged)
|
|
75
|
+
src/libs/CoinRewardsV4.sol 202ms (unchanged)
|
|
76
|
+
src/libs/CoinSetup.sol 53ms (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)
|
|
84
|
+
src/types/LpPosition.sol 1ms (unchanged)
|
|
85
|
+
src/types/PoolConfiguration.sol 2ms (unchanged)
|
|
86
|
+
src/types/PoolState.sol 3ms (unchanged)
|
|
87
|
+
src/utils/AutoSwapper.sol 40ms (unchanged)
|
|
88
|
+
src/utils/DeployedCoinVersionLookup.sol 8ms (unchanged)
|
|
89
|
+
src/utils/MultiOwnable.sol 64ms (unchanged)
|
|
90
|
+
src/utils/uniswap/BitMath.sol 10ms (unchanged)
|
|
91
|
+
src/utils/uniswap/BytesLib.sol 11ms (unchanged)
|
|
92
|
+
src/utils/uniswap/CustomRevert.sol 55ms (unchanged)
|
|
93
|
+
src/utils/uniswap/FixedPoint96.sol 1ms (unchanged)
|
|
94
|
+
src/utils/uniswap/FullMath.sol 36ms (unchanged)
|
|
95
|
+
src/utils/uniswap/LiquidityAmounts.sol 85ms (unchanged)
|
|
96
|
+
src/utils/uniswap/Path.sol 8ms (unchanged)
|
|
97
|
+
src/utils/uniswap/SafeCast.sol 20ms (unchanged)
|
|
98
|
+
src/utils/uniswap/SqrtPriceMath.sol 116ms (unchanged)
|
|
99
|
+
src/utils/uniswap/TickMath.sol 117ms (unchanged)
|
|
100
|
+
src/utils/uniswap/UnsafeMath.sol 3ms (unchanged)
|
|
101
|
+
src/version/ContractVersionBase.sol 1ms (unchanged)
|
|
102
|
+
src/ZoraFactoryImpl.sol 198ms (unchanged)
|
|
103
|
+
test/AutoSwapper.t.sol 87ms (unchanged)
|
|
104
|
+
test/Coin.t.sol 178ms (unchanged)
|
|
105
|
+
test/CoinRewardsV4.t.sol 15ms (unchanged)
|
|
106
|
+
test/CoinUniV4.t.sol 618ms (unchanged)
|
|
107
|
+
test/ContentCoinRewards.t.sol 216ms (unchanged)
|
|
108
|
+
test/CreatorCoin.t.sol 262ms (unchanged)
|
|
109
|
+
test/CreatorCoinRewards.t.sol 178ms (unchanged)
|
|
110
|
+
test/DeploymentHooks.t.sol 152ms (unchanged)
|
|
111
|
+
test/Factory.t.sol 150ms (unchanged)
|
|
112
|
+
test/HooksDeployment.t.sol 46ms (unchanged)
|
|
113
|
+
test/LiquidityMigration.t.sol 363ms (unchanged)
|
|
114
|
+
test/mocks/MockERC20.sol 6ms (unchanged)
|
|
115
|
+
test/MultiOwnable.t.sol 153ms (unchanged)
|
|
116
|
+
test/Upgrades.t.sol 176ms (unchanged)
|
|
117
|
+
test/utils/BaseTest.sol 263ms (unchanged)
|
|
118
|
+
test/utils/ContractAddresses.sol 3ms (unchanged)
|
|
119
|
+
test/utils/DeployedCoinVersionLookup.t.sol 70ms (unchanged)
|
|
120
|
+
test/utils/FeeEstimatorHook.sol 48ms (unchanged)
|
|
121
|
+
test/utils/ProtocolRewards.sol 561ms (unchanged)
|
|
122
|
+
test/utils/ProxyShim.sol 12ms (unchanged)
|
|
123
|
+
test/utils/RewardTestHelpers.sol 76ms (unchanged)
|
|
124
|
+
test/V4Liquidity.t.sol 132ms (unchanged)
|
|
125
|
+
test/ZoraHookRegistry.t.sol 237ms (unchanged)
|
|
126
|
+
script/Deploy.s.sol 8ms (unchanged)
|
|
127
|
+
script/DeployAutoSwapper.s.sol 16ms (unchanged)
|
|
128
|
+
script/DeployDevFactory.s.sol 5ms (unchanged)
|
|
129
|
+
script/DeployPostDeploymentHooks.s.sol 4ms (unchanged)
|
|
130
|
+
script/DeployUpgradeGate.s.sol 5ms (unchanged)
|
|
131
|
+
script/GenerateDeterministicParams.s.sol 20ms (unchanged)
|
|
132
|
+
script/PrintRegisterUpgradePath.s.sol 11ms (unchanged)
|
|
133
|
+
script/PrintUpgradeCommand.s.sol 3ms (unchanged)
|
|
134
|
+
script/TestBackingCoinSwap.s.sol 72ms (unchanged)
|
|
135
|
+
script/TestV4Swap.s.sol 67ms (unchanged)
|
|
136
|
+
script/UpgradeCoinImpl.sol 7ms (unchanged)
|
|
137
|
+
script/UpgradeFactoryImpl.s.sol 9ms (unchanged)
|
|
138
|
+
script/UpgradeHooks.s.sol 6ms (unchanged)
|
|
139
|
+
[34mCLI[39m Building entry: package/index.ts
|
|
140
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
141
|
+
[34mCLI[39m tsup v8.4.0
|
|
142
|
+
[34mCLI[39m Using tsup config: /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins/tsup.config.ts
|
|
143
|
+
[34mCLI[39m Target: es2021
|
|
144
|
+
[34mCLI[39m Cleaning output folder
|
|
145
|
+
[34mCJS[39m Build start
|
|
146
|
+
[34mESM[39m Build start
|
|
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,5 +1,98 @@
|
|
|
1
1
|
# @zoralabs/coins
|
|
2
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
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
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
|
|
23
|
+
|
|
24
|
+
Consolidates multiple hook contracts into a single unified hook for simplified architecture and better maintainability.
|
|
25
|
+
|
|
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
|
|
51
|
+
|
|
52
|
+
## 2.2.0
|
|
53
|
+
|
|
54
|
+
### Minor Changes
|
|
55
|
+
|
|
56
|
+
- 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.
|
|
57
|
+
|
|
58
|
+
## New Features:
|
|
59
|
+
|
|
60
|
+
- Platform referral and trade referral functionality for creator coins (previously only supported on content coins)
|
|
61
|
+
- Unified fee structure: Both content and creator coins use identical 1% fee distribution
|
|
62
|
+
|
|
63
|
+
### Fee Changes - Content Coins
|
|
64
|
+
|
|
65
|
+
| Recipient | Before (3% total fee) | After (1% total fee) |
|
|
66
|
+
| ----------------- | --------------------- | -------------------- |
|
|
67
|
+
| | % of Fee | % of Fee |
|
|
68
|
+
| Creator | 33.33% | 50% |
|
|
69
|
+
| Platform Referral | 10% | 20% |
|
|
70
|
+
| Trade Referral | 10% | 4% |
|
|
71
|
+
| Doppler | 3.33% | 1% |
|
|
72
|
+
| Protocol | 10% | 5% |
|
|
73
|
+
| LP Rewards | 33.33% | 20% |
|
|
74
|
+
|
|
75
|
+
### Fee Changes - Creator Coins
|
|
76
|
+
|
|
77
|
+
| Recipient | Before (3% total fee) | After (1% total fee) |
|
|
78
|
+
| ----------------- | --------------------- | -------------------- |
|
|
79
|
+
| | % of Fee | % of Fee |
|
|
80
|
+
| Creator | 33.33% | 50% |
|
|
81
|
+
| Platform Referral | - | 20% |
|
|
82
|
+
| Trade Referral | - | 4% |
|
|
83
|
+
| Doppler | - | 1% |
|
|
84
|
+
| Protocol | 33.33% | 5% |
|
|
85
|
+
| LP Rewards | 33.33% | 20% |
|
|
86
|
+
|
|
87
|
+
**Implementation Changes:**
|
|
88
|
+
|
|
89
|
+
- Consolidated reward logic into `CoinRewardsV4.distributeMarketRewards()`
|
|
90
|
+
|
|
91
|
+
**Backwards Compatibility:**
|
|
92
|
+
|
|
93
|
+
- Existing `CreatorCoinRewards` event is still emitted for backwards compatibility when rewards are distributed for a CreatorCoin
|
|
94
|
+
- Additionally, when market rewards are distributed for a CreatorCoin, the same `CoinMarketRewardsV4` event that is already emitted for ContentCoins is now also emitted
|
|
95
|
+
|
|
3
96
|
## 2.1.2
|
|
4
97
|
|
|
5
98
|
### Patch Changes
|
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
|
@@ -131,6 +131,19 @@
|
|
|
131
131
|
"outputs": [],
|
|
132
132
|
"stateMutability": "nonpayable"
|
|
133
133
|
},
|
|
134
|
+
{
|
|
135
|
+
"type": "function",
|
|
136
|
+
"name": "coinType",
|
|
137
|
+
"inputs": [],
|
|
138
|
+
"outputs": [
|
|
139
|
+
{
|
|
140
|
+
"name": "",
|
|
141
|
+
"type": "uint8",
|
|
142
|
+
"internalType": "enum IHasCoinType.CoinType"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"stateMutability": "view"
|
|
146
|
+
},
|
|
134
147
|
{
|
|
135
148
|
"type": "function",
|
|
136
149
|
"name": "contractURI",
|
|
@@ -890,6 +903,19 @@
|
|
|
890
903
|
],
|
|
891
904
|
"stateMutability": "view"
|
|
892
905
|
},
|
|
906
|
+
{
|
|
907
|
+
"type": "function",
|
|
908
|
+
"name": "totalSupplyForPositions",
|
|
909
|
+
"inputs": [],
|
|
910
|
+
"outputs": [
|
|
911
|
+
{
|
|
912
|
+
"name": "",
|
|
913
|
+
"type": "uint256",
|
|
914
|
+
"internalType": "uint256"
|
|
915
|
+
}
|
|
916
|
+
],
|
|
917
|
+
"stateMutability": "view"
|
|
918
|
+
},
|
|
893
919
|
{
|
|
894
920
|
"type": "function",
|
|
895
921
|
"name": "transfer",
|
|
@@ -1822,11 +1848,6 @@
|
|
|
1822
1848
|
"name": "OwnerCannotBeAddressZero",
|
|
1823
1849
|
"inputs": []
|
|
1824
1850
|
},
|
|
1825
|
-
{
|
|
1826
|
-
"type": "error",
|
|
1827
|
-
"name": "ReentrancyGuardReentrantCall",
|
|
1828
|
-
"inputs": []
|
|
1829
|
-
},
|
|
1830
1851
|
{
|
|
1831
1852
|
"type": "error",
|
|
1832
1853
|
"name": "SlippageBoundsExceeded",
|
package/abis/BaseTest.json
CHANGED
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
"type": "function",
|
|
94
|
-
"name": "
|
|
94
|
+
"name": "getSalt",
|
|
95
95
|
"inputs": [
|
|
96
96
|
{
|
|
97
97
|
"name": "trustedMessageSenders",
|
|
@@ -101,12 +101,7 @@
|
|
|
101
101
|
],
|
|
102
102
|
"outputs": [
|
|
103
103
|
{
|
|
104
|
-
"name": "
|
|
105
|
-
"type": "bytes32",
|
|
106
|
-
"internalType": "bytes32"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"name": "creatorCoinSalt",
|
|
104
|
+
"name": "hookSalt",
|
|
110
105
|
"type": "bytes32",
|
|
111
106
|
"internalType": "bytes32"
|
|
112
107
|
}
|
package/abis/ContentCoin.json
CHANGED
|
@@ -157,6 +157,19 @@
|
|
|
157
157
|
"outputs": [],
|
|
158
158
|
"stateMutability": "nonpayable"
|
|
159
159
|
},
|
|
160
|
+
{
|
|
161
|
+
"type": "function",
|
|
162
|
+
"name": "coinType",
|
|
163
|
+
"inputs": [],
|
|
164
|
+
"outputs": [
|
|
165
|
+
{
|
|
166
|
+
"name": "",
|
|
167
|
+
"type": "uint8",
|
|
168
|
+
"internalType": "enum IHasCoinType.CoinType"
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"stateMutability": "pure"
|
|
172
|
+
},
|
|
160
173
|
{
|
|
161
174
|
"type": "function",
|
|
162
175
|
"name": "contractURI",
|
|
@@ -916,6 +929,19 @@
|
|
|
916
929
|
],
|
|
917
930
|
"stateMutability": "view"
|
|
918
931
|
},
|
|
932
|
+
{
|
|
933
|
+
"type": "function",
|
|
934
|
+
"name": "totalSupplyForPositions",
|
|
935
|
+
"inputs": [],
|
|
936
|
+
"outputs": [
|
|
937
|
+
{
|
|
938
|
+
"name": "",
|
|
939
|
+
"type": "uint256",
|
|
940
|
+
"internalType": "uint256"
|
|
941
|
+
}
|
|
942
|
+
],
|
|
943
|
+
"stateMutability": "pure"
|
|
944
|
+
},
|
|
919
945
|
{
|
|
920
946
|
"type": "function",
|
|
921
947
|
"name": "transfer",
|
|
@@ -1848,11 +1874,6 @@
|
|
|
1848
1874
|
"name": "OwnerCannotBeAddressZero",
|
|
1849
1875
|
"inputs": []
|
|
1850
1876
|
},
|
|
1851
|
-
{
|
|
1852
|
-
"type": "error",
|
|
1853
|
-
"name": "ReentrancyGuardReentrantCall",
|
|
1854
|
-
"inputs": []
|
|
1855
|
-
},
|
|
1856
1877
|
{
|
|
1857
1878
|
"type": "error",
|
|
1858
1879
|
"name": "SlippageBoundsExceeded",
|
package/abis/CreatorCoin.json
CHANGED
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
"type": "constructor",
|
|
4
4
|
"inputs": [
|
|
5
5
|
{
|
|
6
|
-
"name": "
|
|
6
|
+
"name": "protocolRewardRecipient_",
|
|
7
7
|
"type": "address",
|
|
8
8
|
"internalType": "address"
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
|
-
"name": "
|
|
11
|
+
"name": "protocolRewards_",
|
|
12
12
|
"type": "address",
|
|
13
13
|
"internalType": "address"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
|
-
"name": "
|
|
16
|
+
"name": "poolManager_",
|
|
17
17
|
"type": "address",
|
|
18
18
|
"internalType": "contract IPoolManager"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
|
-
"name": "
|
|
21
|
+
"name": "airlock_",
|
|
22
22
|
"type": "address",
|
|
23
23
|
"internalType": "address"
|
|
24
24
|
}
|
|
@@ -170,6 +170,19 @@
|
|
|
170
170
|
],
|
|
171
171
|
"stateMutability": "nonpayable"
|
|
172
172
|
},
|
|
173
|
+
{
|
|
174
|
+
"type": "function",
|
|
175
|
+
"name": "coinType",
|
|
176
|
+
"inputs": [],
|
|
177
|
+
"outputs": [
|
|
178
|
+
{
|
|
179
|
+
"name": "",
|
|
180
|
+
"type": "uint8",
|
|
181
|
+
"internalType": "enum IHasCoinType.CoinType"
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"stateMutability": "pure"
|
|
185
|
+
},
|
|
173
186
|
{
|
|
174
187
|
"type": "function",
|
|
175
188
|
"name": "contractURI",
|
|
@@ -955,6 +968,19 @@
|
|
|
955
968
|
],
|
|
956
969
|
"stateMutability": "view"
|
|
957
970
|
},
|
|
971
|
+
{
|
|
972
|
+
"type": "function",
|
|
973
|
+
"name": "totalSupplyForPositions",
|
|
974
|
+
"inputs": [],
|
|
975
|
+
"outputs": [
|
|
976
|
+
{
|
|
977
|
+
"name": "",
|
|
978
|
+
"type": "uint256",
|
|
979
|
+
"internalType": "uint256"
|
|
980
|
+
}
|
|
981
|
+
],
|
|
982
|
+
"stateMutability": "pure"
|
|
983
|
+
},
|
|
958
984
|
{
|
|
959
985
|
"type": "function",
|
|
960
986
|
"name": "transfer",
|
|
@@ -1955,11 +1981,6 @@
|
|
|
1955
1981
|
"name": "OwnerCannotBeAddressZero",
|
|
1956
1982
|
"inputs": []
|
|
1957
1983
|
},
|
|
1958
|
-
{
|
|
1959
|
-
"type": "error",
|
|
1960
|
-
"name": "ReentrancyGuardReentrantCall",
|
|
1961
|
-
"inputs": []
|
|
1962
|
-
},
|
|
1963
1984
|
{
|
|
1964
1985
|
"type": "error",
|
|
1965
1986
|
"name": "SlippageBoundsExceeded",
|
|
@@ -16,11 +16,6 @@
|
|
|
16
16
|
"name": "upgradeGate",
|
|
17
17
|
"type": "address",
|
|
18
18
|
"internalType": "contract IHooksUpgradeGate"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"name": "initialSupplyForPositions",
|
|
22
|
-
"type": "uint256",
|
|
23
|
-
"internalType": "uint256"
|
|
24
19
|
}
|
|
25
20
|
],
|
|
26
21
|
"stateMutability": "nonpayable"
|
|
@@ -1248,7 +1243,7 @@
|
|
|
1248
1243
|
]
|
|
1249
1244
|
},
|
|
1250
1245
|
{
|
|
1251
|
-
"name": "",
|
|
1246
|
+
"name": "additionalData",
|
|
1252
1247
|
"type": "bytes",
|
|
1253
1248
|
"internalType": "bytes"
|
|
1254
1249
|
}
|
|
@@ -1256,6 +1251,99 @@
|
|
|
1256
1251
|
"outputs": [],
|
|
1257
1252
|
"stateMutability": "nonpayable"
|
|
1258
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
|
+
},
|
|
1259
1347
|
{
|
|
1260
1348
|
"type": "function",
|
|
1261
1349
|
"name": "isTrustedMessageSender",
|
package/abis/ICoin.json
CHANGED
|
@@ -25,6 +25,19 @@
|
|
|
25
25
|
"outputs": [],
|
|
26
26
|
"stateMutability": "nonpayable"
|
|
27
27
|
},
|
|
28
|
+
{
|
|
29
|
+
"type": "function",
|
|
30
|
+
"name": "coinType",
|
|
31
|
+
"inputs": [],
|
|
32
|
+
"outputs": [
|
|
33
|
+
{
|
|
34
|
+
"name": "",
|
|
35
|
+
"type": "uint8",
|
|
36
|
+
"internalType": "enum IHasCoinType.CoinType"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"stateMutability": "view"
|
|
40
|
+
},
|
|
28
41
|
{
|
|
29
42
|
"type": "function",
|
|
30
43
|
"name": "contractURI",
|
|
@@ -446,6 +459,19 @@
|
|
|
446
459
|
],
|
|
447
460
|
"stateMutability": "view"
|
|
448
461
|
},
|
|
462
|
+
{
|
|
463
|
+
"type": "function",
|
|
464
|
+
"name": "totalSupplyForPositions",
|
|
465
|
+
"inputs": [],
|
|
466
|
+
"outputs": [
|
|
467
|
+
{
|
|
468
|
+
"name": "",
|
|
469
|
+
"type": "uint256",
|
|
470
|
+
"internalType": "uint256"
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
"stateMutability": "view"
|
|
474
|
+
},
|
|
449
475
|
{
|
|
450
476
|
"type": "event",
|
|
451
477
|
"name": "CoinBuy",
|
package/abis/ICoinV3.json
CHANGED
|
@@ -95,6 +95,19 @@
|
|
|
95
95
|
"outputs": [],
|
|
96
96
|
"stateMutability": "nonpayable"
|
|
97
97
|
},
|
|
98
|
+
{
|
|
99
|
+
"type": "function",
|
|
100
|
+
"name": "coinType",
|
|
101
|
+
"inputs": [],
|
|
102
|
+
"outputs": [
|
|
103
|
+
{
|
|
104
|
+
"name": "",
|
|
105
|
+
"type": "uint8",
|
|
106
|
+
"internalType": "enum IHasCoinType.CoinType"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"stateMutability": "view"
|
|
110
|
+
},
|
|
98
111
|
{
|
|
99
112
|
"type": "function",
|
|
100
113
|
"name": "contractURI",
|
|
@@ -690,6 +703,19 @@
|
|
|
690
703
|
],
|
|
691
704
|
"stateMutability": "view"
|
|
692
705
|
},
|
|
706
|
+
{
|
|
707
|
+
"type": "function",
|
|
708
|
+
"name": "totalSupplyForPositions",
|
|
709
|
+
"inputs": [],
|
|
710
|
+
"outputs": [
|
|
711
|
+
{
|
|
712
|
+
"name": "",
|
|
713
|
+
"type": "uint256",
|
|
714
|
+
"internalType": "uint256"
|
|
715
|
+
}
|
|
716
|
+
],
|
|
717
|
+
"stateMutability": "view"
|
|
718
|
+
},
|
|
693
719
|
{
|
|
694
720
|
"type": "function",
|
|
695
721
|
"name": "v3Factory",
|