@zoralabs/coins 0.9.0 → 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 (124) hide show
  1. package/.turbo/turbo-build.log +131 -114
  2. package/CHANGELOG.md +40 -0
  3. package/abis/BaseCoin.json +26 -118
  4. package/abis/BaseTest.json +47 -0
  5. package/abis/Coin.json +171 -63
  6. package/abis/CoinDopplerMultiCurve.json +38 -0
  7. package/abis/CoinRewardsV4.json +54 -0
  8. package/abis/CoinTest.json +53 -20
  9. package/abis/CoinUniV4Test.json +1053 -0
  10. package/abis/CoinV4.json +234 -211
  11. package/abis/DeployScript.json +47 -0
  12. package/abis/DeployedCoinVersionLookup.json +21 -0
  13. package/abis/DeployedCoinVersionLookupTest.json +716 -0
  14. package/abis/DifferentNamespaceVersionLookup.json +39 -0
  15. package/abis/DopplerUniswapV3Test.json +49 -93
  16. package/abis/ERC20.json +310 -0
  17. package/abis/FactoryTest.json +85 -7
  18. package/abis/FeeEstimatorHook.json +1528 -0
  19. package/abis/HooksDeployment.json +23 -0
  20. package/abis/HooksTest.json +47 -0
  21. package/abis/ICoin.json +40 -71
  22. package/abis/ICoinV3.json +879 -0
  23. package/abis/ICoinV4.json +915 -0
  24. package/abis/IDeployedCoinVersionLookup.json +21 -0
  25. package/abis/IERC721.json +36 -36
  26. package/abis/IHasPoolKey.json +42 -0
  27. package/abis/IHasRewardsRecipients.json +54 -0
  28. package/abis/IHasSwapPath.json +60 -0
  29. package/abis/IMsgSender.json +15 -0
  30. package/abis/IPoolConfigEncoding.json +46 -0
  31. package/abis/ISwapPathRouter.json +92 -0
  32. package/abis/IUniversalRouter.json +61 -0
  33. package/abis/IUnlockCallback.json +21 -0
  34. package/abis/IV4Quoter.json +310 -0
  35. package/abis/IZoraFactory.json +191 -11
  36. package/abis/IZoraV4CoinHook.json +348 -4
  37. package/abis/MockERC20.json +21 -0
  38. package/abis/MultiOwnableTest.json +47 -0
  39. package/abis/{CoinConfigurationVersions.json → Position.json} +1 -1
  40. package/abis/PrintUpgradeCommand.json +9 -0
  41. package/abis/ProxyShim.json +24 -0
  42. package/abis/StateLibrary.json +80 -0
  43. package/abis/TestDeployedCoinVersionLookupImplementation.json +39 -0
  44. package/abis/TestV4Swap.json +9 -0
  45. package/abis/UpgradeCoinImpl.json +47 -0
  46. package/abis/UpgradesTest.json +67 -0
  47. package/abis/Vm.json +1482 -111
  48. package/abis/VmSafe.json +856 -32
  49. package/abis/ZoraFactoryImpl.json +339 -1
  50. package/abis/ZoraV4CoinHook.json +455 -5
  51. package/addresses/8453.json +8 -4
  52. package/addresses/84532.json +8 -4
  53. package/dist/index.cjs +1920 -169
  54. package/dist/index.cjs.map +1 -1
  55. package/dist/index.js +1916 -169
  56. package/dist/index.js.map +1 -1
  57. package/dist/wagmiGenerated.d.ts +2599 -183
  58. package/dist/wagmiGenerated.d.ts.map +1 -1
  59. package/package/wagmiGenerated.ts +1928 -165
  60. package/package.json +8 -3
  61. package/remappings.txt +6 -1
  62. package/script/CoinsDeployerBase.sol +74 -11
  63. package/script/DeployDevFactory.s.sol +21 -0
  64. package/script/PrintUpgradeCommand.s.sol +13 -0
  65. package/script/Simulate.s.sol +1 -10
  66. package/script/TestBackingCoinSwap.s.sol +146 -0
  67. package/script/TestV4Swap.s.sol +136 -0
  68. package/script/UpgradeFactoryImpl.s.sol +1 -1
  69. package/src/BaseCoin.sol +176 -0
  70. package/src/Coin.sol +87 -202
  71. package/src/CoinV4.sol +121 -0
  72. package/src/ZoraFactoryImpl.sol +208 -36
  73. package/src/hooks/ZoraV4CoinHook.sol +195 -0
  74. package/src/hooks/{BaseCoinDeployHook.sol → deployment/BaseCoinDeployHook.sol} +3 -3
  75. package/src/hooks/{BuySupplyWithSwapRouterHook.sol → deployment/BuySupplyWithSwapRouterHook.sol} +7 -5
  76. package/src/interfaces/ICoin.sol +31 -39
  77. package/src/interfaces/ICoinV3.sol +71 -0
  78. package/src/interfaces/ICoinV4.sol +69 -0
  79. package/src/interfaces/IDeployedCoinVersionLookup.sol +11 -0
  80. package/src/interfaces/IMsgSender.sol +9 -0
  81. package/src/interfaces/IPoolConfigEncoding.sol +14 -0
  82. package/src/interfaces/ISwapPathRouter.sol +14 -0
  83. package/src/interfaces/IZoraFactory.sol +65 -27
  84. package/src/interfaces/IZoraV4CoinHook.sol +116 -0
  85. package/src/libs/CoinCommon.sol +15 -0
  86. package/src/libs/CoinConfigurationVersions.sol +116 -1
  87. package/src/libs/CoinConstants.sol +5 -0
  88. package/src/libs/CoinDopplerMultiCurve.sol +134 -0
  89. package/src/libs/CoinDopplerUniV3.sol +19 -171
  90. package/src/libs/CoinRewards.sol +195 -0
  91. package/src/libs/CoinRewardsV4.sol +180 -0
  92. package/src/libs/CoinSetup.sol +57 -0
  93. package/src/libs/CoinSetupV3.sol +6 -67
  94. package/src/libs/DopplerMath.sol +156 -0
  95. package/src/libs/HooksDeployment.sol +84 -0
  96. package/src/libs/MarketConstants.sol +4 -0
  97. package/src/libs/PoolStateReader.sol +22 -0
  98. package/src/libs/UniV3BuySell.sol +74 -292
  99. package/src/libs/UniV4SwapHelper.sol +65 -0
  100. package/src/libs/UniV4SwapToCurrency.sol +109 -0
  101. package/src/libs/V4Liquidity.sol +129 -0
  102. package/src/types/PoolConfiguration.sol +15 -0
  103. package/src/utils/DeployedCoinVersionLookup.sol +52 -0
  104. package/src/version/ContractVersionBase.sol +1 -1
  105. package/test/Coin.t.sol +78 -88
  106. package/test/CoinDopplerUniV3.t.sol +32 -171
  107. package/test/CoinUniV4.t.sol +752 -0
  108. package/test/{Hooks.t.sol → DeploymentHooks.t.sol} +2 -6
  109. package/test/Factory.t.sol +80 -47
  110. package/test/MultiOwnable.t.sol +6 -3
  111. package/test/Upgrades.t.sol +6 -5
  112. package/test/mocks/MockERC20.sol +12 -0
  113. package/test/utils/BaseTest.sol +106 -56
  114. package/test/utils/DeployedCoinVersionLookup.t.sol +127 -0
  115. package/test/utils/FeeEstimatorHook.sol +84 -0
  116. package/test/utils/ProxyShim.sol +17 -0
  117. package/wagmi.config.ts +4 -0
  118. package/.env +0 -1
  119. package/.turbo/turbo-update-contract-version.log +0 -22
  120. package/abis/CoinSetupV3.json +0 -7
  121. package/abis/HookDeployer.json +0 -68
  122. package/abis/IHookDeployer.json +0 -42
  123. package/src/libs/CoinLegacy.sol +0 -48
  124. package/src/libs/CoinLegacyMarket.sol +0 -182
