@zoralabs/coins 2.3.0 → 2.4.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 (72) hide show
  1. package/.turbo/turbo-build$colon$js.log +119 -101
  2. package/CHANGELOG.md +31 -1
  3. package/README.md +1 -0
  4. package/abis/AddressConstants.json +7 -0
  5. package/abis/BaseTest.json +65 -3
  6. package/abis/BuySupplyWithV4SwapHook.json +429 -0
  7. package/abis/FeeEstimatorHook.json +23 -0
  8. package/abis/ITrustedMsgSenderProviderLookup.json +21 -0
  9. package/abis/IUniswapV4Router04.json +484 -0
  10. package/abis/IZoraV4CoinHook.json +5 -0
  11. package/abis/MockAirlock.json +39 -0
  12. package/abis/SimpleERC20.json +326 -0
  13. package/abis/TrustedMsgSenderProviderLookup.json +215 -0
  14. package/abis/VmContractHelper242.json +233 -0
  15. package/abis/ZoraV4CoinHook.json +21 -3
  16. package/addresses/8453.json +7 -9
  17. package/audits/report-cantinacode-zora-1021.pdf +0 -0
  18. package/dist/index.cjs +140 -19
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.js +139 -18
  21. package/dist/index.js.map +1 -1
  22. package/dist/wagmiGenerated.d.ts +205 -28
  23. package/dist/wagmiGenerated.d.ts.map +1 -1
  24. package/foundry.toml +5 -1
  25. package/package/wagmiGenerated.ts +139 -18
  26. package/package.json +3 -3
  27. package/script/DeployPostDeploymentHooks.s.sol +1 -3
  28. package/script/DeployTrustedMsgSenderLookup.s.sol +20 -0
  29. package/src/deployment/CoinsDeployerBase.sol +31 -9
  30. package/src/hooks/ZoraV4CoinHook.sol +19 -55
  31. package/src/hooks/deployment/BuySupplyWithV4SwapHook.sol +310 -0
  32. package/src/interfaces/ITrustedMsgSenderProviderLookup.sol +18 -0
  33. package/src/interfaces/IZoraV4CoinHook.sol +3 -0
  34. package/src/libs/HooksDeployment.sol +9 -8
  35. package/src/libs/V4Liquidity.sol +50 -6
  36. package/src/utils/AutoSwapper.sol +1 -1
  37. package/src/utils/TrustedMsgSenderProviderLookup.sol +73 -0
  38. package/src/version/ContractVersionBase.sol +1 -1
  39. package/test/BuySupplyWithV4SwapHook.t.sol +509 -0
  40. package/test/Coin.t.sol +21 -9
  41. package/test/CoinUniV4.t.sol +1 -2
  42. package/test/ContentCoinRewards.t.sol +1 -3
  43. package/test/CreatorCoin.t.sol +1 -4
  44. package/test/CreatorCoinRewards.t.sol +5 -3
  45. package/test/Factory.t.sol +3 -3
  46. package/test/HooksDeployment.t.sol +58 -6
  47. package/test/LiquidityMigration.t.sol +6 -2
  48. package/test/MultiOwnable.t.sol +4 -4
  49. package/test/TrustedMsgSenderProviderLookup.t.sol +112 -0
  50. package/test/Upgrades.t.sol +41 -27
  51. package/test/ZoraHookRegistry.t.sol +19 -9
  52. package/test/mocks/MockAirlock.sol +22 -0
  53. package/test/mocks/SimpleERC20.sol +8 -0
  54. package/test/utils/BaseTest.sol +185 -6
  55. package/test/utils/FeeEstimatorHook.sol +3 -1
  56. package/test/utils/TrustedSenderTestHelper.sol +18 -0
  57. package/test/utils/hookmate/README.md +50 -0
  58. package/test/utils/hookmate/artifacts/DeployHelper.sol +20 -0
  59. package/test/utils/hookmate/artifacts/Permit2.sol +16 -0
  60. package/test/utils/hookmate/artifacts/UniversalRouter.sol +29 -0
  61. package/test/utils/hookmate/artifacts/V4PoolManager.sol +17 -0
  62. package/test/utils/hookmate/artifacts/V4PositionManager.sol +23 -0
  63. package/test/utils/hookmate/artifacts/V4Quoter.sol +17 -0
  64. package/test/utils/hookmate/artifacts/V4Router.sol +18 -0
  65. package/test/utils/hookmate/constants/AddressConstants.sol +193 -0
  66. package/test/utils/hookmate/interfaces/router/IUniswapV4Router04.sol +173 -0
  67. package/test/utils/hookmate/interfaces/router/PathKey.sol +34 -0
  68. package/test/utils/hookmate/test/utils/SwapFeeEventAsserter.sol +24 -0
  69. package/wagmi.config.ts +1 -1
  70. package/src/utils/uniswap/BytesLib.sol +0 -35
  71. package/src/utils/uniswap/Path.sol +0 -31
  72. /package/abis/{VmContractHelper226.json → VmContractHelper235.json} +0 -0
