@zoralabs/coins 0.9.0 → 1.0.1
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.log +179 -114
- package/CHANGELOG.md +46 -0
- package/abis/BaseCoin.json +26 -118
- package/abis/BaseTest.json +47 -0
- package/abis/BuySupplyWithSwapRouterHook.json +40 -0
- package/abis/Coin.json +171 -63
- package/abis/CoinDopplerMultiCurve.json +38 -0
- package/abis/CoinRewardsV4.json +54 -0
- package/abis/CoinTest.json +53 -20
- package/abis/CoinUniV4Test.json +1091 -0
- package/abis/CoinV4.json +234 -211
- package/abis/DeployScript.json +47 -0
- package/abis/DeployedCoinVersionLookup.json +21 -0
- package/abis/DeployedCoinVersionLookupTest.json +716 -0
- package/abis/DifferentNamespaceVersionLookup.json +39 -0
- package/abis/DopplerUniswapV3Test.json +49 -93
- package/abis/ERC20.json +310 -0
- package/abis/FactoryTest.json +85 -7
- package/abis/FeeEstimatorHook.json +1515 -0
- package/abis/HooksDeployment.json +23 -0
- package/abis/HooksTest.json +60 -0
- package/abis/ICoin.json +40 -71
- package/abis/ICoinV3.json +879 -0
- package/abis/ICoinV4.json +915 -0
- package/abis/IDeployedCoinVersionLookup.json +21 -0
- package/abis/IERC721.json +36 -36
- package/abis/IHasPoolKey.json +42 -0
- package/abis/IHasRewardsRecipients.json +54 -0
- package/abis/IHasSwapPath.json +60 -0
- package/abis/IMsgSender.json +15 -0
- package/abis/IPoolConfigEncoding.json +46 -0
- package/abis/ISwapPathRouter.json +92 -0
- package/abis/IUniversalRouter.json +61 -0
- package/abis/IUnlockCallback.json +21 -0
- package/abis/IV4Quoter.json +310 -0
- package/abis/IZoraFactory.json +210 -11
- package/abis/IZoraV4CoinHook.json +348 -4
- package/abis/MockERC20.json +21 -0
- package/abis/MultiOwnableTest.json +47 -0
- package/abis/{CoinConfigurationVersions.json → Position.json} +1 -1
- package/abis/PrintUpgradeCommand.json +9 -0
- package/abis/ProxyShim.json +24 -0
- package/abis/StateLibrary.json +80 -0
- package/abis/TestDeployedCoinVersionLookupImplementation.json +39 -0
- package/abis/TestV4Swap.json +9 -0
- package/abis/UpgradeCoinImpl.json +47 -0
- package/abis/UpgradesTest.json +81 -0
- package/abis/Vm.json +1482 -111
- package/abis/VmSafe.json +856 -32
- package/abis/ZoraFactoryImpl.json +339 -1
- package/abis/ZoraV4CoinHook.json +442 -5
- package/addresses/8453.json +7 -4
- package/addresses/84532.json +8 -5
- package/addresses/dev/8453.json +10 -0
- package/dist/index.cjs +1932 -167
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1928 -167
- package/dist/index.js.map +1 -1
- package/dist/wagmiGenerated.d.ts +2606 -160
- package/dist/wagmiGenerated.d.ts.map +1 -1
- package/foundry.toml +1 -0
- package/package/wagmiGenerated.ts +1941 -164
- package/package.json +8 -3
- package/remappings.txt +6 -1
- package/script/Deploy.s.sol +1 -1
- package/script/DeployDevFactory.s.sol +21 -0
- package/script/DeployHooks.s.sol +1 -1
- package/script/PrintUpgradeCommand.s.sol +13 -0
- package/script/Simulate.s.sol +1 -10
- package/script/TestBackingCoinSwap.s.sol +147 -0
- package/script/TestV4Swap.s.sol +136 -0
- package/script/UpgradeCoinImpl.sol +2 -2
- package/script/UpgradeFactoryImpl.s.sol +2 -2
- package/src/BaseCoin.sol +190 -0
- package/src/Coin.sol +87 -202
- package/src/CoinV4.sol +121 -0
- package/src/ZoraFactoryImpl.sol +208 -36
- package/{script → src/deployment}/CoinsDeployerBase.sol +111 -17
- package/src/hooks/ZoraV4CoinHook.sol +212 -0
- package/src/hooks/{BaseCoinDeployHook.sol → deployment/BaseCoinDeployHook.sol} +3 -3
- package/src/hooks/deployment/BuySupplyWithSwapRouterHook.sol +140 -0
- package/src/interfaces/ICoin.sol +31 -39
- package/src/interfaces/ICoinV3.sol +71 -0
- package/src/interfaces/ICoinV4.sol +69 -0
- package/src/interfaces/IDeployedCoinVersionLookup.sol +11 -0
- package/src/interfaces/IMsgSender.sol +9 -0
- package/src/interfaces/IPoolConfigEncoding.sol +14 -0
- package/src/interfaces/ISwapPathRouter.sol +14 -0
- package/src/interfaces/IZoraFactory.sol +67 -28
- package/src/interfaces/IZoraV4CoinHook.sol +116 -0
- package/src/libs/CoinCommon.sol +15 -0
- package/src/libs/CoinConfigurationVersions.sol +116 -1
- package/src/libs/CoinConstants.sol +5 -0
- package/src/libs/CoinDopplerMultiCurve.sol +134 -0
- package/src/libs/CoinDopplerUniV3.sol +19 -171
- package/src/libs/CoinRewards.sol +195 -0
- package/src/libs/CoinRewardsV4.sol +179 -0
- package/src/libs/CoinSetup.sol +57 -0
- package/src/libs/CoinSetupV3.sol +6 -67
- package/src/libs/DopplerMath.sol +156 -0
- package/src/libs/HooksDeployment.sol +128 -0
- package/src/libs/MarketConstants.sol +4 -0
- package/src/libs/PoolStateReader.sol +22 -0
- package/src/libs/UniV3BuySell.sol +74 -292
- package/src/libs/UniV4SwapHelper.sol +65 -0
- package/src/libs/UniV4SwapToCurrency.sol +109 -0
- package/src/libs/V4Liquidity.sol +122 -0
- package/src/types/PoolConfiguration.sol +15 -0
- package/src/utils/DeployedCoinVersionLookup.sol +52 -0
- package/src/version/ContractVersionBase.sol +1 -1
- package/test/Coin.t.sol +78 -88
- package/test/CoinDopplerUniV3.t.sol +32 -171
- package/test/CoinUniV4.t.sol +777 -0
- package/test/{Hooks.t.sol → DeploymentHooks.t.sol} +53 -16
- package/test/Factory.t.sol +80 -47
- package/test/MultiOwnable.t.sol +6 -3
- package/test/Upgrades.t.sol +97 -5
- package/test/mocks/MockERC20.sol +12 -0
- package/test/utils/BaseTest.sol +162 -57
- package/test/utils/DeployedCoinVersionLookup.t.sol +127 -0
- package/test/utils/FeeEstimatorHook.sol +84 -0
- package/test/utils/ProxyShim.sol +17 -0
- package/wagmi.config.ts +4 -0
- package/.env +0 -1
- package/.turbo/turbo-update-contract-version.log +0 -22
- package/abis/CoinSetupV3.json +0 -7
- package/abis/HookDeployer.json +0 -68
- package/abis/IHookDeployer.json +0 -42
- package/src/hooks/BuySupplyWithSwapRouterHook.sol +0 -78
- package/src/libs/CoinLegacy.sol +0 -48
- package/src/libs/CoinLegacyMarket.sol +0 -182
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,114 +1,179 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
src/
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
src
|
|
79
|
-
|
|
80
|
-
src/
|
|
81
|
-
src/
|
|
82
|
-
src/
|
|
83
|
-
src/
|
|
84
|
-
src/
|
|
85
|
-
src/
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
1
|
+
|
|
2
|
+
> @zoralabs/coins@1.0.1 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.1 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 168.87s
|
|
11
|
+
Compiler run successful with warnings:
|
|
12
|
+
Warning (6321): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
|
13
|
+
--> src/hooks/ZoraV4CoinHook.sol:194:84:
|
|
14
|
+
|
|
|
15
|
+
194 | function unlockCallback(bytes calldata data) external onlyPoolManager returns (bytes memory) {
|
|
16
|
+
| ^^^^^^^^^^^^
|
|
17
|
+
|
|
18
|
+
Warning (2072): Unused local variable.
|
|
19
|
+
--> src/libs/HooksDeployment.sol:35:9:
|
|
20
|
+
|
|
|
21
|
+
35 | bytes32 creationCodeHash = keccak256(creationCodeWithArgs);
|
|
22
|
+
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
23
|
+
|
|
24
|
+
Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning.
|
|
25
|
+
--> src/deployment/CoinsDeployerBase.sol:194:84:
|
|
26
|
+
|
|
|
27
|
+
194 | function deployDevFactory(CoinsDeployment memory deployment) internal returns (ZoraFactory devFactory) {
|
|
28
|
+
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
29
|
+
|
|
30
|
+
Warning (2072): Unused local variable.
|
|
31
|
+
--> script/TestBackingCoinSwap.s.sol:107:9:
|
|
32
|
+
|
|
|
33
|
+
107 | address tradeReferral = 0xC077e4cC02fa01A5b7fAca1acE9BBe9f5ac5Af9F;
|
|
34
|
+
| ^^^^^^^^^^^^^^^^^^^^^
|
|
35
|
+
|
|
36
|
+
Warning (2072): Unused local variable.
|
|
37
|
+
--> script/TestV4Swap.s.sol:99:9:
|
|
38
|
+
|
|
|
39
|
+
99 | address createReferral = 0xC077e4cC02fa01A5b7fAca1acE9BBe9f5ac5Af9F;
|
|
40
|
+
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
41
|
+
|
|
42
|
+
Warning (2072): Unused local variable.
|
|
43
|
+
--> test/Upgrades.t.sol:140:9:
|
|
44
|
+
|
|
|
45
|
+
140 | bytes[] memory inputs = new bytes[](5);
|
|
46
|
+
| ^^^^^^^^^^^^^^^^^^^^^
|
|
47
|
+
|
|
48
|
+
Warning (2072): Unused local variable.
|
|
49
|
+
--> test/Upgrades.t.sol:148:9:
|
|
50
|
+
|
|
|
51
|
+
148 | PoolKey memory key = coin.getPoolKey();
|
|
52
|
+
| ^^^^^^^^^^^^^^^^^^
|
|
53
|
+
|
|
54
|
+
Warning (2018): Function state mutability can be restricted to pure
|
|
55
|
+
--> src/libs/HooksDeployment.sol:20:5:
|
|
56
|
+
|
|
|
57
|
+
20 | function deterministicHookAddress(address deployer, bytes32 salt, bytes memory creationCode) internal view returns (address) {
|
|
58
|
+
| ^ (Relevant source part starts here and spans across multiple lines).
|
|
59
|
+
|
|
60
|
+
[33m-[39m Validating plugins
|
|
61
|
+
[32m✔[39m Validating plugins
|
|
62
|
+
[33m-[39m Resolving contracts
|
|
63
|
+
[32m✔[39m Resolving contracts
|
|
64
|
+
[33m-[39m Running plugins
|
|
65
|
+
[32m✔[39m Running plugins
|
|
66
|
+
[33m-[39m Writing to [90mpackage/wagmiGenerated.ts[39m
|
|
67
|
+
[32m✔[39m Writing to [90mpackage/wagmiGenerated.ts[39m
|
|
68
|
+
🔄 Processing 1 file(s) to replace 'Abi' with 'ABI'...
|
|
69
|
+
📝 Processing ./package/wagmiGenerated.ts...
|
|
70
|
+
✅ Updated ./package/wagmiGenerated.ts (8 replacements)
|
|
71
|
+
✨ All files processed successfully!
|
|
72
|
+
|
|
73
|
+
> @zoralabs/coins@1.0.1 copy-abis /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
|
|
74
|
+
> pnpm exec bundle-abis
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
> @zoralabs/coins@1.0.1 prettier:write /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins
|
|
78
|
+
> prettier --write 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'
|
|
79
|
+
|
|
80
|
+
src/BaseCoin.sol 337ms (unchanged)
|
|
81
|
+
src/Coin.sol 134ms (unchanged)
|
|
82
|
+
src/CoinV4.sol 94ms (unchanged)
|
|
83
|
+
src/deployment/CoinsDeployerBase.sol 171ms (unchanged)
|
|
84
|
+
src/hooks/deployment/BaseCoinDeployHook.sol 16ms (unchanged)
|
|
85
|
+
src/hooks/deployment/BuySupplyWithSwapRouterHook.sol 147ms (unchanged)
|
|
86
|
+
src/hooks/ZoraV4CoinHook.sol 89ms (unchanged)
|
|
87
|
+
src/interfaces/IAirlock.sol 1ms (unchanged)
|
|
88
|
+
src/interfaces/ICoin.sol 10ms (unchanged)
|
|
89
|
+
src/interfaces/ICoinComments.sol 4ms (unchanged)
|
|
90
|
+
src/interfaces/ICoinDeployHook.sol 1ms (unchanged)
|
|
91
|
+
src/interfaces/ICoinV3.sol 3ms (unchanged)
|
|
92
|
+
src/interfaces/ICoinV4.sol 2ms (unchanged)
|
|
93
|
+
src/interfaces/IDeployedCoinVersionLookup.sol 1ms (unchanged)
|
|
94
|
+
src/interfaces/IDopplerErrors.sol 1ms (unchanged)
|
|
95
|
+
src/interfaces/IERC7572.sol 1ms (unchanged)
|
|
96
|
+
src/interfaces/IMsgSender.sol 0ms (unchanged)
|
|
97
|
+
src/interfaces/INonfungiblePositionManager.sol 4ms (unchanged)
|
|
98
|
+
src/interfaces/IPoolConfigEncoding.sol 1ms (unchanged)
|
|
99
|
+
src/interfaces/IProtocolRewards.sol 2ms (unchanged)
|
|
100
|
+
src/interfaces/ISwapPathRouter.sol 1ms (unchanged)
|
|
101
|
+
src/interfaces/ISwapRouter.sol 0ms (unchanged)
|
|
102
|
+
src/interfaces/IUniswapV3Factory.sol 3ms (unchanged)
|
|
103
|
+
src/interfaces/IUniswapV3Pool.sol 3ms (unchanged)
|
|
104
|
+
src/interfaces/IUniswapV3SwapCallback.sol 1ms (unchanged)
|
|
105
|
+
src/interfaces/IWETH.sol 2ms (unchanged)
|
|
106
|
+
src/interfaces/IZoraFactory.sol 10ms (unchanged)
|
|
107
|
+
src/interfaces/IZoraV4CoinHook.sol 6ms (unchanged)
|
|
108
|
+
src/libs/CoinCommon.sol 4ms (unchanged)
|
|
109
|
+
src/libs/CoinConfigurationVersions.sol 51ms (unchanged)
|
|
110
|
+
src/libs/CoinConstants.sol 5ms (unchanged)
|
|
111
|
+
src/libs/CoinDopplerMultiCurve.sol 126ms (unchanged)
|
|
112
|
+
src/libs/CoinDopplerUniV3.sol 28ms (unchanged)
|
|
113
|
+
src/libs/CoinRewards.sol 102ms (unchanged)
|
|
114
|
+
src/libs/CoinRewardsV4.sol 62ms (unchanged)
|
|
115
|
+
src/libs/CoinSetup.sol 20ms (unchanged)
|
|
116
|
+
src/libs/CoinSetupV3.sol 13ms (unchanged)
|
|
117
|
+
src/libs/DopplerMath.sol 93ms (unchanged)
|
|
118
|
+
src/libs/HooksDeployment.sol 47ms (unchanged)
|
|
119
|
+
src/libs/MarketConstants.sol 1ms (unchanged)
|
|
120
|
+
src/libs/PoolStateReader.sol 3ms (unchanged)
|
|
121
|
+
src/libs/UniV3BuySell.sol 77ms (unchanged)
|
|
122
|
+
src/libs/UniV3Errors.sol 1ms (unchanged)
|
|
123
|
+
src/libs/UniV4SwapHelper.sol 25ms (unchanged)
|
|
124
|
+
src/libs/UniV4SwapToCurrency.sol 45ms (unchanged)
|
|
125
|
+
src/libs/V4Liquidity.sol 53ms (unchanged)
|
|
126
|
+
src/proxy/ZoraFactory.sol 6ms (unchanged)
|
|
127
|
+
src/types/LpPosition.sol 1ms (unchanged)
|
|
128
|
+
src/types/PoolConfiguration.sol 1ms (unchanged)
|
|
129
|
+
src/types/PoolState.sol 2ms (unchanged)
|
|
130
|
+
src/utils/DeployedCoinVersionLookup.sol 7ms (unchanged)
|
|
131
|
+
src/utils/MultiOwnable.sol 47ms (unchanged)
|
|
132
|
+
src/utils/uniswap/BitMath.sol 7ms (unchanged)
|
|
133
|
+
src/utils/uniswap/CustomRevert.sol 50ms (unchanged)
|
|
134
|
+
src/utils/uniswap/FixedPoint96.sol 1ms (unchanged)
|
|
135
|
+
src/utils/uniswap/FullMath.sol 20ms (unchanged)
|
|
136
|
+
src/utils/uniswap/LiquidityAmounts.sol 39ms (unchanged)
|
|
137
|
+
src/utils/uniswap/SafeCast.sol 13ms (unchanged)
|
|
138
|
+
src/utils/uniswap/SqrtPriceMath.sol 64ms (unchanged)
|
|
139
|
+
src/utils/uniswap/TickMath.sol 65ms (unchanged)
|
|
140
|
+
src/utils/uniswap/UnsafeMath.sol 2ms (unchanged)
|
|
141
|
+
src/version/ContractVersionBase.sol 1ms (unchanged)
|
|
142
|
+
src/ZoraFactoryImpl.sol 122ms (unchanged)
|
|
143
|
+
test/Coin.t.sol 292ms (unchanged)
|
|
144
|
+
test/CoinDopplerUniV3.t.sol 107ms (unchanged)
|
|
145
|
+
test/CoinUniV4.t.sol 320ms (unchanged)
|
|
146
|
+
test/DeploymentHooks.t.sol 100ms (unchanged)
|
|
147
|
+
test/Factory.t.sol 159ms (unchanged)
|
|
148
|
+
test/mocks/MockERC20.sol 2ms (unchanged)
|
|
149
|
+
test/MultiOwnable.t.sol 76ms (unchanged)
|
|
150
|
+
test/Upgrades.t.sol 44ms (unchanged)
|
|
151
|
+
test/utils/BaseTest.sol 116ms (unchanged)
|
|
152
|
+
test/utils/DeployedCoinVersionLookup.t.sol 36ms (unchanged)
|
|
153
|
+
test/utils/FeeEstimatorHook.sol 22ms (unchanged)
|
|
154
|
+
test/utils/ProtocolRewards.sol 274ms (unchanged)
|
|
155
|
+
test/utils/ProxyShim.sol 6ms (unchanged)
|
|
156
|
+
script/Deploy.s.sol 3ms (unchanged)
|
|
157
|
+
script/DeployDevFactory.s.sol 3ms (unchanged)
|
|
158
|
+
script/DeployHooks.s.sol 3ms (unchanged)
|
|
159
|
+
script/GenerateDeterministicParams.s.sol 10ms (unchanged)
|
|
160
|
+
script/PrintUpgradeCommand.s.sol 2ms (unchanged)
|
|
161
|
+
script/Simulate.s.sol 12ms (unchanged)
|
|
162
|
+
script/TestBackingCoinSwap.s.sol 30ms (unchanged)
|
|
163
|
+
script/TestV4Swap.s.sol 37ms (unchanged)
|
|
164
|
+
script/UpgradeCoinImpl.sol 4ms (unchanged)
|
|
165
|
+
script/UpgradeFactoryImpl.s.sol 5ms (unchanged)
|
|
166
|
+
[34mCLI[39m Building entry: package/index.ts
|
|
167
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
168
|
+
[34mCLI[39m tsup v8.4.0
|
|
169
|
+
[34mCLI[39m Using tsup config: /home/runner/work/zora-protocol-private/zora-protocol-private/packages/coins/tsup.config.ts
|
|
170
|
+
[34mCLI[39m Target: es2021
|
|
171
|
+
[34mCLI[39m Cleaning output folder
|
|
172
|
+
[34mCJS[39m Build start
|
|
173
|
+
[34mESM[39m Build start
|
|
174
|
+
[32mESM[39m [1mdist/index.js [22m[32m88.73 KB[39m
|
|
175
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m159.49 KB[39m
|
|
176
|
+
[32mESM[39m ⚡️ Build success in 33ms
|
|
177
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m90.06 KB[39m
|
|
178
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m159.63 KB[39m
|
|
179
|
+
[32mCJS[39m ⚡️ Build success in 34ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# @zoralabs/coins
|
|
2
2
|
|
|
3
|
+
## 1.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8cd56863: BuySupplyWithSwapRouterHook supports v4 coins
|
|
8
|
+
|
|
9
|
+
## 1.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- 73e95f69: Upgraded coins to use Uniswap V4:
|
|
14
|
+
|
|
15
|
+
**New CoinV4 Implementation:**
|
|
16
|
+
|
|
17
|
+
- Migrated from Uniswap V3 to Uniswap V4, with logic moved into a hook.
|
|
18
|
+
- Automatic LP fee collection and multi-hop reward distribution on every swap
|
|
19
|
+
- New `ZoraV4CoinHook` handles afterSwap operations
|
|
20
|
+
- Support for complex multi-position liquidity curves and discovery positions
|
|
21
|
+
- Multi-hop fee swapping through intermediate currencies (e.g., ContentCoin → BackingCoin → Zora)
|
|
22
|
+
|
|
23
|
+
**Factory Updates:**
|
|
24
|
+
|
|
25
|
+
- Updated `deploy()` function signature with new `poolConfig`, `message`, and `salt` parameters
|
|
26
|
+
- Automatic V3/V4 version selection based on pool configuration
|
|
27
|
+
- Deterministic coin deployment with salt support
|
|
28
|
+
- New `CoinCreatedV4` event for V4 coin deployments
|
|
29
|
+
|
|
30
|
+
**Reward System Changes:**
|
|
31
|
+
|
|
32
|
+
- Increased trade referral rewards from 10% to 15% (1500 basis points)
|
|
33
|
+
- Automatic reward distribution in single backing currency
|
|
34
|
+
|
|
35
|
+
**New Interfaces and Events:**
|
|
36
|
+
|
|
37
|
+
- Added `IHasPoolKey` and `IHasSwapPath` interfaces for V4 functionality
|
|
38
|
+
- New `Swapped` event with detailed swap and price information
|
|
39
|
+
- New `CoinMarketRewardsV4` event for reward distribution tracking
|
|
40
|
+
|
|
41
|
+
**Breaking Changes:**
|
|
42
|
+
|
|
43
|
+
- New deterministic factory deploy function with salt
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- 6b8bdd9d: Remove ability to create coin with legacy pool config
|
|
48
|
+
|
|
3
49
|
## 0.9.0
|
|
4
50
|
|
|
5
51
|
### Minor Changes
|
package/abis/BaseCoin.json
CHANGED
|
@@ -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",
|
package/abis/BaseTest.json
CHANGED
|
@@ -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
|
]
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
"name": "_swapRouter",
|
|
12
12
|
"type": "address",
|
|
13
13
|
"internalType": "address"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "_poolManager",
|
|
17
|
+
"type": "address",
|
|
18
|
+
"internalType": "address"
|
|
14
19
|
}
|
|
15
20
|
],
|
|
16
21
|
"stateMutability": "nonpayable"
|
|
@@ -76,6 +81,25 @@
|
|
|
76
81
|
],
|
|
77
82
|
"stateMutability": "pure"
|
|
78
83
|
},
|
|
84
|
+
{
|
|
85
|
+
"type": "function",
|
|
86
|
+
"name": "unlockCallback",
|
|
87
|
+
"inputs": [
|
|
88
|
+
{
|
|
89
|
+
"name": "data",
|
|
90
|
+
"type": "bytes",
|
|
91
|
+
"internalType": "bytes"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"outputs": [
|
|
95
|
+
{
|
|
96
|
+
"name": "",
|
|
97
|
+
"type": "bytes",
|
|
98
|
+
"internalType": "bytes"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"stateMutability": "nonpayable"
|
|
102
|
+
},
|
|
79
103
|
{
|
|
80
104
|
"type": "error",
|
|
81
105
|
"name": "AddressZero",
|
|
@@ -92,6 +116,17 @@
|
|
|
92
116
|
}
|
|
93
117
|
]
|
|
94
118
|
},
|
|
119
|
+
{
|
|
120
|
+
"type": "error",
|
|
121
|
+
"name": "CurrencyBalanceNot0",
|
|
122
|
+
"inputs": [
|
|
123
|
+
{
|
|
124
|
+
"name": "balance",
|
|
125
|
+
"type": "uint256",
|
|
126
|
+
"internalType": "uint256"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
95
130
|
{
|
|
96
131
|
"type": "error",
|
|
97
132
|
"name": "Erc20NotReceived",
|
|
@@ -112,6 +147,11 @@
|
|
|
112
147
|
"name": "NotFactory",
|
|
113
148
|
"inputs": []
|
|
114
149
|
},
|
|
150
|
+
{
|
|
151
|
+
"type": "error",
|
|
152
|
+
"name": "OnlyPoolManager",
|
|
153
|
+
"inputs": []
|
|
154
|
+
},
|
|
115
155
|
{
|
|
116
156
|
"type": "error",
|
|
117
157
|
"name": "SwapReverted",
|