@gearbox-protocol/sdk 3.0.0-next.142 → 3.0.0-next.144
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/apy/index.d.ts +1 -1
- package/lib/apy/index.js +1 -0
- package/lib/contracts/contractsRegister.d.ts +1 -1
- package/lib/contracts/contractsRegister.js +4 -1
- package/lib/types/IRouterV3.d.ts +33 -1
- package/lib/types/factories/IRouterV3__factory.d.ts +70 -0
- package/lib/types/factories/IRouterV3__factory.js +91 -0
- package/package.json +7 -7
package/lib/apy/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LPTokens, PartialRecord, SupportedToken } from "@gearbox-protocol/sdk-gov";
|
|
2
|
-
export type AdditionalTokenWithAPY = Extract<SupportedToken, "STETH" | "weETH" | "osETH" | "rETH" | "wstETH" | "ezETH" | "cbETH" | "sfrxETH">;
|
|
2
|
+
export type AdditionalTokenWithAPY = Extract<SupportedToken, "STETH" | "weETH" | "osETH" | "rETH" | "wstETH" | "ezETH" | "cbETH" | "sfrxETH" | "USDe">;
|
|
3
3
|
export declare const additionalTokensWIthAPY: Record<AdditionalTokenWithAPY, true>;
|
|
4
4
|
export type TokensWithAPY = LPTokens | AdditionalTokenWithAPY;
|
|
5
5
|
export type LpTokensAPY = PartialRecord<TokensWithAPY, number>;
|
package/lib/apy/index.js
CHANGED
|
@@ -16,7 +16,7 @@ export declare const creditManagerByAddress: Record<string, SupportedCreditManag
|
|
|
16
16
|
export type MainnetPoolsV1 = "DAI_V1" | "USDC_V1" | "WETH_V1" | "WBTC_V1" | "WSTETH_V1" | "FRAX_V1";
|
|
17
17
|
export type MainnetPoolsV3 = "USDC_V3_TRADE" | "WETH_V3_TRADE" | "WBTC_V3_TRADE";
|
|
18
18
|
export type MainnetPools = MainnetPoolsV1 | MainnetPoolsV3;
|
|
19
|
-
export type ArbitrumPools =
|
|
19
|
+
export type ArbitrumPools = "USDC_V3" | "WETH_V3";
|
|
20
20
|
export type OptimismPools = never;
|
|
21
21
|
type PoolsListType = {
|
|
22
22
|
[key in NetworkType]: key extends "Mainnet" ? Record<MainnetPools, string> : key extends "Arbitrum" ? Record<ArbitrumPools, string> : key extends "Optimism" ? Record<OptimismPools, string> : never;
|
|
@@ -59,7 +59,10 @@ exports.poolByNetwork = {
|
|
|
59
59
|
WBTC_V3_TRADE: "0xda00010eda646913f273e10e7a5d1f659242757d".toLowerCase(),
|
|
60
60
|
WETH_V3_TRADE: "0xda0002859b2d05f66a753d8241fcde8623f26f4f".toLowerCase(),
|
|
61
61
|
},
|
|
62
|
-
Arbitrum: {
|
|
62
|
+
Arbitrum: {
|
|
63
|
+
USDC_V3: "0xa76c604145d7394dec36c49af494c144ff327861".toLowerCase(),
|
|
64
|
+
WETH_V3: "0x04419d3509f13054f60d253e0c79491d9e683399".toLowerCase(),
|
|
65
|
+
},
|
|
63
66
|
Optimism: {},
|
|
64
67
|
};
|
|
65
68
|
const deployedContractNames = {
|
package/lib/types/IRouterV3.d.ts
CHANGED
|
@@ -73,14 +73,16 @@ export interface IRouterV3Interface extends utils.Interface {
|
|
|
73
73
|
"componentAddressById(uint8)": FunctionFragment;
|
|
74
74
|
"findAllSwaps((uint8,address,address,address,address[],uint256,uint256),uint256)": FunctionFragment;
|
|
75
75
|
"findBestClosePath(address,(address,uint256)[],(address,uint256)[],address[],uint256,(address,uint8,uint8)[],uint256,bool)": FunctionFragment;
|
|
76
|
+
"findOneTokenDiffPath(address,uint256,uint256,address,address,address[],uint256)": FunctionFragment;
|
|
76
77
|
"findOneTokenPath(address,uint256,address,address,address[],uint256)": FunctionFragment;
|
|
77
78
|
"findOpenStrategyPath(address,(address,uint256)[],(address,uint256)[],address,address[],uint256)": FunctionFragment;
|
|
78
79
|
"futureRouter()": FunctionFragment;
|
|
79
80
|
"isRouterConfigurator(address)": FunctionFragment;
|
|
81
|
+
"maxComponentId()": FunctionFragment;
|
|
80
82
|
"tokenTypes(address)": FunctionFragment;
|
|
81
83
|
"version()": FunctionFragment;
|
|
82
84
|
};
|
|
83
|
-
getFunction(nameOrSignatureOrTopic: "componentAddressById" | "findAllSwaps" | "findBestClosePath" | "findOneTokenPath" | "findOpenStrategyPath" | "futureRouter" | "isRouterConfigurator" | "tokenTypes" | "version"): FunctionFragment;
|
|
85
|
+
getFunction(nameOrSignatureOrTopic: "componentAddressById" | "findAllSwaps" | "findBestClosePath" | "findOneTokenDiffPath" | "findOneTokenPath" | "findOpenStrategyPath" | "futureRouter" | "isRouterConfigurator" | "maxComponentId" | "tokenTypes" | "version"): FunctionFragment;
|
|
84
86
|
encodeFunctionData(functionFragment: "componentAddressById", values: [PromiseOrValue<BigNumberish>]): string;
|
|
85
87
|
encodeFunctionData(functionFragment: "findAllSwaps", values: [SwapTaskStruct, PromiseOrValue<BigNumberish>]): string;
|
|
86
88
|
encodeFunctionData(functionFragment: "findBestClosePath", values: [
|
|
@@ -93,6 +95,15 @@ export interface IRouterV3Interface extends utils.Interface {
|
|
|
93
95
|
PromiseOrValue<BigNumberish>,
|
|
94
96
|
PromiseOrValue<boolean>
|
|
95
97
|
]): string;
|
|
98
|
+
encodeFunctionData(functionFragment: "findOneTokenDiffPath", values: [
|
|
99
|
+
PromiseOrValue<string>,
|
|
100
|
+
PromiseOrValue<BigNumberish>,
|
|
101
|
+
PromiseOrValue<BigNumberish>,
|
|
102
|
+
PromiseOrValue<string>,
|
|
103
|
+
PromiseOrValue<string>,
|
|
104
|
+
PromiseOrValue<string>[],
|
|
105
|
+
PromiseOrValue<BigNumberish>
|
|
106
|
+
]): string;
|
|
96
107
|
encodeFunctionData(functionFragment: "findOneTokenPath", values: [
|
|
97
108
|
PromiseOrValue<string>,
|
|
98
109
|
PromiseOrValue<BigNumberish>,
|
|
@@ -111,15 +122,18 @@ export interface IRouterV3Interface extends utils.Interface {
|
|
|
111
122
|
]): string;
|
|
112
123
|
encodeFunctionData(functionFragment: "futureRouter", values?: undefined): string;
|
|
113
124
|
encodeFunctionData(functionFragment: "isRouterConfigurator", values: [PromiseOrValue<string>]): string;
|
|
125
|
+
encodeFunctionData(functionFragment: "maxComponentId", values?: undefined): string;
|
|
114
126
|
encodeFunctionData(functionFragment: "tokenTypes", values: [PromiseOrValue<string>]): string;
|
|
115
127
|
encodeFunctionData(functionFragment: "version", values?: undefined): string;
|
|
116
128
|
decodeFunctionResult(functionFragment: "componentAddressById", data: BytesLike): Result;
|
|
117
129
|
decodeFunctionResult(functionFragment: "findAllSwaps", data: BytesLike): Result;
|
|
118
130
|
decodeFunctionResult(functionFragment: "findBestClosePath", data: BytesLike): Result;
|
|
131
|
+
decodeFunctionResult(functionFragment: "findOneTokenDiffPath", data: BytesLike): Result;
|
|
119
132
|
decodeFunctionResult(functionFragment: "findOneTokenPath", data: BytesLike): Result;
|
|
120
133
|
decodeFunctionResult(functionFragment: "findOpenStrategyPath", data: BytesLike): Result;
|
|
121
134
|
decodeFunctionResult(functionFragment: "futureRouter", data: BytesLike): Result;
|
|
122
135
|
decodeFunctionResult(functionFragment: "isRouterConfigurator", data: BytesLike): Result;
|
|
136
|
+
decodeFunctionResult(functionFragment: "maxComponentId", data: BytesLike): Result;
|
|
123
137
|
decodeFunctionResult(functionFragment: "tokenTypes", data: BytesLike): Result;
|
|
124
138
|
decodeFunctionResult(functionFragment: "version", data: BytesLike): Result;
|
|
125
139
|
events: {
|
|
@@ -193,6 +207,9 @@ export interface IRouterV3 extends BaseContract {
|
|
|
193
207
|
findBestClosePath(creditAccount: PromiseOrValue<string>, expectedBalances: BalanceStruct[], leftoverBalances: BalanceStruct[], connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, pathOptions: PathOptionStruct[], iterations: PromiseOrValue<BigNumberish>, force: PromiseOrValue<boolean>, overrides?: Overrides & {
|
|
194
208
|
from?: PromiseOrValue<string>;
|
|
195
209
|
}): Promise<ContractTransaction>;
|
|
210
|
+
findOneTokenDiffPath(tokenIn: PromiseOrValue<string>, expectedBalance: PromiseOrValue<BigNumberish>, leftoverAmount: PromiseOrValue<BigNumberish>, tokenOut: PromiseOrValue<string>, creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
211
|
+
from?: PromiseOrValue<string>;
|
|
212
|
+
}): Promise<ContractTransaction>;
|
|
196
213
|
findOneTokenPath(tokenIn: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, tokenOut: PromiseOrValue<string>, creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
197
214
|
from?: PromiseOrValue<string>;
|
|
198
215
|
}): Promise<ContractTransaction>;
|
|
@@ -201,6 +218,7 @@ export interface IRouterV3 extends BaseContract {
|
|
|
201
218
|
}): Promise<ContractTransaction>;
|
|
202
219
|
futureRouter(overrides?: CallOverrides): Promise<[string]>;
|
|
203
220
|
isRouterConfigurator(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<[boolean]>;
|
|
221
|
+
maxComponentId(overrides?: CallOverrides): Promise<[number]>;
|
|
204
222
|
tokenTypes(arg0: PromiseOrValue<string>, overrides?: CallOverrides): Promise<[number]>;
|
|
205
223
|
version(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
206
224
|
};
|
|
@@ -211,6 +229,9 @@ export interface IRouterV3 extends BaseContract {
|
|
|
211
229
|
findBestClosePath(creditAccount: PromiseOrValue<string>, expectedBalances: BalanceStruct[], leftoverBalances: BalanceStruct[], connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, pathOptions: PathOptionStruct[], iterations: PromiseOrValue<BigNumberish>, force: PromiseOrValue<boolean>, overrides?: Overrides & {
|
|
212
230
|
from?: PromiseOrValue<string>;
|
|
213
231
|
}): Promise<ContractTransaction>;
|
|
232
|
+
findOneTokenDiffPath(tokenIn: PromiseOrValue<string>, expectedBalance: PromiseOrValue<BigNumberish>, leftoverAmount: PromiseOrValue<BigNumberish>, tokenOut: PromiseOrValue<string>, creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
233
|
+
from?: PromiseOrValue<string>;
|
|
234
|
+
}): Promise<ContractTransaction>;
|
|
214
235
|
findOneTokenPath(tokenIn: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, tokenOut: PromiseOrValue<string>, creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
215
236
|
from?: PromiseOrValue<string>;
|
|
216
237
|
}): Promise<ContractTransaction>;
|
|
@@ -219,16 +240,19 @@ export interface IRouterV3 extends BaseContract {
|
|
|
219
240
|
}): Promise<ContractTransaction>;
|
|
220
241
|
futureRouter(overrides?: CallOverrides): Promise<string>;
|
|
221
242
|
isRouterConfigurator(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<boolean>;
|
|
243
|
+
maxComponentId(overrides?: CallOverrides): Promise<number>;
|
|
222
244
|
tokenTypes(arg0: PromiseOrValue<string>, overrides?: CallOverrides): Promise<number>;
|
|
223
245
|
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
224
246
|
callStatic: {
|
|
225
247
|
componentAddressById(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
|
|
226
248
|
findAllSwaps(swapTask: SwapTaskStruct, slippage: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<RouterResultStructOutput[]>;
|
|
227
249
|
findBestClosePath(creditAccount: PromiseOrValue<string>, expectedBalances: BalanceStruct[], leftoverBalances: BalanceStruct[], connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, pathOptions: PathOptionStruct[], iterations: PromiseOrValue<BigNumberish>, force: PromiseOrValue<boolean>, overrides?: CallOverrides): Promise<RouterResultStructOutput>;
|
|
250
|
+
findOneTokenDiffPath(tokenIn: PromiseOrValue<string>, expectedBalance: PromiseOrValue<BigNumberish>, leftoverAmount: PromiseOrValue<BigNumberish>, tokenOut: PromiseOrValue<string>, creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<RouterResultStructOutput>;
|
|
228
251
|
findOneTokenPath(tokenIn: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, tokenOut: PromiseOrValue<string>, creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<RouterResultStructOutput>;
|
|
229
252
|
findOpenStrategyPath(creditManager: PromiseOrValue<string>, balances: BalanceStruct[], leftoverBalances: BalanceStruct[], target: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<[BalanceStructOutput[], RouterResultStructOutput]>;
|
|
230
253
|
futureRouter(overrides?: CallOverrides): Promise<string>;
|
|
231
254
|
isRouterConfigurator(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<boolean>;
|
|
255
|
+
maxComponentId(overrides?: CallOverrides): Promise<number>;
|
|
232
256
|
tokenTypes(arg0: PromiseOrValue<string>, overrides?: CallOverrides): Promise<number>;
|
|
233
257
|
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
234
258
|
};
|
|
@@ -250,6 +274,9 @@ export interface IRouterV3 extends BaseContract {
|
|
|
250
274
|
findBestClosePath(creditAccount: PromiseOrValue<string>, expectedBalances: BalanceStruct[], leftoverBalances: BalanceStruct[], connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, pathOptions: PathOptionStruct[], iterations: PromiseOrValue<BigNumberish>, force: PromiseOrValue<boolean>, overrides?: Overrides & {
|
|
251
275
|
from?: PromiseOrValue<string>;
|
|
252
276
|
}): Promise<BigNumber>;
|
|
277
|
+
findOneTokenDiffPath(tokenIn: PromiseOrValue<string>, expectedBalance: PromiseOrValue<BigNumberish>, leftoverAmount: PromiseOrValue<BigNumberish>, tokenOut: PromiseOrValue<string>, creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
278
|
+
from?: PromiseOrValue<string>;
|
|
279
|
+
}): Promise<BigNumber>;
|
|
253
280
|
findOneTokenPath(tokenIn: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, tokenOut: PromiseOrValue<string>, creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
254
281
|
from?: PromiseOrValue<string>;
|
|
255
282
|
}): Promise<BigNumber>;
|
|
@@ -258,6 +285,7 @@ export interface IRouterV3 extends BaseContract {
|
|
|
258
285
|
}): Promise<BigNumber>;
|
|
259
286
|
futureRouter(overrides?: CallOverrides): Promise<BigNumber>;
|
|
260
287
|
isRouterConfigurator(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
|
|
288
|
+
maxComponentId(overrides?: CallOverrides): Promise<BigNumber>;
|
|
261
289
|
tokenTypes(arg0: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
|
|
262
290
|
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
263
291
|
};
|
|
@@ -269,6 +297,9 @@ export interface IRouterV3 extends BaseContract {
|
|
|
269
297
|
findBestClosePath(creditAccount: PromiseOrValue<string>, expectedBalances: BalanceStruct[], leftoverBalances: BalanceStruct[], connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, pathOptions: PathOptionStruct[], iterations: PromiseOrValue<BigNumberish>, force: PromiseOrValue<boolean>, overrides?: Overrides & {
|
|
270
298
|
from?: PromiseOrValue<string>;
|
|
271
299
|
}): Promise<PopulatedTransaction>;
|
|
300
|
+
findOneTokenDiffPath(tokenIn: PromiseOrValue<string>, expectedBalance: PromiseOrValue<BigNumberish>, leftoverAmount: PromiseOrValue<BigNumberish>, tokenOut: PromiseOrValue<string>, creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
301
|
+
from?: PromiseOrValue<string>;
|
|
302
|
+
}): Promise<PopulatedTransaction>;
|
|
272
303
|
findOneTokenPath(tokenIn: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, tokenOut: PromiseOrValue<string>, creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
273
304
|
from?: PromiseOrValue<string>;
|
|
274
305
|
}): Promise<PopulatedTransaction>;
|
|
@@ -277,6 +308,7 @@ export interface IRouterV3 extends BaseContract {
|
|
|
277
308
|
}): Promise<PopulatedTransaction>;
|
|
278
309
|
futureRouter(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
279
310
|
isRouterConfigurator(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
311
|
+
maxComponentId(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
280
312
|
tokenTypes(arg0: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
281
313
|
version(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
282
314
|
};
|
|
@@ -180,6 +180,66 @@ export declare class IRouterV3__factory {
|
|
|
180
180
|
}];
|
|
181
181
|
}];
|
|
182
182
|
readonly stateMutability: "nonpayable";
|
|
183
|
+
}, {
|
|
184
|
+
readonly type: "function";
|
|
185
|
+
readonly name: "findOneTokenDiffPath";
|
|
186
|
+
readonly inputs: readonly [{
|
|
187
|
+
readonly name: "tokenIn";
|
|
188
|
+
readonly type: "address";
|
|
189
|
+
readonly internalType: "address";
|
|
190
|
+
}, {
|
|
191
|
+
readonly name: "expectedBalance";
|
|
192
|
+
readonly type: "uint256";
|
|
193
|
+
readonly internalType: "uint256";
|
|
194
|
+
}, {
|
|
195
|
+
readonly name: "leftoverAmount";
|
|
196
|
+
readonly type: "uint256";
|
|
197
|
+
readonly internalType: "uint256";
|
|
198
|
+
}, {
|
|
199
|
+
readonly name: "tokenOut";
|
|
200
|
+
readonly type: "address";
|
|
201
|
+
readonly internalType: "address";
|
|
202
|
+
}, {
|
|
203
|
+
readonly name: "creditAccount";
|
|
204
|
+
readonly type: "address";
|
|
205
|
+
readonly internalType: "address";
|
|
206
|
+
}, {
|
|
207
|
+
readonly name: "connectors";
|
|
208
|
+
readonly type: "address[]";
|
|
209
|
+
readonly internalType: "address[]";
|
|
210
|
+
}, {
|
|
211
|
+
readonly name: "slippage";
|
|
212
|
+
readonly type: "uint256";
|
|
213
|
+
readonly internalType: "uint256";
|
|
214
|
+
}];
|
|
215
|
+
readonly outputs: readonly [{
|
|
216
|
+
readonly name: "";
|
|
217
|
+
readonly type: "tuple";
|
|
218
|
+
readonly internalType: "struct RouterResult";
|
|
219
|
+
readonly components: readonly [{
|
|
220
|
+
readonly name: "amount";
|
|
221
|
+
readonly type: "uint256";
|
|
222
|
+
readonly internalType: "uint256";
|
|
223
|
+
}, {
|
|
224
|
+
readonly name: "minAmount";
|
|
225
|
+
readonly type: "uint256";
|
|
226
|
+
readonly internalType: "uint256";
|
|
227
|
+
}, {
|
|
228
|
+
readonly name: "calls";
|
|
229
|
+
readonly type: "tuple[]";
|
|
230
|
+
readonly internalType: "struct MultiCall[]";
|
|
231
|
+
readonly components: readonly [{
|
|
232
|
+
readonly name: "target";
|
|
233
|
+
readonly type: "address";
|
|
234
|
+
readonly internalType: "address";
|
|
235
|
+
}, {
|
|
236
|
+
readonly name: "callData";
|
|
237
|
+
readonly type: "bytes";
|
|
238
|
+
readonly internalType: "bytes";
|
|
239
|
+
}];
|
|
240
|
+
}];
|
|
241
|
+
}];
|
|
242
|
+
readonly stateMutability: "nonpayable";
|
|
183
243
|
}, {
|
|
184
244
|
readonly type: "function";
|
|
185
245
|
readonly name: "findOneTokenPath";
|
|
@@ -347,6 +407,16 @@ export declare class IRouterV3__factory {
|
|
|
347
407
|
readonly internalType: "bool";
|
|
348
408
|
}];
|
|
349
409
|
readonly stateMutability: "view";
|
|
410
|
+
}, {
|
|
411
|
+
readonly type: "function";
|
|
412
|
+
readonly name: "maxComponentId";
|
|
413
|
+
readonly inputs: readonly [];
|
|
414
|
+
readonly outputs: readonly [{
|
|
415
|
+
readonly name: "";
|
|
416
|
+
readonly type: "uint8";
|
|
417
|
+
readonly internalType: "uint8";
|
|
418
|
+
}];
|
|
419
|
+
readonly stateMutability: "view";
|
|
350
420
|
}, {
|
|
351
421
|
readonly type: "function";
|
|
352
422
|
readonly name: "tokenTypes";
|
|
@@ -239,6 +239,84 @@ const _abi = [
|
|
|
239
239
|
],
|
|
240
240
|
stateMutability: "nonpayable",
|
|
241
241
|
},
|
|
242
|
+
{
|
|
243
|
+
type: "function",
|
|
244
|
+
name: "findOneTokenDiffPath",
|
|
245
|
+
inputs: [
|
|
246
|
+
{
|
|
247
|
+
name: "tokenIn",
|
|
248
|
+
type: "address",
|
|
249
|
+
internalType: "address",
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: "expectedBalance",
|
|
253
|
+
type: "uint256",
|
|
254
|
+
internalType: "uint256",
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
name: "leftoverAmount",
|
|
258
|
+
type: "uint256",
|
|
259
|
+
internalType: "uint256",
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
name: "tokenOut",
|
|
263
|
+
type: "address",
|
|
264
|
+
internalType: "address",
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: "creditAccount",
|
|
268
|
+
type: "address",
|
|
269
|
+
internalType: "address",
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: "connectors",
|
|
273
|
+
type: "address[]",
|
|
274
|
+
internalType: "address[]",
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: "slippage",
|
|
278
|
+
type: "uint256",
|
|
279
|
+
internalType: "uint256",
|
|
280
|
+
},
|
|
281
|
+
],
|
|
282
|
+
outputs: [
|
|
283
|
+
{
|
|
284
|
+
name: "",
|
|
285
|
+
type: "tuple",
|
|
286
|
+
internalType: "struct RouterResult",
|
|
287
|
+
components: [
|
|
288
|
+
{
|
|
289
|
+
name: "amount",
|
|
290
|
+
type: "uint256",
|
|
291
|
+
internalType: "uint256",
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
name: "minAmount",
|
|
295
|
+
type: "uint256",
|
|
296
|
+
internalType: "uint256",
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
name: "calls",
|
|
300
|
+
type: "tuple[]",
|
|
301
|
+
internalType: "struct MultiCall[]",
|
|
302
|
+
components: [
|
|
303
|
+
{
|
|
304
|
+
name: "target",
|
|
305
|
+
type: "address",
|
|
306
|
+
internalType: "address",
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
name: "callData",
|
|
310
|
+
type: "bytes",
|
|
311
|
+
internalType: "bytes",
|
|
312
|
+
},
|
|
313
|
+
],
|
|
314
|
+
},
|
|
315
|
+
],
|
|
316
|
+
},
|
|
317
|
+
],
|
|
318
|
+
stateMutability: "nonpayable",
|
|
319
|
+
},
|
|
242
320
|
{
|
|
243
321
|
type: "function",
|
|
244
322
|
name: "findOneTokenPath",
|
|
@@ -458,6 +536,19 @@ const _abi = [
|
|
|
458
536
|
],
|
|
459
537
|
stateMutability: "view",
|
|
460
538
|
},
|
|
539
|
+
{
|
|
540
|
+
type: "function",
|
|
541
|
+
name: "maxComponentId",
|
|
542
|
+
inputs: [],
|
|
543
|
+
outputs: [
|
|
544
|
+
{
|
|
545
|
+
name: "",
|
|
546
|
+
type: "uint8",
|
|
547
|
+
internalType: "uint8",
|
|
548
|
+
},
|
|
549
|
+
],
|
|
550
|
+
stateMutability: "view",
|
|
551
|
+
},
|
|
461
552
|
{
|
|
462
553
|
type: "function",
|
|
463
554
|
name: "tokenTypes",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/sdk",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.144",
|
|
4
4
|
"description": "Gearbox SDK",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"test": "npx mocha -r ts-node/register -r dotenv/config 'src/**/*.spec.ts'"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@gearbox-protocol/sdk-gov": "^1.
|
|
33
|
+
"@gearbox-protocol/sdk-gov": "^1.44.0",
|
|
34
34
|
"axios": "^1.2.6",
|
|
35
35
|
"decimal.js-light": "^2.5.1",
|
|
36
36
|
"deep-eql": "^4.1.0",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"@commitlint/cli": "^17.6.3",
|
|
43
43
|
"@commitlint/config-conventional": "^17.0.3",
|
|
44
44
|
"@gearbox-protocol/core-v2": "1.19.0-base.17",
|
|
45
|
-
"@gearbox-protocol/core-v3": "^1.
|
|
45
|
+
"@gearbox-protocol/core-v3": "^1.48.1",
|
|
46
46
|
"@gearbox-protocol/eslint-config": "^1.4.1",
|
|
47
|
-
"@gearbox-protocol/integrations-v3": "^1.
|
|
48
|
-
"@gearbox-protocol/oracles-v3": "^1.10.
|
|
49
|
-
"@gearbox-protocol/periphery-v3": "^1.
|
|
47
|
+
"@gearbox-protocol/integrations-v3": "^1.39.1",
|
|
48
|
+
"@gearbox-protocol/oracles-v3": "^1.10.3",
|
|
49
|
+
"@gearbox-protocol/periphery-v3": "^1.6.1",
|
|
50
50
|
"@gearbox-protocol/prettier-config": "^1.4.1",
|
|
51
51
|
"@gearbox-protocol/router": "^1.5.5",
|
|
52
|
-
"@gearbox-protocol/router-v3": "^1.
|
|
52
|
+
"@gearbox-protocol/router-v3": "^1.19.1",
|
|
53
53
|
"@openzeppelin/contracts": "^4.9.3",
|
|
54
54
|
"@redstone-finance/evm-connector": "^0.3.6",
|
|
55
55
|
"@typechain/ethers-v5": "^10.1.0",
|