@@ -1,17 +1,17 @@
1
1
 
2
- > @zoralabs/coins@2.3.0 build:js /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
2
+ > @zoralabs/coins@2.4.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.3.0 wagmi:generate /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
6
+ > @zoralabs/coins@2.4.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.3.0 build:contracts:minimal /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
10
+ > @zoralabs/coins@2.4.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 210 files with Solc 0.8.28
14
- Solc 0.8.28 finished in 76.74s
13
+ Compiling 227 files with Solc 0.8.28
14
+ Solc 0.8.28 finished in 106.91s
15
15
  Compiler run successful!
16
16
  - Validating plugins
17
17
  ✔ Validating plugins
@@ -26,116 +26,134 @@ Compiler run successful!
26
26
  ✅ Updated ./package/wagmiGenerated.ts (10 replacements)
27
27
  ✨ All files processed successfully!
28
28
 
29
- > @zoralabs/coins@2.3.0 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
29
+ > @zoralabs/coins@2.4.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.3.0 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
33
+ > @zoralabs/coins@2.4.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 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)
36
+ src/BaseCoin.sol 749ms (unchanged)
37
+ src/ContentCoin.sol 55ms (unchanged)
38
+ src/CreatorCoin.sol 98ms (unchanged)
39
+ src/deployment/CoinsDeployerBase.sol 363ms (unchanged)
40
+ src/hook-registry/ZoraHookRegistry.sol 138ms (unchanged)
41
+ src/hooks/deployment/BaseCoinDeployHook.sol 43ms (unchanged)
42
+ src/hooks/deployment/BuySupplyWithSwapRouterHook.sol 241ms (unchanged)
43
+ src/hooks/deployment/BuySupplyWithV4SwapHook.sol 233ms (unchanged)
44
+ src/hooks/HookUpgradeGate.sol 51ms (unchanged)
45
+ src/hooks/ZoraV4CoinHook.sol 224ms (unchanged)
45
46
  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)
47
+ src/interfaces/ICoin.sol 26ms (unchanged)
48
+ src/interfaces/ICoinComments.sol 4ms (unchanged)
49
+ src/interfaces/ICoinDeployHook.sol 2ms (unchanged)
50
+ src/interfaces/ICoinV3.sol 5ms (unchanged)
50
51
  src/interfaces/ICreatorCoin.sol 2ms (unchanged)
51
- src/interfaces/ICreatorCoinHook.sol 1ms (unchanged)
52
+ src/interfaces/ICreatorCoinHook.sol 2ms (unchanged)
52
53
  src/interfaces/IDeployedCoinVersionLookup.sol 1ms (unchanged)
53
54
  src/interfaces/IDopplerErrors.sol 1ms (unchanged)
54
55
  src/interfaces/IERC7572.sol 1ms (unchanged)
55
56
  src/interfaces/IHasRewardsRecipients.sol 2ms (unchanged)
56
- src/interfaces/IHooksUpgradeGate.sol 3ms (unchanged)
57
- src/interfaces/IMsgSender.sol 1ms (unchanged)
57
+ src/interfaces/IHooksUpgradeGate.sol 2ms (unchanged)
58
+ src/interfaces/IMsgSender.sol 2ms (unchanged)
58
59
  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)
60
+ src/interfaces/IPoolConfigEncoding.sol 1ms (unchanged)
61
+ src/interfaces/IProtocolRewards.sol 7ms (unchanged)
62
+ src/interfaces/ISwapPathRouter.sol 3ms (unchanged)
62
63
  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)
