@zoralabs/limit-orders 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$js.log +85 -0
- package/AUDIT_NOTES.md +33 -0
- package/AUDIT_RFP.md +408 -0
- package/CHANGELOG.md +25 -0
- package/GAS_COMPARISON_RESULTS.md +194 -0
- package/LICENSE +21 -0
- package/README.md +650 -0
- package/SPEC.md +291 -0
- package/abis/BalanceDeltaLibrary.json +15 -0
- package/abis/BeforeSwapDeltaLibrary.json +15 -0
- package/abis/CurrencyLibrary.json +25 -0
- package/abis/CustomRevert.json +28 -0
- package/abis/IAllowanceTransfer.json +486 -0
- package/abis/IAuthority.json +31 -0
- package/abis/ICoin.json +1074 -0
- package/abis/IDeployedCoinVersionLookup.json +21 -0
- package/abis/IDopplerErrors.json +44 -0
- package/abis/IEIP712.json +15 -0
- package/abis/IERC1363.json +373 -0
- package/abis/IERC165.json +21 -0
- package/abis/IERC20.json +185 -0
- package/abis/IERC20Minimal.json +172 -0
- package/abis/IERC6909Claims.json +288 -0
- package/abis/IERC7572.json +21 -0
- package/abis/IExtsload.json +64 -0
- package/abis/IExttload.json +40 -0
- package/abis/IHasCoinType.json +15 -0
- package/abis/IHasPoolKey.json +42 -0
- package/abis/IHasRewardsRecipients.json +54 -0
- package/abis/IHasSwapPath.json +60 -0
- package/abis/IHasTotalSupplyForPositions.json +15 -0
- package/abis/IHooks.json +789 -0
- package/abis/IMsgSender.json +15 -0
- package/abis/IPoolManager.json +1286 -0
- package/abis/IProtocolFees.json +174 -0
- package/abis/ISupportsLimitOrderFill.json +15 -0
- package/abis/ISwapPathRouter.json +92 -0
- package/abis/ISwapRouter.json +219 -0
- package/abis/IUniswapV3SwapCallback.json +25 -0
- package/abis/IUpgradeableDestinationV4Hook.json +84 -0
- package/abis/IUpgradeableDestinationV4HookWithUpdateableFee.json +95 -0
- package/abis/IUpgradeableV4Hook.json +112 -0
- package/abis/IZoraHookRegistry.json +188 -0
- package/abis/IZoraLimitOrderBook.json +623 -0
- package/abis/IZoraLimitOrderBookCoinsInterface.json +67 -0
- package/abis/IZoraV4CoinHook.json +610 -0
- package/abis/Permit2Payments.json +7 -0
- package/abis/Position.json +7 -0
- package/abis/SafeCast.json +7 -0
- package/abis/SafeCast160.json +7 -0
- package/abis/SafeERC20.json +34 -0
- package/abis/SimpleAccessManaged.json +57 -0
- package/abis/SimpleAccessManager.json +351 -0
- package/abis/SqrtPriceMath.json +22 -0
- package/abis/StateLibrary.json +80 -0
- package/abis/SwapLimitOrders.json +22 -0
- package/abis/SwapWithLimitOrders.json +457 -0
- package/abis/TickBitmap.json +18 -0
- package/abis/TickMath.json +24 -0
- package/abis/V3ToV4SwapLib.json +28 -0
- package/abis/ZoraLimitOrderBook.json +771 -0
- package/cache/solidity-files-cache.json +1 -0
- package/dist/index.cjs +760 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +731 -0
- package/dist/index.js.map +1 -0
- package/dist/wagmiGenerated.d.ts +1012 -0
- package/dist/wagmiGenerated.d.ts.map +1 -0
- package/foundry.toml +29 -0
- package/gas_comparison.py +49 -0
- package/out/BalanceDelta.sol/BalanceDeltaLibrary.json +1 -0
- package/out/BeforeSwapDelta.sol/BeforeSwapDeltaLibrary.json +1 -0
- package/out/BitMath.sol/BitMath.json +1 -0
- package/out/BytesLib.sol/BytesLib.json +1 -0
- package/out/CoinCommon.sol/CoinCommon.json +1 -0
- package/out/CoinConfigurationVersions.sol/CoinConfigurationVersions.json +1 -0
- package/out/CoinConstants.sol/CoinConstants.json +1 -0
- package/out/Context.sol/Context.json +1 -0
- package/out/Currency.sol/CurrencyLibrary.json +1 -0
- package/out/CurrencyReserves.sol/CurrencyReserves.json +1 -0
- package/out/CustomRevert.sol/CustomRevert.json +1 -0
- package/out/DopplerMath.sol/DopplerMath.json +1 -0
- package/out/FixedPoint128.sol/FixedPoint128.json +1 -0
- package/out/FixedPoint96.sol/FixedPoint96.json +1 -0
- package/out/FullMath.sol/FullMath.json +1 -0
- package/out/IAllowanceTransfer.sol/IAllowanceTransfer.json +1 -0
- package/out/IAuthority.sol/IAuthority.json +1 -0
- package/out/ICoin.sol/ICoin.json +1 -0
- package/out/ICoin.sol/IHasCoinType.json +1 -0
- package/out/ICoin.sol/IHasPoolKey.json +1 -0
- package/out/ICoin.sol/IHasSwapPath.json +1 -0
- package/out/ICoin.sol/IHasTotalSupplyForPositions.json +1 -0
- package/out/IDeployedCoinVersionLookup.sol/IDeployedCoinVersionLookup.json +1 -0
- package/out/IDopplerErrors.sol/IDopplerErrors.json +1 -0
- package/out/IEIP712.sol/IEIP712.json +1 -0
- package/out/IERC1363.sol/IERC1363.json +1 -0
- package/out/IERC165.sol/IERC165.json +1 -0
- package/out/IERC20.sol/IERC20.json +1 -0
- package/out/IERC20Minimal.sol/IERC20Minimal.json +1 -0
- package/out/IERC6909Claims.sol/IERC6909Claims.json +1 -0
- package/out/IERC7572.sol/IERC7572.json +1 -0
- package/out/IExtsload.sol/IExtsload.json +1 -0
- package/out/IExttload.sol/IExttload.json +1 -0
- package/out/IHasRewardsRecipients.sol/IHasRewardsRecipients.json +1 -0
- package/out/IHooks.sol/IHooks.json +1 -0
- package/out/IMsgSender.sol/IMsgSender.json +1 -0
- package/out/IPoolManager.sol/IPoolManager.json +1 -0
- package/out/IProtocolFees.sol/IProtocolFees.json +1 -0
- package/out/ISupportsLimitOrderFill.sol/ISupportsLimitOrderFill.json +1 -0
- package/out/ISwapPathRouter.sol/ISwapPathRouter.json +1 -0
- package/out/ISwapRouter.sol/ISwapRouter.json +1 -0
- package/out/IUniswapV3SwapCallback.sol/IUniswapV3SwapCallback.json +1 -0
- package/out/IUpgradeableV4Hook.sol/IUpgradeableDestinationV4Hook.json +1 -0
- package/out/IUpgradeableV4Hook.sol/IUpgradeableDestinationV4HookWithUpdateableFee.json +1 -0
- package/out/IUpgradeableV4Hook.sol/IUpgradeableV4Hook.json +1 -0
- package/out/IZoraHookRegistry.sol/IZoraHookRegistry.json +1 -0
- package/out/IZoraLimitOrderBook.sol/IZoraLimitOrderBook.json +1 -0
- package/out/IZoraLimitOrderBookCoinsInterface.sol/IZoraLimitOrderBookCoinsInterface.json +1 -0
- package/out/IZoraV4CoinHook.sol/IZoraV4CoinHook.json +1 -0
- package/out/LimitOrderBitmap.sol/LimitOrderBitmap.json +1 -0
- package/out/LimitOrderCommon.sol/LimitOrderCommon.json +1 -0
- package/out/LimitOrderCreate.sol/LimitOrderCreate.json +1 -0
- package/out/LimitOrderFill.sol/LimitOrderFill.json +1 -0
- package/out/LimitOrderLiquidity.sol/LimitOrderLiquidity.json +1 -0
- package/out/LimitOrderQueues.sol/LimitOrderQueues.json +1 -0
- package/out/LimitOrderStorage.sol/LimitOrderStorage.json +1 -0
- package/out/LimitOrderTypes.sol/LimitOrderTypes.json +1 -0
- package/out/LimitOrderWithdraw.sol/LimitOrderWithdraw.json +1 -0
- package/out/LiquidityAmounts.sol/LiquidityAmounts.json +1 -0
- package/out/LiquidityMath.sol/LiquidityMath.json +1 -0
- package/out/Lock.sol/Lock.json +1 -0
- package/out/NonzeroDeltaCount.sol/NonzeroDeltaCount.json +1 -0
- package/out/Path.sol/Path.json +1 -0
- package/out/PathKey.sol/PathKeyLibrary.json +1 -0
- package/out/Permit2Payments.sol/Permit2Payments.json +1 -0
- package/out/PoolId.sol/PoolIdLibrary.json +1 -0
- package/out/Position.sol/Position.json +1 -0
- package/out/SafeCast.sol/SafeCast.json +1 -0
- package/out/SafeCast160.sol/SafeCast160.json +1 -0
- package/out/SafeERC20.sol/SafeERC20.json +1 -0
- package/out/SimpleAccessManaged.sol/SimpleAccessManaged.json +1 -0
- package/out/SimpleAccessManager.sol/SimpleAccessManager.json +1 -0
- package/out/SqrtPriceMath.sol/SqrtPriceMath.json +1 -0
- package/out/StateLibrary.sol/StateLibrary.json +1 -0
- package/out/SwapLimitOrders.sol/SwapLimitOrders.json +1 -0
- package/out/SwapWithLimitOrders.sol/SwapWithLimitOrders.json +1 -0
- package/out/TickBitmap.sol/TickBitmap.json +1 -0
- package/out/TickMath.sol/TickMath.json +1 -0
- package/out/TransientSlot.sol/TransientSlot.json +1 -0
- package/out/TransientStateLibrary.sol/TransientStateLibrary.json +1 -0
- package/out/UniV4SwapToCurrency.sol/UniV4SwapToCurrency.json +1 -0
- package/out/UnsafeMath.sol/UnsafeMath.json +1 -0
- package/out/V3ToV4SwapLib.sol/V3ToV4SwapLib.json +1 -0
- package/out/ZoraLimitOrderBook.sol/ZoraLimitOrderBook.json +1 -0
- package/out/build-info/69718f10d1dc37f0.json +1 -0
- package/out/uniswap/BitMath.sol/BitMath.json +1 -0
- package/out/uniswap/CustomRevert.sol/CustomRevert.json +1 -0
- package/out/uniswap/FullMath.sol/FullMath.json +1 -0
- package/out/uniswap/SafeCast.sol/SafeCast.json +1 -0
- package/out/uniswap/TickMath.sol/TickMath.json +1 -0
- package/package/index.ts +1 -0
- package/package/wagmiGenerated.ts +738 -0
- package/package.json +57 -0
- package/remappings.txt +11 -0
- package/src/IZoraLimitOrderBook.sol +195 -0
- package/src/ZoraLimitOrderBook.sol +220 -0
- package/src/access/SimpleAccessManaged.sol +76 -0
- package/src/access/SimpleAccessManager.sol +268 -0
- package/src/libs/LimitOrderBitmap.sol +84 -0
- package/src/libs/LimitOrderCommon.sol +91 -0
- package/src/libs/LimitOrderCreate.sol +277 -0
- package/src/libs/LimitOrderFill.sol +362 -0
- package/src/libs/LimitOrderLiquidity.sol +222 -0
- package/src/libs/LimitOrderQueues.sol +101 -0
- package/src/libs/LimitOrderStorage.sol +34 -0
- package/src/libs/LimitOrderTypes.sol +41 -0
- package/src/libs/LimitOrderWithdraw.sol +100 -0
- package/src/libs/Permit2Payments.sol +41 -0
- package/src/libs/SwapLimitOrders.sol +209 -0
- package/src/router/SwapWithLimitOrders.sol +454 -0
- package/test/LimitOrderAccessControl.t.sol +461 -0
- package/test/LimitOrderBitmap.t.sol +194 -0
- package/test/LimitOrderCreate.t.sol +348 -0
- package/test/LimitOrderFill.t.sol +1005 -0
- package/test/LimitOrderLibraries.t.sol +354 -0
- package/test/LimitOrderLiquidityPayouts.t.sol +333 -0
- package/test/LimitOrderV4Pools.t.sol +157 -0
- package/test/LimitOrderWithdraw.t.sol +653 -0
- package/test/SimpleAccessManager.t.sol +420 -0
- package/test/SwapWithLimitOrders.t.sol +107 -0
- package/test/SwapWithLimitOrdersRouter.t.sol +1073 -0
- package/test/gas/LimitOrderFillGas.t.sol +1008 -0
- package/test/gas/LimitOrderSwapGas.t.sol +403 -0
- package/test/gas/logs/gas_benchmarks_fill_20251201.log +30 -0
- package/test/gas/logs/gas_benchmarks_swap_20251201.log +27 -0
- package/test/unit/LimitOrderBitmapUnit.t.sol +276 -0
- package/test/unit/LimitOrderCreateUnit.t.sol +358 -0
- package/test/unit/SwapLimitOrdersUnit.t.sol +672 -0
- package/test/unit/SwapLimitOrdersValidation.t.sol +423 -0
- package/test/unit/SwapWithLimitOrdersUnit.t.sol +321 -0
- package/test/utils/BaseTest.sol +793 -0
- package/test/utils/TestableZoraLimitOrderBook.sol +54 -0
- package/tsconfig.build.json +10 -0
- package/tsconfig.json +9 -0
- package/tsup.config.ts +11 -0
- package/wagmi.config.ts +18 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "collectProtocolFees",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "recipient",
|
|
8
|
+
"type": "address",
|
|
9
|
+
"internalType": "address"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "currency",
|
|
13
|
+
"type": "address",
|
|
14
|
+
"internalType": "Currency"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "amount",
|
|
18
|
+
"type": "uint256",
|
|
19
|
+
"internalType": "uint256"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"outputs": [
|
|
23
|
+
{
|
|
24
|
+
"name": "amountCollected",
|
|
25
|
+
"type": "uint256",
|
|
26
|
+
"internalType": "uint256"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"stateMutability": "nonpayable"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "function",
|
|
33
|
+
"name": "protocolFeeController",
|
|
34
|
+
"inputs": [],
|
|
35
|
+
"outputs": [
|
|
36
|
+
{
|
|
37
|
+
"name": "",
|
|
38
|
+
"type": "address",
|
|
39
|
+
"internalType": "address"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"stateMutability": "view"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "function",
|
|
46
|
+
"name": "protocolFeesAccrued",
|
|
47
|
+
"inputs": [
|
|
48
|
+
{
|
|
49
|
+
"name": "currency",
|
|
50
|
+
"type": "address",
|
|
51
|
+
"internalType": "Currency"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"outputs": [
|
|
55
|
+
{
|
|
56
|
+
"name": "amount",
|
|
57
|
+
"type": "uint256",
|
|
58
|
+
"internalType": "uint256"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"stateMutability": "view"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"type": "function",
|
|
65
|
+
"name": "setProtocolFee",
|
|
66
|
+
"inputs": [
|
|
67
|
+
{
|
|
68
|
+
"name": "key",
|
|
69
|
+
"type": "tuple",
|
|
70
|
+
"internalType": "struct PoolKey",
|
|
71
|
+
"components": [
|
|
72
|
+
{
|
|
73
|
+
"name": "currency0",
|
|
74
|
+
"type": "address",
|
|
75
|
+
"internalType": "Currency"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "currency1",
|
|
79
|
+
"type": "address",
|
|
80
|
+
"internalType": "Currency"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "fee",
|
|
84
|
+
"type": "uint24",
|
|
85
|
+
"internalType": "uint24"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "tickSpacing",
|
|
89
|
+
"type": "int24",
|
|
90
|
+
"internalType": "int24"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "hooks",
|
|
94
|
+
"type": "address",
|
|
95
|
+
"internalType": "contract IHooks"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "newProtocolFee",
|
|
101
|
+
"type": "uint24",
|
|
102
|
+
"internalType": "uint24"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"outputs": [],
|
|
106
|
+
"stateMutability": "nonpayable"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "function",
|
|
110
|
+
"name": "setProtocolFeeController",
|
|
111
|
+
"inputs": [
|
|
112
|
+
{
|
|
113
|
+
"name": "controller",
|
|
114
|
+
"type": "address",
|
|
115
|
+
"internalType": "address"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"outputs": [],
|
|
119
|
+
"stateMutability": "nonpayable"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"type": "event",
|
|
123
|
+
"name": "ProtocolFeeControllerUpdated",
|
|
124
|
+
"inputs": [
|
|
125
|
+
{
|
|
126
|
+
"name": "protocolFeeController",
|
|
127
|
+
"type": "address",
|
|
128
|
+
"indexed": true,
|
|
129
|
+
"internalType": "address"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"anonymous": false
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"type": "event",
|
|
136
|
+
"name": "ProtocolFeeUpdated",
|
|
137
|
+
"inputs": [
|
|
138
|
+
{
|
|
139
|
+
"name": "id",
|
|
140
|
+
"type": "bytes32",
|
|
141
|
+
"indexed": true,
|
|
142
|
+
"internalType": "PoolId"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"name": "protocolFee",
|
|
146
|
+
"type": "uint24",
|
|
147
|
+
"indexed": false,
|
|
148
|
+
"internalType": "uint24"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"anonymous": false
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"type": "error",
|
|
155
|
+
"name": "InvalidCaller",
|
|
156
|
+
"inputs": []
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"type": "error",
|
|
160
|
+
"name": "ProtocolFeeCurrencySynced",
|
|
161
|
+
"inputs": []
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"type": "error",
|
|
165
|
+
"name": "ProtocolFeeTooLarge",
|
|
166
|
+
"inputs": [
|
|
167
|
+
{
|
|
168
|
+
"name": "fee",
|
|
169
|
+
"type": "uint24",
|
|
170
|
+
"internalType": "uint24"
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
]
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "getSwapPath",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "key",
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"internalType": "struct PoolKey",
|
|
10
|
+
"components": [
|
|
11
|
+
{
|
|
12
|
+
"name": "currency0",
|
|
13
|
+
"type": "address",
|
|
14
|
+
"internalType": "Currency"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "currency1",
|
|
18
|
+
"type": "address",
|
|
19
|
+
"internalType": "Currency"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "fee",
|
|
23
|
+
"type": "uint24",
|
|
24
|
+
"internalType": "uint24"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "tickSpacing",
|
|
28
|
+
"type": "int24",
|
|
29
|
+
"internalType": "int24"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "hooks",
|
|
33
|
+
"type": "address",
|
|
34
|
+
"internalType": "contract IHooks"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "toSwapOut",
|
|
40
|
+
"type": "address",
|
|
41
|
+
"internalType": "Currency"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"outputs": [
|
|
45
|
+
{
|
|
46
|
+
"name": "path",
|
|
47
|
+
"type": "tuple[]",
|
|
48
|
+
"internalType": "struct ISwapPathRouter.Path[]",
|
|
49
|
+
"components": [
|
|
50
|
+
{
|
|
51
|
+
"name": "key",
|
|
52
|
+
"type": "tuple",
|
|
53
|
+
"internalType": "struct PoolKey",
|
|
54
|
+
"components": [
|
|
55
|
+
{
|
|
56
|
+
"name": "currency0",
|
|
57
|
+
"type": "address",
|
|
58
|
+
"internalType": "Currency"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "currency1",
|
|
62
|
+
"type": "address",
|
|
63
|
+
"internalType": "Currency"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "fee",
|
|
67
|
+
"type": "uint24",
|
|
68
|
+
"internalType": "uint24"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "tickSpacing",
|
|
72
|
+
"type": "int24",
|
|
73
|
+
"internalType": "int24"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "hooks",
|
|
77
|
+
"type": "address",
|
|
78
|
+
"internalType": "contract IHooks"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "currencyIn",
|
|
84
|
+
"type": "address",
|
|
85
|
+
"internalType": "Currency"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"stateMutability": "view"
|
|
91
|
+
}
|
|
92
|
+
]
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "exactInput",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "params",
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"internalType": "struct ISwapRouter.ExactInputParams",
|
|
10
|
+
"components": [
|
|
11
|
+
{
|
|
12
|
+
"name": "path",
|
|
13
|
+
"type": "bytes",
|
|
14
|
+
"internalType": "bytes"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "recipient",
|
|
18
|
+
"type": "address",
|
|
19
|
+
"internalType": "address"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "amountIn",
|
|
23
|
+
"type": "uint256",
|
|
24
|
+
"internalType": "uint256"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "amountOutMinimum",
|
|
28
|
+
"type": "uint256",
|
|
29
|
+
"internalType": "uint256"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"outputs": [
|
|
35
|
+
{
|
|
36
|
+
"name": "amountOut",
|
|
37
|
+
"type": "uint256",
|
|
38
|
+
"internalType": "uint256"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"stateMutability": "payable"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"type": "function",
|
|
45
|
+
"name": "exactInputSingle",
|
|
46
|
+
"inputs": [
|
|
47
|
+
{
|
|
48
|
+
"name": "params",
|
|
49
|
+
"type": "tuple",
|
|
50
|
+
"internalType": "struct ISwapRouter.ExactInputSingleParams",
|
|
51
|
+
"components": [
|
|
52
|
+
{
|
|
53
|
+
"name": "tokenIn",
|
|
54
|
+
"type": "address",
|
|
55
|
+
"internalType": "address"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "tokenOut",
|
|
59
|
+
"type": "address",
|
|
60
|
+
"internalType": "address"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "fee",
|
|
64
|
+
"type": "uint24",
|
|
65
|
+
"internalType": "uint24"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "recipient",
|
|
69
|
+
"type": "address",
|
|
70
|
+
"internalType": "address"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "amountIn",
|
|
74
|
+
"type": "uint256",
|
|
75
|
+
"internalType": "uint256"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "amountOutMinimum",
|
|
79
|
+
"type": "uint256",
|
|
80
|
+
"internalType": "uint256"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "sqrtPriceLimitX96",
|
|
84
|
+
"type": "uint160",
|
|
85
|
+
"internalType": "uint160"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"outputs": [
|
|
91
|
+
{
|
|
92
|
+
"name": "amountOut",
|
|
93
|
+
"type": "uint256",
|
|
94
|
+
"internalType": "uint256"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"stateMutability": "payable"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "function",
|
|
101
|
+
"name": "exactOutput",
|
|
102
|
+
"inputs": [
|
|
103
|
+
{
|
|
104
|
+
"name": "params",
|
|
105
|
+
"type": "tuple",
|
|
106
|
+
"internalType": "struct ISwapRouter.ExactOutputParams",
|
|
107
|
+
"components": [
|
|
108
|
+
{
|
|
109
|
+
"name": "path",
|
|
110
|
+
"type": "bytes",
|
|
111
|
+
"internalType": "bytes"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "recipient",
|
|
115
|
+
"type": "address",
|
|
116
|
+
"internalType": "address"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "amountOut",
|
|
120
|
+
"type": "uint256",
|
|
121
|
+
"internalType": "uint256"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "amountInMaximum",
|
|
125
|
+
"type": "uint256",
|
|
126
|
+
"internalType": "uint256"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"outputs": [
|
|
132
|
+
{
|
|
133
|
+
"name": "amountIn",
|
|
134
|
+
"type": "uint256",
|
|
135
|
+
"internalType": "uint256"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"stateMutability": "payable"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"type": "function",
|
|
142
|
+
"name": "exactOutputSingle",
|
|
143
|
+
"inputs": [
|
|
144
|
+
{
|
|
145
|
+
"name": "params",
|
|
146
|
+
"type": "tuple",
|
|
147
|
+
"internalType": "struct ISwapRouter.ExactOutputSingleParams",
|
|
148
|
+
"components": [
|
|
149
|
+
{
|
|
150
|
+
"name": "tokenIn",
|
|
151
|
+
"type": "address",
|
|
152
|
+
"internalType": "address"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "tokenOut",
|
|
156
|
+
"type": "address",
|
|
157
|
+
"internalType": "address"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "fee",
|
|
161
|
+
"type": "uint24",
|
|
162
|
+
"internalType": "uint24"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "recipient",
|
|
166
|
+
"type": "address",
|
|
167
|
+
"internalType": "address"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "amountOut",
|
|
171
|
+
"type": "uint256",
|
|
172
|
+
"internalType": "uint256"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "amountInMaximum",
|
|
176
|
+
"type": "uint256",
|
|
177
|
+
"internalType": "uint256"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "sqrtPriceLimitX96",
|
|
181
|
+
"type": "uint160",
|
|
182
|
+
"internalType": "uint160"
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"outputs": [
|
|
188
|
+
{
|
|
189
|
+
"name": "amountIn",
|
|
190
|
+
"type": "uint256",
|
|
191
|
+
"internalType": "uint256"
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"stateMutability": "payable"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"type": "function",
|
|
198
|
+
"name": "uniswapV3SwapCallback",
|
|
199
|
+
"inputs": [
|
|
200
|
+
{
|
|
201
|
+
"name": "amount0Delta",
|
|
202
|
+
"type": "int256",
|
|
203
|
+
"internalType": "int256"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"name": "amount1Delta",
|
|
207
|
+
"type": "int256",
|
|
208
|
+
"internalType": "int256"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"name": "data",
|
|
212
|
+
"type": "bytes",
|
|
213
|
+
"internalType": "bytes"
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"outputs": [],
|
|
217
|
+
"stateMutability": "nonpayable"
|
|
218
|
+
}
|
|
219
|
+
]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "uniswapV3SwapCallback",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "amount0Delta",
|
|
8
|
+
"type": "int256",
|
|
9
|
+
"internalType": "int256"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "amount1Delta",
|
|
13
|
+
"type": "int256",
|
|
14
|
+
"internalType": "int256"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "data",
|
|
18
|
+
"type": "bytes",
|
|
19
|
+
"internalType": "bytes"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"outputs": [],
|
|
23
|
+
"stateMutability": "nonpayable"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "initializeFromMigration",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "poolKey",
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"internalType": "struct PoolKey",
|
|
10
|
+
"components": [
|
|
11
|
+
{
|
|
12
|
+
"name": "currency0",
|
|
13
|
+
"type": "address",
|
|
14
|
+
"internalType": "Currency"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "currency1",
|
|
18
|
+
"type": "address",
|
|
19
|
+
"internalType": "Currency"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "fee",
|
|
23
|
+
"type": "uint24",
|
|
24
|
+
"internalType": "uint24"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "tickSpacing",
|
|
28
|
+
"type": "int24",
|
|
29
|
+
"internalType": "int24"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "hooks",
|
|
33
|
+
"type": "address",
|
|
34
|
+
"internalType": "contract IHooks"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "coin",
|
|
40
|
+
"type": "address",
|
|
41
|
+
"internalType": "address"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "sqrtPriceX96",
|
|
45
|
+
"type": "uint160",
|
|
46
|
+
"internalType": "uint160"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "migratedLiquidity",
|
|
50
|
+
"type": "tuple[]",
|
|
51
|
+
"internalType": "struct BurnedPosition[]",
|
|
52
|
+
"components": [
|
|
53
|
+
{
|
|
54
|
+
"name": "tickLower",
|
|
55
|
+
"type": "int24",
|
|
56
|
+
"internalType": "int24"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "tickUpper",
|
|
60
|
+
"type": "int24",
|
|
61
|
+
"internalType": "int24"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "amount0Received",
|
|
65
|
+
"type": "uint128",
|
|
66
|
+
"internalType": "uint128"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "amount1Received",
|
|
70
|
+
"type": "uint128",
|
|
71
|
+
"internalType": "uint128"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "additionalData",
|
|
77
|
+
"type": "bytes",
|
|
78
|
+
"internalType": "bytes"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"outputs": [],
|
|
82
|
+
"stateMutability": "nonpayable"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "initializeFromMigrationWithUpdateableFee",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "poolKey",
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"internalType": "struct PoolKey",
|
|
10
|
+
"components": [
|
|
11
|
+
{
|
|
12
|
+
"name": "currency0",
|
|
13
|
+
"type": "address",
|
|
14
|
+
"internalType": "Currency"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "currency1",
|
|
18
|
+
"type": "address",
|
|
19
|
+
"internalType": "Currency"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "fee",
|
|
23
|
+
"type": "uint24",
|
|
24
|
+
"internalType": "uint24"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "tickSpacing",
|
|
28
|
+
"type": "int24",
|
|
29
|
+
"internalType": "int24"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "hooks",
|
|
33
|
+
"type": "address",
|
|
34
|
+
"internalType": "contract IHooks"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "coin",
|
|
40
|
+
"type": "address",
|
|
41
|
+
"internalType": "address"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "sqrtPriceX96",
|
|
45
|
+
"type": "uint160",
|
|
46
|
+
"internalType": "uint160"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "migratedLiquidity",
|
|
50
|
+
"type": "tuple[]",
|
|
51
|
+
"internalType": "struct BurnedPosition[]",
|
|
52
|
+
"components": [
|
|
53
|
+
{
|
|
54
|
+
"name": "tickLower",
|
|
55
|
+
"type": "int24",
|
|
56
|
+
"internalType": "int24"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "tickUpper",
|
|
60
|
+
"type": "int24",
|
|
61
|
+
"internalType": "int24"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "amount0Received",
|
|
65
|
+
"type": "uint128",
|
|
66
|
+
"internalType": "uint128"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "amount1Received",
|
|
70
|
+
"type": "uint128",
|
|
71
|
+
"internalType": "uint128"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "additionalData",
|
|
77
|
+
"type": "bytes",
|
|
78
|
+
"internalType": "bytes"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"outputs": [
|
|
82
|
+
{
|
|
83
|
+
"name": "fee",
|
|
84
|
+
"type": "uint24",
|
|
85
|
+
"internalType": "uint24"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "tickSpacing",
|
|
89
|
+
"type": "int24",
|
|
90
|
+
"internalType": "int24"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"stateMutability": "nonpayable"
|
|
94
|
+
}
|
|
95
|
+
]
|