@gearbox-protocol/sdk 3.0.0-next.87 → 3.0.0-next.89
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/contracts/index.sol +1 -3
- package/lib/core/creditManager.d.ts +2 -0
- package/lib/core/creditManager.js +12 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/pathfinder/v1/core.d.ts +16 -0
- package/lib/pathfinder/v1/core.js +2 -0
- package/lib/pathfinder/v1/pathfinderv1.d.ts +46 -0
- package/lib/pathfinder/v1/pathfinderv1.js +155 -0
- package/lib/pathfinder/v1/pathfinderv1.spec.d.ts +1 -0
- package/lib/pathfinder/v1/pathfinderv1.spec.js +39 -0
- package/lib/types/IRouter.d.ts +278 -0
- package/lib/types/IRouter.js +2 -0
- package/lib/types/factories/IRouter__factory.d.ts +396 -0
- package/lib/types/factories/IRouter__factory.js +526 -0
- package/lib/types/factories/index.d.ts +1 -0
- package/lib/types/factories/index.js +3 -1
- package/lib/types/index.d.ts +14 -12
- package/lib/types/index.js +24 -22
- package/package.json +3 -2
package/contracts/index.sol
CHANGED
|
@@ -72,8 +72,6 @@ import {ICurveV1_4AssetsAdapter} from
|
|
|
72
72
|
"@gearbox-protocol/integrations-v3/contracts/interfaces/curve/ICurveV1_4AssetsAdapter.sol";
|
|
73
73
|
|
|
74
74
|
import {IRouterV3} from "@gearbox-protocol/router-v3/contracts/interfaces/IRouterV3.sol";
|
|
75
|
+
import {IRouter} from "@gearbox-protocol/router/contracts/interfaces/IRouter.sol";
|
|
75
76
|
|
|
76
77
|
import {IFarmingPool} from "@1inch/farming/contracts/interfaces/IFarmingPool.sol";
|
|
77
|
-
|
|
78
|
-
import {IFarmingPool} from "@1inch/farming/contracts/interfaces/IFarmingPool.sol";
|
|
79
|
-
|
|
@@ -17,6 +17,7 @@ export declare class CreditManagerData {
|
|
|
17
17
|
readonly forbiddenTokenMask: bigint;
|
|
18
18
|
readonly maxEnabledTokensLength: number;
|
|
19
19
|
readonly name: string;
|
|
20
|
+
readonly tier: number;
|
|
20
21
|
readonly baseBorrowRate: number;
|
|
21
22
|
readonly minDebt: bigint;
|
|
22
23
|
readonly maxDebt: bigint;
|
|
@@ -53,6 +54,7 @@ export declare class CreditManagerData {
|
|
|
53
54
|
encodeWithdrawCollateralV3(token: string, amount: bigint, to: string): MultiCall;
|
|
54
55
|
static withdrawAllAndUnwrap_Convex(address: string, claim: boolean): MultiCall;
|
|
55
56
|
encodeOnDemandPriceUpdateV3(token: string, reserve: boolean, data: string): MultiCall;
|
|
57
|
+
static getPoolTier(name: string): number;
|
|
56
58
|
}
|
|
57
59
|
export declare class ChartsCreditManagerData {
|
|
58
60
|
readonly address: string;
|
|
@@ -19,6 +19,7 @@ class CreditManagerData {
|
|
|
19
19
|
forbiddenTokenMask; // V2 only: mask which forbids some particular tokens
|
|
20
20
|
maxEnabledTokensLength;
|
|
21
21
|
name;
|
|
22
|
+
tier;
|
|
22
23
|
baseBorrowRate;
|
|
23
24
|
minDebt;
|
|
24
25
|
maxDebt;
|
|
@@ -42,6 +43,7 @@ class CreditManagerData {
|
|
|
42
43
|
this.type = pool_1.PoolData.getPoolType(payload.name || "");
|
|
43
44
|
this.name = payload.name;
|
|
44
45
|
this.pool = payload.pool.toLowerCase();
|
|
46
|
+
this.tier = CreditManagerData.getPoolTier(payload.name);
|
|
45
47
|
this.creditFacade = payload.creditFacade.toLowerCase();
|
|
46
48
|
this.creditConfigurator = payload.creditConfigurator.toLowerCase();
|
|
47
49
|
this.degenNFT = payload.degenNFT.toLowerCase();
|
|
@@ -212,6 +214,16 @@ class CreditManagerData {
|
|
|
212
214
|
callData: types_1.ICreditFacadeV3Multicall__factory.createInterface().encodeFunctionData("onDemandPriceUpdate", [token, reserve, data]),
|
|
213
215
|
};
|
|
214
216
|
}
|
|
217
|
+
static getPoolTier(name) {
|
|
218
|
+
const DEFAULT_TIER = 99;
|
|
219
|
+
const l = name.split(" ") || [];
|
|
220
|
+
const [word, number] = l.slice(-2);
|
|
221
|
+
if (word.toLowerCase() === "tier") {
|
|
222
|
+
const n = Number(number || DEFAULT_TIER);
|
|
223
|
+
return Number.isNaN(n) ? DEFAULT_TIER : n;
|
|
224
|
+
}
|
|
225
|
+
return DEFAULT_TIER;
|
|
226
|
+
}
|
|
215
227
|
}
|
|
216
228
|
exports.CreditManagerData = CreditManagerData;
|
|
217
229
|
class ChartsCreditManagerData {
|
package/lib/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from "./core/transactions";
|
|
|
19
19
|
export * from "./parsers/txParser";
|
|
20
20
|
export * from "./pathfinder/core";
|
|
21
21
|
export * from "./pathfinder/pathfinder";
|
|
22
|
+
export * from "./pathfinder/v1/pathfinderv1";
|
|
22
23
|
export * from "./payload/creditAccount";
|
|
23
24
|
export * from "./payload/creditManager";
|
|
24
25
|
export * from "./payload/creditSession";
|
package/lib/index.js
CHANGED
|
@@ -36,6 +36,7 @@ __exportStar(require("./core/transactions"), exports);
|
|
|
36
36
|
__exportStar(require("./parsers/txParser"), exports);
|
|
37
37
|
__exportStar(require("./pathfinder/core"), exports);
|
|
38
38
|
__exportStar(require("./pathfinder/pathfinder"), exports);
|
|
39
|
+
__exportStar(require("./pathfinder/v1/pathfinderv1"), exports);
|
|
39
40
|
__exportStar(require("./payload/creditAccount"), exports);
|
|
40
41
|
__exportStar(require("./payload/creditManager"), exports);
|
|
41
42
|
__exportStar(require("./payload/creditSession"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ExcludeArrayProps } from "@gearbox-protocol/sdk-gov";
|
|
2
|
+
import { SwapTaskStructOutput } from "../../types/IRouter";
|
|
3
|
+
import { MultiCall } from "../core";
|
|
4
|
+
export type SwapTaskV1 = ExcludeArrayProps<SwapTaskStructOutput>;
|
|
5
|
+
export interface PathFinderV1Result {
|
|
6
|
+
amount: bigint;
|
|
7
|
+
calls: Array<MultiCall>;
|
|
8
|
+
}
|
|
9
|
+
export interface PathFinderV1OpenStrategyResult {
|
|
10
|
+
balances: Record<string, bigint>;
|
|
11
|
+
calls: Array<MultiCall>;
|
|
12
|
+
}
|
|
13
|
+
export interface PathFinderV1CloseResult {
|
|
14
|
+
underlyingBalance: bigint;
|
|
15
|
+
calls: Array<MultiCall>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { NetworkType, SupportedToken } from "@gearbox-protocol/sdk-gov";
|
|
2
|
+
import { BigNumberish, providers, Signer } from "ethers";
|
|
3
|
+
import { CreditAccountData } from "../../core/creditAccount";
|
|
4
|
+
import { CreditManagerData } from "../../core/creditManager";
|
|
5
|
+
import { IRouter } from "../../types";
|
|
6
|
+
import { MultiCall, SwapOperation } from "../core";
|
|
7
|
+
import { PathFinderV1CloseResult, PathFinderV1OpenStrategyResult, PathFinderV1Result } from "./core";
|
|
8
|
+
export interface CloseResult {
|
|
9
|
+
amount: bigint;
|
|
10
|
+
calls: Array<MultiCall>;
|
|
11
|
+
gasUsage: bigint;
|
|
12
|
+
}
|
|
13
|
+
export declare class PathFinderV1 {
|
|
14
|
+
pathFinder: IRouter;
|
|
15
|
+
network: NetworkType;
|
|
16
|
+
static connectors: Array<SupportedToken>;
|
|
17
|
+
protected readonly _connectors: Array<string>;
|
|
18
|
+
constructor(address: string, provider: Signer | providers.Provider, network?: NetworkType, connectors?: SupportedToken[]);
|
|
19
|
+
findAllSwaps(creditAccount: CreditAccountData, swapOperation: SwapOperation, tokenIn: SupportedToken | string, tokenOut: SupportedToken | string, amount: BigNumberish, slippage: number): Promise<Array<PathFinderV1Result>>;
|
|
20
|
+
findOneTokenPath(creditAccount: CreditAccountData, tokenIn: SupportedToken | string, tokenOut: SupportedToken | string, amount: BigNumberish, slippage: number): Promise<PathFinderV1Result>;
|
|
21
|
+
/**
|
|
22
|
+
* @dev Finds the best path for opening credit account and converting all NORMAL tokens and LP token in the way to TARGET
|
|
23
|
+
* @param cm CreditManagerData which represents credit manager you want to use to open credit account
|
|
24
|
+
* @param expectedBalances Expected balances which would be on account accounting also debt. For example,
|
|
25
|
+
* if you open an USDC credit account, borrow 50_000 USDC and provide 10 WETH and 10_USDC as collateral
|
|
26
|
+
* from your own funds, expectedBalances should be: { "USDC": 60_000 * (10**6), "<address of WETH>": WAD.mul(10) }
|
|
27
|
+
*
|
|
28
|
+
* @param target Address of symbol of desired token
|
|
29
|
+
* @param slippage Slippage in PERCENTAGE_FORMAT (100% = 10_000) per operation
|
|
30
|
+
* @returns PathFinderOpenStrategyResult which
|
|
31
|
+
*/
|
|
32
|
+
findOpenStrategyPath(cm: CreditManagerData, expectedBalances: Record<SupportedToken | string, BigNumberish>, target: SupportedToken | string, slippage: number): Promise<PathFinderV1OpenStrategyResult>;
|
|
33
|
+
/**
|
|
34
|
+
* @dev Finds the path to swap / withdraw all assets from CreditAccount into underlying asset
|
|
35
|
+
* Can bu used for closing credit account and for liquidations as well.
|
|
36
|
+
* @param creditAccount CreditAccountData object used for close path computation
|
|
37
|
+
* @param slippage Slippage in PERCENTAGE_FORMAT (100% = 10_000) per operation
|
|
38
|
+
* @return The best option in PathFinderCloseResult format, which
|
|
39
|
+
* - underlyingBalance - total balance of underlying token
|
|
40
|
+
* - calls - list of calls which should be done to swap & unwrap everything to underlying token
|
|
41
|
+
*/
|
|
42
|
+
findBestClosePath(creditAccount: CreditAccountData, slippage: number, noConcurency?: boolean): Promise<PathFinderV1CloseResult>;
|
|
43
|
+
static compare(r1: CloseResult, r2: CloseResult, gasPriceRAY: bigint): CloseResult;
|
|
44
|
+
getAvailableConnectors(availableList: Record<string, bigint> | Record<string, true>): string[];
|
|
45
|
+
static getAvailableConnectors(availableList: Record<string, bigint> | Record<string, true>, connectors: string[]): string[];
|
|
46
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PathFinderV1 = void 0;
|
|
4
|
+
const sdk_gov_1 = require("@gearbox-protocol/sdk-gov");
|
|
5
|
+
const ethers_1 = require("ethers");
|
|
6
|
+
const types_1 = require("../../types");
|
|
7
|
+
const pathOptions_1 = require("../pathOptions");
|
|
8
|
+
const MAX_GAS_PER_ROUTE = 200e6;
|
|
9
|
+
const GAS_PER_BLOCK = 400e6;
|
|
10
|
+
class PathFinderV1 {
|
|
11
|
+
pathFinder;
|
|
12
|
+
network;
|
|
13
|
+
static connectors = [
|
|
14
|
+
"USDC",
|
|
15
|
+
"WETH",
|
|
16
|
+
"USDT",
|
|
17
|
+
"FRAX",
|
|
18
|
+
];
|
|
19
|
+
_connectors;
|
|
20
|
+
constructor(address, provider, network = "Mainnet", connectors = PathFinderV1.connectors) {
|
|
21
|
+
this.pathFinder = types_1.IRouter__factory.connect(address, provider);
|
|
22
|
+
this.network = network;
|
|
23
|
+
this._connectors = connectors
|
|
24
|
+
.map(c => sdk_gov_1.tokenDataByNetwork[this.network][c]?.toLowerCase())
|
|
25
|
+
.filter(t => !!t);
|
|
26
|
+
}
|
|
27
|
+
async findAllSwaps(creditAccount, swapOperation, tokenIn, tokenOut, amount, slippage) {
|
|
28
|
+
const connectors = this.getAvailableConnectors(creditAccount.balances);
|
|
29
|
+
const swapTask = {
|
|
30
|
+
swapOperation: swapOperation,
|
|
31
|
+
creditAccount: creditAccount.addr,
|
|
32
|
+
tokenIn: sdk_gov_1.tokenDataByNetwork[this.network][tokenIn] || tokenIn,
|
|
33
|
+
tokenOut: sdk_gov_1.tokenDataByNetwork[this.network][tokenOut] ||
|
|
34
|
+
tokenOut,
|
|
35
|
+
connectors,
|
|
36
|
+
amount: ethers_1.BigNumber.from(amount),
|
|
37
|
+
slippage: ethers_1.BigNumber.from(slippage),
|
|
38
|
+
externalSlippage: false,
|
|
39
|
+
};
|
|
40
|
+
const results = await this.pathFinder.callStatic.findAllSwaps(swapTask, {
|
|
41
|
+
gasLimit: GAS_PER_BLOCK,
|
|
42
|
+
});
|
|
43
|
+
const unique = {};
|
|
44
|
+
results.forEach(r => {
|
|
45
|
+
const key = `${r.amount.toHexString()}${r.calls
|
|
46
|
+
.map(c => `${c.target.toLowerCase()}${c.callData}`)
|
|
47
|
+
.join("-")}`;
|
|
48
|
+
unique[key] = {
|
|
49
|
+
amount: (0, sdk_gov_1.toBigInt)(r.amount),
|
|
50
|
+
calls: r.calls,
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
return Object.values(unique);
|
|
54
|
+
}
|
|
55
|
+
async findOneTokenPath(creditAccount, tokenIn, tokenOut, amount, slippage) {
|
|
56
|
+
const tokenInAddr = sdk_gov_1.tokenDataByNetwork[this.network][tokenIn] || tokenIn;
|
|
57
|
+
const connectors = this.getAvailableConnectors(creditAccount.balances);
|
|
58
|
+
const result = await this.pathFinder.callStatic.findOneTokenPath(tokenInAddr, amount, sdk_gov_1.tokenDataByNetwork[this.network][tokenOut] || tokenOut, creditAccount.addr, connectors, slippage, {
|
|
59
|
+
gasLimit: GAS_PER_BLOCK,
|
|
60
|
+
});
|
|
61
|
+
return {
|
|
62
|
+
amount: (0, sdk_gov_1.toBigInt)(result.amount),
|
|
63
|
+
calls: result.calls,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @dev Finds the best path for opening credit account and converting all NORMAL tokens and LP token in the way to TARGET
|
|
68
|
+
* @param cm CreditManagerData which represents credit manager you want to use to open credit account
|
|
69
|
+
* @param expectedBalances Expected balances which would be on account accounting also debt. For example,
|
|
70
|
+
* if you open an USDC credit account, borrow 50_000 USDC and provide 10 WETH and 10_USDC as collateral
|
|
71
|
+
* from your own funds, expectedBalances should be: { "USDC": 60_000 * (10**6), "<address of WETH>": WAD.mul(10) }
|
|
72
|
+
*
|
|
73
|
+
* @param target Address of symbol of desired token
|
|
74
|
+
* @param slippage Slippage in PERCENTAGE_FORMAT (100% = 10_000) per operation
|
|
75
|
+
* @returns PathFinderOpenStrategyResult which
|
|
76
|
+
*/
|
|
77
|
+
async findOpenStrategyPath(cm, expectedBalances, target, slippage) {
|
|
78
|
+
const targetAddr = sdk_gov_1.tokenDataByNetwork[this.network][target] || target;
|
|
79
|
+
const expectedBalancesAddr = Object.entries(expectedBalances).reduce((acc, [token, balance]) => {
|
|
80
|
+
const tokenAddr = sdk_gov_1.tokenDataByNetwork[this.network][token] || token;
|
|
81
|
+
acc[tokenAddr.toLowerCase()] = balance;
|
|
82
|
+
return acc;
|
|
83
|
+
}, {});
|
|
84
|
+
const balances = cm.collateralTokens.map(token => ({
|
|
85
|
+
token,
|
|
86
|
+
balance: expectedBalancesAddr[token] || 0,
|
|
87
|
+
}));
|
|
88
|
+
const connectors = this.getAvailableConnectors(cm.supportedTokens);
|
|
89
|
+
const result = await this.pathFinder.callStatic.findOpenStrategyPath(cm.address, balances, targetAddr, connectors, slippage, {
|
|
90
|
+
gasLimit: GAS_PER_BLOCK,
|
|
91
|
+
});
|
|
92
|
+
const balancesAfter = result[0].reduce((acc, b) => {
|
|
93
|
+
acc[b.token.toLowerCase()] = (0, sdk_gov_1.toBigInt)(b.balance);
|
|
94
|
+
return acc;
|
|
95
|
+
}, {});
|
|
96
|
+
return {
|
|
97
|
+
balances: balancesAfter,
|
|
98
|
+
calls: result[1].calls,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* @dev Finds the path to swap / withdraw all assets from CreditAccount into underlying asset
|
|
103
|
+
* Can bu used for closing credit account and for liquidations as well.
|
|
104
|
+
* @param creditAccount CreditAccountData object used for close path computation
|
|
105
|
+
* @param slippage Slippage in PERCENTAGE_FORMAT (100% = 10_000) per operation
|
|
106
|
+
* @return The best option in PathFinderCloseResult format, which
|
|
107
|
+
* - underlyingBalance - total balance of underlying token
|
|
108
|
+
* - calls - list of calls which should be done to swap & unwrap everything to underlying token
|
|
109
|
+
*/
|
|
110
|
+
async findBestClosePath(creditAccount, slippage, noConcurency = false) {
|
|
111
|
+
const loopsPerTx = Math.floor(GAS_PER_BLOCK / MAX_GAS_PER_ROUTE);
|
|
112
|
+
const pathOptions = pathOptions_1.PathOptionFactory.generatePathOptions(creditAccount.allBalances, loopsPerTx);
|
|
113
|
+
const connectors = this.getAvailableConnectors(creditAccount.balances);
|
|
114
|
+
let results = [];
|
|
115
|
+
if (noConcurency) {
|
|
116
|
+
for (const po of pathOptions) {
|
|
117
|
+
results.push(await this.pathFinder.callStatic.findBestClosePath(creditAccount.addr, connectors, slippage, po, loopsPerTx, false, {
|
|
118
|
+
gasLimit: GAS_PER_BLOCK,
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
const requests = pathOptions.map(po => this.pathFinder.callStatic.findBestClosePath(creditAccount.addr, connectors, slippage, po, loopsPerTx, false, {
|
|
124
|
+
gasLimit: GAS_PER_BLOCK,
|
|
125
|
+
}));
|
|
126
|
+
results = await Promise.all(requests);
|
|
127
|
+
}
|
|
128
|
+
const bestResult = results.reduce((best, [pathFinderResult, gasPriceRAY]) => PathFinderV1.compare(best, {
|
|
129
|
+
calls: pathFinderResult.calls,
|
|
130
|
+
amount: (0, sdk_gov_1.toBigInt)(pathFinderResult.amount),
|
|
131
|
+
gasUsage: (0, sdk_gov_1.toBigInt)(pathFinderResult.gasUsage),
|
|
132
|
+
}, (0, sdk_gov_1.toBigInt)(gasPriceRAY)), {
|
|
133
|
+
amount: 0n,
|
|
134
|
+
gasUsage: 0n,
|
|
135
|
+
calls: [],
|
|
136
|
+
});
|
|
137
|
+
return {
|
|
138
|
+
underlyingBalance: bestResult.amount +
|
|
139
|
+
creditAccount.allBalances[creditAccount.underlyingToken.toLowerCase()]
|
|
140
|
+
.balance,
|
|
141
|
+
calls: bestResult.calls,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
static compare(r1, r2, gasPriceRAY) {
|
|
145
|
+
const comparator = ({ amount, gasUsage }, gasPrice) => amount - (gasUsage * gasPrice) / sdk_gov_1.RAY;
|
|
146
|
+
return comparator(r1, gasPriceRAY) > comparator(r2, gasPriceRAY) ? r1 : r2;
|
|
147
|
+
}
|
|
148
|
+
getAvailableConnectors(availableList) {
|
|
149
|
+
return PathFinderV1.getAvailableConnectors(availableList, this._connectors);
|
|
150
|
+
}
|
|
151
|
+
static getAvailableConnectors(availableList, connectors) {
|
|
152
|
+
return connectors.filter(t => availableList[t] !== undefined);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
exports.PathFinderV1 = PathFinderV1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sdk_gov_1 = require("@gearbox-protocol/sdk-gov");
|
|
4
|
+
const chai_1 = require("chai");
|
|
5
|
+
const ethers_1 = require("ethers");
|
|
6
|
+
const pathfinderv1_1 = require("./pathfinderv1");
|
|
7
|
+
describe("PathFinderV1 test", () => {
|
|
8
|
+
it("compare works correctly", () => {
|
|
9
|
+
const r1 = {
|
|
10
|
+
amount: 2000n,
|
|
11
|
+
gasUsage: 1000n,
|
|
12
|
+
calls: [],
|
|
13
|
+
};
|
|
14
|
+
const r2 = {
|
|
15
|
+
amount: 3000n,
|
|
16
|
+
gasUsage: 2000n,
|
|
17
|
+
calls: [],
|
|
18
|
+
};
|
|
19
|
+
let result = pathfinderv1_1.PathFinderV1.compare(r1, r2, sdk_gov_1.RAY);
|
|
20
|
+
(0, chai_1.expect)(result).to.be.eql(r2);
|
|
21
|
+
result = pathfinderv1_1.PathFinderV1.compare(r1, r2, sdk_gov_1.RAY * 2n);
|
|
22
|
+
(0, chai_1.expect)(result).to.be.eql(r1);
|
|
23
|
+
});
|
|
24
|
+
it("has all expected connectors", () => {
|
|
25
|
+
const pf = new pathfinderv1_1.PathFinderV1("", new ethers_1.providers.JsonRpcProvider(), "Mainnet");
|
|
26
|
+
const allowedTokens = {
|
|
27
|
+
[sdk_gov_1.tokenDataByNetwork.Mainnet.USDC.toLowerCase()]: true,
|
|
28
|
+
[sdk_gov_1.tokenDataByNetwork.Mainnet.WETH.toLowerCase()]: true,
|
|
29
|
+
[sdk_gov_1.tokenDataByNetwork.Mainnet.USDT.toLowerCase()]: true,
|
|
30
|
+
[sdk_gov_1.tokenDataByNetwork.Mainnet.FRAX.toLowerCase()]: true,
|
|
31
|
+
};
|
|
32
|
+
(0, chai_1.expect)(pf.getAvailableConnectors(allowedTokens)).to.be.deep.equal([
|
|
33
|
+
sdk_gov_1.tokenDataByNetwork.Mainnet.USDC.toLowerCase(),
|
|
34
|
+
sdk_gov_1.tokenDataByNetwork.Mainnet.WETH.toLowerCase(),
|
|
35
|
+
sdk_gov_1.tokenDataByNetwork.Mainnet.USDT.toLowerCase(),
|
|
36
|
+
sdk_gov_1.tokenDataByNetwork.Mainnet.FRAX.toLowerCase(),
|
|
37
|
+
]);
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
2
|
+
import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi";
|
|
3
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from "./common";
|
|
5
|
+
export type SwapTaskStruct = {
|
|
6
|
+
swapOperation: PromiseOrValue<BigNumberish>;
|
|
7
|
+
creditAccount: PromiseOrValue<string>;
|
|
8
|
+
tokenIn: PromiseOrValue<string>;
|
|
9
|
+
tokenOut: PromiseOrValue<string>;
|
|
10
|
+
connectors: PromiseOrValue<string>[];
|
|
11
|
+
amount: PromiseOrValue<BigNumberish>;
|
|
12
|
+
slippage: PromiseOrValue<BigNumberish>;
|
|
13
|
+
externalSlippage: PromiseOrValue<boolean>;
|
|
14
|
+
};
|
|
15
|
+
export type SwapTaskStructOutput = [
|
|
16
|
+
number,
|
|
17
|
+
string,
|
|
18
|
+
string,
|
|
19
|
+
string,
|
|
20
|
+
string[],
|
|
21
|
+
BigNumber,
|
|
22
|
+
BigNumber,
|
|
23
|
+
boolean
|
|
24
|
+
] & {
|
|
25
|
+
swapOperation: number;
|
|
26
|
+
creditAccount: string;
|
|
27
|
+
tokenIn: string;
|
|
28
|
+
tokenOut: string;
|
|
29
|
+
connectors: string[];
|
|
30
|
+
amount: BigNumber;
|
|
31
|
+
slippage: BigNumber;
|
|
32
|
+
externalSlippage: boolean;
|
|
33
|
+
};
|
|
34
|
+
export type MultiCallStruct = {
|
|
35
|
+
target: PromiseOrValue<string>;
|
|
36
|
+
callData: PromiseOrValue<BytesLike>;
|
|
37
|
+
};
|
|
38
|
+
export type MultiCallStructOutput = [string, string] & {
|
|
39
|
+
target: string;
|
|
40
|
+
callData: string;
|
|
41
|
+
};
|
|
42
|
+
export type RouterResultStruct = {
|
|
43
|
+
amount: PromiseOrValue<BigNumberish>;
|
|
44
|
+
gasUsage: PromiseOrValue<BigNumberish>;
|
|
45
|
+
calls: MultiCallStruct[];
|
|
46
|
+
};
|
|
47
|
+
export type RouterResultStructOutput = [
|
|
48
|
+
BigNumber,
|
|
49
|
+
BigNumber,
|
|
50
|
+
MultiCallStructOutput[]
|
|
51
|
+
] & {
|
|
52
|
+
amount: BigNumber;
|
|
53
|
+
gasUsage: BigNumber;
|
|
54
|
+
calls: MultiCallStructOutput[];
|
|
55
|
+
};
|
|
56
|
+
export type PathOptionStruct = {
|
|
57
|
+
target: PromiseOrValue<string>;
|
|
58
|
+
option: PromiseOrValue<BigNumberish>;
|
|
59
|
+
totalOptions: PromiseOrValue<BigNumberish>;
|
|
60
|
+
};
|
|
61
|
+
export type PathOptionStructOutput = [string, number, number] & {
|
|
62
|
+
target: string;
|
|
63
|
+
option: number;
|
|
64
|
+
totalOptions: number;
|
|
65
|
+
};
|
|
66
|
+
export type BalanceStruct = {
|
|
67
|
+
token: PromiseOrValue<string>;
|
|
68
|
+
balance: PromiseOrValue<BigNumberish>;
|
|
69
|
+
};
|
|
70
|
+
export type BalanceStructOutput = [string, BigNumber] & {
|
|
71
|
+
token: string;
|
|
72
|
+
balance: BigNumber;
|
|
73
|
+
};
|
|
74
|
+
export interface IRouterInterface extends utils.Interface {
|
|
75
|
+
functions: {
|
|
76
|
+
"componentAddressById(uint8)": FunctionFragment;
|
|
77
|
+
"findAllSwaps((uint8,address,address,address,address[],uint256,uint256,bool))": FunctionFragment;
|
|
78
|
+
"findBestClosePath(address,address[],uint256,(address,uint8,uint8)[],uint256,bool)": FunctionFragment;
|
|
79
|
+
"findOneTokenPath(address,uint256,address,address,address[],uint256)": FunctionFragment;
|
|
80
|
+
"findOpenStrategyPath(address,(address,uint256)[],address,address[],uint256)": FunctionFragment;
|
|
81
|
+
"getGasPriceTokenOutRAY(address)": FunctionFragment;
|
|
82
|
+
"isRouterConfigurator(address)": FunctionFragment;
|
|
83
|
+
"tokenTypes(address)": FunctionFragment;
|
|
84
|
+
"version()": FunctionFragment;
|
|
85
|
+
};
|
|
86
|
+
getFunction(nameOrSignatureOrTopic: "componentAddressById" | "findAllSwaps" | "findBestClosePath" | "findOneTokenPath" | "findOpenStrategyPath" | "getGasPriceTokenOutRAY" | "isRouterConfigurator" | "tokenTypes" | "version"): FunctionFragment;
|
|
87
|
+
encodeFunctionData(functionFragment: "componentAddressById", values: [PromiseOrValue<BigNumberish>]): string;
|
|
88
|
+
encodeFunctionData(functionFragment: "findAllSwaps", values: [SwapTaskStruct]): string;
|
|
89
|
+
encodeFunctionData(functionFragment: "findBestClosePath", values: [
|
|
90
|
+
PromiseOrValue<string>,
|
|
91
|
+
PromiseOrValue<string>[],
|
|
92
|
+
PromiseOrValue<BigNumberish>,
|
|
93
|
+
PathOptionStruct[],
|
|
94
|
+
PromiseOrValue<BigNumberish>,
|
|
95
|
+
PromiseOrValue<boolean>
|
|
96
|
+
]): string;
|
|
97
|
+
encodeFunctionData(functionFragment: "findOneTokenPath", values: [
|
|
98
|
+
PromiseOrValue<string>,
|
|
99
|
+
PromiseOrValue<BigNumberish>,
|
|
100
|
+
PromiseOrValue<string>,
|
|
101
|
+
PromiseOrValue<string>,
|
|
102
|
+
PromiseOrValue<string>[],
|
|
103
|
+
PromiseOrValue<BigNumberish>
|
|
104
|
+
]): string;
|
|
105
|
+
encodeFunctionData(functionFragment: "findOpenStrategyPath", values: [
|
|
106
|
+
PromiseOrValue<string>,
|
|
107
|
+
BalanceStruct[],
|
|
108
|
+
PromiseOrValue<string>,
|
|
109
|
+
PromiseOrValue<string>[],
|
|
110
|
+
PromiseOrValue<BigNumberish>
|
|
111
|
+
]): string;
|
|
112
|
+
encodeFunctionData(functionFragment: "getGasPriceTokenOutRAY", values: [PromiseOrValue<string>]): string;
|
|
113
|
+
encodeFunctionData(functionFragment: "isRouterConfigurator", values: [PromiseOrValue<string>]): string;
|
|
114
|
+
encodeFunctionData(functionFragment: "tokenTypes", values: [PromiseOrValue<string>]): string;
|
|
115
|
+
encodeFunctionData(functionFragment: "version", values?: undefined): string;
|
|
116
|
+
decodeFunctionResult(functionFragment: "componentAddressById", data: BytesLike): Result;
|
|
117
|
+
decodeFunctionResult(functionFragment: "findAllSwaps", data: BytesLike): Result;
|
|
118
|
+
decodeFunctionResult(functionFragment: "findBestClosePath", data: BytesLike): Result;
|
|
119
|
+
decodeFunctionResult(functionFragment: "findOneTokenPath", data: BytesLike): Result;
|
|
120
|
+
decodeFunctionResult(functionFragment: "findOpenStrategyPath", data: BytesLike): Result;
|
|
121
|
+
decodeFunctionResult(functionFragment: "getGasPriceTokenOutRAY", data: BytesLike): Result;
|
|
122
|
+
decodeFunctionResult(functionFragment: "isRouterConfigurator", data: BytesLike): Result;
|
|
123
|
+
decodeFunctionResult(functionFragment: "tokenTypes", data: BytesLike): Result;
|
|
124
|
+
decodeFunctionResult(functionFragment: "version", data: BytesLike): Result;
|
|
125
|
+
events: {
|
|
126
|
+
"ResolverUpdate(uint8,uint8,uint8)": EventFragment;
|
|
127
|
+
"RouterComponentUpdate(uint8,address)": EventFragment;
|
|
128
|
+
"TokenTypeUpdate(address,uint8)": EventFragment;
|
|
129
|
+
};
|
|
130
|
+
getEvent(nameOrSignatureOrTopic: "ResolverUpdate"): EventFragment;
|
|
131
|
+
getEvent(nameOrSignatureOrTopic: "RouterComponentUpdate"): EventFragment;
|
|
132
|
+
getEvent(nameOrSignatureOrTopic: "TokenTypeUpdate"): EventFragment;
|
|
133
|
+
}
|
|
134
|
+
export interface ResolverUpdateEventObject {
|
|
135
|
+
ttIn: number;
|
|
136
|
+
ttOut: number;
|
|
137
|
+
rc: number;
|
|
138
|
+
}
|
|
139
|
+
export type ResolverUpdateEvent = TypedEvent<[
|
|
140
|
+
number,
|
|
141
|
+
number,
|
|
142
|
+
number
|
|
143
|
+
], ResolverUpdateEventObject>;
|
|
144
|
+
export type ResolverUpdateEventFilter = TypedEventFilter<ResolverUpdateEvent>;
|
|
145
|
+
export interface RouterComponentUpdateEventObject {
|
|
146
|
+
arg0: number;
|
|
147
|
+
arg1: string;
|
|
148
|
+
}
|
|
149
|
+
export type RouterComponentUpdateEvent = TypedEvent<[
|
|
150
|
+
number,
|
|
151
|
+
string
|
|
152
|
+
], RouterComponentUpdateEventObject>;
|
|
153
|
+
export type RouterComponentUpdateEventFilter = TypedEventFilter<RouterComponentUpdateEvent>;
|
|
154
|
+
export interface TokenTypeUpdateEventObject {
|
|
155
|
+
tokenAddress: string;
|
|
156
|
+
tt: number;
|
|
157
|
+
}
|
|
158
|
+
export type TokenTypeUpdateEvent = TypedEvent<[
|
|
159
|
+
string,
|
|
160
|
+
number
|
|
161
|
+
], TokenTypeUpdateEventObject>;
|
|
162
|
+
export type TokenTypeUpdateEventFilter = TypedEventFilter<TokenTypeUpdateEvent>;
|
|
163
|
+
export interface IRouter extends BaseContract {
|
|
164
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
165
|
+
attach(addressOrName: string): this;
|
|
166
|
+
deployed(): Promise<this>;
|
|
167
|
+
interface: IRouterInterface;
|
|
168
|
+
queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
|
|
169
|
+
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
|
170
|
+
listeners(eventName?: string): Array<Listener>;
|
|
171
|
+
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
|
172
|
+
removeAllListeners(eventName?: string): this;
|
|
173
|
+
off: OnEvent<this>;
|
|
174
|
+
on: OnEvent<this>;
|
|
175
|
+
once: OnEvent<this>;
|
|
176
|
+
removeListener: OnEvent<this>;
|
|
177
|
+
functions: {
|
|
178
|
+
componentAddressById(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<[string]>;
|
|
179
|
+
findAllSwaps(swapTask: SwapTaskStruct, overrides?: Overrides & {
|
|
180
|
+
from?: PromiseOrValue<string>;
|
|
181
|
+
}): Promise<ContractTransaction>;
|
|
182
|
+
findBestClosePath(creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, pathOptions: PathOptionStruct[], iterations: PromiseOrValue<BigNumberish>, force: PromiseOrValue<boolean>, overrides?: Overrides & {
|
|
183
|
+
from?: PromiseOrValue<string>;
|
|
184
|
+
}): Promise<ContractTransaction>;
|
|
185
|
+
findOneTokenPath(tokenIn: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, tokenOut: PromiseOrValue<string>, creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
186
|
+
from?: PromiseOrValue<string>;
|
|
187
|
+
}): Promise<ContractTransaction>;
|
|
188
|
+
findOpenStrategyPath(creditManager: PromiseOrValue<string>, balances: BalanceStruct[], target: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
189
|
+
from?: PromiseOrValue<string>;
|
|
190
|
+
}): Promise<ContractTransaction>;
|
|
191
|
+
getGasPriceTokenOutRAY(token: PromiseOrValue<string>, overrides?: CallOverrides): Promise<[BigNumber] & {
|
|
192
|
+
gasPrice: BigNumber;
|
|
193
|
+
}>;
|
|
194
|
+
isRouterConfigurator(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<[boolean]>;
|
|
195
|
+
tokenTypes(arg0: PromiseOrValue<string>, overrides?: CallOverrides): Promise<[number]>;
|
|
196
|
+
version(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
197
|
+
};
|
|
198
|
+
componentAddressById(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
|
|
199
|
+
findAllSwaps(swapTask: SwapTaskStruct, overrides?: Overrides & {
|
|
200
|
+
from?: PromiseOrValue<string>;
|
|
201
|
+
}): Promise<ContractTransaction>;
|
|
202
|
+
findBestClosePath(creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, pathOptions: PathOptionStruct[], iterations: PromiseOrValue<BigNumberish>, force: PromiseOrValue<boolean>, overrides?: Overrides & {
|
|
203
|
+
from?: PromiseOrValue<string>;
|
|
204
|
+
}): Promise<ContractTransaction>;
|
|
205
|
+
findOneTokenPath(tokenIn: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, tokenOut: PromiseOrValue<string>, creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
206
|
+
from?: PromiseOrValue<string>;
|
|
207
|
+
}): Promise<ContractTransaction>;
|
|
208
|
+
findOpenStrategyPath(creditManager: PromiseOrValue<string>, balances: BalanceStruct[], target: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
209
|
+
from?: PromiseOrValue<string>;
|
|
210
|
+
}): Promise<ContractTransaction>;
|
|
211
|
+
getGasPriceTokenOutRAY(token: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
|
|
212
|
+
isRouterConfigurator(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<boolean>;
|
|
213
|
+
tokenTypes(arg0: PromiseOrValue<string>, overrides?: CallOverrides): Promise<number>;
|
|
214
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
215
|
+
callStatic: {
|
|
216
|
+
componentAddressById(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
|
|
217
|
+
findAllSwaps(swapTask: SwapTaskStruct, overrides?: CallOverrides): Promise<RouterResultStructOutput[]>;
|
|
218
|
+
findBestClosePath(creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, pathOptions: PathOptionStruct[], iterations: PromiseOrValue<BigNumberish>, force: PromiseOrValue<boolean>, overrides?: CallOverrides): Promise<[
|
|
219
|
+
RouterResultStructOutput,
|
|
220
|
+
BigNumber
|
|
221
|
+
] & {
|
|
222
|
+
result: RouterResultStructOutput;
|
|
223
|
+
gasPriceTargetRAY: BigNumber;
|
|
224
|
+
}>;
|
|
225
|
+
findOneTokenPath(tokenIn: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, tokenOut: PromiseOrValue<string>, creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<RouterResultStructOutput>;
|
|
226
|
+
findOpenStrategyPath(creditManager: PromiseOrValue<string>, balances: BalanceStruct[], target: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<[BalanceStructOutput[], RouterResultStructOutput]>;
|
|
227
|
+
getGasPriceTokenOutRAY(token: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
|
|
228
|
+
isRouterConfigurator(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<boolean>;
|
|
229
|
+
tokenTypes(arg0: PromiseOrValue<string>, overrides?: CallOverrides): Promise<number>;
|
|
230
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
231
|
+
};
|
|
232
|
+
filters: {
|
|
233
|
+
"ResolverUpdate(uint8,uint8,uint8)"(ttIn?: PromiseOrValue<BigNumberish> | null, ttOut?: PromiseOrValue<BigNumberish> | null, rc?: PromiseOrValue<BigNumberish> | null): ResolverUpdateEventFilter;
|
|
234
|
+
ResolverUpdate(ttIn?: PromiseOrValue<BigNumberish> | null, ttOut?: PromiseOrValue<BigNumberish> | null, rc?: PromiseOrValue<BigNumberish> | null): ResolverUpdateEventFilter;
|
|
235
|
+
"RouterComponentUpdate(uint8,address)"(arg0?: PromiseOrValue<BigNumberish> | null, arg1?: PromiseOrValue<string> | null): RouterComponentUpdateEventFilter;
|
|
236
|
+
RouterComponentUpdate(arg0?: PromiseOrValue<BigNumberish> | null, arg1?: PromiseOrValue<string> | null): RouterComponentUpdateEventFilter;
|
|
237
|
+
"TokenTypeUpdate(address,uint8)"(tokenAddress?: PromiseOrValue<string> | null, tt?: PromiseOrValue<BigNumberish> | null): TokenTypeUpdateEventFilter;
|
|
238
|
+
TokenTypeUpdate(tokenAddress?: PromiseOrValue<string> | null, tt?: PromiseOrValue<BigNumberish> | null): TokenTypeUpdateEventFilter;
|
|
239
|
+
};
|
|
240
|
+
estimateGas: {
|
|
241
|
+
componentAddressById(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<BigNumber>;
|
|
242
|
+
findAllSwaps(swapTask: SwapTaskStruct, overrides?: Overrides & {
|
|
243
|
+
from?: PromiseOrValue<string>;
|
|
244
|
+
}): Promise<BigNumber>;
|
|
245
|
+
findBestClosePath(creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, pathOptions: PathOptionStruct[], iterations: PromiseOrValue<BigNumberish>, force: PromiseOrValue<boolean>, overrides?: Overrides & {
|
|
246
|
+
from?: PromiseOrValue<string>;
|
|
247
|
+
}): Promise<BigNumber>;
|
|
248
|
+
findOneTokenPath(tokenIn: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, tokenOut: PromiseOrValue<string>, creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
249
|
+
from?: PromiseOrValue<string>;
|
|
250
|
+
}): Promise<BigNumber>;
|
|
251
|
+
findOpenStrategyPath(creditManager: PromiseOrValue<string>, balances: BalanceStruct[], target: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
252
|
+
from?: PromiseOrValue<string>;
|
|
253
|
+
}): Promise<BigNumber>;
|
|
254
|
+
getGasPriceTokenOutRAY(token: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
|
|
255
|
+
isRouterConfigurator(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
|
|
256
|
+
tokenTypes(arg0: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
|
|
257
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
258
|
+
};
|
|
259
|
+
populateTransaction: {
|
|
260
|
+
componentAddressById(arg0: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
261
|
+
findAllSwaps(swapTask: SwapTaskStruct, overrides?: Overrides & {
|
|
262
|
+
from?: PromiseOrValue<string>;
|
|
263
|
+
}): Promise<PopulatedTransaction>;
|
|
264
|
+
findBestClosePath(creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, pathOptions: PathOptionStruct[], iterations: PromiseOrValue<BigNumberish>, force: PromiseOrValue<boolean>, overrides?: Overrides & {
|
|
265
|
+
from?: PromiseOrValue<string>;
|
|
266
|
+
}): Promise<PopulatedTransaction>;
|
|
267
|
+
findOneTokenPath(tokenIn: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, tokenOut: PromiseOrValue<string>, creditAccount: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
268
|
+
from?: PromiseOrValue<string>;
|
|
269
|
+
}): Promise<PopulatedTransaction>;
|
|
270
|
+
findOpenStrategyPath(creditManager: PromiseOrValue<string>, balances: BalanceStruct[], target: PromiseOrValue<string>, connectors: PromiseOrValue<string>[], slippage: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
271
|
+
from?: PromiseOrValue<string>;
|
|
272
|
+
}): Promise<PopulatedTransaction>;
|
|
273
|
+
getGasPriceTokenOutRAY(token: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
274
|
+
isRouterConfigurator(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
275
|
+
tokenTypes(arg0: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
276
|
+
version(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
277
|
+
};
|
|
278
|
+
}
|