@zoralabs/coins 0.7.1 → 1.0.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 (167) hide show
  1. package/.turbo/turbo-build.log +106 -84
  2. package/CHANGELOG.md +68 -0
  3. package/abis/BadImpl.json +15 -0
  4. package/abis/BalanceDeltaLibrary.json +15 -0
  5. package/abis/BaseCoin.json +1350 -0
  6. package/abis/BaseCoinDeployHook.json +78 -0
  7. package/abis/BaseHook.json +897 -0
  8. package/abis/BaseTest.json +60 -91
  9. package/abis/BeforeSwapDeltaLibrary.json +15 -0
  10. package/abis/BuySupplyWithSwapRouterHook.json +126 -0
  11. package/abis/Coin.json +214 -150
  12. package/abis/CoinConstants.json +65 -0
  13. package/abis/CoinDopplerMultiCurve.json +38 -0
  14. package/abis/CoinRewardsV4.json +54 -0
  15. package/abis/CoinTest.json +66 -111
  16. package/abis/CoinUniV4Test.json +1053 -0
  17. package/abis/CoinV4.json +1687 -0
  18. package/abis/CurrencyLibrary.json +25 -0
  19. package/abis/DeployHooks.json +9 -0
  20. package/abis/DeployScript.json +47 -0
  21. package/abis/DeployedCoinVersionLookup.json +21 -0
  22. package/abis/DeployedCoinVersionLookupTest.json +716 -0
  23. package/abis/DifferentNamespaceVersionLookup.json +39 -0
  24. package/abis/DopplerUniswapV3Test.json +62 -184
  25. package/abis/ERC20.json +310 -0
  26. package/abis/FactoryTest.json +98 -98
  27. package/abis/FakeHookNoInterface.json +21 -0
  28. package/abis/FeeEstimatorHook.json +1528 -0
  29. package/abis/Hooks.json +28 -0
  30. package/abis/HooksDeployment.json +23 -0
  31. package/abis/HooksTest.json +698 -0
  32. package/abis/IAllowanceTransfer.json +486 -0
  33. package/abis/ICoin.json +62 -69
  34. package/abis/ICoinDeployHook.json +31 -0
  35. package/abis/ICoinV3.json +879 -0
  36. package/abis/ICoinV4.json +915 -0
  37. package/abis/IContractMetadata.json +28 -0
  38. package/abis/IDeployedCoinVersionLookup.json +21 -0
  39. package/abis/IEIP712.json +15 -0
  40. package/abis/IEIP712_v4.json +15 -0
  41. package/abis/IERC20Minimal.json +172 -0
  42. package/abis/IERC6909Claims.json +288 -0
  43. package/abis/IERC721.json +36 -36
  44. package/abis/IERC721Permit_v4.json +88 -0
  45. package/abis/IExtsload.json +64 -0
  46. package/abis/IExttload.json +40 -0
  47. package/abis/IHasAfterCoinDeploy.json +31 -0
  48. package/abis/IHasContractName.json +15 -0
  49. package/abis/IHasPoolKey.json +42 -0
  50. package/abis/IHasRewardsRecipients.json +54 -0
  51. package/abis/IHasSwapPath.json +60 -0
  52. package/abis/IHooks.json +789 -0
  53. package/abis/IImmutableState.json +15 -0
  54. package/abis/IMsgSender.json +15 -0
  55. package/abis/IMulticall_v4.json +21 -0
  56. package/abis/INotifier.json +187 -0
  57. package/abis/IPermit2.json +865 -0
  58. package/abis/IPermit2Forwarder.json +138 -0
  59. package/abis/IPoolConfigEncoding.json +46 -0
  60. package/abis/IPoolInitializer_v4.json +53 -0
  61. package/abis/IPoolManager.json +1286 -0
  62. package/abis/IPositionManager.json +712 -0
  63. package/abis/IProtocolFees.json +174 -0
  64. package/abis/ISignatureTransfer.json +394 -0
  65. package/abis/ISubscriber.json +89 -0
  66. package/abis/ISwapPathRouter.json +92 -0
  67. package/abis/ISwapRouter.json +82 -0
  68. package/abis/IUniversalRouter.json +61 -0
  69. package/abis/IUnlockCallback.json +21 -0
  70. package/abis/IUnorderedNonce.json +44 -0
  71. package/abis/IV4Quoter.json +310 -0
  72. package/abis/IV4Router.json +47 -0
  73. package/abis/IZoraFactory.json +328 -4
  74. package/abis/IZoraV4CoinHook.json +427 -0
  75. package/abis/ImmutableState.json +36 -0
  76. package/abis/LPFeeLibrary.json +65 -0
  77. package/abis/MockERC20.json +21 -0
  78. package/abis/MultiOwnableTest.json +60 -91
  79. package/abis/{CoinConfigurationVersions.json → Position.json} +1 -1
  80. package/abis/PrintUpgradeCommand.json +9 -0
  81. package/abis/ProxyShim.json +24 -0
  82. package/abis/Simulate.json +0 -91
  83. package/abis/StateLibrary.json +80 -0
  84. package/abis/TestDeployedCoinVersionLookupImplementation.json +39 -0
  85. package/abis/TestV4Swap.json +9 -0
  86. package/abis/{CoinSetup.json → UniV3BuySell.json} +5 -0
  87. package/abis/UniV3Errors.json +32 -0
  88. package/abis/UpgradeCoinImpl.json +47 -0
  89. package/abis/UpgradeFactoryImpl.json +9 -0
  90. package/abis/UpgradesTest.json +671 -0
  91. package/abis/Vm.json +1482 -111
  92. package/abis/VmSafe.json +856 -32
  93. package/abis/ZoraFactoryImpl.json +450 -1
  94. package/abis/ZoraV4CoinHook.json +1439 -0
  95. package/addresses/8453.json +8 -3
  96. package/addresses/84532.json +8 -3
  97. package/dist/index.cjs +1998 -184
  98. package/dist/index.cjs.map +1 -1
  99. package/dist/index.js +1989 -178
  100. package/dist/index.js.map +1 -1
  101. package/dist/wagmiGenerated.d.ts +2852 -688
  102. package/dist/wagmiGenerated.d.ts.map +1 -1
  103. package/package/wagmiGenerated.ts +1992 -173
  104. package/package.json +7 -2
  105. package/remappings.txt +6 -1
  106. package/script/CoinsDeployerBase.sol +105 -10
  107. package/script/DeployDevFactory.s.sol +21 -0
  108. package/script/DeployHooks.s.sol +22 -0
  109. package/script/PrintUpgradeCommand.s.sol +13 -0
  110. package/script/Simulate.s.sol +4 -12
  111. package/script/TestBackingCoinSwap.s.sol +146 -0
  112. package/script/TestV4Swap.s.sol +136 -0
  113. package/script/UpgradeCoinImpl.sol +2 -2
  114. package/script/UpgradeFactoryImpl.s.sol +23 -0
  115. package/src/BaseCoin.sol +176 -0
  116. package/src/Coin.sol +93 -515
  117. package/src/CoinV4.sol +121 -0
  118. package/src/ZoraFactoryImpl.sol +257 -57
  119. package/src/hooks/ZoraV4CoinHook.sol +195 -0
  120. package/src/hooks/deployment/BaseCoinDeployHook.sol +62 -0
  121. package/src/hooks/deployment/BuySupplyWithSwapRouterHook.sol +80 -0
  122. package/src/interfaces/ICoin.sol +35 -39
  123. package/src/interfaces/ICoinDeployHook.sol +8 -0
  124. package/src/interfaces/ICoinV3.sol +71 -0
  125. package/src/interfaces/ICoinV4.sol +69 -0
  126. package/src/interfaces/IDeployedCoinVersionLookup.sol +11 -0
  127. package/src/interfaces/IMsgSender.sol +9 -0
  128. package/src/interfaces/IPoolConfigEncoding.sol +14 -0
  129. package/src/interfaces/ISwapPathRouter.sol +14 -0
  130. package/src/interfaces/ISwapRouter.sol +1 -35
  131. package/src/interfaces/IZoraFactory.sol +97 -7
  132. package/src/interfaces/IZoraV4CoinHook.sol +116 -0
  133. package/src/libs/CoinCommon.sol +15 -0
  134. package/src/libs/CoinConfigurationVersions.sol +116 -1
  135. package/src/{utils → libs}/CoinConstants.sol +11 -6
  136. package/src/libs/CoinDopplerMultiCurve.sol +134 -0
  137. package/src/libs/CoinDopplerUniV3.sol +19 -171
  138. package/src/libs/CoinRewards.sol +195 -0
  139. package/src/libs/CoinRewardsV4.sol +180 -0
  140. package/src/libs/CoinSetup.sol +40 -20
  141. package/src/libs/CoinSetupV3.sol +50 -0
  142. package/src/libs/DopplerMath.sol +156 -0
  143. package/src/libs/HooksDeployment.sol +84 -0
  144. package/src/libs/MarketConstants.sol +4 -0
  145. package/src/libs/PoolStateReader.sol +22 -0
  146. package/src/libs/UniV3BuySell.sol +231 -0
  147. package/src/libs/UniV3Errors.sol +11 -0
  148. package/src/libs/UniV4SwapHelper.sol +65 -0
  149. package/src/libs/UniV4SwapToCurrency.sol +109 -0
  150. package/src/libs/V4Liquidity.sol +129 -0
  151. package/src/types/PoolConfiguration.sol +15 -0
  152. package/src/utils/DeployedCoinVersionLookup.sol +52 -0
  153. package/src/version/ContractVersionBase.sol +1 -1
  154. package/test/Coin.t.sol +94 -101
  155. package/test/CoinDopplerUniV3.t.sol +35 -184
  156. package/test/CoinUniV4.t.sol +752 -0
  157. package/test/DeploymentHooks.t.sol +270 -0
  158. package/test/Factory.t.sol +84 -50
  159. package/test/MultiOwnable.t.sol +6 -3
  160. package/test/Upgrades.t.sol +68 -0
  161. package/test/mocks/MockERC20.sol +12 -0
  162. package/test/utils/BaseTest.sol +124 -59
  163. package/test/utils/DeployedCoinVersionLookup.t.sol +127 -0
  164. package/test/utils/FeeEstimatorHook.sol +84 -0
  165. package/test/utils/ProxyShim.sol +17 -0
  166. package/wagmi.config.ts +10 -9
  167. package/src/libs/CoinLegacy.sol +0 -48