64
+ src/interfaces/ITrustedMsgSenderProviderLookup.sol 1ms (unchanged)
65
+ src/interfaces/IUniswapV3Factory.sol 5ms (unchanged)
66
+ src/interfaces/IUniswapV3Pool.sol 9ms (unchanged)
67
+ src/interfaces/IUniswapV3SwapCallback.sol 3ms (unchanged)
68
+ src/interfaces/IUpgradeableV4Hook.sol 6ms (unchanged)
69
+ src/interfaces/IWETH.sol 5ms (unchanged)
70
+ src/interfaces/IZoraFactory.sol 18ms (unchanged)
71
+ src/interfaces/IZoraHookRegistry.sol 4ms (unchanged)
72
+ src/interfaces/IZoraV4CoinHook.sol 9ms (unchanged)
73
+ src/libs/CoinCommon.sol 5ms (unchanged)
74
+ src/libs/CoinConfigurationVersions.sol 57ms (unchanged)
75
+ src/libs/CoinConstants.sol 7ms (unchanged)
76
+ src/libs/CoinDopplerMultiCurve.sol 174ms (unchanged)
77
+ src/libs/CoinRewardsV4.sol 210ms (unchanged)
78
+ src/libs/CoinSetup.sol 30ms (unchanged)
79
+ src/libs/DopplerMath.sol 165ms (unchanged)
80
+ src/libs/HooksDeployment.sol 114ms (unchanged)
81
+ src/libs/PoolStateReader.sol 9ms (unchanged)
82
+ src/libs/UniV4SwapHelper.sol 43ms (unchanged)
83
+ src/libs/UniV4SwapToCurrency.sol 74ms (unchanged)
84
+ src/libs/V4Liquidity.sol 322ms (unchanged)
85
+ src/proxy/ZoraFactory.sol 17ms (unchanged)
84
86
  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)
87
+ src/types/PoolConfiguration.sol 3ms (unchanged)
88
+ src/types/PoolState.sol 2ms (unchanged)
89
+ src/utils/AutoSwapper.sol 29ms (unchanged)
90
+ src/utils/DeployedCoinVersionLookup.sol 7ms (unchanged)
91
+ src/utils/MultiOwnable.sol 72ms (unchanged)
92
+ src/utils/TrustedMsgSenderProviderLookup.sol 37ms (unchanged)
93
+ src/utils/uniswap/BitMath.sol 9ms (unchanged)
94
+ src/utils/uniswap/CustomRevert.sol 52ms (unchanged)
95
+ src/utils/uniswap/FixedPoint96.sol 4ms (unchanged)
96
+ src/utils/uniswap/FullMath.sol 45ms (unchanged)
97
+ src/utils/uniswap/LiquidityAmounts.sol 72ms (unchanged)
98
+ src/utils/uniswap/SafeCast.sol 18ms (unchanged)
99
+ src/utils/uniswap/SqrtPriceMath.sol 106ms (unchanged)
100
+ src/utils/uniswap/TickMath.sol 102ms (unchanged)
100
101
  src/utils/uniswap/UnsafeMath.sol 3ms (unchanged)
101
102
  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)
103
+ src/ZoraFactoryImpl.sol 194ms (unchanged)
104
+ test/AutoSwapper.t.sol 89ms (unchanged)
105
+ test/BuySupplyWithV4SwapHook.t.sol 238ms (unchanged)
106
+ test/Coin.t.sol 219ms (unchanged)
107
+ test/CoinRewardsV4.t.sol 14ms (unchanged)
108
+ test/CoinUniV4.t.sol 605ms (unchanged)
109
+ test/ContentCoinRewards.t.sol 202ms (unchanged)
110
+ test/CreatorCoin.t.sol 233ms (unchanged)
111
+ test/CreatorCoinRewards.t.sol 160ms (unchanged)
112
+ test/DeploymentHooks.t.sol 134ms (unchanged)
113
+ test/Factory.t.sol 138ms (unchanged)
114
+ test/HooksDeployment.t.sol 77ms (unchanged)
115
+ test/LiquidityMigration.t.sol 369ms (unchanged)
116
+ test/mocks/MockAirlock.sol 6ms (unchanged)
117
+ test/mocks/MockERC20.sol 3ms (unchanged)
118
+ test/mocks/SimpleERC20.sol 2ms (unchanged)
119
+ test/MultiOwnable.t.sol 144ms (unchanged)
120
+ test/TrustedMsgSenderProviderLookup.t.sol 85ms (unchanged)
121
+ test/Upgrades.t.sol 163ms (unchanged)
122
+ test/utils/BaseTest.sol 414ms (unchanged)
123
+ test/utils/ContractAddresses.sol 5ms (unchanged)
124
+ test/utils/DeployedCoinVersionLookup.t.sol 75ms (unchanged)
125
+ test/utils/FeeEstimatorHook.sol 44ms (unchanged)
126
+ test/utils/hookmate/artifacts/DeployHelper.sol 9ms (unchanged)
127
+ test/utils/hookmate/artifacts/Permit2.sol 6ms (unchanged)
128
+ test/utils/hookmate/artifacts/UniversalRouter.sol 10ms (unchanged)
129
+ test/utils/hookmate/artifacts/V4PoolManager.sol 8ms (unchanged)
130
+ test/utils/hookmate/artifacts/V4PositionManager.sol 12ms (unchanged)
131
+ test/utils/hookmate/artifacts/V4Quoter.sol 6ms (unchanged)
132
+ test/utils/hookmate/artifacts/V4Router.sol 13ms (unchanged)
133
+ test/utils/hookmate/constants/AddressConstants.sol 101ms (unchanged)
134
+ test/utils/hookmate/interfaces/router/IUniswapV4Router04.sol 13ms (unchanged)
135
+ test/utils/hookmate/interfaces/router/PathKey.sol 21ms (unchanged)
136
+ test/utils/hookmate/test/utils/SwapFeeEventAsserter.sol 24ms (unchanged)
137
+ test/utils/ProtocolRewards.sol 545ms (unchanged)
138
+ test/utils/ProxyShim.sol 5ms (unchanged)
139
+ test/utils/RewardTestHelpers.sol 98ms (unchanged)
140
+ test/utils/TrustedSenderTestHelper.sol 5ms (unchanged)
141
+ test/V4Liquidity.t.sol 162ms (unchanged)
142
+ test/ZoraHookRegistry.t.sol 301ms (unchanged)
143
+ script/Deploy.s.sol 7ms (unchanged)
144
+ script/DeployAutoSwapper.s.sol 22ms (unchanged)
128
145
  script/DeployDevFactory.s.sol 5ms (unchanged)
