@gearbox-protocol/sdk 1.5.6 → 1.5.9
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/lib/contracts/contracts.d.ts +1 -0
- package/lib/contracts/contracts.js +5 -1
- package/lib/core/adapter.d.ts +4 -9
- package/lib/core/adapter.js +2 -19
- package/lib/core/creditManager.d.ts +1 -1
- package/lib/core/creditManager.js +1 -1
- package/lib/core/trade.d.ts +20 -22
- package/lib/core/trade.js +108 -36
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/lib/parsers/curveAdapterParser.js +7 -1
- package/lib/parsers/txParser.d.ts +9 -1
- package/lib/parsers/txParser.js +11 -3
- package/lib/pathfinder/core.d.ts +22 -0
- package/lib/pathfinder/core.js +9 -0
- package/lib/pathfinder/pathOptions.d.ts +11 -0
- package/lib/pathfinder/pathOptions.js +74 -0
- package/lib/pathfinder/pathOptions.spec.d.ts +1 -0
- package/lib/pathfinder/pathOptions.spec.js +90 -0
- package/lib/pathfinder/pathfinder.d.ts +24 -0
- package/lib/pathfinder/pathfinder.js +177 -0
- package/lib/pathfinder/pathfinder.spec.d.ts +1 -0
- package/lib/pathfinder/pathfinder.spec.js +21 -0
- package/lib/types/contracts/interfaces/IAddressProvider.sol/IAddressProvider.d.ts +9 -1
- package/lib/types/contracts/interfaces/adapters/lido/ILidoV1Adapter.sol/ILidoV1Adapter.d.ts +17 -1
- package/lib/types/contracts/pathfinder/interfaces/IClosePathResolver.d.ts +4 -1
- package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/IDepositor.d.ts +6 -3
- package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/IDepositorOptions.d.ts +7 -4
- package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorker.d.ts +4 -1
- package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorkerOptions.d.ts +4 -1
- package/lib/types/contracts/pathfinder/interfaces/IPathFinder.d.ts +20 -7
- package/lib/types/contracts/pathfinder/interfaces/IPathResolver.d.ts +5 -2
- package/lib/types/contracts/pathfinder/interfaces/ISwapAggregator.d.ts +8 -5
- package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawer.d.ts +7 -4
- package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawerOptions.d.ts +7 -4
- package/lib/types/factories/contracts/interfaces/IAddressProvider.sol/IAddressProvider__factory.js +13 -0
- package/lib/types/factories/contracts/interfaces/adapters/lido/ILidoV1Adapter.sol/ILidoV1Adapter__factory.js +26 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/IClosePathResolver__factory.js +10 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/IDepositorOptions__factory.js +40 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/IDepositor__factory.js +30 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorkerOptions__factory.js +10 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorker__factory.js +10 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/IPathFinder__factory.d.ts +7 -17
- package/lib/types/factories/contracts/pathfinder/interfaces/IPathFinder__factory.js +10 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/IPathResolver__factory.js +20 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/ISwapAggregator__factory.js +50 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawerOptions__factory.js +40 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawer__factory.js +40 -0
- package/lib/types/factories/contracts/support/MultiCall.sol/Multicall2__factory.d.ts +1 -1
- package/lib/types/factories/contracts/support/MultiCall.sol/Multicall2__factory.js +1 -1
- package/package.json +3 -1
- package/lib/tokens/connectors.d.ts +0 -2
- package/lib/tokens/connectors.js +0 -9
|
@@ -35,6 +35,7 @@ export declare type StrategyPathTaskStruct = {
|
|
|
35
35
|
connectors: string[];
|
|
36
36
|
adapters: string[];
|
|
37
37
|
slippagePerStep: BigNumberish;
|
|
38
|
+
force: boolean;
|
|
38
39
|
targetType: BigNumberish;
|
|
39
40
|
foundAdapters: TokenAdaptersStruct[];
|
|
40
41
|
gasPriceTargetRAY: BigNumberish;
|
|
@@ -50,6 +51,7 @@ export declare type StrategyPathTaskStructOutput = [
|
|
|
50
51
|
string[],
|
|
51
52
|
string[],
|
|
52
53
|
BigNumber,
|
|
54
|
+
boolean,
|
|
53
55
|
number,
|
|
54
56
|
TokenAdaptersStructOutput[],
|
|
55
57
|
BigNumber,
|
|
@@ -64,6 +66,7 @@ export declare type StrategyPathTaskStructOutput = [
|
|
|
64
66
|
connectors: string[];
|
|
65
67
|
adapters: string[];
|
|
66
68
|
slippagePerStep: BigNumber;
|
|
69
|
+
force: boolean;
|
|
67
70
|
targetType: number;
|
|
68
71
|
foundAdapters: TokenAdaptersStructOutput[];
|
|
69
72
|
gasPriceTargetRAY: BigNumber;
|
|
@@ -75,7 +78,7 @@ export declare type StrategyPathTaskStructOutput = [
|
|
|
75
78
|
export interface ILPWorkerOptionsInterface extends utils.Interface {
|
|
76
79
|
functions: {
|
|
77
80
|
"getComponentId()": FunctionFragment;
|
|
78
|
-
"getUnderlyings(uint8,address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
81
|
+
"getUnderlyings(uint8,address,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
79
82
|
"version()": FunctionFragment;
|
|
80
83
|
};
|
|
81
84
|
getFunction(nameOrSignatureOrTopic: "getComponentId" | "getUnderlyings" | "version"): FunctionFragment;
|
|
@@ -75,7 +75,7 @@ export interface IPathFinderInterface extends utils.Interface {
|
|
|
75
75
|
functions: {
|
|
76
76
|
"componentAddressById(uint8)": FunctionFragment;
|
|
77
77
|
"findAllSwaps((uint8,address,address,address,address[],uint256,uint256,bool))": FunctionFragment;
|
|
78
|
-
"findBestClosePath(address,address[],uint256,(address,uint8,uint8)[],uint256)": FunctionFragment;
|
|
78
|
+
"findBestClosePath(address,address[],uint256,(address,uint8,uint8)[],uint256,bool)": FunctionFragment;
|
|
79
79
|
"findOneTokenPath(address,uint256,address,address,address[],uint256)": FunctionFragment;
|
|
80
80
|
"findOpenStrategyPath(address,(address,uint256)[],address,address[],uint256)": FunctionFragment;
|
|
81
81
|
"getGasPriceTokenOutRAY(address)": FunctionFragment;
|
|
@@ -86,7 +86,14 @@ export interface IPathFinderInterface extends utils.Interface {
|
|
|
86
86
|
getFunction(nameOrSignatureOrTopic: "componentAddressById" | "findAllSwaps" | "findBestClosePath" | "findOneTokenPath" | "findOpenStrategyPath" | "getGasPriceTokenOutRAY" | "isPathFinderConfigurator" | "tokenTypes" | "version"): FunctionFragment;
|
|
87
87
|
encodeFunctionData(functionFragment: "componentAddressById", values: [BigNumberish]): string;
|
|
88
88
|
encodeFunctionData(functionFragment: "findAllSwaps", values: [SwapTaskStruct]): string;
|
|
89
|
-
encodeFunctionData(functionFragment: "findBestClosePath", values: [
|
|
89
|
+
encodeFunctionData(functionFragment: "findBestClosePath", values: [
|
|
90
|
+
string,
|
|
91
|
+
string[],
|
|
92
|
+
BigNumberish,
|
|
93
|
+
PathOptionStruct[],
|
|
94
|
+
BigNumberish,
|
|
95
|
+
boolean
|
|
96
|
+
]): string;
|
|
90
97
|
encodeFunctionData(functionFragment: "findOneTokenPath", values: [string, BigNumberish, string, string, string[], BigNumberish]): string;
|
|
91
98
|
encodeFunctionData(functionFragment: "findOpenStrategyPath", values: [string, BalanceStruct[], string, string[], BigNumberish]): string;
|
|
92
99
|
encodeFunctionData(functionFragment: "getGasPriceTokenOutRAY", values: [string]): string;
|
|
@@ -168,7 +175,7 @@ export interface IPathFinder extends BaseContract {
|
|
|
168
175
|
findAllSwaps(swapTask: SwapTaskStruct, overrides?: Overrides & {
|
|
169
176
|
from?: string | Promise<string>;
|
|
170
177
|
}): Promise<ContractTransaction>;
|
|
171
|
-
findBestClosePath(creditAccount: string, connectors: string[], slippage: BigNumberish, pathOptions: PathOptionStruct[], iterations: BigNumberish, overrides?: Overrides & {
|
|
178
|
+
findBestClosePath(creditAccount: string, connectors: string[], slippage: BigNumberish, pathOptions: PathOptionStruct[], iterations: BigNumberish, force: boolean, overrides?: Overrides & {
|
|
172
179
|
from?: string | Promise<string>;
|
|
173
180
|
}): Promise<ContractTransaction>;
|
|
174
181
|
findOneTokenPath(tokenIn: string, amount: BigNumberish, tokenOut: string, creditAccount: string, connectors: string[], slippage: BigNumberish, overrides?: Overrides & {
|
|
@@ -188,7 +195,7 @@ export interface IPathFinder extends BaseContract {
|
|
|
188
195
|
findAllSwaps(swapTask: SwapTaskStruct, overrides?: Overrides & {
|
|
189
196
|
from?: string | Promise<string>;
|
|
190
197
|
}): Promise<ContractTransaction>;
|
|
191
|
-
findBestClosePath(creditAccount: string, connectors: string[], slippage: BigNumberish, pathOptions: PathOptionStruct[], iterations: BigNumberish, overrides?: Overrides & {
|
|
198
|
+
findBestClosePath(creditAccount: string, connectors: string[], slippage: BigNumberish, pathOptions: PathOptionStruct[], iterations: BigNumberish, force: boolean, overrides?: Overrides & {
|
|
192
199
|
from?: string | Promise<string>;
|
|
193
200
|
}): Promise<ContractTransaction>;
|
|
194
201
|
findOneTokenPath(tokenIn: string, amount: BigNumberish, tokenOut: string, creditAccount: string, connectors: string[], slippage: BigNumberish, overrides?: Overrides & {
|
|
@@ -204,7 +211,13 @@ export interface IPathFinder extends BaseContract {
|
|
|
204
211
|
callStatic: {
|
|
205
212
|
componentAddressById(pf: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
|
206
213
|
findAllSwaps(swapTask: SwapTaskStruct, overrides?: CallOverrides): Promise<PathFinderResultStructOutput[]>;
|
|
207
|
-
findBestClosePath(creditAccount: string, connectors: string[], slippage: BigNumberish, pathOptions: PathOptionStruct[], iterations: BigNumberish, overrides?: CallOverrides): Promise<
|
|
214
|
+
findBestClosePath(creditAccount: string, connectors: string[], slippage: BigNumberish, pathOptions: PathOptionStruct[], iterations: BigNumberish, force: boolean, overrides?: CallOverrides): Promise<[
|
|
215
|
+
PathFinderResultStructOutput,
|
|
216
|
+
BigNumber
|
|
217
|
+
] & {
|
|
218
|
+
result: PathFinderResultStructOutput;
|
|
219
|
+
gasPriceTargetRAY: BigNumber;
|
|
220
|
+
}>;
|
|
208
221
|
findOneTokenPath(tokenIn: string, amount: BigNumberish, tokenOut: string, creditAccount: string, connectors: string[], slippage: BigNumberish, overrides?: CallOverrides): Promise<PathFinderResultStructOutput>;
|
|
209
222
|
findOpenStrategyPath(creditManager: string, balances: BalanceStruct[], target: string, connectors: string[], slippage: BigNumberish, overrides?: CallOverrides): Promise<[BalanceStructOutput[], PathFinderResultStructOutput]>;
|
|
210
223
|
getGasPriceTokenOutRAY(token: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
@@ -227,7 +240,7 @@ export interface IPathFinder extends BaseContract {
|
|
|
227
240
|
findAllSwaps(swapTask: SwapTaskStruct, overrides?: Overrides & {
|
|
228
241
|
from?: string | Promise<string>;
|
|
229
242
|
}): Promise<BigNumber>;
|
|
230
|
-
findBestClosePath(creditAccount: string, connectors: string[], slippage: BigNumberish, pathOptions: PathOptionStruct[], iterations: BigNumberish, overrides?: Overrides & {
|
|
243
|
+
findBestClosePath(creditAccount: string, connectors: string[], slippage: BigNumberish, pathOptions: PathOptionStruct[], iterations: BigNumberish, force: boolean, overrides?: Overrides & {
|
|
231
244
|
from?: string | Promise<string>;
|
|
232
245
|
}): Promise<BigNumber>;
|
|
233
246
|
findOneTokenPath(tokenIn: string, amount: BigNumberish, tokenOut: string, creditAccount: string, connectors: string[], slippage: BigNumberish, overrides?: Overrides & {
|
|
@@ -246,7 +259,7 @@ export interface IPathFinder extends BaseContract {
|
|
|
246
259
|
findAllSwaps(swapTask: SwapTaskStruct, overrides?: Overrides & {
|
|
247
260
|
from?: string | Promise<string>;
|
|
248
261
|
}): Promise<PopulatedTransaction>;
|
|
249
|
-
findBestClosePath(creditAccount: string, connectors: string[], slippage: BigNumberish, pathOptions: PathOptionStruct[], iterations: BigNumberish, overrides?: Overrides & {
|
|
262
|
+
findBestClosePath(creditAccount: string, connectors: string[], slippage: BigNumberish, pathOptions: PathOptionStruct[], iterations: BigNumberish, force: boolean, overrides?: Overrides & {
|
|
250
263
|
from?: string | Promise<string>;
|
|
251
264
|
}): Promise<PopulatedTransaction>;
|
|
252
265
|
findOneTokenPath(tokenIn: string, amount: BigNumberish, tokenOut: string, creditAccount: string, connectors: string[], slippage: BigNumberish, overrides?: Overrides & {
|
|
@@ -35,6 +35,7 @@ export declare type StrategyPathTaskStruct = {
|
|
|
35
35
|
connectors: string[];
|
|
36
36
|
adapters: string[];
|
|
37
37
|
slippagePerStep: BigNumberish;
|
|
38
|
+
force: boolean;
|
|
38
39
|
targetType: BigNumberish;
|
|
39
40
|
foundAdapters: TokenAdaptersStruct[];
|
|
40
41
|
gasPriceTargetRAY: BigNumberish;
|
|
@@ -50,6 +51,7 @@ export declare type StrategyPathTaskStructOutput = [
|
|
|
50
51
|
string[],
|
|
51
52
|
string[],
|
|
52
53
|
BigNumber,
|
|
54
|
+
boolean,
|
|
53
55
|
number,
|
|
54
56
|
TokenAdaptersStructOutput[],
|
|
55
57
|
BigNumber,
|
|
@@ -64,6 +66,7 @@ export declare type StrategyPathTaskStructOutput = [
|
|
|
64
66
|
connectors: string[];
|
|
65
67
|
adapters: string[];
|
|
66
68
|
slippagePerStep: BigNumber;
|
|
69
|
+
force: boolean;
|
|
67
70
|
targetType: number;
|
|
68
71
|
foundAdapters: TokenAdaptersStructOutput[];
|
|
69
72
|
gasPriceTargetRAY: BigNumber;
|
|
@@ -74,8 +77,8 @@ export declare type StrategyPathTaskStructOutput = [
|
|
|
74
77
|
};
|
|
75
78
|
export interface IPathResolverInterface extends utils.Interface {
|
|
76
79
|
functions: {
|
|
77
|
-
"findOneTokenPath(uint8,address,uint256,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
78
|
-
"findOpenStrategyPath((address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
80
|
+
"findOneTokenPath(uint8,address,uint256,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
81
|
+
"findOpenStrategyPath((address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
79
82
|
"getComponentId()": FunctionFragment;
|
|
80
83
|
"version()": FunctionFragment;
|
|
81
84
|
};
|
|
@@ -81,6 +81,7 @@ export declare type StrategyPathTaskStruct = {
|
|
|
81
81
|
connectors: string[];
|
|
82
82
|
adapters: string[];
|
|
83
83
|
slippagePerStep: BigNumberish;
|
|
84
|
+
force: boolean;
|
|
84
85
|
targetType: BigNumberish;
|
|
85
86
|
foundAdapters: TokenAdaptersStruct[];
|
|
86
87
|
gasPriceTargetRAY: BigNumberish;
|
|
@@ -96,6 +97,7 @@ export declare type StrategyPathTaskStructOutput = [
|
|
|
96
97
|
string[],
|
|
97
98
|
string[],
|
|
98
99
|
BigNumber,
|
|
100
|
+
boolean,
|
|
99
101
|
number,
|
|
100
102
|
TokenAdaptersStructOutput[],
|
|
101
103
|
BigNumber,
|
|
@@ -110,6 +112,7 @@ export declare type StrategyPathTaskStructOutput = [
|
|
|
110
112
|
connectors: string[];
|
|
111
113
|
adapters: string[];
|
|
112
114
|
slippagePerStep: BigNumber;
|
|
115
|
+
force: boolean;
|
|
113
116
|
targetType: number;
|
|
114
117
|
foundAdapters: TokenAdaptersStructOutput[];
|
|
115
118
|
gasPriceTargetRAY: BigNumber;
|
|
@@ -121,14 +124,14 @@ export declare type StrategyPathTaskStructOutput = [
|
|
|
121
124
|
export interface ISwapAggregatorInterface extends utils.Interface {
|
|
122
125
|
functions: {
|
|
123
126
|
"findAllSwaps((uint8,address,address,address,address[],uint256,uint256,bool),address[])": FunctionFragment;
|
|
124
|
-
"findBestAllInputSwap(address,address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
125
|
-
"findBestAllInputSwapOrRevert(address,address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
126
|
-
"findBestSwap(address,uint256,address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
127
|
-
"findBestSwapOrRevert(address,uint256,address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
127
|
+
"findBestAllInputSwap(address,address,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
128
|
+
"findBestAllInputSwapOrRevert(address,address,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
129
|
+
"findBestSwap(address,uint256,address,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
130
|
+
"findBestSwapOrRevert(address,uint256,address,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
128
131
|
"findBestSwapQuote((uint8,address,address,address,address[],uint256,uint256,bool),address[])": FunctionFragment;
|
|
129
132
|
"getBestDirectPairSwap((uint8,address,address,address,address[],uint256,uint256,bool),address[],uint256)": FunctionFragment;
|
|
130
133
|
"getComponentId()": FunctionFragment;
|
|
131
|
-
"swapAllNormalTokens((address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]),address)": FunctionFragment;
|
|
134
|
+
"swapAllNormalTokens((address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]),address)": FunctionFragment;
|
|
132
135
|
"version()": FunctionFragment;
|
|
133
136
|
};
|
|
134
137
|
getFunction(nameOrSignatureOrTopic: "findAllSwaps" | "findBestAllInputSwap" | "findBestAllInputSwapOrRevert" | "findBestSwap" | "findBestSwapOrRevert" | "findBestSwapQuote" | "getBestDirectPairSwap" | "getComponentId" | "swapAllNormalTokens" | "version"): FunctionFragment;
|
|
@@ -35,6 +35,7 @@ export declare type StrategyPathTaskStruct = {
|
|
|
35
35
|
connectors: string[];
|
|
36
36
|
adapters: string[];
|
|
37
37
|
slippagePerStep: BigNumberish;
|
|
38
|
+
force: boolean;
|
|
38
39
|
targetType: BigNumberish;
|
|
39
40
|
foundAdapters: TokenAdaptersStruct[];
|
|
40
41
|
gasPriceTargetRAY: BigNumberish;
|
|
@@ -50,6 +51,7 @@ export declare type StrategyPathTaskStructOutput = [
|
|
|
50
51
|
string[],
|
|
51
52
|
string[],
|
|
52
53
|
BigNumber,
|
|
54
|
+
boolean,
|
|
53
55
|
number,
|
|
54
56
|
TokenAdaptersStructOutput[],
|
|
55
57
|
BigNumber,
|
|
@@ -64,6 +66,7 @@ export declare type StrategyPathTaskStructOutput = [
|
|
|
64
66
|
connectors: string[];
|
|
65
67
|
adapters: string[];
|
|
66
68
|
slippagePerStep: BigNumber;
|
|
69
|
+
force: boolean;
|
|
67
70
|
targetType: number;
|
|
68
71
|
foundAdapters: TokenAdaptersStructOutput[];
|
|
69
72
|
gasPriceTargetRAY: BigNumber;
|
|
@@ -75,11 +78,11 @@ export declare type StrategyPathTaskStructOutput = [
|
|
|
75
78
|
export interface IWithdrawerInterface extends utils.Interface {
|
|
76
79
|
functions: {
|
|
77
80
|
"getComponentId()": FunctionFragment;
|
|
78
|
-
"getUnderlying(address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
81
|
+
"getUnderlying(address,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
79
82
|
"version()": FunctionFragment;
|
|
80
|
-
"withdraw(uint256,address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
81
|
-
"withdrawAll(address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
82
|
-
"withdrawAllTokens((address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
83
|
+
"withdraw(uint256,address,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
84
|
+
"withdrawAll(address,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
85
|
+
"withdrawAllTokens((address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
83
86
|
};
|
|
84
87
|
getFunction(nameOrSignatureOrTopic: "getComponentId" | "getUnderlying" | "version" | "withdraw" | "withdrawAll" | "withdrawAllTokens"): FunctionFragment;
|
|
85
88
|
encodeFunctionData(functionFragment: "getComponentId", values?: undefined): string;
|
|
@@ -35,6 +35,7 @@ export declare type StrategyPathTaskStruct = {
|
|
|
35
35
|
connectors: string[];
|
|
36
36
|
adapters: string[];
|
|
37
37
|
slippagePerStep: BigNumberish;
|
|
38
|
+
force: boolean;
|
|
38
39
|
targetType: BigNumberish;
|
|
39
40
|
foundAdapters: TokenAdaptersStruct[];
|
|
40
41
|
gasPriceTargetRAY: BigNumberish;
|
|
@@ -50,6 +51,7 @@ export declare type StrategyPathTaskStructOutput = [
|
|
|
50
51
|
string[],
|
|
51
52
|
string[],
|
|
52
53
|
BigNumber,
|
|
54
|
+
boolean,
|
|
53
55
|
number,
|
|
54
56
|
TokenAdaptersStructOutput[],
|
|
55
57
|
BigNumber,
|
|
@@ -64,6 +66,7 @@ export declare type StrategyPathTaskStructOutput = [
|
|
|
64
66
|
connectors: string[];
|
|
65
67
|
adapters: string[];
|
|
66
68
|
slippagePerStep: BigNumber;
|
|
69
|
+
force: boolean;
|
|
67
70
|
targetType: number;
|
|
68
71
|
foundAdapters: TokenAdaptersStructOutput[];
|
|
69
72
|
gasPriceTargetRAY: BigNumber;
|
|
@@ -85,11 +88,11 @@ export declare type PathOptionStructOutput = [string, number, number] & {
|
|
|
85
88
|
export interface IWithdrawerOptionsInterface extends utils.Interface {
|
|
86
89
|
functions: {
|
|
87
90
|
"getComponentId()": FunctionFragment;
|
|
88
|
-
"getUnderlyings(uint8,address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
91
|
+
"getUnderlyings(uint8,address,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
89
92
|
"version()": FunctionFragment;
|
|
90
|
-
"withdraw(address,uint256,uint8,address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
91
|
-
"withdrawAll(address,uint8,address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
92
|
-
"withdrawAllTokens((address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]),(address,uint8,uint8)[])": FunctionFragment;
|
|
93
|
+
"withdraw(address,uint256,uint8,address,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
94
|
+
"withdrawAll(address,uint8,address,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
|
|
95
|
+
"withdrawAllTokens((address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,uint256,(address,bytes)[]),(address,uint8,uint8)[])": FunctionFragment;
|
|
93
96
|
};
|
|
94
97
|
getFunction(nameOrSignatureOrTopic: "getComponentId" | "getUnderlyings" | "version" | "withdraw" | "withdrawAll" | "withdrawAllTokens"): FunctionFragment;
|
|
95
98
|
encodeFunctionData(functionFragment: "getComponentId", values?: undefined): string;
|
package/lib/types/factories/contracts/interfaces/IAddressProvider.sol/IAddressProvider__factory.js
CHANGED
|
@@ -90,6 +90,19 @@ var _abi = [
|
|
|
90
90
|
stateMutability: "view",
|
|
91
91
|
type: "function",
|
|
92
92
|
},
|
|
93
|
+
{
|
|
94
|
+
inputs: [],
|
|
95
|
+
name: "getLeveragedActions",
|
|
96
|
+
outputs: [
|
|
97
|
+
{
|
|
98
|
+
internalType: "address",
|
|
99
|
+
name: "",
|
|
100
|
+
type: "address",
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
stateMutability: "view",
|
|
104
|
+
type: "function",
|
|
105
|
+
},
|
|
93
106
|
{
|
|
94
107
|
inputs: [],
|
|
95
108
|
name: "getPriceOracle",
|
|
@@ -265,6 +265,19 @@ var _abi = [
|
|
|
265
265
|
stateMutability: "view",
|
|
266
266
|
type: "function",
|
|
267
267
|
},
|
|
268
|
+
{
|
|
269
|
+
inputs: [],
|
|
270
|
+
name: "stETH",
|
|
271
|
+
outputs: [
|
|
272
|
+
{
|
|
273
|
+
internalType: "address",
|
|
274
|
+
name: "",
|
|
275
|
+
type: "address",
|
|
276
|
+
},
|
|
277
|
+
],
|
|
278
|
+
stateMutability: "view",
|
|
279
|
+
type: "function",
|
|
280
|
+
},
|
|
268
281
|
{
|
|
269
282
|
inputs: [
|
|
270
283
|
{
|
|
@@ -336,6 +349,19 @@ var _abi = [
|
|
|
336
349
|
stateMutability: "view",
|
|
337
350
|
type: "function",
|
|
338
351
|
},
|
|
352
|
+
{
|
|
353
|
+
inputs: [],
|
|
354
|
+
name: "weth",
|
|
355
|
+
outputs: [
|
|
356
|
+
{
|
|
357
|
+
internalType: "address",
|
|
358
|
+
name: "",
|
|
359
|
+
type: "address",
|
|
360
|
+
},
|
|
361
|
+
],
|
|
362
|
+
stateMutability: "view",
|
|
363
|
+
type: "function",
|
|
364
|
+
},
|
|
339
365
|
];
|
|
340
366
|
var ILidoV1Adapter__factory = /** @class */ (function () {
|
|
341
367
|
function ILidoV1Adapter__factory() {
|
|
@@ -52,6 +52,11 @@ var _abi = [
|
|
|
52
52
|
name: "slippagePerStep",
|
|
53
53
|
type: "uint256",
|
|
54
54
|
},
|
|
55
|
+
{
|
|
56
|
+
internalType: "bool",
|
|
57
|
+
name: "force",
|
|
58
|
+
type: "bool",
|
|
59
|
+
},
|
|
55
60
|
{
|
|
56
61
|
internalType: "enum TokenType",
|
|
57
62
|
name: "targetType",
|
|
@@ -195,6 +200,11 @@ var _abi = [
|
|
|
195
200
|
name: "slippagePerStep",
|
|
196
201
|
type: "uint256",
|
|
197
202
|
},
|
|
203
|
+
{
|
|
204
|
+
internalType: "bool",
|
|
205
|
+
name: "force",
|
|
206
|
+
type: "bool",
|
|
207
|
+
},
|
|
198
208
|
{
|
|
199
209
|
internalType: "enum TokenType",
|
|
200
210
|
name: "targetType",
|
|
@@ -72,6 +72,11 @@ var _abi = [
|
|
|
72
72
|
name: "slippagePerStep",
|
|
73
73
|
type: "uint256",
|
|
74
74
|
},
|
|
75
|
+
{
|
|
76
|
+
internalType: "bool",
|
|
77
|
+
name: "force",
|
|
78
|
+
type: "bool",
|
|
79
|
+
},
|
|
75
80
|
{
|
|
76
81
|
internalType: "enum TokenType",
|
|
77
82
|
name: "targetType",
|
|
@@ -193,6 +198,11 @@ var _abi = [
|
|
|
193
198
|
name: "slippagePerStep",
|
|
194
199
|
type: "uint256",
|
|
195
200
|
},
|
|
201
|
+
{
|
|
202
|
+
internalType: "bool",
|
|
203
|
+
name: "force",
|
|
204
|
+
type: "bool",
|
|
205
|
+
},
|
|
196
206
|
{
|
|
197
207
|
internalType: "enum TokenType",
|
|
198
208
|
name: "targetType",
|
|
@@ -327,6 +337,11 @@ var _abi = [
|
|
|
327
337
|
name: "slippagePerStep",
|
|
328
338
|
type: "uint256",
|
|
329
339
|
},
|
|
340
|
+
{
|
|
341
|
+
internalType: "bool",
|
|
342
|
+
name: "force",
|
|
343
|
+
type: "bool",
|
|
344
|
+
},
|
|
330
345
|
{
|
|
331
346
|
internalType: "enum TokenType",
|
|
332
347
|
name: "targetType",
|
|
@@ -448,6 +463,11 @@ var _abi = [
|
|
|
448
463
|
name: "slippagePerStep",
|
|
449
464
|
type: "uint256",
|
|
450
465
|
},
|
|
466
|
+
{
|
|
467
|
+
internalType: "bool",
|
|
468
|
+
name: "force",
|
|
469
|
+
type: "bool",
|
|
470
|
+
},
|
|
451
471
|
{
|
|
452
472
|
internalType: "enum TokenType",
|
|
453
473
|
name: "targetType",
|
|
@@ -572,6 +592,11 @@ var _abi = [
|
|
|
572
592
|
name: "slippagePerStep",
|
|
573
593
|
type: "uint256",
|
|
574
594
|
},
|
|
595
|
+
{
|
|
596
|
+
internalType: "bool",
|
|
597
|
+
name: "force",
|
|
598
|
+
type: "bool",
|
|
599
|
+
},
|
|
575
600
|
{
|
|
576
601
|
internalType: "enum TokenType",
|
|
577
602
|
name: "targetType",
|
|
@@ -693,6 +718,11 @@ var _abi = [
|
|
|
693
718
|
name: "slippagePerStep",
|
|
694
719
|
type: "uint256",
|
|
695
720
|
},
|
|
721
|
+
{
|
|
722
|
+
internalType: "bool",
|
|
723
|
+
name: "force",
|
|
724
|
+
type: "bool",
|
|
725
|
+
},
|
|
696
726
|
{
|
|
697
727
|
internalType: "enum TokenType",
|
|
698
728
|
name: "targetType",
|
|
@@ -835,6 +865,11 @@ var _abi = [
|
|
|
835
865
|
name: "slippagePerStep",
|
|
836
866
|
type: "uint256",
|
|
837
867
|
},
|
|
868
|
+
{
|
|
869
|
+
internalType: "bool",
|
|
870
|
+
name: "force",
|
|
871
|
+
type: "bool",
|
|
872
|
+
},
|
|
838
873
|
{
|
|
839
874
|
internalType: "enum TokenType",
|
|
840
875
|
name: "targetType",
|
|
@@ -956,6 +991,11 @@ var _abi = [
|
|
|
956
991
|
name: "slippagePerStep",
|
|
957
992
|
type: "uint256",
|
|
958
993
|
},
|
|
994
|
+
{
|
|
995
|
+
internalType: "bool",
|
|
996
|
+
name: "force",
|
|
997
|
+
type: "bool",
|
|
998
|
+
},
|
|
959
999
|
{
|
|
960
1000
|
internalType: "enum TokenType",
|
|
961
1001
|
name: "targetType",
|
package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/IDepositor__factory.js
CHANGED
|
@@ -62,6 +62,11 @@ var _abi = [
|
|
|
62
62
|
name: "slippagePerStep",
|
|
63
63
|
type: "uint256",
|
|
64
64
|
},
|
|
65
|
+
{
|
|
66
|
+
internalType: "bool",
|
|
67
|
+
name: "force",
|
|
68
|
+
type: "bool",
|
|
69
|
+
},
|
|
65
70
|
{
|
|
66
71
|
internalType: "enum TokenType",
|
|
67
72
|
name: "targetType",
|
|
@@ -183,6 +188,11 @@ var _abi = [
|
|
|
183
188
|
name: "slippagePerStep",
|
|
184
189
|
type: "uint256",
|
|
185
190
|
},
|
|
191
|
+
{
|
|
192
|
+
internalType: "bool",
|
|
193
|
+
name: "force",
|
|
194
|
+
type: "bool",
|
|
195
|
+
},
|
|
186
196
|
{
|
|
187
197
|
internalType: "enum TokenType",
|
|
188
198
|
name: "targetType",
|
|
@@ -307,6 +317,11 @@ var _abi = [
|
|
|
307
317
|
name: "slippagePerStep",
|
|
308
318
|
type: "uint256",
|
|
309
319
|
},
|
|
320
|
+
{
|
|
321
|
+
internalType: "bool",
|
|
322
|
+
name: "force",
|
|
323
|
+
type: "bool",
|
|
324
|
+
},
|
|
310
325
|
{
|
|
311
326
|
internalType: "enum TokenType",
|
|
312
327
|
name: "targetType",
|
|
@@ -428,6 +443,11 @@ var _abi = [
|
|
|
428
443
|
name: "slippagePerStep",
|
|
429
444
|
type: "uint256",
|
|
430
445
|
},
|
|
446
|
+
{
|
|
447
|
+
internalType: "bool",
|
|
448
|
+
name: "force",
|
|
449
|
+
type: "bool",
|
|
450
|
+
},
|
|
431
451
|
{
|
|
432
452
|
internalType: "enum TokenType",
|
|
433
453
|
name: "targetType",
|
|
@@ -565,6 +585,11 @@ var _abi = [
|
|
|
565
585
|
name: "slippagePerStep",
|
|
566
586
|
type: "uint256",
|
|
567
587
|
},
|
|
588
|
+
{
|
|
589
|
+
internalType: "bool",
|
|
590
|
+
name: "force",
|
|
591
|
+
type: "bool",
|
|
592
|
+
},
|
|
568
593
|
{
|
|
569
594
|
internalType: "enum TokenType",
|
|
570
595
|
name: "targetType",
|
|
@@ -686,6 +711,11 @@ var _abi = [
|
|
|
686
711
|
name: "slippagePerStep",
|
|
687
712
|
type: "uint256",
|
|
688
713
|
},
|
|
714
|
+
{
|
|
715
|
+
internalType: "bool",
|
|
716
|
+
name: "force",
|
|
717
|
+
type: "bool",
|
|
718
|
+
},
|
|
689
719
|
{
|
|
690
720
|
internalType: "enum TokenType",
|
|
691
721
|
name: "targetType",
|
|
@@ -75,6 +75,11 @@ var _abi = [
|
|
|
75
75
|
name: "slippagePerStep",
|
|
76
76
|
type: "uint256",
|
|
77
77
|
},
|
|
78
|
+
{
|
|
79
|
+
internalType: "bool",
|
|
80
|
+
name: "force",
|
|
81
|
+
type: "bool",
|
|
82
|
+
},
|
|
78
83
|
{
|
|
79
84
|
internalType: "enum TokenType",
|
|
80
85
|
name: "targetType",
|
|
@@ -196,6 +201,11 @@ var _abi = [
|
|
|
196
201
|
name: "slippagePerStep",
|
|
197
202
|
type: "uint256",
|
|
198
203
|
},
|
|
204
|
+
{
|
|
205
|
+
internalType: "bool",
|
|
206
|
+
name: "force",
|
|
207
|
+
type: "bool",
|
|
208
|
+
},
|
|
199
209
|
{
|
|
200
210
|
internalType: "enum TokenType",
|
|
201
211
|
name: "targetType",
|
package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorker__factory.js
CHANGED
|
@@ -70,6 +70,11 @@ var _abi = [
|
|
|
70
70
|
name: "slippagePerStep",
|
|
71
71
|
type: "uint256",
|
|
72
72
|
},
|
|
73
|
+
{
|
|
74
|
+
internalType: "bool",
|
|
75
|
+
name: "force",
|
|
76
|
+
type: "bool",
|
|
77
|
+
},
|
|
73
78
|
{
|
|
74
79
|
internalType: "enum TokenType",
|
|
75
80
|
name: "targetType",
|
|
@@ -191,6 +196,11 @@ var _abi = [
|
|
|
191
196
|
name: "slippagePerStep",
|
|
192
197
|
type: "uint256",
|
|
193
198
|
},
|
|
199
|
+
{
|
|
200
|
+
internalType: "bool",
|
|
201
|
+
name: "force",
|
|
202
|
+
type: "bool",
|
|
203
|
+
},
|
|
194
204
|
{
|
|
195
205
|
internalType: "enum TokenType",
|
|
196
206
|
name: "targetType",
|
|
@@ -14,21 +14,6 @@ export declare class IPathFinder__factory {
|
|
|
14
14
|
type: string;
|
|
15
15
|
outputs?: undefined;
|
|
16
16
|
stateMutability?: undefined;
|
|
17
|
-
} | {
|
|
18
|
-
inputs: {
|
|
19
|
-
internalType: string;
|
|
20
|
-
name: string;
|
|
21
|
-
type: string;
|
|
22
|
-
}[];
|
|
23
|
-
name: string;
|
|
24
|
-
outputs: {
|
|
25
|
-
internalType: string;
|
|
26
|
-
name: string;
|
|
27
|
-
type: string;
|
|
28
|
-
}[];
|
|
29
|
-
stateMutability: string;
|
|
30
|
-
type: string;
|
|
31
|
-
anonymous?: undefined;
|
|
32
17
|
} | {
|
|
33
18
|
inputs: ({
|
|
34
19
|
internalType: string;
|
|
@@ -46,7 +31,7 @@ export declare class IPathFinder__factory {
|
|
|
46
31
|
type: string;
|
|
47
32
|
})[];
|
|
48
33
|
name: string;
|
|
49
|
-
outputs: {
|
|
34
|
+
outputs: ({
|
|
50
35
|
components: ({
|
|
51
36
|
internalType: string;
|
|
52
37
|
name: string;
|
|
@@ -65,7 +50,12 @@ export declare class IPathFinder__factory {
|
|
|
65
50
|
internalType: string;
|
|
66
51
|
name: string;
|
|
67
52
|
type: string;
|
|
68
|
-
}
|
|
53
|
+
} | {
|
|
54
|
+
internalType: string;
|
|
55
|
+
name: string;
|
|
56
|
+
type: string;
|
|
57
|
+
components?: undefined;
|
|
58
|
+
})[];
|
|
69
59
|
stateMutability: string;
|
|
70
60
|
type: string;
|
|
71
61
|
anonymous?: undefined;
|
|
@@ -235,6 +235,11 @@ var _abi = [
|
|
|
235
235
|
name: "iterations",
|
|
236
236
|
type: "uint256",
|
|
237
237
|
},
|
|
238
|
+
{
|
|
239
|
+
internalType: "bool",
|
|
240
|
+
name: "force",
|
|
241
|
+
type: "bool",
|
|
242
|
+
},
|
|
238
243
|
],
|
|
239
244
|
name: "findBestClosePath",
|
|
240
245
|
outputs: [
|
|
@@ -272,6 +277,11 @@ var _abi = [
|
|
|
272
277
|
name: "result",
|
|
273
278
|
type: "tuple",
|
|
274
279
|
},
|
|
280
|
+
{
|
|
281
|
+
internalType: "uint256",
|
|
282
|
+
name: "gasPriceTargetRAY",
|
|
283
|
+
type: "uint256",
|
|
284
|
+
},
|
|
275
285
|
],
|
|
276
286
|
stateMutability: "nonpayable",
|
|
277
287
|
type: "function",
|