@@ -1,32 +1,14 @@
1
1
 
2
- > @zoralabs/coins@0.7.1 build /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
2
+ > @zoralabs/coins@1.0.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@0.7.1 wagmi:generate /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
6
+ > @zoralabs/coins@1.0.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 113 files with Solc 0.8.28
10
- Solc 0.8.28 finished in 124.27s
11
- Compiler run successful with warnings:
12
- Warning (2072): Unused local variable.
13
- --> script/Simulate.s.sol:44:10:
14
- |
15
- 44 | (address coinAddress, uint256 coinsPurchased) = factory.deploy{value: orderSize}(
16
- | ^^^^^^^^^^^^^^^^^^^
17
-
18
- Warning (2072): Unused local variable.
19
- --> script/Simulate.s.sol:44:31:
20
- |
21
- 44 | (address coinAddress, uint256 coinsPurchased) = factory.deploy{value: orderSize}(
22
- | ^^^^^^^^^^^^^^^^^^^^^^
23
-
24
- Warning (2072): Unused local variable.
25
- --> script/UpgradeCoinImpl.sol:14:9:
26
- |
27
- 14 | DeterministicDeployerAndCaller deployer = createOrGetDeployerAndCaller();
28
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29
-
9
+ Compiling 217 files with Solc 0.8.28
10
+ Solc 0.8.28 finished in 165.31s
11
+ Compiler run successful!
30
12
  - Validating plugins
31
13
  ✔ Validating plugins
32
14
  - Resolving contracts
@@ -37,73 +19,113 @@ Warning (2072): Unused local variable.
37
19
  ✔ Writing to package/wagmiGenerated.ts
38
20
  🔄 Processing 1 file(s) to replace 'Abi' with 'ABI'...
39
21
  📝 Processing ./package/wagmiGenerated.ts...
40
- ✅ Updated ./package/wagmiGenerated.ts (4 replacements)
22
+ ✅ Updated ./package/wagmiGenerated.ts (8 replacements)
41
23
  ✨ All files processed successfully!
42
24
 
43
- > @zoralabs/coins@0.7.1 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
25
+ > @zoralabs/coins@1.0.0 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
44
26
  > pnpm exec bundle-abis
45
27
 
46
28
 
47
- > @zoralabs/coins@0.7.1 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
29
+ > @zoralabs/coins@1.0.0 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
48
30
  > prettier --write 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'
49
31
 
50
- src/Coin.sol 1754ms (unchanged)
51
- src/interfaces/IAirlock.sol 14ms (unchanged)
52
- src/interfaces/ICoin.sol 56ms (unchanged)
53
- src/interfaces/ICoinComments.sol 3ms (unchanged)
54
- src/interfaces/IDopplerErrors.sol 6ms (unchanged)
55
- src/interfaces/IERC7572.sol 2ms (unchanged)
56
- src/interfaces/INonfungiblePositionManager.sol 21ms (unchanged)
57
- src/interfaces/IProtocolRewards.sol 9ms (unchanged)
58
- src/interfaces/ISwapRouter.sol 12ms (unchanged)
59
- src/interfaces/IUniswapV3Factory.sol 12ms (unchanged)
60
- src/interfaces/IUniswapV3Pool.sol 13ms (unchanged)
32
+ src/BaseCoin.sol 310ms (unchanged)
33
+ src/Coin.sol 140ms (unchanged)
34
+ src/CoinV4.sol 91ms (unchanged)
35
+ src/hooks/deployment/BaseCoinDeployHook.sol 20ms (unchanged)
36
+ src/hooks/deployment/BuySupplyWithSwapRouterHook.sol 77ms (unchanged)
37
+ src/hooks/ZoraV4CoinHook.sol 117ms (unchanged)
38
+ src/interfaces/IAirlock.sol 1ms (unchanged)
39
+ src/interfaces/ICoin.sol 24ms (unchanged)
40
+ src/interfaces/ICoinComments.sol 4ms (unchanged)
41
+ src/interfaces/ICoinDeployHook.sol 1ms (unchanged)
42
+ src/interfaces/ICoinV3.sol 3ms (unchanged)
43
+ src/interfaces/ICoinV4.sol 3ms (unchanged)
44
+ src/interfaces/IDeployedCoinVersionLookup.sol 2ms (unchanged)
45
+ src/interfaces/IDopplerErrors.sol 1ms (unchanged)
46
+ src/interfaces/IERC7572.sol 1ms (unchanged)
47
+ src/interfaces/IMsgSender.sol 2ms (unchanged)
48
+ src/interfaces/INonfungiblePositionManager.sol 6ms (unchanged)
49
+ src/interfaces/IPoolConfigEncoding.sol 1ms (unchanged)
50
+ src/interfaces/IProtocolRewards.sol 3ms (unchanged)
51
+ src/interfaces/ISwapPathRouter.sol 1ms (unchanged)
52
+ src/interfaces/ISwapRouter.sol 1ms (unchanged)
53
+ src/interfaces/IUniswapV3Factory.sol 3ms (unchanged)
54
+ src/interfaces/IUniswapV3Pool.sol 3ms (unchanged)
61
55
  src/interfaces/IUniswapV3SwapCallback.sol 2ms (unchanged)
62
- src/interfaces/IWETH.sol 5ms (unchanged)
63
- src/interfaces/IZoraFactory.sol 9ms (unchanged)
64
- src/libs/CoinConfigurationVersions.sol 4ms (unchanged)
65
- src/libs/CoinDopplerUniV3.sol 333ms (unchanged)
66
- src/libs/CoinLegacy.sol 81ms (unchanged)
67
- src/libs/CoinSetup.sol 48ms (unchanged)
68
- src/libs/MarketConstants.sol 4ms (unchanged)
69
- src/proxy/ZoraFactory.sol 17ms (unchanged)
56
+ src/interfaces/IWETH.sol 3ms (unchanged)
57
+ src/interfaces/IZoraFactory.sol 7ms (unchanged)
58
+ src/interfaces/IZoraV4CoinHook.sol 10ms (unchanged)
59
+ src/libs/CoinCommon.sol 4ms (unchanged)
60
+ src/libs/CoinConfigurationVersions.sol 62ms (unchanged)
61
+ src/libs/CoinConstants.sol 7ms (unchanged)
62
+ src/libs/CoinDopplerMultiCurve.sol 125ms (unchanged)
63
+ src/libs/CoinDopplerUniV3.sol 30ms (unchanged)
64
+ src/libs/CoinRewards.sol 118ms (unchanged)
65
+ src/libs/CoinRewardsV4.sol 85ms (unchanged)
66
+ src/libs/CoinSetup.sol 19ms (unchanged)
67
+ src/libs/CoinSetupV3.sol 11ms (unchanged)
68
+ src/libs/DopplerMath.sol 89ms (unchanged)
69
+ src/libs/HooksDeployment.sol 36ms (unchanged)
70
+ src/libs/MarketConstants.sol 2ms (unchanged)
71
+ src/libs/PoolStateReader.sol 3ms (unchanged)
72
+ src/libs/UniV3BuySell.sol 78ms (unchanged)
73
+ src/libs/UniV3Errors.sol 1ms (unchanged)
74
+ src/libs/UniV4SwapHelper.sol 36ms (unchanged)
75
+ src/libs/UniV4SwapToCurrency.sol 52ms (unchanged)
76
+ src/libs/V4Liquidity.sol 57ms (unchanged)
77
+ src/proxy/ZoraFactory.sol 11ms (unchanged)
70
78
  src/types/LpPosition.sol 1ms (unchanged)
71
- src/types/PoolState.sol 2ms (unchanged)
72
- src/utils/CoinConstants.sol 6ms (unchanged)
73
- src/utils/MultiOwnable.sol 152ms (unchanged)
74
- src/utils/uniswap/BitMath.sol 39ms (unchanged)
75
- src/utils/uniswap/CustomRevert.sol 94ms (unchanged)
76
- src/utils/uniswap/FixedPoint96.sol 3ms (unchanged)
77
- src/utils/uniswap/FullMath.sol 76ms (unchanged)
78
- src/utils/uniswap/LiquidityAmounts.sol 163ms (unchanged)
79
- src/utils/uniswap/SafeCast.sol 34ms (unchanged)
80
- src/utils/uniswap/SqrtPriceMath.sol 147ms (unchanged)
81
- src/utils/uniswap/TickMath.sol 160ms (unchanged)
82
- src/utils/uniswap/UnsafeMath.sol 5ms (unchanged)
83
- src/version/ContractVersionBase.sol 2ms (unchanged)
84
- src/ZoraFactoryImpl.sol 205ms (unchanged)
85
- test/Coin.t.sol 684ms (unchanged)
86
- test/CoinDopplerUniV3.t.sol 523ms (unchanged)
87
- test/Factory.t.sol 504ms (unchanged)
88
- test/MultiOwnable.t.sol 242ms (unchanged)
89
- test/utils/BaseTest.sol 170ms (unchanged)
90
- test/utils/ProtocolRewards.sol 690ms (unchanged)
91
- script/CoinsDeployerBase.sol 106ms (unchanged)
92
- script/Deploy.s.sol 9ms (unchanged)
93
- script/GenerateDeterministicParams.s.sol 40ms (unchanged)
94
- script/Simulate.s.sol 41ms (unchanged)
95
- script/UpgradeCoinImpl.sol 12ms (unchanged)
96
- CLI Building entry: package/index.ts
97
- CLI Using tsconfig: tsconfig.json
98
- CLI tsup v7.3.0
99
- CLI Using tsup config: /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins/tsup.config.ts
100
- CLI Target: es2021
101
- CLI Cleaning output folder
102
- CJS Build start
103
- ESM Build start
104
- CJS dist/index.cjs 38.93 KB
105
- CJS dist/index.cjs.map 69.39 KB
106
- CJS ⚡️ Build success in 45ms
107
- ESM dist/index.js 37.72 KB
108
- ESM dist/index.js.map 69.26 KB
109
- ESM ⚡️ Build success in 47ms
79
+ src/types/PoolConfiguration.sol 1ms (unchanged)
80
+ src/types/PoolState.sol 1ms (unchanged)
81
+ src/utils/DeployedCoinVersionLookup.sol 8ms (unchanged)
82
+ src/utils/MultiOwnable.sol 42ms (unchanged)
83
+ src/utils/uniswap/BitMath.sol 11ms (unchanged)
84
+ src/utils/uniswap/CustomRevert.sol 51ms (unchanged)
85
+ src/utils/uniswap/FixedPoint96.sol 1ms (unchanged)
86
+ src/utils/uniswap/FullMath.sol 21ms (unchanged)
87
+ src/utils/uniswap/LiquidityAmounts.sol 42ms (unchanged)
88
+ src/utils/uniswap/SafeCast.sol 16ms (unchanged)
89
+ src/utils/uniswap/SqrtPriceMath.sol 58ms (unchanged)
90
+ src/utils/uniswap/TickMath.sol 58ms (unchanged)
91
+ src/utils/uniswap/UnsafeMath.sol 2ms (unchanged)
92
+ src/version/ContractVersionBase.sol 1ms (unchanged)
93
+ src/ZoraFactoryImpl.sol 129ms (unchanged)
94
+ test/Coin.t.sol 306ms (unchanged)
95
+ test/CoinDopplerUniV3.t.sol 109ms (unchanged)
96
+ test/CoinUniV4.t.sol 336ms (unchanged)
97
+ test/DeploymentHooks.t.sol 81ms (unchanged)
98
+ test/Factory.t.sol 155ms (unchanged)
99
+ test/mocks/MockERC20.sol 3ms (unchanged)
100
+ test/MultiOwnable.t.sol 85ms (unchanged)
101
+ test/Upgrades.t.sol 21ms (unchanged)
102
+ test/utils/BaseTest.sol 108ms (unchanged)
103
+ test/utils/DeployedCoinVersionLookup.t.sol 36ms (unchanged)
104
+ test/utils/FeeEstimatorHook.sol 21ms (unchanged)
105
+ test/utils/ProtocolRewards.sol 271ms (unchanged)
106
+ test/utils/ProxyShim.sol 3ms (unchanged)
107
+ script/CoinsDeployerBase.sol 69ms (unchanged)
108
+ script/Deploy.s.sol 3ms (unchanged)
109
+ script/DeployDevFactory.s.sol 3ms (unchanged)
110
+ script/DeployHooks.s.sol 4ms (unchanged)
111
+ script/GenerateDeterministicParams.s.sol 10ms (unchanged)
112
+ script/PrintUpgradeCommand.s.sol 9ms (unchanged)
113
+ script/Simulate.s.sol 14ms (unchanged)
114
+ script/TestBackingCoinSwap.s.sol 35ms (unchanged)
115
+ script/TestV4Swap.s.sol 31ms (unchanged)
116
+ script/UpgradeCoinImpl.sol 4ms (unchanged)
117
+ script/UpgradeFactoryImpl.s.sol 4ms (unchanged)
118
+ CLI Building entry: package/index.ts
119
+ CLI Using tsconfig: tsconfig.json
120
+ CLI tsup v8.4.0
121
+ CLI Using tsup config: /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins/tsup.config.ts
122
+ CLI Target: es2021
123
+ CLI Cleaning output folder
124
+ CJS Build start
125
+ ESM Build start
126
+ CJS dist/index.cjs 89.57 KB
127
+ CJS dist/index.cjs.map 158.74 KB
128
+ CJS ⚡️ Build success in 33ms
129
+ ESM dist/index.js 88.24 KB
130
+ ESM dist/index.js.map 158.60 KB
131
+ ESM ⚡️ Build success in 34ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,73 @@
1
1
  # @zoralabs/coins
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 73e95f69: Upgraded coins to use Uniswap V4:
8
+
9
+ **New CoinV4 Implementation:**
10
+
11
+ - Migrated from Uniswap V3 to Uniswap V4, with logic moved into a hook.
12
+ - Automatic LP fee collection and multi-hop reward distribution on every swap
13
+ - New `ZoraV4CoinHook` handles afterSwap operations
14
+ - Support for complex multi-position liquidity curves and discovery positions
15
+ - Multi-hop fee swapping through intermediate currencies (e.g., ContentCoin → BackingCoin → Zora)
16
+
17
+ **Factory Updates:**
18
+
19
+ - Updated `deploy()` function signature with new `poolConfig`, `message`, and `salt` parameters
20
+ - Automatic V3/V4 version selection based on pool configuration
21
+ - Deterministic coin deployment with salt support
22
+ - New `CoinCreatedV4` event for V4 coin deployments
23
+
24
+ **Reward System Changes:**
25
+
26
+ - Increased trade referral rewards from 10% to 15% (1500 basis points)
27
+ - Automatic reward distribution in single backing currency
28
+
29
+ **New Interfaces and Events:**
30
+
31
+ - Added `IHasPoolKey` and `IHasSwapPath` interfaces for V4 functionality
32
+ - New `Swapped` event with detailed swap and price information
33
+ - New `CoinMarketRewardsV4` event for reward distribution tracking
34
+
35
+ **Breaking Changes:**
36
+
37
+ - New deterministic factory deploy function with salt
38
+
39
+ ### Patch Changes
40
+
41
+ - 6b8bdd9d: Remove ability to create coin with legacy pool config
42
+
43
+ ## 0.9.0
44
+
45
+ ### Minor Changes
46
+
47
+ - 9ed0ce76: - Publishing new coins hooks in `@zoralabs/protocol-deployments`
48
+ - In coins, pulling ISwapRouter from `@zoralabs/shared-contracts`, and updated the shared interface to match the full interface of the ISwapRouter. This new interface is published in `@zoralabs/protocol-deployments`.
49
+ - Removed publishing of the factory addresses directly in the wagmi config of the coins package, as that's inconsistent with the rest of the packages.
50
+ - Updated the `@zoralabs/coins-sdk` to use `@zoralabs/protocol-deployments` for abis and addresses, which significantly reduces the dependency tree of it and has it follow the patterns of the other sdk packages.
51
+ - 9ed0ce76: added deployWithHook to the coin factory
52
+
53
+ ### Patch Changes
54
+
55
+ - 9ed0ce76: Refactored some reusable code into helper functions for the Coin factory
56
+
57
+ ## 0.8.0
58
+
59
+ ### Minor Changes
60
+
61
+ - 9ed0ce76: - Publishing new coins hooks in `@zoralabs/protocol-deployments`
62
+ - In coins, pulling ISwapRouter from `@zoralabs/shared-contracts`, and updated the shared interface to match the full interface of the ISwapRouter. This new interface is published in `@zoralabs/protocol-deployments`.
63
+ - Removed publishing of the factory addresses directly in the wagmi config of the coins package, as that's inconsistent with the rest of the packages.
64
+ - Updated the `@zoralabs/coins-sdk` to use `@zoralabs/protocol-deployments` for abis and addresses, which significantly reduces the dependency tree of it and has it follow the patterns of the other sdk packages.
65
+ - 9ed0ce76: added deployWithHook to the coin factory
66
+
67
+ ### Patch Changes
68
+
69
+ - 9ed0ce76: Refactored some reusable code into helper functions for the Coin factory
70
+
3
71
  ## 0.7.1
4
72
 
5
73
  ### Patch Changes
@@ -0,0 +1,15 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "contractName",
5
+ "inputs": [],
6
+ "outputs": [
7
+ {
8
+ "name": "",
9
+ "type": "string",
10
+ "internalType": "string"
11
+ }
12
+ ],
13
+ "stateMutability": "pure"
14
+ }
15
+ ]
@@ -0,0 +1,15 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "ZERO_DELTA",
5
+ "inputs": [],
6
+ "outputs": [
7
+ {
8
+ "name": "",
9
+ "type": "int256",
10
+ "internalType": "BalanceDelta"
11
+ }
12
+ ],
13
+ "stateMutability": "view"
14
+ }
15
+ ]