129
- script/DeployPostDeploymentHooks.s.sol 4ms (unchanged)
146
+ script/DeployPostDeploymentHooks.s.sol 9ms (unchanged)
147
+ script/DeployTrustedMsgSenderLookup.s.sol 6ms (unchanged)
130
148
  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)
149
+ script/GenerateDeterministicParams.s.sol 26ms (unchanged)
150
+ script/PrintRegisterUpgradePath.s.sol 13ms (unchanged)
151
+ script/PrintUpgradeCommand.s.sol 13ms (unchanged)
152
+ script/TestBackingCoinSwap.s.sol 79ms (unchanged)
153
+ script/TestV4Swap.s.sol 63ms (unchanged)
136
154
  script/UpgradeCoinImpl.sol 7ms (unchanged)
137
155
  script/UpgradeFactoryImpl.s.sol 9ms (unchanged)
138
- script/UpgradeHooks.s.sol 6ms (unchanged)
156
+ script/UpgradeHooks.s.sol 9ms (unchanged)
139
157
  CLI Building entry: package/index.ts
140
158
  CLI Using tsconfig: tsconfig.json
141
159
  CLI tsup v8.4.0
@@ -144,9 +162,9 @@ script/UpgradeHooks.s.sol 6ms (unchanged)
144
162
  CLI Cleaning output folder
145
163
  CJS Build start
146
164
  ESM Build start
147
- ESM dist/index.js 130.77 KB
148
- ESM dist/index.js.map 233.85 KB
149
- ESM ⚡️ Build success in 86ms
150
- CJS dist/index.cjs 132.20 KB
151
- CJS dist/index.cjs.map 234.00 KB
152
- CJS ⚡️ Build success in 88ms
165
+ ESM dist/index.js 134.57 KB
166
+ ESM dist/index.js.map 240.22 KB
167
+ ESM ⚡️ Build success in 115ms
168
+ CJS dist/index.cjs 135.99 KB
169
+ CJS dist/index.cjs.map 240.37 KB
170
+ CJS ⚡️ Build success in 118ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @zoralabs/coins
2
2
 
3
+ ## 2.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 09fb2528: Make trusted senders in coin hooks modifiable
8
+
9
+ Trusted message senders can now be added or removed after hook deployment instead of being hardcoded at deployment time.
10
+
11
+ ### Patch Changes
12
+
13
+ - b41a2773: Fix double-counting of fees in burnPositions during liquidity migration
14
+
15
+ 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.
16
+
17
+ The fix:
18
+
19
+ - Use only `callerDelta` values directly without adding `feesAccrued`
20
+ - Add defensive balance checking in `mintPositions()` to cap liquidity at available token amounts
21
+ - Prevents migration failures from any remaining rounding discrepancies between burn and mint operations
22
+
23
+ - 8dc766eb: Fix incorrect senderIsTrusted logic for address(0) in ZoraV4CoinHook
24
+
25
+ Removes the special case handling for address(0) in the \_getOriginalMsgSender function that was incorrectly setting senderIsTrusted to true. This behavior was unintentionally changed in commit 09fb2528 which added special handling for address(0). This fix restores the original behavior where address(0) returns false for senderIsTrusted,
26
+
27
+ ## 2.3.1
28
+
29
+ ### Patch Changes
30
+
31
+ - 3c274d9d: Created a buy supply with v4 hook, for buying initial supply of a creator coin, supporting doing a v3 and v4 swap to buy the creator coin. updated the encoding function for buying initial supply to work with the v3 to v4 swap
32
+
3
33
  ## 2.3.0
