@gearbox-protocol/sdk 9.11.1 → 9.12.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/dist/cjs/plugins/adapters/AdaptersPlugin.js +127 -0
- package/dist/cjs/plugins/adapters/abi/actionAbi.js +95 -0
- package/dist/cjs/plugins/adapters/abi/conctructorAbi.js +154 -0
- package/dist/cjs/plugins/adapters/abi/conctructorAbiPatterns.js +99 -0
- package/dist/cjs/plugins/adapters/abi/index.js +26 -0
- package/dist/cjs/plugins/adapters/abi/utils.js +86 -0
- package/dist/cjs/plugins/adapters/contracts/AbstractAdapter.js +39 -0
- package/dist/cjs/plugins/adapters/contracts/BalancerV2VaultAdapterContract.js +51 -0
- package/dist/cjs/plugins/adapters/contracts/BalancerV3RouterAdapterContract.js +46 -0
- package/dist/cjs/plugins/adapters/contracts/CamelotV3AdapterContract.js +56 -0
- package/dist/cjs/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.js +60 -0
- package/dist/cjs/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.js +60 -0
- package/dist/cjs/plugins/adapters/contracts/Curve2AssetsAdapterContract.js +66 -0
- package/dist/cjs/plugins/adapters/contracts/Curve3AssetsAdapterContract.js +66 -0
- package/dist/cjs/plugins/adapters/contracts/Curve4AssetsAdapterContract.js +66 -0
- package/dist/cjs/plugins/adapters/contracts/CurveV1AdapterDeposit.js +69 -0
- package/dist/cjs/plugins/adapters/contracts/CurveV1AdapterStETHContract.js +61 -0
- package/dist/cjs/plugins/adapters/contracts/CurveV1StableNGAdapterContract.js +69 -0
- package/dist/cjs/plugins/adapters/contracts/DaiUsdsAdapterContract.js +49 -0
- package/dist/cjs/plugins/adapters/contracts/ERC4626AdapterContract.js +63 -0
- package/dist/cjs/plugins/adapters/contracts/ERC4626ReferralAdapterContract.js +49 -0
- package/dist/cjs/plugins/adapters/contracts/EqualizerRouterAdapterContract.js +58 -0
- package/dist/cjs/plugins/adapters/contracts/FluidDexAdapterContract.js +49 -0
- package/dist/cjs/plugins/adapters/contracts/InfraredVaultAdapterContract.js +49 -0
- package/dist/cjs/plugins/adapters/contracts/KodiakIslandGatewayAdapterContract.js +56 -0
- package/dist/cjs/plugins/adapters/contracts/LidoV1AdapterContract.js +52 -0
- package/dist/cjs/plugins/adapters/contracts/MellowClaimerAdapterContract.js +46 -0
- package/dist/cjs/plugins/adapters/contracts/MellowDVVAdapterContract.js +49 -0
- package/dist/cjs/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.js +78 -0
- package/dist/cjs/plugins/adapters/contracts/MellowVaultAdapterContract.js +46 -0
- package/dist/cjs/plugins/adapters/contracts/MellowWrapperAdapterContract.js +46 -0
- package/dist/cjs/plugins/adapters/contracts/PendleRouterAdapterContract.js +60 -0
- package/dist/cjs/plugins/adapters/contracts/StakingRewardsAdapterContract.js +73 -0
- package/dist/cjs/plugins/adapters/contracts/TraderJoeRouterAdapterContract.js +60 -0
- package/dist/cjs/plugins/adapters/contracts/UniswapV2AdapterContract.js +77 -0
- package/dist/cjs/plugins/adapters/contracts/UniswapV3AdapterContract.js +177 -0
- package/dist/cjs/plugins/adapters/contracts/UpshiftVaultAdapterContract.js +52 -0
- package/dist/cjs/plugins/adapters/contracts/VelodromeV2AdapterContract.js +60 -0
- package/dist/cjs/plugins/adapters/contracts/WstETHV1AdapterContract.js +46 -0
- package/dist/cjs/plugins/adapters/contracts/YearnV2AdapterContract.js +46 -0
- package/dist/cjs/plugins/adapters/contracts/index.js +90 -0
- package/dist/cjs/plugins/adapters/contracts/types.js +60 -0
- package/dist/cjs/plugins/adapters/index.js +28 -0
- package/dist/cjs/plugins/adapters/package.json +1 -0
- package/dist/cjs/plugins/adapters/types.js +63 -0
- package/dist/cjs/sdk/sdk-legacy/core/transactions.js +1 -1
- package/dist/esm/plugins/adapters/AdaptersPlugin.js +137 -0
- package/dist/esm/plugins/adapters/abi/actionAbi.js +69 -0
- package/dist/esm/plugins/adapters/abi/conctructorAbi.js +141 -0
- package/dist/esm/plugins/adapters/abi/conctructorAbiPatterns.js +66 -0
- package/dist/esm/plugins/adapters/abi/index.js +3 -0
- package/dist/esm/plugins/adapters/abi/utils.js +64 -0
- package/dist/esm/plugins/adapters/contracts/AbstractAdapter.js +15 -0
- package/dist/esm/plugins/adapters/contracts/BalancerV2VaultAdapterContract.js +27 -0
- package/dist/esm/plugins/adapters/contracts/BalancerV3RouterAdapterContract.js +22 -0
- package/dist/esm/plugins/adapters/contracts/CamelotV3AdapterContract.js +32 -0
- package/dist/esm/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.js +36 -0
- package/dist/esm/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.js +36 -0
- package/dist/esm/plugins/adapters/contracts/Curve2AssetsAdapterContract.js +42 -0
- package/dist/esm/plugins/adapters/contracts/Curve3AssetsAdapterContract.js +42 -0
- package/dist/esm/plugins/adapters/contracts/Curve4AssetsAdapterContract.js +42 -0
- package/dist/esm/plugins/adapters/contracts/CurveV1AdapterDeposit.js +45 -0
- package/dist/esm/plugins/adapters/contracts/CurveV1AdapterStETHContract.js +37 -0
- package/dist/esm/plugins/adapters/contracts/CurveV1StableNGAdapterContract.js +45 -0
- package/dist/esm/plugins/adapters/contracts/DaiUsdsAdapterContract.js +25 -0
- package/dist/esm/plugins/adapters/contracts/ERC4626AdapterContract.js +39 -0
- package/dist/esm/plugins/adapters/contracts/ERC4626ReferralAdapterContract.js +25 -0
- package/dist/esm/plugins/adapters/contracts/EqualizerRouterAdapterContract.js +34 -0
- package/dist/esm/plugins/adapters/contracts/FluidDexAdapterContract.js +25 -0
- package/dist/esm/plugins/adapters/contracts/InfraredVaultAdapterContract.js +25 -0
- package/dist/esm/plugins/adapters/contracts/KodiakIslandGatewayAdapterContract.js +32 -0
- package/dist/esm/plugins/adapters/contracts/LidoV1AdapterContract.js +28 -0
- package/dist/esm/plugins/adapters/contracts/MellowClaimerAdapterContract.js +22 -0
- package/dist/esm/plugins/adapters/contracts/MellowDVVAdapterContract.js +25 -0
- package/dist/esm/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.js +54 -0
- package/dist/esm/plugins/adapters/contracts/MellowVaultAdapterContract.js +22 -0
- package/dist/esm/plugins/adapters/contracts/MellowWrapperAdapterContract.js +22 -0
- package/dist/esm/plugins/adapters/contracts/PendleRouterAdapterContract.js +36 -0
- package/dist/esm/plugins/adapters/contracts/StakingRewardsAdapterContract.js +49 -0
- package/dist/esm/plugins/adapters/contracts/TraderJoeRouterAdapterContract.js +36 -0
- package/dist/esm/plugins/adapters/contracts/UniswapV2AdapterContract.js +55 -0
- package/dist/esm/plugins/adapters/contracts/UniswapV3AdapterContract.js +155 -0
- package/dist/esm/plugins/adapters/contracts/UpshiftVaultAdapterContract.js +28 -0
- package/dist/esm/plugins/adapters/contracts/VelodromeV2AdapterContract.js +36 -0
- package/dist/esm/plugins/adapters/contracts/WstETHV1AdapterContract.js +22 -0
- package/dist/esm/plugins/adapters/contracts/YearnV2AdapterContract.js +22 -0
- package/dist/esm/plugins/adapters/contracts/index.js +35 -0
- package/dist/esm/plugins/adapters/contracts/types.js +33 -0
- package/dist/esm/plugins/adapters/index.js +4 -0
- package/dist/esm/plugins/adapters/package.json +1 -0
- package/dist/esm/plugins/adapters/types.js +39 -0
- package/dist/esm/sdk/sdk-legacy/core/transactions.js +1 -1
- package/dist/types/plugins/adapters/AdaptersPlugin.d.ts +11 -0
- package/dist/types/plugins/adapters/abi/actionAbi.d.ts +21 -0
- package/dist/types/plugins/adapters/abi/conctructorAbi.d.ts +7 -0
- package/dist/types/plugins/adapters/abi/conctructorAbiPatterns.d.ts +112 -0
- package/dist/types/plugins/adapters/abi/index.d.ts +3 -0
- package/dist/types/plugins/adapters/abi/utils.d.ts +30 -0
- package/dist/types/plugins/adapters/contracts/AbstractAdapter.d.ts +13 -0
- package/dist/types/plugins/adapters/contracts/BalancerV2VaultAdapterContract.d.ts +482 -0
- package/dist/types/plugins/adapters/contracts/BalancerV3RouterAdapterContract.d.ts +198 -0
- package/dist/types/plugins/adapters/contracts/CamelotV3AdapterContract.d.ts +441 -0
- package/dist/types/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.d.ts +284 -0
- package/dist/types/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.d.ts +208 -0
- package/dist/types/plugins/adapters/contracts/Curve2AssetsAdapterContract.d.ts +534 -0
- package/dist/types/plugins/adapters/contracts/Curve3AssetsAdapterContract.d.ts +534 -0
- package/dist/types/plugins/adapters/contracts/Curve4AssetsAdapterContract.d.ts +534 -0
- package/dist/types/plugins/adapters/contracts/CurveV1AdapterDeposit.d.ts +481 -0
- package/dist/types/plugins/adapters/contracts/CurveV1AdapterStETHContract.d.ts +534 -0
- package/dist/types/plugins/adapters/contracts/CurveV1StableNGAdapterContract.d.ts +535 -0
- package/dist/types/plugins/adapters/contracts/DaiUsdsAdapterContract.d.ts +146 -0
- package/dist/types/plugins/adapters/contracts/ERC4626AdapterContract.d.ts +190 -0
- package/dist/types/plugins/adapters/contracts/ERC4626ReferralAdapterContract.d.ts +242 -0
- package/dist/types/plugins/adapters/contracts/EqualizerRouterAdapterContract.d.ts +225 -0
- package/dist/types/plugins/adapters/contracts/FluidDexAdapterContract.d.ts +130 -0
- package/dist/types/plugins/adapters/contracts/InfraredVaultAdapterContract.d.ts +198 -0
- package/dist/types/plugins/adapters/contracts/KodiakIslandGatewayAdapterContract.d.ts +396 -0
- package/dist/types/plugins/adapters/contracts/LidoV1AdapterContract.d.ts +121 -0
- package/dist/types/plugins/adapters/contracts/MellowClaimerAdapterContract.d.ts +257 -0
- package/dist/types/plugins/adapters/contracts/MellowDVVAdapterContract.d.ts +232 -0
- package/dist/types/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.d.ts +195 -0
- package/dist/types/plugins/adapters/contracts/MellowVaultAdapterContract.d.ts +203 -0
- package/dist/types/plugins/adapters/contracts/MellowWrapperAdapterContract.d.ts +161 -0
- package/dist/types/plugins/adapters/contracts/PendleRouterAdapterContract.d.ts +823 -0
- package/dist/types/plugins/adapters/contracts/StakingRewardsAdapterContract.d.ts +210 -0
- package/dist/types/plugins/adapters/contracts/TraderJoeRouterAdapterContract.d.ts +349 -0
- package/dist/types/plugins/adapters/contracts/UniswapV2AdapterContract.d.ts +216 -0
- package/dist/types/plugins/adapters/contracts/UniswapV3AdapterContract.d.ts +384 -0
- package/dist/types/plugins/adapters/contracts/UpshiftVaultAdapterContract.d.ts +269 -0
- package/dist/types/plugins/adapters/contracts/VelodromeV2AdapterContract.d.ts +247 -0
- package/dist/types/plugins/adapters/contracts/WstETHV1AdapterContract.d.ts +127 -0
- package/dist/types/plugins/adapters/contracts/YearnV2AdapterContract.d.ts +185 -0
- package/dist/types/plugins/adapters/contracts/index.d.ts +35 -0
- package/dist/types/plugins/adapters/contracts/types.d.ts +23 -0
- package/dist/types/plugins/adapters/index.d.ts +4 -0
- package/dist/types/plugins/adapters/types.d.ts +39 -0
- package/package.json +2 -1
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { type Address, type DecodeFunctionDataReturnType } from "viem";
|
|
2
|
+
import type { GearboxSDK } from "../../../sdk/index.js";
|
|
3
|
+
import type { AbstractAdapterContractOptions } from "./AbstractAdapter.js";
|
|
4
|
+
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
5
|
+
declare const abi: readonly [{
|
|
6
|
+
readonly type: "function";
|
|
7
|
+
readonly inputs: readonly [];
|
|
8
|
+
readonly name: "contractType";
|
|
9
|
+
readonly outputs: readonly [{
|
|
10
|
+
readonly name: "";
|
|
11
|
+
readonly internalType: "bytes32";
|
|
12
|
+
readonly type: "bytes32";
|
|
13
|
+
}];
|
|
14
|
+
readonly stateMutability: "view";
|
|
15
|
+
}, {
|
|
16
|
+
readonly type: "function";
|
|
17
|
+
readonly inputs: readonly [];
|
|
18
|
+
readonly name: "creditManager";
|
|
19
|
+
readonly outputs: readonly [{
|
|
20
|
+
readonly name: "";
|
|
21
|
+
readonly internalType: "address";
|
|
22
|
+
readonly type: "address";
|
|
23
|
+
}];
|
|
24
|
+
readonly stateMutability: "view";
|
|
25
|
+
}, {
|
|
26
|
+
readonly type: "function";
|
|
27
|
+
readonly inputs: readonly [{
|
|
28
|
+
readonly name: "token0";
|
|
29
|
+
readonly internalType: "address";
|
|
30
|
+
readonly type: "address";
|
|
31
|
+
}, {
|
|
32
|
+
readonly name: "token1";
|
|
33
|
+
readonly internalType: "address";
|
|
34
|
+
readonly type: "address";
|
|
35
|
+
}];
|
|
36
|
+
readonly name: "isPairAllowed";
|
|
37
|
+
readonly outputs: readonly [{
|
|
38
|
+
readonly name: "";
|
|
39
|
+
readonly internalType: "bool";
|
|
40
|
+
readonly type: "bool";
|
|
41
|
+
}];
|
|
42
|
+
readonly stateMutability: "view";
|
|
43
|
+
}, {
|
|
44
|
+
readonly type: "function";
|
|
45
|
+
readonly inputs: readonly [];
|
|
46
|
+
readonly name: "serialize";
|
|
47
|
+
readonly outputs: readonly [{
|
|
48
|
+
readonly name: "serializedData";
|
|
49
|
+
readonly internalType: "bytes";
|
|
50
|
+
readonly type: "bytes";
|
|
51
|
+
}];
|
|
52
|
+
readonly stateMutability: "view";
|
|
53
|
+
}, {
|
|
54
|
+
readonly type: "function";
|
|
55
|
+
readonly inputs: readonly [{
|
|
56
|
+
readonly name: "pairs";
|
|
57
|
+
readonly internalType: "struct UniswapV2PairStatus[]";
|
|
58
|
+
readonly type: "tuple[]";
|
|
59
|
+
readonly components: readonly [{
|
|
60
|
+
readonly name: "token0";
|
|
61
|
+
readonly internalType: "address";
|
|
62
|
+
readonly type: "address";
|
|
63
|
+
}, {
|
|
64
|
+
readonly name: "token1";
|
|
65
|
+
readonly internalType: "address";
|
|
66
|
+
readonly type: "address";
|
|
67
|
+
}, {
|
|
68
|
+
readonly name: "allowed";
|
|
69
|
+
readonly internalType: "bool";
|
|
70
|
+
readonly type: "bool";
|
|
71
|
+
}];
|
|
72
|
+
}];
|
|
73
|
+
readonly name: "setPairStatusBatch";
|
|
74
|
+
readonly outputs: readonly [];
|
|
75
|
+
readonly stateMutability: "nonpayable";
|
|
76
|
+
}, {
|
|
77
|
+
readonly type: "function";
|
|
78
|
+
readonly inputs: readonly [{
|
|
79
|
+
readonly name: "leftoverAmount";
|
|
80
|
+
readonly internalType: "uint256";
|
|
81
|
+
readonly type: "uint256";
|
|
82
|
+
}, {
|
|
83
|
+
readonly name: "rateMinRAY";
|
|
84
|
+
readonly internalType: "uint256";
|
|
85
|
+
readonly type: "uint256";
|
|
86
|
+
}, {
|
|
87
|
+
readonly name: "path";
|
|
88
|
+
readonly internalType: "address[]";
|
|
89
|
+
readonly type: "address[]";
|
|
90
|
+
}, {
|
|
91
|
+
readonly name: "deadline";
|
|
92
|
+
readonly internalType: "uint256";
|
|
93
|
+
readonly type: "uint256";
|
|
94
|
+
}];
|
|
95
|
+
readonly name: "swapDiffTokensForTokens";
|
|
96
|
+
readonly outputs: readonly [{
|
|
97
|
+
readonly name: "useSafePrices";
|
|
98
|
+
readonly internalType: "bool";
|
|
99
|
+
readonly type: "bool";
|
|
100
|
+
}];
|
|
101
|
+
readonly stateMutability: "nonpayable";
|
|
102
|
+
}, {
|
|
103
|
+
readonly type: "function";
|
|
104
|
+
readonly inputs: readonly [{
|
|
105
|
+
readonly name: "amountIn";
|
|
106
|
+
readonly internalType: "uint256";
|
|
107
|
+
readonly type: "uint256";
|
|
108
|
+
}, {
|
|
109
|
+
readonly name: "amountOutMin";
|
|
110
|
+
readonly internalType: "uint256";
|
|
111
|
+
readonly type: "uint256";
|
|
112
|
+
}, {
|
|
113
|
+
readonly name: "path";
|
|
114
|
+
readonly internalType: "address[]";
|
|
115
|
+
readonly type: "address[]";
|
|
116
|
+
}, {
|
|
117
|
+
readonly name: "";
|
|
118
|
+
readonly internalType: "address";
|
|
119
|
+
readonly type: "address";
|
|
120
|
+
}, {
|
|
121
|
+
readonly name: "deadline";
|
|
122
|
+
readonly internalType: "uint256";
|
|
123
|
+
readonly type: "uint256";
|
|
124
|
+
}];
|
|
125
|
+
readonly name: "swapExactTokensForTokens";
|
|
126
|
+
readonly outputs: readonly [{
|
|
127
|
+
readonly name: "useSafePrices";
|
|
128
|
+
readonly internalType: "bool";
|
|
129
|
+
readonly type: "bool";
|
|
130
|
+
}];
|
|
131
|
+
readonly stateMutability: "nonpayable";
|
|
132
|
+
}, {
|
|
133
|
+
readonly type: "function";
|
|
134
|
+
readonly inputs: readonly [{
|
|
135
|
+
readonly name: "amountOut";
|
|
136
|
+
readonly internalType: "uint256";
|
|
137
|
+
readonly type: "uint256";
|
|
138
|
+
}, {
|
|
139
|
+
readonly name: "amountInMax";
|
|
140
|
+
readonly internalType: "uint256";
|
|
141
|
+
readonly type: "uint256";
|
|
142
|
+
}, {
|
|
143
|
+
readonly name: "path";
|
|
144
|
+
readonly internalType: "address[]";
|
|
145
|
+
readonly type: "address[]";
|
|
146
|
+
}, {
|
|
147
|
+
readonly name: "";
|
|
148
|
+
readonly internalType: "address";
|
|
149
|
+
readonly type: "address";
|
|
150
|
+
}, {
|
|
151
|
+
readonly name: "deadline";
|
|
152
|
+
readonly internalType: "uint256";
|
|
153
|
+
readonly type: "uint256";
|
|
154
|
+
}];
|
|
155
|
+
readonly name: "swapTokensForExactTokens";
|
|
156
|
+
readonly outputs: readonly [{
|
|
157
|
+
readonly name: "useSafePrices";
|
|
158
|
+
readonly internalType: "bool";
|
|
159
|
+
readonly type: "bool";
|
|
160
|
+
}];
|
|
161
|
+
readonly stateMutability: "nonpayable";
|
|
162
|
+
}, {
|
|
163
|
+
readonly type: "function";
|
|
164
|
+
readonly inputs: readonly [];
|
|
165
|
+
readonly name: "targetContract";
|
|
166
|
+
readonly outputs: readonly [{
|
|
167
|
+
readonly name: "";
|
|
168
|
+
readonly internalType: "address";
|
|
169
|
+
readonly type: "address";
|
|
170
|
+
}];
|
|
171
|
+
readonly stateMutability: "view";
|
|
172
|
+
}, {
|
|
173
|
+
readonly type: "function";
|
|
174
|
+
readonly inputs: readonly [];
|
|
175
|
+
readonly name: "version";
|
|
176
|
+
readonly outputs: readonly [{
|
|
177
|
+
readonly name: "";
|
|
178
|
+
readonly internalType: "uint256";
|
|
179
|
+
readonly type: "uint256";
|
|
180
|
+
}];
|
|
181
|
+
readonly stateMutability: "view";
|
|
182
|
+
}, {
|
|
183
|
+
readonly type: "event";
|
|
184
|
+
readonly anonymous: false;
|
|
185
|
+
readonly inputs: readonly [{
|
|
186
|
+
readonly name: "token0";
|
|
187
|
+
readonly internalType: "address";
|
|
188
|
+
readonly type: "address";
|
|
189
|
+
readonly indexed: true;
|
|
190
|
+
}, {
|
|
191
|
+
readonly name: "token1";
|
|
192
|
+
readonly internalType: "address";
|
|
193
|
+
readonly type: "address";
|
|
194
|
+
readonly indexed: true;
|
|
195
|
+
}, {
|
|
196
|
+
readonly name: "allowed";
|
|
197
|
+
readonly internalType: "bool";
|
|
198
|
+
readonly type: "bool";
|
|
199
|
+
readonly indexed: false;
|
|
200
|
+
}];
|
|
201
|
+
readonly name: "SetPairStatus";
|
|
202
|
+
}, {
|
|
203
|
+
readonly type: "error";
|
|
204
|
+
readonly inputs: readonly [];
|
|
205
|
+
readonly name: "InvalidPathException";
|
|
206
|
+
}];
|
|
207
|
+
type abi = typeof abi;
|
|
208
|
+
export declare class UniswapV2AdapterContract extends AbstractAdapterContract<abi> {
|
|
209
|
+
readonly supportedPairs: {
|
|
210
|
+
token0: Address;
|
|
211
|
+
token1: Address;
|
|
212
|
+
}[];
|
|
213
|
+
constructor(sdk: GearboxSDK, args: Omit<AbstractAdapterContractOptions<abi>, "abi">);
|
|
214
|
+
protected parseFunctionParams(params: DecodeFunctionDataReturnType<abi>): string[] | undefined;
|
|
215
|
+
}
|
|
216
|
+
export {};
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import { type Address, type DecodeFunctionDataReturnType } from "viem";
|
|
2
|
+
import type { GearboxSDK } from "../../../sdk/index.js";
|
|
3
|
+
import type { AbstractAdapterContractOptions } from "./AbstractAdapter.js";
|
|
4
|
+
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
5
|
+
declare const abi: readonly [{
|
|
6
|
+
readonly type: "function";
|
|
7
|
+
readonly inputs: readonly [];
|
|
8
|
+
readonly name: "contractType";
|
|
9
|
+
readonly outputs: readonly [{
|
|
10
|
+
readonly name: "";
|
|
11
|
+
readonly internalType: "bytes32";
|
|
12
|
+
readonly type: "bytes32";
|
|
13
|
+
}];
|
|
14
|
+
readonly stateMutability: "view";
|
|
15
|
+
}, {
|
|
16
|
+
readonly type: "function";
|
|
17
|
+
readonly inputs: readonly [];
|
|
18
|
+
readonly name: "creditManager";
|
|
19
|
+
readonly outputs: readonly [{
|
|
20
|
+
readonly name: "";
|
|
21
|
+
readonly internalType: "address";
|
|
22
|
+
readonly type: "address";
|
|
23
|
+
}];
|
|
24
|
+
readonly stateMutability: "view";
|
|
25
|
+
}, {
|
|
26
|
+
readonly type: "function";
|
|
27
|
+
readonly inputs: readonly [{
|
|
28
|
+
readonly name: "params";
|
|
29
|
+
readonly internalType: "struct IUniswapV3AdapterTypes.ExactDiffInputParams";
|
|
30
|
+
readonly type: "tuple";
|
|
31
|
+
readonly components: readonly [{
|
|
32
|
+
readonly name: "path";
|
|
33
|
+
readonly internalType: "bytes";
|
|
34
|
+
readonly type: "bytes";
|
|
35
|
+
}, {
|
|
36
|
+
readonly name: "deadline";
|
|
37
|
+
readonly internalType: "uint256";
|
|
38
|
+
readonly type: "uint256";
|
|
39
|
+
}, {
|
|
40
|
+
readonly name: "leftoverAmount";
|
|
41
|
+
readonly internalType: "uint256";
|
|
42
|
+
readonly type: "uint256";
|
|
43
|
+
}, {
|
|
44
|
+
readonly name: "rateMinRAY";
|
|
45
|
+
readonly internalType: "uint256";
|
|
46
|
+
readonly type: "uint256";
|
|
47
|
+
}];
|
|
48
|
+
}];
|
|
49
|
+
readonly name: "exactDiffInput";
|
|
50
|
+
readonly outputs: readonly [{
|
|
51
|
+
readonly name: "useSafePrices";
|
|
52
|
+
readonly internalType: "bool";
|
|
53
|
+
readonly type: "bool";
|
|
54
|
+
}];
|
|
55
|
+
readonly stateMutability: "nonpayable";
|
|
56
|
+
}, {
|
|
57
|
+
readonly type: "function";
|
|
58
|
+
readonly inputs: readonly [{
|
|
59
|
+
readonly name: "params";
|
|
60
|
+
readonly internalType: "struct IUniswapV3AdapterTypes.ExactDiffInputSingleParams";
|
|
61
|
+
readonly type: "tuple";
|
|
62
|
+
readonly components: readonly [{
|
|
63
|
+
readonly name: "tokenIn";
|
|
64
|
+
readonly internalType: "address";
|
|
65
|
+
readonly type: "address";
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "tokenOut";
|
|
68
|
+
readonly internalType: "address";
|
|
69
|
+
readonly type: "address";
|
|
70
|
+
}, {
|
|
71
|
+
readonly name: "fee";
|
|
72
|
+
readonly internalType: "uint24";
|
|
73
|
+
readonly type: "uint24";
|
|
74
|
+
}, {
|
|
75
|
+
readonly name: "deadline";
|
|
76
|
+
readonly internalType: "uint256";
|
|
77
|
+
readonly type: "uint256";
|
|
78
|
+
}, {
|
|
79
|
+
readonly name: "leftoverAmount";
|
|
80
|
+
readonly internalType: "uint256";
|
|
81
|
+
readonly type: "uint256";
|
|
82
|
+
}, {
|
|
83
|
+
readonly name: "rateMinRAY";
|
|
84
|
+
readonly internalType: "uint256";
|
|
85
|
+
readonly type: "uint256";
|
|
86
|
+
}, {
|
|
87
|
+
readonly name: "sqrtPriceLimitX96";
|
|
88
|
+
readonly internalType: "uint160";
|
|
89
|
+
readonly type: "uint160";
|
|
90
|
+
}];
|
|
91
|
+
}];
|
|
92
|
+
readonly name: "exactDiffInputSingle";
|
|
93
|
+
readonly outputs: readonly [{
|
|
94
|
+
readonly name: "useSafePrices";
|
|
95
|
+
readonly internalType: "bool";
|
|
96
|
+
readonly type: "bool";
|
|
97
|
+
}];
|
|
98
|
+
readonly stateMutability: "nonpayable";
|
|
99
|
+
}, {
|
|
100
|
+
readonly type: "function";
|
|
101
|
+
readonly inputs: readonly [{
|
|
102
|
+
readonly name: "params";
|
|
103
|
+
readonly internalType: "struct ISwapRouter.ExactInputParams";
|
|
104
|
+
readonly type: "tuple";
|
|
105
|
+
readonly components: readonly [{
|
|
106
|
+
readonly name: "path";
|
|
107
|
+
readonly internalType: "bytes";
|
|
108
|
+
readonly type: "bytes";
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: "recipient";
|
|
111
|
+
readonly internalType: "address";
|
|
112
|
+
readonly type: "address";
|
|
113
|
+
}, {
|
|
114
|
+
readonly name: "deadline";
|
|
115
|
+
readonly internalType: "uint256";
|
|
116
|
+
readonly type: "uint256";
|
|
117
|
+
}, {
|
|
118
|
+
readonly name: "amountIn";
|
|
119
|
+
readonly internalType: "uint256";
|
|
120
|
+
readonly type: "uint256";
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "amountOutMinimum";
|
|
123
|
+
readonly internalType: "uint256";
|
|
124
|
+
readonly type: "uint256";
|
|
125
|
+
}];
|
|
126
|
+
}];
|
|
127
|
+
readonly name: "exactInput";
|
|
128
|
+
readonly outputs: readonly [{
|
|
129
|
+
readonly name: "useSafePrices";
|
|
130
|
+
readonly internalType: "bool";
|
|
131
|
+
readonly type: "bool";
|
|
132
|
+
}];
|
|
133
|
+
readonly stateMutability: "nonpayable";
|
|
134
|
+
}, {
|
|
135
|
+
readonly type: "function";
|
|
136
|
+
readonly inputs: readonly [{
|
|
137
|
+
readonly name: "params";
|
|
138
|
+
readonly internalType: "struct ISwapRouter.ExactInputSingleParams";
|
|
139
|
+
readonly type: "tuple";
|
|
140
|
+
readonly components: readonly [{
|
|
141
|
+
readonly name: "tokenIn";
|
|
142
|
+
readonly internalType: "address";
|
|
143
|
+
readonly type: "address";
|
|
144
|
+
}, {
|
|
145
|
+
readonly name: "tokenOut";
|
|
146
|
+
readonly internalType: "address";
|
|
147
|
+
readonly type: "address";
|
|
148
|
+
}, {
|
|
149
|
+
readonly name: "fee";
|
|
150
|
+
readonly internalType: "uint24";
|
|
151
|
+
readonly type: "uint24";
|
|
152
|
+
}, {
|
|
153
|
+
readonly name: "recipient";
|
|
154
|
+
readonly internalType: "address";
|
|
155
|
+
readonly type: "address";
|
|
156
|
+
}, {
|
|
157
|
+
readonly name: "deadline";
|
|
158
|
+
readonly internalType: "uint256";
|
|
159
|
+
readonly type: "uint256";
|
|
160
|
+
}, {
|
|
161
|
+
readonly name: "amountIn";
|
|
162
|
+
readonly internalType: "uint256";
|
|
163
|
+
readonly type: "uint256";
|
|
164
|
+
}, {
|
|
165
|
+
readonly name: "amountOutMinimum";
|
|
166
|
+
readonly internalType: "uint256";
|
|
167
|
+
readonly type: "uint256";
|
|
168
|
+
}, {
|
|
169
|
+
readonly name: "sqrtPriceLimitX96";
|
|
170
|
+
readonly internalType: "uint160";
|
|
171
|
+
readonly type: "uint160";
|
|
172
|
+
}];
|
|
173
|
+
}];
|
|
174
|
+
readonly name: "exactInputSingle";
|
|
175
|
+
readonly outputs: readonly [{
|
|
176
|
+
readonly name: "useSafePrices";
|
|
177
|
+
readonly internalType: "bool";
|
|
178
|
+
readonly type: "bool";
|
|
179
|
+
}];
|
|
180
|
+
readonly stateMutability: "nonpayable";
|
|
181
|
+
}, {
|
|
182
|
+
readonly type: "function";
|
|
183
|
+
readonly inputs: readonly [{
|
|
184
|
+
readonly name: "params";
|
|
185
|
+
readonly internalType: "struct ISwapRouter.ExactOutputParams";
|
|
186
|
+
readonly type: "tuple";
|
|
187
|
+
readonly components: readonly [{
|
|
188
|
+
readonly name: "path";
|
|
189
|
+
readonly internalType: "bytes";
|
|
190
|
+
readonly type: "bytes";
|
|
191
|
+
}, {
|
|
192
|
+
readonly name: "recipient";
|
|
193
|
+
readonly internalType: "address";
|
|
194
|
+
readonly type: "address";
|
|
195
|
+
}, {
|
|
196
|
+
readonly name: "deadline";
|
|
197
|
+
readonly internalType: "uint256";
|
|
198
|
+
readonly type: "uint256";
|
|
199
|
+
}, {
|
|
200
|
+
readonly name: "amountOut";
|
|
201
|
+
readonly internalType: "uint256";
|
|
202
|
+
readonly type: "uint256";
|
|
203
|
+
}, {
|
|
204
|
+
readonly name: "amountInMaximum";
|
|
205
|
+
readonly internalType: "uint256";
|
|
206
|
+
readonly type: "uint256";
|
|
207
|
+
}];
|
|
208
|
+
}];
|
|
209
|
+
readonly name: "exactOutput";
|
|
210
|
+
readonly outputs: readonly [{
|
|
211
|
+
readonly name: "useSafePrices";
|
|
212
|
+
readonly internalType: "bool";
|
|
213
|
+
readonly type: "bool";
|
|
214
|
+
}];
|
|
215
|
+
readonly stateMutability: "nonpayable";
|
|
216
|
+
}, {
|
|
217
|
+
readonly type: "function";
|
|
218
|
+
readonly inputs: readonly [{
|
|
219
|
+
readonly name: "params";
|
|
220
|
+
readonly internalType: "struct ISwapRouter.ExactOutputSingleParams";
|
|
221
|
+
readonly type: "tuple";
|
|
222
|
+
readonly components: readonly [{
|
|
223
|
+
readonly name: "tokenIn";
|
|
224
|
+
readonly internalType: "address";
|
|
225
|
+
readonly type: "address";
|
|
226
|
+
}, {
|
|
227
|
+
readonly name: "tokenOut";
|
|
228
|
+
readonly internalType: "address";
|
|
229
|
+
readonly type: "address";
|
|
230
|
+
}, {
|
|
231
|
+
readonly name: "fee";
|
|
232
|
+
readonly internalType: "uint24";
|
|
233
|
+
readonly type: "uint24";
|
|
234
|
+
}, {
|
|
235
|
+
readonly name: "recipient";
|
|
236
|
+
readonly internalType: "address";
|
|
237
|
+
readonly type: "address";
|
|
238
|
+
}, {
|
|
239
|
+
readonly name: "deadline";
|
|
240
|
+
readonly internalType: "uint256";
|
|
241
|
+
readonly type: "uint256";
|
|
242
|
+
}, {
|
|
243
|
+
readonly name: "amountOut";
|
|
244
|
+
readonly internalType: "uint256";
|
|
245
|
+
readonly type: "uint256";
|
|
246
|
+
}, {
|
|
247
|
+
readonly name: "amountInMaximum";
|
|
248
|
+
readonly internalType: "uint256";
|
|
249
|
+
readonly type: "uint256";
|
|
250
|
+
}, {
|
|
251
|
+
readonly name: "sqrtPriceLimitX96";
|
|
252
|
+
readonly internalType: "uint160";
|
|
253
|
+
readonly type: "uint160";
|
|
254
|
+
}];
|
|
255
|
+
}];
|
|
256
|
+
readonly name: "exactOutputSingle";
|
|
257
|
+
readonly outputs: readonly [{
|
|
258
|
+
readonly name: "useSafePrices";
|
|
259
|
+
readonly internalType: "bool";
|
|
260
|
+
readonly type: "bool";
|
|
261
|
+
}];
|
|
262
|
+
readonly stateMutability: "nonpayable";
|
|
263
|
+
}, {
|
|
264
|
+
readonly type: "function";
|
|
265
|
+
readonly inputs: readonly [{
|
|
266
|
+
readonly name: "token0";
|
|
267
|
+
readonly internalType: "address";
|
|
268
|
+
readonly type: "address";
|
|
269
|
+
}, {
|
|
270
|
+
readonly name: "token1";
|
|
271
|
+
readonly internalType: "address";
|
|
272
|
+
readonly type: "address";
|
|
273
|
+
}, {
|
|
274
|
+
readonly name: "fee";
|
|
275
|
+
readonly internalType: "uint24";
|
|
276
|
+
readonly type: "uint24";
|
|
277
|
+
}];
|
|
278
|
+
readonly name: "isPoolAllowed";
|
|
279
|
+
readonly outputs: readonly [{
|
|
280
|
+
readonly name: "";
|
|
281
|
+
readonly internalType: "bool";
|
|
282
|
+
readonly type: "bool";
|
|
283
|
+
}];
|
|
284
|
+
readonly stateMutability: "view";
|
|
285
|
+
}, {
|
|
286
|
+
readonly type: "function";
|
|
287
|
+
readonly inputs: readonly [];
|
|
288
|
+
readonly name: "serialize";
|
|
289
|
+
readonly outputs: readonly [{
|
|
290
|
+
readonly name: "serializedData";
|
|
291
|
+
readonly internalType: "bytes";
|
|
292
|
+
readonly type: "bytes";
|
|
293
|
+
}];
|
|
294
|
+
readonly stateMutability: "view";
|
|
295
|
+
}, {
|
|
296
|
+
readonly type: "function";
|
|
297
|
+
readonly inputs: readonly [{
|
|
298
|
+
readonly name: "pools";
|
|
299
|
+
readonly internalType: "struct UniswapV3PoolStatus[]";
|
|
300
|
+
readonly type: "tuple[]";
|
|
301
|
+
readonly components: readonly [{
|
|
302
|
+
readonly name: "token0";
|
|
303
|
+
readonly internalType: "address";
|
|
304
|
+
readonly type: "address";
|
|
305
|
+
}, {
|
|
306
|
+
readonly name: "token1";
|
|
307
|
+
readonly internalType: "address";
|
|
308
|
+
readonly type: "address";
|
|
309
|
+
}, {
|
|
310
|
+
readonly name: "fee";
|
|
311
|
+
readonly internalType: "uint24";
|
|
312
|
+
readonly type: "uint24";
|
|
313
|
+
}, {
|
|
314
|
+
readonly name: "allowed";
|
|
315
|
+
readonly internalType: "bool";
|
|
316
|
+
readonly type: "bool";
|
|
317
|
+
}];
|
|
318
|
+
}];
|
|
319
|
+
readonly name: "setPoolStatusBatch";
|
|
320
|
+
readonly outputs: readonly [];
|
|
321
|
+
readonly stateMutability: "nonpayable";
|
|
322
|
+
}, {
|
|
323
|
+
readonly type: "function";
|
|
324
|
+
readonly inputs: readonly [];
|
|
325
|
+
readonly name: "targetContract";
|
|
326
|
+
readonly outputs: readonly [{
|
|
327
|
+
readonly name: "";
|
|
328
|
+
readonly internalType: "address";
|
|
329
|
+
readonly type: "address";
|
|
330
|
+
}];
|
|
331
|
+
readonly stateMutability: "view";
|
|
332
|
+
}, {
|
|
333
|
+
readonly type: "function";
|
|
334
|
+
readonly inputs: readonly [];
|
|
335
|
+
readonly name: "version";
|
|
336
|
+
readonly outputs: readonly [{
|
|
337
|
+
readonly name: "";
|
|
338
|
+
readonly internalType: "uint256";
|
|
339
|
+
readonly type: "uint256";
|
|
340
|
+
}];
|
|
341
|
+
readonly stateMutability: "view";
|
|
342
|
+
}, {
|
|
343
|
+
readonly type: "event";
|
|
344
|
+
readonly anonymous: false;
|
|
345
|
+
readonly inputs: readonly [{
|
|
346
|
+
readonly name: "token0";
|
|
347
|
+
readonly internalType: "address";
|
|
348
|
+
readonly type: "address";
|
|
349
|
+
readonly indexed: true;
|
|
350
|
+
}, {
|
|
351
|
+
readonly name: "token1";
|
|
352
|
+
readonly internalType: "address";
|
|
353
|
+
readonly type: "address";
|
|
354
|
+
readonly indexed: true;
|
|
355
|
+
}, {
|
|
356
|
+
readonly name: "fee";
|
|
357
|
+
readonly internalType: "uint24";
|
|
358
|
+
readonly type: "uint24";
|
|
359
|
+
readonly indexed: true;
|
|
360
|
+
}, {
|
|
361
|
+
readonly name: "allowed";
|
|
362
|
+
readonly internalType: "bool";
|
|
363
|
+
readonly type: "bool";
|
|
364
|
+
readonly indexed: false;
|
|
365
|
+
}];
|
|
366
|
+
readonly name: "SetPoolStatus";
|
|
367
|
+
}, {
|
|
368
|
+
readonly type: "error";
|
|
369
|
+
readonly inputs: readonly [];
|
|
370
|
+
readonly name: "InvalidPathException";
|
|
371
|
+
}];
|
|
372
|
+
type abi = typeof abi;
|
|
373
|
+
export declare class UniswapV3AdapterContract extends AbstractAdapterContract<abi> {
|
|
374
|
+
readonly supportedPools: {
|
|
375
|
+
token0: Address;
|
|
376
|
+
token1: Address;
|
|
377
|
+
fee: number;
|
|
378
|
+
}[];
|
|
379
|
+
constructor(sdk: GearboxSDK, args: Omit<AbstractAdapterContractOptions<abi>, "abi">);
|
|
380
|
+
protected parseFunctionParams(params: DecodeFunctionDataReturnType<abi>): string[] | undefined;
|
|
381
|
+
private trackInputPath;
|
|
382
|
+
private trackOutputPath;
|
|
383
|
+
}
|
|
384
|
+
export {};
|