@@ -1,114 +1,131 @@
1
-
2
- 
3
- > @zoralabs/coins@0.9.0 build /Users/danovedzora/source/zora-protocol/packages/coins
4
- > pnpm run wagmi:generate && pnpm run copy-abis && pnpm run prettier:write && tsup
5
-
6
-
7
- > @zoralabs/coins@0.9.0 wagmi:generate /Users/danovedzora/source/zora-protocol/packages/coins
8
- > FOUNDRY_PROFILE=dev forge build && wagmi generate && pnpm exec rename-generated-abi-casing ./package/wagmiGenerated.ts
9
-
10
- Warning: This is a nightly build of Foundry. It is recommended to use the latest stable version. Visit https://book.getfoundry.sh/announcements for more information.
11
- To mute this warning set `FOUNDRY_DISABLE_NIGHTLY_WARNING` in your environment.
12
-
13
-
14
-
15
-
16
- Compiler run successful with warnings:
17
- Warning (2072): Unused local variable.
18
- --> script/Simulate.s.sol:45:10:
19
-  |
20
- 45 | (address coinAddress, uint256 coinsPurchased) = factory.deploy{value: orderSize}(
21
-  | ^^^^^^^^^^^^^^^^^^^
22
-
23
- Warning (2072): Unused local variable.
24
- --> script/Simulate.s.sol:45:31:
25
-  |
26
- 45 | (address coinAddress, uint256 coinsPurchased) = factory.deploy{value: orderSize}(
27
-  | ^^^^^^^^^^^^^^^^^^^^^^
28
-
29
- [?25l⠋ Validating plugins✔ Validating plugins
30
- [?25h[?25l⠙ Resolving contracts✔ Resolving contracts
31
- [?25h[?25l⠹ Running plugins✔ Running plugins
32
- [?25h[?25l⠸ Writing to package/wagmiGenerated.ts[?25l⠼ Writing to package/wagmiGenerated.ts✔ Writing to package/wagmiGenerated.ts
33
- [?25h🔄 Processing 1 file(s) to replace 'Abi' with 'ABI'...
34
- 📝 Processing ./package/wagmiGenerated.ts...
35
- ✅ Updated ./package/wagmiGenerated.ts (4 replacements)
36
- All files processed successfully!
37
-
38
- > @zoralabs/coins@0.9.0 copy-abis /Users/danovedzora/source/zora-protocol/packages/coins
39
- > pnpm exec bundle-abis
40
-
41
-
42
- > @zoralabs/coins@0.9.0 prettier:write /Users/danovedzora/source/zora-protocol/packages/coins
43
- > prettier --write 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'
44
-
45
- src/Coin.solsrc/Coin.sol 141ms (unchanged)
46
- src/hooks/BaseCoinDeployHook.solsrc/hooks/BaseCoinDeployHook.sol 17ms (unchanged)
47
- src/hooks/BuySupplyWithSwapRouterHook.solsrc/hooks/BuySupplyWithSwapRouterHook.sol 36ms (unchanged)
48
- src/interfaces/IAirlock.solsrc/interfaces/IAirlock.sol 3ms (unchanged)
49
- src/interfaces/ICoin.solsrc/interfaces/ICoin.sol 8ms (unchanged)
50
- src/interfaces/ICoinComments.solsrc/interfaces/ICoinComments.sol 1ms (unchanged)
51
- src/interfaces/ICoinDeployHook.solsrc/interfaces/ICoinDeployHook.sol 1ms (unchanged)
52
- src/interfaces/IDopplerErrors.solsrc/interfaces/IDopplerErrors.sol 1ms (unchanged)
53
- src/interfaces/IERC7572.solsrc/interfaces/IERC7572.sol 1ms (unchanged)
54
- src/interfaces/INonfungiblePositionManager.solsrc/interfaces/INonfungiblePositionManager.sol 5ms (unchanged)
55
- src/interfaces/IProtocolRewards.solsrc/interfaces/IProtocolRewards.sol 2ms (unchanged)
56
- src/interfaces/ISwapRouter.solsrc/interfaces/ISwapRouter.sol 0ms (unchanged)
57
- src/interfaces/IUniswapV3Factory.solsrc/interfaces/IUniswapV3Factory.sol 3ms (unchanged)
58
- src/interfaces/IUniswapV3Pool.solsrc/interfaces/IUniswapV3Pool.sol 3ms (unchanged)
59
- src/interfaces/IUniswapV3SwapCallback.solsrc/interfaces/IUniswapV3SwapCallback.sol 0ms (unchanged)
60
- src/interfaces/IWETH.solsrc/interfaces/IWETH.sol 2ms (unchanged)
61
- src/interfaces/IZoraFactory.solsrc/interfaces/IZoraFactory.sol 3ms (unchanged)
62
- src/libs/CoinConfigurationVersions.solsrc/libs/CoinConfigurationVersions.sol 1ms (unchanged)
63
- src/libs/CoinConstants.solsrc/libs/CoinConstants.sol 2ms (unchanged)
64
- src/libs/CoinDopplerUniV3.solsrc/libs/CoinDopplerUniV3.sol 87ms (unchanged)
65
- src/libs/CoinLegacy.solsrc/libs/CoinLegacy.sol 18ms (unchanged)
66
- src/libs/CoinLegacyMarket.solsrc/libs/CoinLegacyMarket.sol 49ms (unchanged)
67
- src/libs/CoinSetupV3.solsrc/libs/CoinSetupV3.sol 27ms (unchanged)
68
- src/libs/MarketConstants.solsrc/libs/MarketConstants.sol 0ms (unchanged)
69
- src/libs/UniV3BuySell.solsrc/libs/UniV3BuySell.sol 156ms (unchanged)
70
- src/libs/UniV3Errors.solsrc/libs/UniV3Errors.sol 1ms (unchanged)
71
- src/proxy/ZoraFactory.solsrc/proxy/ZoraFactory.sol 5ms (unchanged)
72
- src/types/LpPosition.solsrc/types/LpPosition.sol 1ms (unchanged)
73
- src/types/PoolState.solsrc/types/PoolState.sol 1ms (unchanged)
74
- src/utils/MultiOwnable.solsrc/utils/MultiOwnable.sol 26ms (unchanged)
75
- src/utils/uniswap/BitMath.solsrc/utils/uniswap/BitMath.sol 5ms (unchanged)
76
- src/utils/uniswap/CustomRevert.solsrc/utils/uniswap/CustomRevert.sol 18ms (unchanged)
77
- src/utils/uniswap/FixedPoint96.solsrc/utils/uniswap/FixedPoint96.sol 1ms (unchanged)
78
- src/utils/uniswap/FullMath.solsrc/utils/uniswap/FullMath.sol 14ms (unchanged)
79
- src/utils/uniswap/LiquidityAmounts.solsrc/utils/uniswap/LiquidityAmounts.sol 26ms (unchanged)
80
- src/utils/uniswap/SafeCast.solsrc/utils/uniswap/SafeCast.sol 20ms (unchanged)
81
- src/utils/uniswap/SqrtPriceMath.solsrc/utils/uniswap/SqrtPriceMath.sol 40ms (unchanged)
82
- src/utils/uniswap/TickMath.solsrc/utils/uniswap/TickMath.sol 37ms (unchanged)
83
- src/utils/uniswap/UnsafeMath.solsrc/utils/uniswap/UnsafeMath.sol 2ms (unchanged)
84
- src/version/ContractVersionBase.solsrc/version/ContractVersionBase.sol 1ms (unchanged)
85
- src/ZoraFactoryImpl.solsrc/ZoraFactoryImpl.sol 54ms (unchanged)
86
- test/Coin.t.soltest/Coin.t.sol 188ms (unchanged)
87
- test/CoinDopplerUniV3.t.soltest/CoinDopplerUniV3.t.sol 135ms (unchanged)
88
- test/Factory.t.soltest/Factory.t.sol 87ms (unchanged)
89
- test/Hooks.t.soltest/Hooks.t.sol 55ms (unchanged)
90
- test/MultiOwnable.t.soltest/MultiOwnable.t.sol 46ms (unchanged)
91
- test/Upgrades.t.soltest/Upgrades.t.sol 11ms (unchanged)
92
- test/utils/BaseTest.soltest/utils/BaseTest.sol 53ms (unchanged)
93
- test/utils/ProtocolRewards.soltest/utils/ProtocolRewards.sol 171ms (unchanged)
94
- script/CoinsDeployerBase.solscript/CoinsDeployerBase.sol 45ms (unchanged)
95
- script/Deploy.s.solscript/Deploy.s.sol 3ms (unchanged)
96
- script/DeployHooks.s.solscript/DeployHooks.s.sol 2ms (unchanged)
97
- script/GenerateDeterministicParams.s.solscript/GenerateDeterministicParams.s.sol 7ms (unchanged)
98
- script/Simulate.s.solscript/Simulate.s.sol 7ms (unchanged)
99
- script/UpgradeCoinImpl.solscript/UpgradeCoinImpl.sol 3ms (unchanged)
100
- script/UpgradeFactoryImpl.s.solscript/UpgradeFactoryImpl.s.sol 2ms (unchanged)
101
- CLI Building entry: package/index.ts
102
- CLI Using tsconfig: tsconfig.json
103
- CLI tsup v8.4.0
104
- CLI Using tsup config: /Users/danovedzora/source/zora-protocol/packages/coins/tsup.config.ts
105
- CLI Target: es2021
106
- CLI Cleaning output folder
107
- CJS Build start
108
- ESM Build start
109
- ESM dist/index.js 39.96 KB
110
- ESM dist/index.js.map 72.99 KB
111
- ESM ⚡️ Build success in 9ms
112
- CJS dist/index.cjs 41.12 KB
113
- CJS dist/index.cjs.map 73.11 KB
114
- CJS ⚡️ Build success in 10ms
1
+
2
+ > @zoralabs/coins@1.0.0 build /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@1.0.0 wagmi:generate /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
7
+ > FOUNDRY_PROFILE=dev forge build && wagmi generate && pnpm exec rename-generated-abi-casing ./package/wagmiGenerated.ts
8
+
9
+ Compiling 217 files with Solc 0.8.28
10
+ Solc 0.8.28 finished in 165.31s
11
+ Compiler run successful!
12
+ - Validating plugins
13
+ ✔ Validating plugins
14
+ - Resolving contracts
15
+ ✔ Resolving contracts
16
+ - Running plugins
17
+ ✔ Running plugins
18
+ - Writing to package/wagmiGenerated.ts
19
+ ✔ Writing to package/wagmiGenerated.ts
20
+ 🔄 Processing 1 file(s) to replace 'Abi' with 'ABI'...
21
+ 📝 Processing ./package/wagmiGenerated.ts...
22
+ ✅ Updated ./package/wagmiGenerated.ts (8 replacements)
23
+ All files processed successfully!
24
+
25
+ > @zoralabs/coins@1.0.0 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
26
+ > pnpm exec bundle-abis
27
+
28
+
29
+ > @zoralabs/coins@1.0.0 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
30
+ > prettier --write 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'
31
+
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)
55
+ src/interfaces/IUniswapV3SwapCallback.sol 2ms (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)
78
+ src/types/LpPosition.sol 1ms (unchanged)
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,45 @@
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
+
3
43
  ## 0.9.0
4
44
 
5
45
  ### Minor Changes
@@ -1,8 +1,4 @@
1
1
  [
2
- {
3
- "type": "receive",
4
- "stateMutability": "payable"
5
- },
6
2
  {
7
3
  "type": "function",
8
4
  "name": "DOMAIN_SEPARATOR",
@@ -16,19 +12,6 @@
16
12
  ],
17
13
  "stateMutability": "view"
18
14
  },
19
- {
20
- "type": "function",
21
- "name": "WETH",
22
- "inputs": [],
23
- "outputs": [
24
- {
25
- "name": "",
26
- "type": "address",
27
- "internalType": "address"
28
- }
29
- ],
30
- "stateMutability": "view"
31
- },
32
15
  {
33
16
  "type": "function",
34
17
  "name": "addOwner",
@@ -55,6 +38,19 @@
55
38
  "outputs": [],
56
39
  "stateMutability": "nonpayable"
57
40
  },
41
+ {
42
+ "type": "function",
43
+ "name": "airlock",
44
+ "inputs": [],
45
+ "outputs": [
46
+ {
47
+ "name": "",
48
+ "type": "address",
49
+ "internalType": "address"
50
+ }
51
+ ],
52
+ "stateMutability": "view"
53
+ },
58
54
  {
59
55
  "type": "function",
60
56
  "name": "allowance",
@@ -135,63 +131,6 @@
135
131
  "outputs": [],
136
132
  "stateMutability": "nonpayable"
137
133
  },
138
- {
139
- "type": "function",
140
- "name": "buy",
141
- "inputs": [
142
- {
143
- "name": "recipient",
144
- "type": "address",
145
- "internalType": "address"
146
- },
147
- {
148
- "name": "orderSize",
149
- "type": "uint256",
150
- "internalType": "uint256"
151
- },
152
- {
153
- "name": "minAmountOut",
154
- "type": "uint256",
155
- "internalType": "uint256"
156
- },
157
- {
158
- "name": "sqrtPriceLimitX96",
159
- "type": "uint160",
160
- "internalType": "uint160"
161
- },
162
- {
163
- "name": "tradeReferrer",
164
- "type": "address",
165
- "internalType": "address"
166
- }
167
- ],
168
- "outputs": [
169
- {
170
- "name": "",
171
- "type": "uint256",
172
- "internalType": "uint256"
173
- },
174
- {
175
- "name": "",
176
- "type": "uint256",
177
- "internalType": "uint256"
178
- }
179
- ],
180
- "stateMutability": "payable"
181
- },
182
- {
183
- "type": "function",
184
- "name": "claimSecondaryRewards",
185
- "inputs": [
186
- {
187
- "name": "pushEthRewards",
188
- "type": "bool",
189
- "internalType": "bool"
190
- }
191
- ],
192
- "outputs": [],
193
- "stateMutability": "nonpayable"
194
- },
195
134
  {
196
135
  "type": "function",
197
136
  "name": "contractURI",
@@ -244,6 +183,19 @@
244
183
  ],
245
184
  "stateMutability": "view"
246
185
  },
186
+ {
187
+ "type": "function",
188
+ "name": "dopplerFeeRecipient",
189
+ "inputs": [],
190
+ "outputs": [
191
+ {
192
+ "name": "",
193
+ "type": "address",
194
+ "internalType": "address"
195
+ }
196
+ ],
197
+ "stateMutability": "view"
198
+ },
247
199
  {
248
200
  "type": "function",
249
201
  "name": "eip712Domain",
@@ -479,50 +431,6 @@
479
431
  "outputs": [],
480
432
  "stateMutability": "nonpayable"
481
433
  },
482
- {
483
- "type": "function",
484
- "name": "sell",
485
- "inputs": [
486
- {
487
- "name": "recipient",
488
- "type": "address",
489
- "internalType": "address"
490
- },
491
- {
492
- "name": "orderSize",
493
- "type": "uint256",
494
- "internalType": "uint256"
495
- },
496
- {
497
- "name": "minAmountOut",
498
- "type": "uint256",
499
- "internalType": "uint256"
500
- },
501
- {
502
- "name": "sqrtPriceLimitX96",
503
- "type": "uint160",
504
- "internalType": "uint160"
505
- },
506
- {
507
- "name": "tradeReferrer",
508
- "type": "address",
509
- "internalType": "address"
510
- }
511
- ],
512
- "outputs": [
513
- {
514
- "name": "",
515
- "type": "uint256",
516
- "internalType": "uint256"
517
- },
518
- {
519
- "name": "",
520
- "type": "uint256",
521
- "internalType": "uint256"
522
- }
523
- ],
524
- "stateMutability": "nonpayable"
525
- },
526
434
  {
527
435
  "type": "function",
528
436
  "name": "setContractURI",
@@ -586,5 +586,52 @@
586
586
  }
587
587
  ],
588
588
  "anonymous": false
589
+ },
590
+ {
591
+ "type": "error",
592
+ "name": "Create2EmptyBytecode",
593
+ "inputs": []
594
+ },
595
+ {
596
+ "type": "error",
597
+ "name": "Create2FailedDeployment",
598
+ "inputs": []
599
+ },
600
+ {
601
+ "type": "error",
602
+ "name": "Create2InsufficientBalance",
603
+ "inputs": [
604
+ {
605
+ "name": "balance",
606
+ "type": "uint256",
607
+ "internalType": "uint256"
608
+ },
609
+ {
610
+ "name": "needed",
611
+ "type": "uint256",
612
+ "internalType": "uint256"
613
+ }
614
+ ]
615
+ },
616
+ {
617
+ "type": "error",
618
+ "name": "HookNotDeployed",
619
+ "inputs": []
620
+ },
621
+ {
622
+ "type": "error",
623
+ "name": "InvalidHookAddress",
624
+ "inputs": [
625
+ {
626
+ "name": "expected",
627
+ "type": "address",
628
+ "internalType": "address"
629
+ },
630
+ {
631
+ "name": "actual",
632
+ "type": "address",
633
+ "internalType": "address"
634
+ }
635
+ ]
589
636
  }
590
637
  ]