4
34
 
5
35
  ### Minor Changes
@@ -25,7 +55,7 @@
25
55
 
26
56
  - d3808d55: Adjust creator coin vesting duration to account for leap years
27
57
 
28
- - Changed CREATOR_VESTING_DURATION from 5 _ 365 days to 5 _ 365.25 days
58
+ - Changed CREATOR*VESTING_DURATION from 5 * 365 days to 5 \_ 365.25 days
29
59
  - Addresses Cantina audit finding about 1.25 day shortfall in 5-year vesting period
30
60
 
31
61
  - b571fe54: Consolidate and clarify coin constants
package/README.md CHANGED
@@ -78,3 +78,4 @@ where `{chainName}` is the emdash name of the chain you want to deploy on.
78
78
  ## Audits
79
79
 
80
80
  * Coins Aug 2025: [Cantina Audit Report](./audits/report-cantinacode-zora-0827.pdf)
81
+ * Coins Oct 2025: [Cantina Audit Report](./audits/report-cantinacode-zora-1021.pdf)
@@ -0,0 +1,7 @@
1
+ [
2
+ {
3
+ "type": "error",
4
+ "name": "UnsupportedChainId",
5
+ "inputs": []
6
+ }
7
+ ]
@@ -94,9 +94,9 @@
94
94
  "name": "getSalt",
95
95
  "inputs": [
96
96
  {
97
- "name": "trustedMessageSenders",
98
- "type": "address[]",
99
- "internalType": "address[]"
97
+ "name": "trustedMsgSenderLookup",
98
+ "type": "address",
99
+ "internalType": "contract ITrustedMsgSenderProviderLookup"
100
100
  }
101
101
  ],
102
102
  "outputs": [
@@ -115,6 +115,13 @@
115
115
  "outputs": [],
116
116
  "stateMutability": "nonpayable"
117
117
  },
118
+ {
119
+ "type": "function",
120
+ "name": "setUpNonForked",
121
+ "inputs": [],
122
+ "outputs": [],
123
+ "stateMutability": "nonpayable"
124
+ },
118
125
  {
119
126
  "type": "function",
120
127
  "name": "setUpWithBlockNumber",
@@ -242,6 +249,56 @@
242
249
  ],
243
250
  "stateMutability": "view"
244
251
  },
252
+ {
253
+ "type": "event",
254
+ "name": "SlotFound",
255
+ "inputs": [
256
+ {
257
+ "name": "who",
258
+ "type": "address",
259
+ "indexed": false,
260
+ "internalType": "address"
261
+ },
262
+ {
263
+ "name": "fsig",
264
+ "type": "bytes4",
265
+ "indexed": false,
266
+ "internalType": "bytes4"
267
+ },
268
+ {
269
+ "name": "keysHash",
270
+ "type": "bytes32",
271
+ "indexed": false,
272
+ "internalType": "bytes32"
273
+ },
274
+ {
275
+ "name": "slot",
276
+ "type": "uint256",
277
+ "indexed": false,
278
+ "internalType": "uint256"
279
+ }
280
+ ],
281
+ "anonymous": false
282
+ },
283
+ {
284
+ "type": "event",
285
+ "name": "WARNING_UninitedSlot",
286
+ "inputs": [
287
+ {
288
+ "name": "who",
289
+ "type": "address",
290
+ "indexed": false,
291
+ "internalType": "address"
292
+ },
293
+ {
294
+ "name": "slot",
295
+ "type": "uint256",
296
+ "indexed": false,
297
+ "internalType": "uint256"
298
+ }
299
+ ],
300
+ "anonymous": false
301
+ },
245
302
  {
246
303
  "type": "event",
247
304
  "name": "log",
@@ -652,5 +709,10 @@
652
709
  "internalType": "address"
653
710
  }
654
711
  ]
712
+ },
713
+ {
714
+ "type": "error",
715
+ "name": "UnsupportedChainId",
716
+ "inputs": []
655
717
  }
656
718
  ]