@gearbox-protocol/sdk 3.0.0-next.165 → 3.0.0-next.167
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 +2 -0
- package/lib/core/bot.d.ts +11 -0
- package/lib/core/bot.js +23 -0
- package/lib/core/creditAccount.d.ts +1 -1
- package/lib/core/creditAccount.js +1 -1
- package/lib/core/transactions.d.ts +19 -1
- package/lib/core/transactions.js +43 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/payload/bot.d.ts +13 -0
- package/lib/payload/bot.js +2 -0
- package/lib/types/ContractsRegisterTrait.d.ts +42 -0
- package/lib/types/ContractsRegisterTrait.js +2 -0
- package/lib/types/ICreditAccountV3.sol/ICreditAccountBase.d.ts +86 -0
- package/lib/types/ICreditAccountV3.sol/ICreditAccountBase.js +2 -0
- package/lib/types/ICreditAccountV3.sol/ICreditAccountV3.d.ts +110 -0
- package/lib/types/ICreditAccountV3.sol/ICreditAccountV3.js +2 -0
- package/lib/types/ICreditAccountV3.sol/index.d.ts +2 -0
- package/lib/types/ICreditAccountV3.sol/index.js +2 -0
- package/lib/types/IPartialLiquidationBotV3.d.ts +163 -0
- package/lib/types/IPartialLiquidationBotV3.js +2 -0
- package/lib/types/PartialLiquidationBotV3.d.ts +171 -0
- package/lib/types/PartialLiquidationBotV3.js +2 -0
- package/lib/types/factories/ContractsRegisterTrait__factory.d.ts +22 -0
- package/lib/types/factories/ContractsRegisterTrait__factory.js +37 -0
- package/lib/types/factories/ICreditAccountV3.sol/ICreditAccountBase__factory.d.ts +64 -0
- package/lib/types/factories/ICreditAccountV3.sol/ICreditAccountBase__factory.js +92 -0
- package/lib/types/factories/ICreditAccountV3.sol/ICreditAccountV3__factory.d.ts +88 -0
- package/lib/types/factories/ICreditAccountV3.sol/ICreditAccountV3__factory.js +123 -0
- package/lib/types/factories/ICreditAccountV3.sol/index.d.ts +2 -0
- package/lib/types/factories/ICreditAccountV3.sol/index.js +10 -0
- package/lib/types/factories/IPartialLiquidationBotV3__factory.d.ts +217 -0
- package/lib/types/factories/IPartialLiquidationBotV3__factory.js +287 -0
- package/lib/types/factories/PartialLiquidationBotV3__factory.d.ts +284 -0
- package/lib/types/factories/PartialLiquidationBotV3__factory.js +379 -0
- package/lib/types/factories/index.d.ts +4 -0
- package/lib/types/factories/index.js +9 -2
- package/lib/types/index.d.ts +12 -0
- package/lib/types/index.js +13 -3
- package/package.json +6 -5
package/contracts/index.sol
CHANGED
|
@@ -76,3 +76,5 @@ import {IRouterV3} from "@gearbox-protocol/router-v3/contracts/interfaces/IRoute
|
|
|
76
76
|
import {IRouter} from "@gearbox-protocol/router/contracts/interfaces/IRouter.sol";
|
|
77
77
|
|
|
78
78
|
import {IFarmingPool} from "@1inch/farming/contracts/interfaces/IFarmingPool.sol";
|
|
79
|
+
|
|
80
|
+
import {PartialLiquidationBotV3} from "@gearbox-protocol/bots-v3/contracts/bots/PartialLiquidationBotV3.sol";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BotBaseType, BotDataPayload, BotDetailedType } from "../payload/bot";
|
|
2
|
+
export declare class BotData {
|
|
3
|
+
readonly address: string;
|
|
4
|
+
readonly baseType: BotBaseType;
|
|
5
|
+
readonly detailedType: BotDetailedType;
|
|
6
|
+
readonly minHealthFactor: bigint;
|
|
7
|
+
readonly maxHealthFactor: bigint;
|
|
8
|
+
readonly premiumScaleFactor: bigint;
|
|
9
|
+
readonly feeScaleFactor: bigint;
|
|
10
|
+
constructor(payload: BotDataPayload);
|
|
11
|
+
}
|
package/lib/core/bot.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BotData = void 0;
|
|
4
|
+
const sdk_gov_1 = require("@gearbox-protocol/sdk-gov");
|
|
5
|
+
class BotData {
|
|
6
|
+
address;
|
|
7
|
+
baseType;
|
|
8
|
+
detailedType;
|
|
9
|
+
minHealthFactor;
|
|
10
|
+
maxHealthFactor;
|
|
11
|
+
premiumScaleFactor;
|
|
12
|
+
feeScaleFactor;
|
|
13
|
+
constructor(payload) {
|
|
14
|
+
this.address = payload.address.toLowerCase();
|
|
15
|
+
this.baseType = payload.baseType;
|
|
16
|
+
this.detailedType = payload.detailedType;
|
|
17
|
+
this.minHealthFactor = (0, sdk_gov_1.toBigInt)(payload.minHealthFactor);
|
|
18
|
+
this.maxHealthFactor = (0, sdk_gov_1.toBigInt)(payload.maxHealthFactor);
|
|
19
|
+
this.premiumScaleFactor = (0, sdk_gov_1.toBigInt)(payload.premiumScaleFactor);
|
|
20
|
+
this.feeScaleFactor = (0, sdk_gov_1.toBigInt)(payload.feeScaleFactor);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.BotData = BotData;
|
|
@@ -101,7 +101,7 @@ export declare class CreditAccountData {
|
|
|
101
101
|
readonly twvUSD: bigint;
|
|
102
102
|
readonly cumulativeIndexLastUpdate: bigint;
|
|
103
103
|
readonly cumulativeQuotaInterest: bigint;
|
|
104
|
-
readonly activeBots: string
|
|
104
|
+
readonly activeBots: Record<string, true>;
|
|
105
105
|
readonly balances: Record<string, bigint>;
|
|
106
106
|
readonly collateralTokens: Array<string>;
|
|
107
107
|
readonly allBalances: Record<string, CaTokenBalance>;
|
|
@@ -73,7 +73,7 @@ class CreditAccountData {
|
|
|
73
73
|
sdk_gov_1.PERCENTAGE_FACTOR);
|
|
74
74
|
this.cumulativeIndexLastUpdate = (0, sdk_gov_1.toBigInt)(payload.cumulativeIndexLastUpdate);
|
|
75
75
|
this.cumulativeQuotaInterest = (0, sdk_gov_1.toBigInt)(payload.cumulativeQuotaInterest);
|
|
76
|
-
this.activeBots = payload.activeBots.map(b => b.toLowerCase());
|
|
76
|
+
this.activeBots = Object.fromEntries(payload.activeBots.map(b => [b.toLowerCase(), true]));
|
|
77
77
|
payload.balances.forEach(b => {
|
|
78
78
|
const token = b.token.toLowerCase();
|
|
79
79
|
const balance = {
|
|
@@ -10,7 +10,7 @@ interface PoolEvent {
|
|
|
10
10
|
readonly poolName?: string;
|
|
11
11
|
}
|
|
12
12
|
export interface TxSerialized {
|
|
13
|
-
type: "TxAddLiquidity" | "TxRemoveLiquidity" | "TxSwap" | "TxAddCollateral" | "TxIncreaseBorrowAmount" | "TxDecreaseBorrowAmount" | "TxOpenAccount" | "TxRepayAccount" | "TxCloseAccount" | "TxApprove" | "TxOpenMultitokenAccount" | "TxClaimReward" | "TxClaimNFT" | "TxClaimRewards" | "TxEnableTokens" | "TxUpdateQuota" | "TxGaugeStake" | "TxGaugeUnstake" | "TxGaugeClaim" | "TxGaugeVote" | "TxWithdrawCollateral";
|
|
13
|
+
type: "TxAddLiquidity" | "TxRemoveLiquidity" | "TxSwap" | "TxAddCollateral" | "TxIncreaseBorrowAmount" | "TxDecreaseBorrowAmount" | "TxOpenAccount" | "TxRepayAccount" | "TxCloseAccount" | "TxApprove" | "TxOpenMultitokenAccount" | "TxClaimReward" | "TxClaimNFT" | "TxClaimRewards" | "TxEnableTokens" | "TxUpdateQuota" | "TxGaugeStake" | "TxGaugeUnstake" | "TxGaugeClaim" | "TxGaugeVote" | "TxWithdrawCollateral" | "TxAddBot" | "TxRemoveBot";
|
|
14
14
|
content: string;
|
|
15
15
|
}
|
|
16
16
|
export declare class TxSerializer {
|
|
@@ -286,4 +286,22 @@ export declare class TxWithdrawCollateral extends EVMTx implements CMEvent {
|
|
|
286
286
|
toString(): string;
|
|
287
287
|
serialize(): TxSerialized;
|
|
288
288
|
}
|
|
289
|
+
interface TxAddBotProps extends EVMTxProps {
|
|
290
|
+
creditManager: string;
|
|
291
|
+
creditManagerName?: string;
|
|
292
|
+
}
|
|
293
|
+
export declare class TxAddBot extends EVMTx implements CMEvent {
|
|
294
|
+
readonly creditManager: string;
|
|
295
|
+
readonly creditManagerName?: string;
|
|
296
|
+
constructor(opts: TxAddBotProps);
|
|
297
|
+
toString(): string;
|
|
298
|
+
serialize(): TxSerialized;
|
|
299
|
+
}
|
|
300
|
+
export declare class TxRemoveBot extends EVMTx implements CMEvent {
|
|
301
|
+
readonly creditManager: string;
|
|
302
|
+
readonly creditManagerName?: string;
|
|
303
|
+
constructor(opts: TxAddBotProps);
|
|
304
|
+
toString(): string;
|
|
305
|
+
serialize(): TxSerialized;
|
|
306
|
+
}
|
|
289
307
|
export {};
|
package/lib/core/transactions.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TxWithdrawCollateral = exports.TxGaugeVote = exports.TxGaugeClaim = exports.TxGaugeUnstake = exports.TxGaugeStake = exports.TxUpdateQuota = exports.TxEnableTokens = exports.TxApprove = exports.TxCloseAccount = exports.TxRepayAccount = exports.TxClaimRewards = exports.TxClaimNFT = exports.TxClaimReward = exports.TxOpenMultitokenAccount = exports.TxOpenAccount = exports.TxDecreaseBorrowAmount = exports.TxIncreaseBorrowAmount = exports.TxAddCollateral = exports.TXSwap = exports.TxRemoveLiquidity = exports.TxAddLiquidity = exports.TxSerializer = void 0;
|
|
3
|
+
exports.TxRemoveBot = exports.TxAddBot = exports.TxWithdrawCollateral = exports.TxGaugeVote = exports.TxGaugeClaim = exports.TxGaugeUnstake = exports.TxGaugeStake = exports.TxUpdateQuota = exports.TxEnableTokens = exports.TxApprove = exports.TxCloseAccount = exports.TxRepayAccount = exports.TxClaimRewards = exports.TxClaimNFT = exports.TxClaimReward = exports.TxOpenMultitokenAccount = exports.TxOpenAccount = exports.TxDecreaseBorrowAmount = exports.TxIncreaseBorrowAmount = exports.TxAddCollateral = exports.TXSwap = exports.TxRemoveLiquidity = exports.TxAddLiquidity = exports.TxSerializer = void 0;
|
|
4
4
|
const sdk_gov_1 = require("@gearbox-protocol/sdk-gov");
|
|
5
5
|
const contractsRegister_1 = require("../contracts/contractsRegister");
|
|
6
6
|
const math_1 = require("../utils/math");
|
|
@@ -55,6 +55,10 @@ class TxSerializer {
|
|
|
55
55
|
return new TxGaugeVote(params);
|
|
56
56
|
case "TxWithdrawCollateral":
|
|
57
57
|
return new TxWithdrawCollateral(params);
|
|
58
|
+
case "TxAddBot":
|
|
59
|
+
return new TxAddBot(params);
|
|
60
|
+
case "TxRemoveBot":
|
|
61
|
+
return new TxRemoveBot(params);
|
|
58
62
|
default:
|
|
59
63
|
throw new Error(`Unknown transaction for parsing: ${e.type}`);
|
|
60
64
|
}
|
|
@@ -553,3 +557,41 @@ class TxWithdrawCollateral extends eventOrTx_1.EVMTx {
|
|
|
553
557
|
}
|
|
554
558
|
}
|
|
555
559
|
exports.TxWithdrawCollateral = TxWithdrawCollateral;
|
|
560
|
+
class TxAddBot extends eventOrTx_1.EVMTx {
|
|
561
|
+
creditManager;
|
|
562
|
+
creditManagerName;
|
|
563
|
+
constructor(opts) {
|
|
564
|
+
super(opts);
|
|
565
|
+
this.creditManager = opts.creditManager;
|
|
566
|
+
this.creditManagerName = opts.creditManagerName;
|
|
567
|
+
}
|
|
568
|
+
toString() {
|
|
569
|
+
return `Credit Account ${this.creditManagerName || (0, contractsRegister_1.getContractName)(this.creditManager)}: bot enabled`;
|
|
570
|
+
}
|
|
571
|
+
serialize() {
|
|
572
|
+
return {
|
|
573
|
+
type: "TxAddBot",
|
|
574
|
+
content: JSON.stringify(this),
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
exports.TxAddBot = TxAddBot;
|
|
579
|
+
class TxRemoveBot extends eventOrTx_1.EVMTx {
|
|
580
|
+
creditManager;
|
|
581
|
+
creditManagerName;
|
|
582
|
+
constructor(opts) {
|
|
583
|
+
super(opts);
|
|
584
|
+
this.creditManager = opts.creditManager;
|
|
585
|
+
this.creditManagerName = opts.creditManagerName;
|
|
586
|
+
}
|
|
587
|
+
toString() {
|
|
588
|
+
return `Credit Account ${this.creditManagerName || (0, contractsRegister_1.getContractName)(this.creditManager)}: bot disabled`;
|
|
589
|
+
}
|
|
590
|
+
serialize() {
|
|
591
|
+
return {
|
|
592
|
+
type: "TxAddBot",
|
|
593
|
+
content: JSON.stringify(this),
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
exports.TxRemoveBot = TxRemoveBot;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./apy";
|
|
2
2
|
export * from "./contracts/contractsRegister";
|
|
3
3
|
export * from "./core/assets";
|
|
4
|
+
export * from "./core/bot";
|
|
4
5
|
export * from "./core/creditAccount";
|
|
5
6
|
export * from "./core/creditManager";
|
|
6
7
|
export * from "./core/creditSession";
|
|
@@ -18,6 +19,7 @@ export * from "./core/trade";
|
|
|
18
19
|
export * from "./core/transactions";
|
|
19
20
|
export * from "./parsers/txParser";
|
|
20
21
|
export * from "./pathfinder";
|
|
22
|
+
export * from "./payload/bot";
|
|
21
23
|
export * from "./payload/creditAccount";
|
|
22
24
|
export * from "./payload/creditManager";
|
|
23
25
|
export * from "./payload/creditSession";
|
package/lib/index.js
CHANGED
|
@@ -18,6 +18,7 @@ exports.callRepeater = void 0;
|
|
|
18
18
|
__exportStar(require("./apy"), exports);
|
|
19
19
|
__exportStar(require("./contracts/contractsRegister"), exports);
|
|
20
20
|
__exportStar(require("./core/assets"), exports);
|
|
21
|
+
__exportStar(require("./core/bot"), exports);
|
|
21
22
|
__exportStar(require("./core/creditAccount"), exports);
|
|
22
23
|
__exportStar(require("./core/creditManager"), exports);
|
|
23
24
|
__exportStar(require("./core/creditSession"), exports);
|
|
@@ -35,6 +36,7 @@ __exportStar(require("./core/trade"), exports);
|
|
|
35
36
|
__exportStar(require("./core/transactions"), exports);
|
|
36
37
|
__exportStar(require("./parsers/txParser"), exports);
|
|
37
38
|
__exportStar(require("./pathfinder"), exports);
|
|
39
|
+
__exportStar(require("./payload/bot"), exports);
|
|
38
40
|
__exportStar(require("./payload/creditAccount"), exports);
|
|
39
41
|
__exportStar(require("./payload/creditManager"), exports);
|
|
40
42
|
__exportStar(require("./payload/creditSession"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BigNumberish } from "ethers";
|
|
2
|
+
export type BotBaseType = "liquidationProtection";
|
|
3
|
+
export type LiquidationBotType = "deleverageBotPegged" | "deleverageBotLV" | "deleverageBotHV";
|
|
4
|
+
export type BotDetailedType = LiquidationBotType;
|
|
5
|
+
export interface BotDataPayload {
|
|
6
|
+
baseType: BotBaseType;
|
|
7
|
+
detailedType: BotDetailedType;
|
|
8
|
+
address: string;
|
|
9
|
+
minHealthFactor: BigNumberish;
|
|
10
|
+
maxHealthFactor: BigNumberish;
|
|
11
|
+
premiumScaleFactor: BigNumberish;
|
|
12
|
+
feeScaleFactor: BigNumberish;
|
|
13
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
2
|
+
import type { FunctionFragment, Result } from "@ethersproject/abi";
|
|
3
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";
|
|
5
|
+
export interface ContractsRegisterTraitInterface extends utils.Interface {
|
|
6
|
+
functions: {
|
|
7
|
+
"contractsRegister()": FunctionFragment;
|
|
8
|
+
};
|
|
9
|
+
getFunction(nameOrSignatureOrTopic: "contractsRegister"): FunctionFragment;
|
|
10
|
+
encodeFunctionData(functionFragment: "contractsRegister", values?: undefined): string;
|
|
11
|
+
decodeFunctionResult(functionFragment: "contractsRegister", data: BytesLike): Result;
|
|
12
|
+
events: {};
|
|
13
|
+
}
|
|
14
|
+
export interface ContractsRegisterTrait extends BaseContract {
|
|
15
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
16
|
+
attach(addressOrName: string): this;
|
|
17
|
+
deployed(): Promise<this>;
|
|
18
|
+
interface: ContractsRegisterTraitInterface;
|
|
19
|
+
queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
|
|
20
|
+
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
|
21
|
+
listeners(eventName?: string): Array<Listener>;
|
|
22
|
+
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
|
23
|
+
removeAllListeners(eventName?: string): this;
|
|
24
|
+
off: OnEvent<this>;
|
|
25
|
+
on: OnEvent<this>;
|
|
26
|
+
once: OnEvent<this>;
|
|
27
|
+
removeListener: OnEvent<this>;
|
|
28
|
+
functions: {
|
|
29
|
+
contractsRegister(overrides?: CallOverrides): Promise<[string]>;
|
|
30
|
+
};
|
|
31
|
+
contractsRegister(overrides?: CallOverrides): Promise<string>;
|
|
32
|
+
callStatic: {
|
|
33
|
+
contractsRegister(overrides?: CallOverrides): Promise<string>;
|
|
34
|
+
};
|
|
35
|
+
filters: {};
|
|
36
|
+
estimateGas: {
|
|
37
|
+
contractsRegister(overrides?: CallOverrides): Promise<BigNumber>;
|
|
38
|
+
};
|
|
39
|
+
populateTransaction: {
|
|
40
|
+
contractsRegister(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
2
|
+
import type { FunctionFragment, Result } from "@ethersproject/abi";
|
|
3
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from "../common";
|
|
5
|
+
export interface ICreditAccountBaseInterface extends utils.Interface {
|
|
6
|
+
functions: {
|
|
7
|
+
"creditManager()": FunctionFragment;
|
|
8
|
+
"execute(address,bytes)": FunctionFragment;
|
|
9
|
+
"safeTransfer(address,address,uint256)": FunctionFragment;
|
|
10
|
+
"version()": FunctionFragment;
|
|
11
|
+
};
|
|
12
|
+
getFunction(nameOrSignatureOrTopic: "creditManager" | "execute" | "safeTransfer" | "version"): FunctionFragment;
|
|
13
|
+
encodeFunctionData(functionFragment: "creditManager", values?: undefined): string;
|
|
14
|
+
encodeFunctionData(functionFragment: "execute", values: [PromiseOrValue<string>, PromiseOrValue<BytesLike>]): string;
|
|
15
|
+
encodeFunctionData(functionFragment: "safeTransfer", values: [
|
|
16
|
+
PromiseOrValue<string>,
|
|
17
|
+
PromiseOrValue<string>,
|
|
18
|
+
PromiseOrValue<BigNumberish>
|
|
19
|
+
]): string;
|
|
20
|
+
encodeFunctionData(functionFragment: "version", values?: undefined): string;
|
|
21
|
+
decodeFunctionResult(functionFragment: "creditManager", data: BytesLike): Result;
|
|
22
|
+
decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result;
|
|
23
|
+
decodeFunctionResult(functionFragment: "safeTransfer", data: BytesLike): Result;
|
|
24
|
+
decodeFunctionResult(functionFragment: "version", data: BytesLike): Result;
|
|
25
|
+
events: {};
|
|
26
|
+
}
|
|
27
|
+
export interface ICreditAccountBase extends BaseContract {
|
|
28
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
29
|
+
attach(addressOrName: string): this;
|
|
30
|
+
deployed(): Promise<this>;
|
|
31
|
+
interface: ICreditAccountBaseInterface;
|
|
32
|
+
queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
|
|
33
|
+
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
|
34
|
+
listeners(eventName?: string): Array<Listener>;
|
|
35
|
+
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
|
36
|
+
removeAllListeners(eventName?: string): this;
|
|
37
|
+
off: OnEvent<this>;
|
|
38
|
+
on: OnEvent<this>;
|
|
39
|
+
once: OnEvent<this>;
|
|
40
|
+
removeListener: OnEvent<this>;
|
|
41
|
+
functions: {
|
|
42
|
+
creditManager(overrides?: CallOverrides): Promise<[string]>;
|
|
43
|
+
execute(target: PromiseOrValue<string>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
44
|
+
from?: PromiseOrValue<string>;
|
|
45
|
+
}): Promise<ContractTransaction>;
|
|
46
|
+
safeTransfer(token: PromiseOrValue<string>, to: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
47
|
+
from?: PromiseOrValue<string>;
|
|
48
|
+
}): Promise<ContractTransaction>;
|
|
49
|
+
version(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
50
|
+
};
|
|
51
|
+
creditManager(overrides?: CallOverrides): Promise<string>;
|
|
52
|
+
execute(target: PromiseOrValue<string>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
53
|
+
from?: PromiseOrValue<string>;
|
|
54
|
+
}): Promise<ContractTransaction>;
|
|
55
|
+
safeTransfer(token: PromiseOrValue<string>, to: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
56
|
+
from?: PromiseOrValue<string>;
|
|
57
|
+
}): Promise<ContractTransaction>;
|
|
58
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
59
|
+
callStatic: {
|
|
60
|
+
creditManager(overrides?: CallOverrides): Promise<string>;
|
|
61
|
+
execute(target: PromiseOrValue<string>, data: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<string>;
|
|
62
|
+
safeTransfer(token: PromiseOrValue<string>, to: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<void>;
|
|
63
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
64
|
+
};
|
|
65
|
+
filters: {};
|
|
66
|
+
estimateGas: {
|
|
67
|
+
creditManager(overrides?: CallOverrides): Promise<BigNumber>;
|
|
68
|
+
execute(target: PromiseOrValue<string>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
69
|
+
from?: PromiseOrValue<string>;
|
|
70
|
+
}): Promise<BigNumber>;
|
|
71
|
+
safeTransfer(token: PromiseOrValue<string>, to: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
72
|
+
from?: PromiseOrValue<string>;
|
|
73
|
+
}): Promise<BigNumber>;
|
|
74
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
75
|
+
};
|
|
76
|
+
populateTransaction: {
|
|
77
|
+
creditManager(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
78
|
+
execute(target: PromiseOrValue<string>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
79
|
+
from?: PromiseOrValue<string>;
|
|
80
|
+
}): Promise<PopulatedTransaction>;
|
|
81
|
+
safeTransfer(token: PromiseOrValue<string>, to: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
82
|
+
from?: PromiseOrValue<string>;
|
|
83
|
+
}): Promise<PopulatedTransaction>;
|
|
84
|
+
version(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
2
|
+
import type { FunctionFragment, Result } from "@ethersproject/abi";
|
|
3
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from "../common";
|
|
5
|
+
export interface ICreditAccountV3Interface extends utils.Interface {
|
|
6
|
+
functions: {
|
|
7
|
+
"creditManager()": FunctionFragment;
|
|
8
|
+
"execute(address,bytes)": FunctionFragment;
|
|
9
|
+
"factory()": FunctionFragment;
|
|
10
|
+
"rescue(address,bytes)": FunctionFragment;
|
|
11
|
+
"safeTransfer(address,address,uint256)": FunctionFragment;
|
|
12
|
+
"version()": FunctionFragment;
|
|
13
|
+
};
|
|
14
|
+
getFunction(nameOrSignatureOrTopic: "creditManager" | "execute" | "factory" | "rescue" | "safeTransfer" | "version"): FunctionFragment;
|
|
15
|
+
encodeFunctionData(functionFragment: "creditManager", values?: undefined): string;
|
|
16
|
+
encodeFunctionData(functionFragment: "execute", values: [PromiseOrValue<string>, PromiseOrValue<BytesLike>]): string;
|
|
17
|
+
encodeFunctionData(functionFragment: "factory", values?: undefined): string;
|
|
18
|
+
encodeFunctionData(functionFragment: "rescue", values: [PromiseOrValue<string>, PromiseOrValue<BytesLike>]): string;
|
|
19
|
+
encodeFunctionData(functionFragment: "safeTransfer", values: [
|
|
20
|
+
PromiseOrValue<string>,
|
|
21
|
+
PromiseOrValue<string>,
|
|
22
|
+
PromiseOrValue<BigNumberish>
|
|
23
|
+
]): string;
|
|
24
|
+
encodeFunctionData(functionFragment: "version", values?: undefined): string;
|
|
25
|
+
decodeFunctionResult(functionFragment: "creditManager", data: BytesLike): Result;
|
|
26
|
+
decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result;
|
|
27
|
+
decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result;
|
|
28
|
+
decodeFunctionResult(functionFragment: "rescue", data: BytesLike): Result;
|
|
29
|
+
decodeFunctionResult(functionFragment: "safeTransfer", data: BytesLike): Result;
|
|
30
|
+
decodeFunctionResult(functionFragment: "version", data: BytesLike): Result;
|
|
31
|
+
events: {};
|
|
32
|
+
}
|
|
33
|
+
export interface ICreditAccountV3 extends BaseContract {
|
|
34
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
35
|
+
attach(addressOrName: string): this;
|
|
36
|
+
deployed(): Promise<this>;
|
|
37
|
+
interface: ICreditAccountV3Interface;
|
|
38
|
+
queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
|
|
39
|
+
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
|
40
|
+
listeners(eventName?: string): Array<Listener>;
|
|
41
|
+
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
|
42
|
+
removeAllListeners(eventName?: string): this;
|
|
43
|
+
off: OnEvent<this>;
|
|
44
|
+
on: OnEvent<this>;
|
|
45
|
+
once: OnEvent<this>;
|
|
46
|
+
removeListener: OnEvent<this>;
|
|
47
|
+
functions: {
|
|
48
|
+
creditManager(overrides?: CallOverrides): Promise<[string]>;
|
|
49
|
+
execute(target: PromiseOrValue<string>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
50
|
+
from?: PromiseOrValue<string>;
|
|
51
|
+
}): Promise<ContractTransaction>;
|
|
52
|
+
factory(overrides?: CallOverrides): Promise<[string]>;
|
|
53
|
+
rescue(target: PromiseOrValue<string>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
54
|
+
from?: PromiseOrValue<string>;
|
|
55
|
+
}): Promise<ContractTransaction>;
|
|
56
|
+
safeTransfer(token: PromiseOrValue<string>, to: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
57
|
+
from?: PromiseOrValue<string>;
|
|
58
|
+
}): Promise<ContractTransaction>;
|
|
59
|
+
version(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
60
|
+
};
|
|
61
|
+
creditManager(overrides?: CallOverrides): Promise<string>;
|
|
62
|
+
execute(target: PromiseOrValue<string>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
63
|
+
from?: PromiseOrValue<string>;
|
|
64
|
+
}): Promise<ContractTransaction>;
|
|
65
|
+
factory(overrides?: CallOverrides): Promise<string>;
|
|
66
|
+
rescue(target: PromiseOrValue<string>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
67
|
+
from?: PromiseOrValue<string>;
|
|
68
|
+
}): Promise<ContractTransaction>;
|
|
69
|
+
safeTransfer(token: PromiseOrValue<string>, to: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
70
|
+
from?: PromiseOrValue<string>;
|
|
71
|
+
}): Promise<ContractTransaction>;
|
|
72
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
73
|
+
callStatic: {
|
|
74
|
+
creditManager(overrides?: CallOverrides): Promise<string>;
|
|
75
|
+
execute(target: PromiseOrValue<string>, data: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<string>;
|
|
76
|
+
factory(overrides?: CallOverrides): Promise<string>;
|
|
77
|
+
rescue(target: PromiseOrValue<string>, data: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<void>;
|
|
78
|
+
safeTransfer(token: PromiseOrValue<string>, to: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<void>;
|
|
79
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
80
|
+
};
|
|
81
|
+
filters: {};
|
|
82
|
+
estimateGas: {
|
|
83
|
+
creditManager(overrides?: CallOverrides): Promise<BigNumber>;
|
|
84
|
+
execute(target: PromiseOrValue<string>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
85
|
+
from?: PromiseOrValue<string>;
|
|
86
|
+
}): Promise<BigNumber>;
|
|
87
|
+
factory(overrides?: CallOverrides): Promise<BigNumber>;
|
|
88
|
+
rescue(target: PromiseOrValue<string>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
89
|
+
from?: PromiseOrValue<string>;
|
|
90
|
+
}): Promise<BigNumber>;
|
|
91
|
+
safeTransfer(token: PromiseOrValue<string>, to: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
92
|
+
from?: PromiseOrValue<string>;
|
|
93
|
+
}): Promise<BigNumber>;
|
|
94
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
95
|
+
};
|
|
96
|
+
populateTransaction: {
|
|
97
|
+
creditManager(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
98
|
+
execute(target: PromiseOrValue<string>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
99
|
+
from?: PromiseOrValue<string>;
|
|
100
|
+
}): Promise<PopulatedTransaction>;
|
|
101
|
+
factory(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
102
|
+
rescue(target: PromiseOrValue<string>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
103
|
+
from?: PromiseOrValue<string>;
|
|
104
|
+
}): Promise<PopulatedTransaction>;
|
|
105
|
+
safeTransfer(token: PromiseOrValue<string>, to: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
106
|
+
from?: PromiseOrValue<string>;
|
|
107
|
+
}): Promise<PopulatedTransaction>;
|
|
108
|
+
version(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
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 declare namespace IPartialLiquidationBotV3 {
|
|
6
|
+
type PriceUpdateStruct = {
|
|
7
|
+
token: PromiseOrValue<string>;
|
|
8
|
+
reserve: PromiseOrValue<boolean>;
|
|
9
|
+
data: PromiseOrValue<BytesLike>;
|
|
10
|
+
};
|
|
11
|
+
type PriceUpdateStructOutput = [string, boolean, string] & {
|
|
12
|
+
token: string;
|
|
13
|
+
reserve: boolean;
|
|
14
|
+
data: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface IPartialLiquidationBotV3Interface extends utils.Interface {
|
|
18
|
+
functions: {
|
|
19
|
+
"feeScaleFactor()": FunctionFragment;
|
|
20
|
+
"liquidateExactCollateral(address,address,uint256,uint256,address,(address,bool,bytes)[])": FunctionFragment;
|
|
21
|
+
"liquidateExactDebt(address,address,uint256,uint256,address,(address,bool,bytes)[])": FunctionFragment;
|
|
22
|
+
"maxHealthFactor()": FunctionFragment;
|
|
23
|
+
"minHealthFactor()": FunctionFragment;
|
|
24
|
+
"premiumScaleFactor()": FunctionFragment;
|
|
25
|
+
"treasury()": FunctionFragment;
|
|
26
|
+
"version()": FunctionFragment;
|
|
27
|
+
};
|
|
28
|
+
getFunction(nameOrSignatureOrTopic: "feeScaleFactor" | "liquidateExactCollateral" | "liquidateExactDebt" | "maxHealthFactor" | "minHealthFactor" | "premiumScaleFactor" | "treasury" | "version"): FunctionFragment;
|
|
29
|
+
encodeFunctionData(functionFragment: "feeScaleFactor", values?: undefined): string;
|
|
30
|
+
encodeFunctionData(functionFragment: "liquidateExactCollateral", values: [
|
|
31
|
+
PromiseOrValue<string>,
|
|
32
|
+
PromiseOrValue<string>,
|
|
33
|
+
PromiseOrValue<BigNumberish>,
|
|
34
|
+
PromiseOrValue<BigNumberish>,
|
|
35
|
+
PromiseOrValue<string>,
|
|
36
|
+
IPartialLiquidationBotV3.PriceUpdateStruct[]
|
|
37
|
+
]): string;
|
|
38
|
+
encodeFunctionData(functionFragment: "liquidateExactDebt", values: [
|
|
39
|
+
PromiseOrValue<string>,
|
|
40
|
+
PromiseOrValue<string>,
|
|
41
|
+
PromiseOrValue<BigNumberish>,
|
|
42
|
+
PromiseOrValue<BigNumberish>,
|
|
43
|
+
PromiseOrValue<string>,
|
|
44
|
+
IPartialLiquidationBotV3.PriceUpdateStruct[]
|
|
45
|
+
]): string;
|
|
46
|
+
encodeFunctionData(functionFragment: "maxHealthFactor", values?: undefined): string;
|
|
47
|
+
encodeFunctionData(functionFragment: "minHealthFactor", values?: undefined): string;
|
|
48
|
+
encodeFunctionData(functionFragment: "premiumScaleFactor", values?: undefined): string;
|
|
49
|
+
encodeFunctionData(functionFragment: "treasury", values?: undefined): string;
|
|
50
|
+
encodeFunctionData(functionFragment: "version", values?: undefined): string;
|
|
51
|
+
decodeFunctionResult(functionFragment: "feeScaleFactor", data: BytesLike): Result;
|
|
52
|
+
decodeFunctionResult(functionFragment: "liquidateExactCollateral", data: BytesLike): Result;
|
|
53
|
+
decodeFunctionResult(functionFragment: "liquidateExactDebt", data: BytesLike): Result;
|
|
54
|
+
decodeFunctionResult(functionFragment: "maxHealthFactor", data: BytesLike): Result;
|
|
55
|
+
decodeFunctionResult(functionFragment: "minHealthFactor", data: BytesLike): Result;
|
|
56
|
+
decodeFunctionResult(functionFragment: "premiumScaleFactor", data: BytesLike): Result;
|
|
57
|
+
decodeFunctionResult(functionFragment: "treasury", data: BytesLike): Result;
|
|
58
|
+
decodeFunctionResult(functionFragment: "version", data: BytesLike): Result;
|
|
59
|
+
events: {
|
|
60
|
+
"LiquidatePartial(address,address,address,uint256,uint256,uint256)": EventFragment;
|
|
61
|
+
};
|
|
62
|
+
getEvent(nameOrSignatureOrTopic: "LiquidatePartial"): EventFragment;
|
|
63
|
+
}
|
|
64
|
+
export interface LiquidatePartialEventObject {
|
|
65
|
+
creditManager: string;
|
|
66
|
+
creditAccount: string;
|
|
67
|
+
token: string;
|
|
68
|
+
repaidDebt: BigNumber;
|
|
69
|
+
seizedCollateral: BigNumber;
|
|
70
|
+
fee: BigNumber;
|
|
71
|
+
}
|
|
72
|
+
export type LiquidatePartialEvent = TypedEvent<[
|
|
73
|
+
string,
|
|
74
|
+
string,
|
|
75
|
+
string,
|
|
76
|
+
BigNumber,
|
|
77
|
+
BigNumber,
|
|
78
|
+
BigNumber
|
|
79
|
+
], LiquidatePartialEventObject>;
|
|
80
|
+
export type LiquidatePartialEventFilter = TypedEventFilter<LiquidatePartialEvent>;
|
|
81
|
+
export interface IPartialLiquidationBotV3 extends BaseContract {
|
|
82
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
83
|
+
attach(addressOrName: string): this;
|
|
84
|
+
deployed(): Promise<this>;
|
|
85
|
+
interface: IPartialLiquidationBotV3Interface;
|
|
86
|
+
queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
|
|
87
|
+
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
|
88
|
+
listeners(eventName?: string): Array<Listener>;
|
|
89
|
+
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
|
90
|
+
removeAllListeners(eventName?: string): this;
|
|
91
|
+
off: OnEvent<this>;
|
|
92
|
+
on: OnEvent<this>;
|
|
93
|
+
once: OnEvent<this>;
|
|
94
|
+
removeListener: OnEvent<this>;
|
|
95
|
+
functions: {
|
|
96
|
+
feeScaleFactor(overrides?: CallOverrides): Promise<[number]>;
|
|
97
|
+
liquidateExactCollateral(creditAccount: PromiseOrValue<string>, token: PromiseOrValue<string>, seizedAmount: PromiseOrValue<BigNumberish>, maxRepaidAmount: PromiseOrValue<BigNumberish>, to: PromiseOrValue<string>, priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], overrides?: Overrides & {
|
|
98
|
+
from?: PromiseOrValue<string>;
|
|
99
|
+
}): Promise<ContractTransaction>;
|
|
100
|
+
liquidateExactDebt(creditAccount: PromiseOrValue<string>, token: PromiseOrValue<string>, repaidAmount: PromiseOrValue<BigNumberish>, minSeizedAmount: PromiseOrValue<BigNumberish>, to: PromiseOrValue<string>, priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], overrides?: Overrides & {
|
|
101
|
+
from?: PromiseOrValue<string>;
|
|
102
|
+
}): Promise<ContractTransaction>;
|
|
103
|
+
maxHealthFactor(overrides?: CallOverrides): Promise<[number]>;
|
|
104
|
+
minHealthFactor(overrides?: CallOverrides): Promise<[number]>;
|
|
105
|
+
premiumScaleFactor(overrides?: CallOverrides): Promise<[number]>;
|
|
106
|
+
treasury(overrides?: CallOverrides): Promise<[string]>;
|
|
107
|
+
version(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
108
|
+
};
|
|
109
|
+
feeScaleFactor(overrides?: CallOverrides): Promise<number>;
|
|
110
|
+
liquidateExactCollateral(creditAccount: PromiseOrValue<string>, token: PromiseOrValue<string>, seizedAmount: PromiseOrValue<BigNumberish>, maxRepaidAmount: PromiseOrValue<BigNumberish>, to: PromiseOrValue<string>, priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], overrides?: Overrides & {
|
|
111
|
+
from?: PromiseOrValue<string>;
|
|
112
|
+
}): Promise<ContractTransaction>;
|
|
113
|
+
liquidateExactDebt(creditAccount: PromiseOrValue<string>, token: PromiseOrValue<string>, repaidAmount: PromiseOrValue<BigNumberish>, minSeizedAmount: PromiseOrValue<BigNumberish>, to: PromiseOrValue<string>, priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], overrides?: Overrides & {
|
|
114
|
+
from?: PromiseOrValue<string>;
|
|
115
|
+
}): Promise<ContractTransaction>;
|
|
116
|
+
maxHealthFactor(overrides?: CallOverrides): Promise<number>;
|
|
117
|
+
minHealthFactor(overrides?: CallOverrides): Promise<number>;
|
|
118
|
+
premiumScaleFactor(overrides?: CallOverrides): Promise<number>;
|
|
119
|
+
treasury(overrides?: CallOverrides): Promise<string>;
|
|
120
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
121
|
+
callStatic: {
|
|
122
|
+
feeScaleFactor(overrides?: CallOverrides): Promise<number>;
|
|
123
|
+
liquidateExactCollateral(creditAccount: PromiseOrValue<string>, token: PromiseOrValue<string>, seizedAmount: PromiseOrValue<BigNumberish>, maxRepaidAmount: PromiseOrValue<BigNumberish>, to: PromiseOrValue<string>, priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], overrides?: CallOverrides): Promise<BigNumber>;
|
|
124
|
+
liquidateExactDebt(creditAccount: PromiseOrValue<string>, token: PromiseOrValue<string>, repaidAmount: PromiseOrValue<BigNumberish>, minSeizedAmount: PromiseOrValue<BigNumberish>, to: PromiseOrValue<string>, priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], overrides?: CallOverrides): Promise<BigNumber>;
|
|
125
|
+
maxHealthFactor(overrides?: CallOverrides): Promise<number>;
|
|
126
|
+
minHealthFactor(overrides?: CallOverrides): Promise<number>;
|
|
127
|
+
premiumScaleFactor(overrides?: CallOverrides): Promise<number>;
|
|
128
|
+
treasury(overrides?: CallOverrides): Promise<string>;
|
|
129
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
130
|
+
};
|
|
131
|
+
filters: {
|
|
132
|
+
"LiquidatePartial(address,address,address,uint256,uint256,uint256)"(creditManager?: PromiseOrValue<string> | null, creditAccount?: PromiseOrValue<string> | null, token?: PromiseOrValue<string> | null, repaidDebt?: null, seizedCollateral?: null, fee?: null): LiquidatePartialEventFilter;
|
|
133
|
+
LiquidatePartial(creditManager?: PromiseOrValue<string> | null, creditAccount?: PromiseOrValue<string> | null, token?: PromiseOrValue<string> | null, repaidDebt?: null, seizedCollateral?: null, fee?: null): LiquidatePartialEventFilter;
|
|
134
|
+
};
|
|
135
|
+
estimateGas: {
|
|
136
|
+
feeScaleFactor(overrides?: CallOverrides): Promise<BigNumber>;
|
|
137
|
+
liquidateExactCollateral(creditAccount: PromiseOrValue<string>, token: PromiseOrValue<string>, seizedAmount: PromiseOrValue<BigNumberish>, maxRepaidAmount: PromiseOrValue<BigNumberish>, to: PromiseOrValue<string>, priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], overrides?: Overrides & {
|
|
138
|
+
from?: PromiseOrValue<string>;
|
|
139
|
+
}): Promise<BigNumber>;
|
|
140
|
+
liquidateExactDebt(creditAccount: PromiseOrValue<string>, token: PromiseOrValue<string>, repaidAmount: PromiseOrValue<BigNumberish>, minSeizedAmount: PromiseOrValue<BigNumberish>, to: PromiseOrValue<string>, priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], overrides?: Overrides & {
|
|
141
|
+
from?: PromiseOrValue<string>;
|
|
142
|
+
}): Promise<BigNumber>;
|
|
143
|
+
maxHealthFactor(overrides?: CallOverrides): Promise<BigNumber>;
|
|
144
|
+
minHealthFactor(overrides?: CallOverrides): Promise<BigNumber>;
|
|
145
|
+
premiumScaleFactor(overrides?: CallOverrides): Promise<BigNumber>;
|
|
146
|
+
treasury(overrides?: CallOverrides): Promise<BigNumber>;
|
|
147
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
148
|
+
};
|
|
149
|
+
populateTransaction: {
|
|
150
|
+
feeScaleFactor(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
151
|
+
liquidateExactCollateral(creditAccount: PromiseOrValue<string>, token: PromiseOrValue<string>, seizedAmount: PromiseOrValue<BigNumberish>, maxRepaidAmount: PromiseOrValue<BigNumberish>, to: PromiseOrValue<string>, priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], overrides?: Overrides & {
|
|
152
|
+
from?: PromiseOrValue<string>;
|
|
153
|
+
}): Promise<PopulatedTransaction>;
|
|
154
|
+
liquidateExactDebt(creditAccount: PromiseOrValue<string>, token: PromiseOrValue<string>, repaidAmount: PromiseOrValue<BigNumberish>, minSeizedAmount: PromiseOrValue<BigNumberish>, to: PromiseOrValue<string>, priceUpdates: IPartialLiquidationBotV3.PriceUpdateStruct[], overrides?: Overrides & {
|
|
155
|
+
from?: PromiseOrValue<string>;
|
|
156
|
+
}): Promise<PopulatedTransaction>;
|
|
157
|
+
maxHealthFactor(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
158
|
+
minHealthFactor(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
159
|
+
premiumScaleFactor(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
160
|
+
treasury(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
161
|
+
version(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
162
|
+
};
|
|
163
|
+
}
|