@gearbox-protocol/sdk 3.0.0-next.166 → 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/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/SafeERC20.d.ts +27 -0
- package/lib/types/SafeERC20.js +2 -0
- package/lib/types/factories/SafeERC20__factory.d.ts +49 -0
- package/lib/types/factories/SafeERC20__factory.js +77 -0
- package/lib/types/factories/index.d.ts +1 -0
- package/lib/types/factories/index.js +3 -1
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.js +3 -1
- package/package.json +5 -5
|
@@ -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,27 @@
|
|
|
1
|
+
import type { BaseContract, Signer, utils } from "ethers";
|
|
2
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
3
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";
|
|
4
|
+
export interface SafeERC20Interface extends utils.Interface {
|
|
5
|
+
functions: {};
|
|
6
|
+
events: {};
|
|
7
|
+
}
|
|
8
|
+
export interface SafeERC20 extends BaseContract {
|
|
9
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
10
|
+
attach(addressOrName: string): this;
|
|
11
|
+
deployed(): Promise<this>;
|
|
12
|
+
interface: SafeERC20Interface;
|
|
13
|
+
queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
|
|
14
|
+
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
|
15
|
+
listeners(eventName?: string): Array<Listener>;
|
|
16
|
+
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
|
17
|
+
removeAllListeners(eventName?: string): this;
|
|
18
|
+
off: OnEvent<this>;
|
|
19
|
+
on: OnEvent<this>;
|
|
20
|
+
once: OnEvent<this>;
|
|
21
|
+
removeListener: OnEvent<this>;
|
|
22
|
+
functions: {};
|
|
23
|
+
callStatic: {};
|
|
24
|
+
filters: {};
|
|
25
|
+
estimateGas: {};
|
|
26
|
+
populateTransaction: {};
|
|
27
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Signer, ContractFactory, Overrides } from "ethers";
|
|
2
|
+
import type { Provider, TransactionRequest } from "@ethersproject/providers";
|
|
3
|
+
import type { PromiseOrValue } from "../common";
|
|
4
|
+
import type { SafeERC20, SafeERC20Interface } from "../SafeERC20";
|
|
5
|
+
type SafeERC20ConstructorParams = [signer?: Signer] | ConstructorParameters<typeof ContractFactory>;
|
|
6
|
+
export declare class SafeERC20__factory extends ContractFactory {
|
|
7
|
+
constructor(...args: SafeERC20ConstructorParams);
|
|
8
|
+
deploy(overrides?: Overrides & {
|
|
9
|
+
from?: PromiseOrValue<string>;
|
|
10
|
+
}): Promise<SafeERC20>;
|
|
11
|
+
getDeployTransaction(overrides?: Overrides & {
|
|
12
|
+
from?: PromiseOrValue<string>;
|
|
13
|
+
}): TransactionRequest;
|
|
14
|
+
attach(address: string): SafeERC20;
|
|
15
|
+
connect(signer: Signer): SafeERC20__factory;
|
|
16
|
+
static readonly bytecode = "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122010ed61e36afc365f1eded6e9c818de6f0f1b5628720ffe04dc70323ec79eb82964736f6c63430008110033";
|
|
17
|
+
static readonly abi: readonly [{
|
|
18
|
+
readonly type: "error";
|
|
19
|
+
readonly name: "ForceApproveFailed";
|
|
20
|
+
readonly inputs: readonly [];
|
|
21
|
+
}, {
|
|
22
|
+
readonly type: "error";
|
|
23
|
+
readonly name: "Permit2TransferAmountTooHigh";
|
|
24
|
+
readonly inputs: readonly [];
|
|
25
|
+
}, {
|
|
26
|
+
readonly type: "error";
|
|
27
|
+
readonly name: "SafeDecreaseAllowanceFailed";
|
|
28
|
+
readonly inputs: readonly [];
|
|
29
|
+
}, {
|
|
30
|
+
readonly type: "error";
|
|
31
|
+
readonly name: "SafeIncreaseAllowanceFailed";
|
|
32
|
+
readonly inputs: readonly [];
|
|
33
|
+
}, {
|
|
34
|
+
readonly type: "error";
|
|
35
|
+
readonly name: "SafePermitBadLength";
|
|
36
|
+
readonly inputs: readonly [];
|
|
37
|
+
}, {
|
|
38
|
+
readonly type: "error";
|
|
39
|
+
readonly name: "SafeTransferFailed";
|
|
40
|
+
readonly inputs: readonly [];
|
|
41
|
+
}, {
|
|
42
|
+
readonly type: "error";
|
|
43
|
+
readonly name: "SafeTransferFromFailed";
|
|
44
|
+
readonly inputs: readonly [];
|
|
45
|
+
}];
|
|
46
|
+
static createInterface(): SafeERC20Interface;
|
|
47
|
+
static connect(address: string, signerOrProvider: Signer | Provider): SafeERC20;
|
|
48
|
+
}
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SafeERC20__factory = void 0;
|
|
4
|
+
/* Autogenerated file. Do not edit manually. */
|
|
5
|
+
/* tslint:disable */
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
const ethers_1 = require("ethers");
|
|
8
|
+
const _abi = [
|
|
9
|
+
{
|
|
10
|
+
type: "error",
|
|
11
|
+
name: "ForceApproveFailed",
|
|
12
|
+
inputs: [],
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
type: "error",
|
|
16
|
+
name: "Permit2TransferAmountTooHigh",
|
|
17
|
+
inputs: [],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: "error",
|
|
21
|
+
name: "SafeDecreaseAllowanceFailed",
|
|
22
|
+
inputs: [],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
type: "error",
|
|
26
|
+
name: "SafeIncreaseAllowanceFailed",
|
|
27
|
+
inputs: [],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
type: "error",
|
|
31
|
+
name: "SafePermitBadLength",
|
|
32
|
+
inputs: [],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: "error",
|
|
36
|
+
name: "SafeTransferFailed",
|
|
37
|
+
inputs: [],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: "error",
|
|
41
|
+
name: "SafeTransferFromFailed",
|
|
42
|
+
inputs: [],
|
|
43
|
+
},
|
|
44
|
+
];
|
|
45
|
+
const _bytecode = "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122010ed61e36afc365f1eded6e9c818de6f0f1b5628720ffe04dc70323ec79eb82964736f6c63430008110033";
|
|
46
|
+
const isSuperArgs = (xs) => xs.length > 1;
|
|
47
|
+
class SafeERC20__factory extends ethers_1.ContractFactory {
|
|
48
|
+
constructor(...args) {
|
|
49
|
+
if (isSuperArgs(args)) {
|
|
50
|
+
super(...args);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
super(_abi, _bytecode, args[0]);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
deploy(overrides) {
|
|
57
|
+
return super.deploy(overrides || {});
|
|
58
|
+
}
|
|
59
|
+
getDeployTransaction(overrides) {
|
|
60
|
+
return super.getDeployTransaction(overrides || {});
|
|
61
|
+
}
|
|
62
|
+
attach(address) {
|
|
63
|
+
return super.attach(address);
|
|
64
|
+
}
|
|
65
|
+
connect(signer) {
|
|
66
|
+
return super.connect(signer);
|
|
67
|
+
}
|
|
68
|
+
static bytecode = _bytecode;
|
|
69
|
+
static abi = _abi;
|
|
70
|
+
static createInterface() {
|
|
71
|
+
return new ethers_1.utils.Interface(_abi);
|
|
72
|
+
}
|
|
73
|
+
static connect(address, signerOrProvider) {
|
|
74
|
+
return new ethers_1.Contract(address, _abi, signerOrProvider);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.SafeERC20__factory = SafeERC20__factory;
|
|
@@ -97,3 +97,4 @@ export { RedstoneConstants__factory } from "./RedstoneConstants__factory";
|
|
|
97
97
|
export { RedstoneConsumerBase__factory } from "./RedstoneConsumerBase__factory";
|
|
98
98
|
export { RedstoneConsumerNumericBase__factory } from "./RedstoneConsumerNumericBase__factory";
|
|
99
99
|
export { RedstoneDefaultsLib__factory } from "./RedstoneDefaultsLib__factory";
|
|
100
|
+
export { SafeERC20__factory } from "./SafeERC20__factory";
|
|
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.IAaveV2_WrappedATokenAdapter__factory = exports.IAaveV2_LendingPoolAdapter__factory = exports.FarmAccounting__factory = exports.Errors__factory = exports.ERC20__factory = exports.ContractsRegisterTrait__factory = exports.CompositePriceFeed__factory = exports.Claimable__factory = exports.CalldataExtractor__factory = exports.AddressProvider__factory = exports.contracts = exports.redstonePriceFeedSol = exports.iwstEthGatewaySol = exports.iwstEthSol = exports.istEthSol = exports.iUniswapV3AdapterSol = exports.iUniswapV3Sol = exports.iUniswapV2AdapterSol = exports.iPriceOracleV3Sol = exports.iPriceOracleSol = exports.iPriceFeedSol = exports.iPoolV3Sol = exports.iPoolServiceSol = exports.iPoolQuotaKeeperV3Sol = exports.ilpPriceFeedSol = exports.iGearStakingV3Sol = exports.iGaugeV3Sol = exports.iDegenNftv2Sol = exports.iDegenDistributorSol = exports.iCurvePool4Sol = exports.iCurvePool3Sol = exports.iCurvePool2Sol = exports.iCreditManagerV3Sol = exports.iCreditManagerV2Sol = exports.iCreditFacadeV3Sol = exports.iCreditFacadeV2Sol = exports.iCreditConfiguratorV3Sol = exports.iCreditConfiguratorV2Sol = exports.iCreditAccountV3Sol = exports.iConvexV1BoosterAdapterSol = exports.iControllerTimelockV3Sol = exports.iContractsRegisterSol = exports.iCompoundV2CTokenAdapterSol = exports.iBotListV3Sol = exports.iBalancerV2VaultAdapterSol = exports.iBalancerV2VaultSol = exports.iAirdropDistributorSol = exports.iAddressProviderV3Sol = exports.iAddressProviderSol = exports.balancesSol = void 0;
|
|
27
|
-
exports.RedstoneDefaultsLib__factory = exports.RedstoneConsumerNumericBase__factory = exports.RedstoneConsumerBase__factory = exports.RedstoneConstants__factory = exports.PartialLiquidationBotV3__factory = exports.Ownable__factory = exports.NumericArrayLib__factory = exports.IwstETHV1Adapter__factory = exports.IZapperRegister__factory = exports.IZapper__factory = exports.IYearnV2Adapter__factory = exports.IYVault__factory = exports.IWETHGateway__factory = exports.IWETH__factory = exports.IVotingContractV3__factory = exports.IVersion__factory = exports.IRouterV3__factory = exports.IRouter__factory = exports.IPriceOracleBase__factory = exports.IPermit2__factory = exports.IPartialLiquidationBotV3__factory = exports.IOffchainOracle__factory = exports.ILinearInterestRateModelV3__factory = exports.ILidoV1Adapter__factory = exports.IInterestRateModel__factory = exports.IFarmingPool__factory = exports.IETHZapperDeposits__factory = exports.IERC721Metadata__factory = exports.IERC721__factory = exports.IERC4626Adapter__factory = exports.IERC4626__factory = exports.IERC20ZapperDeposits__factory = exports.IERC20Permit__factory = exports.IERC20Metadata__factory = exports.IERC20__factory = exports.IERC165__factory = exports.IDataCompressorV3__factory = exports.IDataCompressorV2_1__factory = exports.IDaiLikePermit__factory = exports.ICurveV1_4AssetsAdapter__factory = exports.ICurveV1_3AssetsAdapter__factory = exports.ICurveV1_2AssetsAdapter__factory = exports.ICurveV1Adapter__factory = exports.ICurvePool__factory = exports.ICreditFacadeV3Multicall__factory = exports.IConvexV1BaseRewardPoolAdapter__factory = exports.IConvexToken__factory = exports.IBaseRewardPool__factory = exports.IAdapter__factory = void 0;
|
|
27
|
+
exports.SafeERC20__factory = exports.RedstoneDefaultsLib__factory = exports.RedstoneConsumerNumericBase__factory = exports.RedstoneConsumerBase__factory = exports.RedstoneConstants__factory = exports.PartialLiquidationBotV3__factory = exports.Ownable__factory = exports.NumericArrayLib__factory = exports.IwstETHV1Adapter__factory = exports.IZapperRegister__factory = exports.IZapper__factory = exports.IYearnV2Adapter__factory = exports.IYVault__factory = exports.IWETHGateway__factory = exports.IWETH__factory = exports.IVotingContractV3__factory = exports.IVersion__factory = exports.IRouterV3__factory = exports.IRouter__factory = exports.IPriceOracleBase__factory = exports.IPermit2__factory = exports.IPartialLiquidationBotV3__factory = exports.IOffchainOracle__factory = exports.ILinearInterestRateModelV3__factory = exports.ILidoV1Adapter__factory = exports.IInterestRateModel__factory = exports.IFarmingPool__factory = exports.IETHZapperDeposits__factory = exports.IERC721Metadata__factory = exports.IERC721__factory = exports.IERC4626Adapter__factory = exports.IERC4626__factory = exports.IERC20ZapperDeposits__factory = exports.IERC20Permit__factory = exports.IERC20Metadata__factory = exports.IERC20__factory = exports.IERC165__factory = exports.IDataCompressorV3__factory = exports.IDataCompressorV2_1__factory = exports.IDaiLikePermit__factory = exports.ICurveV1_4AssetsAdapter__factory = exports.ICurveV1_3AssetsAdapter__factory = exports.ICurveV1_2AssetsAdapter__factory = exports.ICurveV1Adapter__factory = exports.ICurvePool__factory = exports.ICreditFacadeV3Multicall__factory = exports.IConvexV1BaseRewardPoolAdapter__factory = exports.IConvexToken__factory = exports.IBaseRewardPool__factory = exports.IAdapter__factory = void 0;
|
|
28
28
|
/* Autogenerated file. Do not edit manually. */
|
|
29
29
|
/* tslint:disable */
|
|
30
30
|
/* eslint-disable */
|
|
@@ -186,3 +186,5 @@ var RedstoneConsumerNumericBase__factory_1 = require("./RedstoneConsumerNumericB
|
|
|
186
186
|
Object.defineProperty(exports, "RedstoneConsumerNumericBase__factory", { enumerable: true, get: function () { return RedstoneConsumerNumericBase__factory_1.RedstoneConsumerNumericBase__factory; } });
|
|
187
187
|
var RedstoneDefaultsLib__factory_1 = require("./RedstoneDefaultsLib__factory");
|
|
188
188
|
Object.defineProperty(exports, "RedstoneDefaultsLib__factory", { enumerable: true, get: function () { return RedstoneDefaultsLib__factory_1.RedstoneDefaultsLib__factory; } });
|
|
189
|
+
var SafeERC20__factory_1 = require("./SafeERC20__factory");
|
|
190
|
+
Object.defineProperty(exports, "SafeERC20__factory", { enumerable: true, get: function () { return SafeERC20__factory_1.SafeERC20__factory; } });
|
package/lib/types/index.d.ts
CHANGED
|
@@ -137,6 +137,7 @@ export type { RedstoneConstants } from "./RedstoneConstants";
|
|
|
137
137
|
export type { RedstoneConsumerBase } from "./RedstoneConsumerBase";
|
|
138
138
|
export type { RedstoneConsumerNumericBase } from "./RedstoneConsumerNumericBase";
|
|
139
139
|
export type { RedstoneDefaultsLib } from "./RedstoneDefaultsLib";
|
|
140
|
+
export type { SafeERC20 } from "./SafeERC20";
|
|
140
141
|
export * as factories from "./factories";
|
|
141
142
|
export { AddressProvider__factory } from "./factories/AddressProvider__factory";
|
|
142
143
|
export type { BalanceOps } from "./Balances.sol/BalanceOps";
|
|
@@ -369,3 +370,4 @@ export type { IRedstonePriceFeedExceptions } from "./RedstonePriceFeed.sol/IReds
|
|
|
369
370
|
export { IRedstonePriceFeedExceptions__factory } from "./factories/RedstonePriceFeed.sol/IRedstonePriceFeedExceptions__factory";
|
|
370
371
|
export type { RedstonePriceFeed } from "./RedstonePriceFeed.sol/RedstonePriceFeed";
|
|
371
372
|
export { RedstonePriceFeed__factory } from "./factories/RedstonePriceFeed.sol/RedstonePriceFeed__factory";
|
|
373
|
+
export { SafeERC20__factory } from "./factories/SafeERC20__factory";
|
package/lib/types/index.js
CHANGED
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.ICreditFacadeV2V2__factory = exports.ICreditFacadeV2Extended__factory = exports.ICreditFacadeV2Exceptions__factory = exports.ICreditFacadeV2Events__factory = exports.ICreditFacadeV2__factory = exports.ICreditConfiguratorV3Events__factory = exports.ICreditConfiguratorV3__factory = exports.ICreditConfiguratorV2Exceptions__factory = exports.ICreditConfiguratorV2Events__factory = exports.ICreditConfiguratorV2__factory = exports.ICreditAccountV3__factory = exports.ICreditAccountBase__factory = exports.IConvexV1BoosterAdapterEvents__factory = exports.IConvexV1BoosterAdapter__factory = exports.IConvexV1BaseRewardPoolAdapter__factory = exports.IConvexToken__factory = exports.IControllerTimelockV3Events__factory = exports.IControllerTimelockV3__factory = exports.IContractsRegisterEvents__factory = exports.IContractsRegister__factory = exports.ICompoundV2_Exceptions__factory = exports.ICompoundV2_CTokenAdapter__factory = exports.IBotListV3Events__factory = exports.IBotListV3__factory = exports.IBaseRewardPool__factory = exports.IBalancerV2VaultAdapterExceptions__factory = exports.IBalancerV2VaultAdapterEvents__factory = exports.IBalancerV2VaultAdapter__factory = exports.IBalancerV2VaultGetters__factory = exports.IBalancerV2Vault__factory = exports.IAirdropDistributorEvents__factory = exports.IAirdropDistributor__factory = exports.IAddressProviderV3Events__factory = exports.IAddressProviderV3__factory = exports.IAddressProviderEvents__factory = exports.IAddressProvider__factory = exports.IAdapter__factory = exports.IAaveV2_WrappedATokenAdapter__factory = exports.IAaveV2_LendingPoolAdapter__factory = exports.FarmAccounting__factory = exports.Errors__factory = exports.ERC20__factory = exports.ContractsRegisterTrait__factory = exports.IGasPricer__factory = exports.CompositePriceFeed__factory = exports.Claimable__factory = exports.CalldataExtractor__factory = exports.BalanceOps__factory = exports.AddressProvider__factory = exports.factories = void 0;
|
|
27
27
|
exports.IPoolQuotaKeeperV3Events__factory = exports.IPoolQuotaKeeperV3__factory = exports.IPermit2__factory = exports.IPartialLiquidationBotV3__factory = exports.IOffchainOracle__factory = exports.ILPPriceFeedExceptions__factory = exports.ILPPriceFeedEvents__factory = exports.ILPPriceFeed__factory = exports.ILinearInterestRateModelV3__factory = exports.ILidoV1Adapter__factory = exports.IInterestRateModel__factory = exports.IGearStakingV3Events__factory = exports.IGearStakingV3__factory = exports.IGaugeV3Events__factory = exports.IGaugeV3__factory = exports.IFarmingPool__factory = exports.IETHZapperDeposits__factory = exports.IERC721Metadata__factory = exports.IERC721__factory = exports.IERC4626Adapter__factory = exports.IERC4626__factory = exports.IERC20ZapperDeposits__factory = exports.IERC20Permit__factory = exports.IERC20Metadata__factory = exports.IERC20__factory = exports.IERC165__factory = exports.IDegenNFTV2Exceptions__factory = exports.IDegenNFTV2Events__factory = exports.IDegenNFTV2__factory = exports.IDegenDistributorEvents__factory = exports.IDegenDistributor__factory = exports.IDataCompressorV3__factory = exports.IDataCompressorV2_1__factory = exports.IDaiLikePermit__factory = exports.ICurveV1Adapter__factory = exports.ICurveV1_4AssetsAdapter__factory = exports.ICurveV1_3AssetsAdapter__factory = exports.ICurveV1_2AssetsAdapter__factory = exports.ICurvePool__factory = exports.ICurvePool4Assets__factory = exports.ICurvePool3Assets__factory = exports.ICurvePool2Assets__factory = exports.ICreditManagerV3Events__factory = exports.ICreditManagerV3__factory = exports.ICreditManagerV2Exceptions__factory = exports.ICreditManagerV2Events__factory = exports.ICreditManagerV2__factory = exports.ICreditFacadeV3Multicall__factory = exports.ICreditFacadeV3Events__factory = exports.ICreditFacadeV3__factory = void 0;
|
|
28
|
-
exports.RedstonePriceFeed__factory = exports.IRedstonePriceFeedExceptions__factory = exports.IRedstonePriceFeedEvents__factory = exports.RedstoneDefaultsLib__factory = exports.RedstoneConsumerNumericBase__factory = exports.RedstoneConsumerBase__factory = exports.RedstoneConstants__factory = exports.PartialLiquidationBotV3__factory = exports.Ownable__factory = exports.NumericArrayLib__factory = exports.IZapperRegister__factory = exports.IZapper__factory = exports.IYVault__factory = exports.IYearnV2Adapter__factory = exports.IwstETHV1Adapter__factory = exports.IwstETHGateWay__factory = exports.IwstETHGetters__factory = exports.IwstETH__factory = exports.IWETHGateway__factory = exports.IWETH__factory = exports.IVotingContractV3__factory = exports.IVersion__factory = exports.IUniswapV3AdapterExceptions__factory = exports.IUniswapV3AdapterEvents__factory = exports.IUniswapV3Adapter__factory = exports.ISwapRouter__factory = exports.IUniswapV2AdapterExceptions__factory = exports.IUniswapV2AdapterEvents__factory = exports.IUniswapV2Adapter__factory = exports.IstETHGetters__factory = exports.IstETH__factory = exports.IRouterV3__factory = exports.IRouter__factory = exports.IPriceOracleV3Events__factory = exports.IPriceOracleV3__factory = exports.IPriceOracleBase__factory = exports.IPriceOracleV2Ext__factory = exports.IPriceOracleV2Exceptions__factory = exports.IPriceOracleV2Events__factory = exports.IPriceOracleV2__factory = exports.IUpdatablePriceFeed__factory = exports.IPriceFeed__factory = exports.IPoolV3Events__factory = exports.IPoolV3__factory = exports.IPoolServiceEvents__factory = exports.IPoolService__factory = void 0;
|
|
28
|
+
exports.SafeERC20__factory = exports.RedstonePriceFeed__factory = exports.IRedstonePriceFeedExceptions__factory = exports.IRedstonePriceFeedEvents__factory = exports.RedstoneDefaultsLib__factory = exports.RedstoneConsumerNumericBase__factory = exports.RedstoneConsumerBase__factory = exports.RedstoneConstants__factory = exports.PartialLiquidationBotV3__factory = exports.Ownable__factory = exports.NumericArrayLib__factory = exports.IZapperRegister__factory = exports.IZapper__factory = exports.IYVault__factory = exports.IYearnV2Adapter__factory = exports.IwstETHV1Adapter__factory = exports.IwstETHGateWay__factory = exports.IwstETHGetters__factory = exports.IwstETH__factory = exports.IWETHGateway__factory = exports.IWETH__factory = exports.IVotingContractV3__factory = exports.IVersion__factory = exports.IUniswapV3AdapterExceptions__factory = exports.IUniswapV3AdapterEvents__factory = exports.IUniswapV3Adapter__factory = exports.ISwapRouter__factory = exports.IUniswapV2AdapterExceptions__factory = exports.IUniswapV2AdapterEvents__factory = exports.IUniswapV2Adapter__factory = exports.IstETHGetters__factory = exports.IstETH__factory = exports.IRouterV3__factory = exports.IRouter__factory = exports.IPriceOracleV3Events__factory = exports.IPriceOracleV3__factory = exports.IPriceOracleBase__factory = exports.IPriceOracleV2Ext__factory = exports.IPriceOracleV2Exceptions__factory = exports.IPriceOracleV2Events__factory = exports.IPriceOracleV2__factory = exports.IUpdatablePriceFeed__factory = exports.IPriceFeed__factory = exports.IPoolV3Events__factory = exports.IPoolV3__factory = exports.IPoolServiceEvents__factory = exports.IPoolService__factory = void 0;
|
|
29
29
|
exports.factories = __importStar(require("./factories"));
|
|
30
30
|
var AddressProvider__factory_1 = require("./factories/AddressProvider__factory");
|
|
31
31
|
Object.defineProperty(exports, "AddressProvider__factory", { enumerable: true, get: function () { return AddressProvider__factory_1.AddressProvider__factory; } });
|
|
@@ -317,3 +317,5 @@ var IRedstonePriceFeedExceptions__factory_1 = require("./factories/RedstonePrice
|
|
|
317
317
|
Object.defineProperty(exports, "IRedstonePriceFeedExceptions__factory", { enumerable: true, get: function () { return IRedstonePriceFeedExceptions__factory_1.IRedstonePriceFeedExceptions__factory; } });
|
|
318
318
|
var RedstonePriceFeed__factory_1 = require("./factories/RedstonePriceFeed.sol/RedstonePriceFeed__factory");
|
|
319
319
|
Object.defineProperty(exports, "RedstonePriceFeed__factory", { enumerable: true, get: function () { return RedstonePriceFeed__factory_1.RedstonePriceFeed__factory; } });
|
|
320
|
+
var SafeERC20__factory_1 = require("./factories/SafeERC20__factory");
|
|
321
|
+
Object.defineProperty(exports, "SafeERC20__factory", { enumerable: true, get: function () { return SafeERC20__factory_1.SafeERC20__factory; } });
|
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.167",
|
|
4
4
|
"description": "Gearbox SDK",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@gearbox-protocol/bots-v3": "^1.5.1",
|
|
34
|
-
"@gearbox-protocol/sdk-gov": "^1.
|
|
34
|
+
"@gearbox-protocol/sdk-gov": "^1.62.2",
|
|
35
35
|
"axios": "^1.2.6",
|
|
36
36
|
"decimal.js-light": "^2.5.1",
|
|
37
37
|
"deep-eql": "^4.1.0",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"@commitlint/cli": "^17.6.3",
|
|
44
44
|
"@commitlint/config-conventional": "^17.0.3",
|
|
45
45
|
"@gearbox-protocol/core-v2": "1.19.0-base.17",
|
|
46
|
-
"@gearbox-protocol/core-v3": "^1.49.
|
|
46
|
+
"@gearbox-protocol/core-v3": "^1.49.6",
|
|
47
47
|
"@gearbox-protocol/eslint-config": "^1.4.1",
|
|
48
|
-
"@gearbox-protocol/integrations-v3": "^1.40.
|
|
48
|
+
"@gearbox-protocol/integrations-v3": "^1.40.3",
|
|
49
49
|
"@gearbox-protocol/oracles-v3": "^1.10.3",
|
|
50
50
|
"@gearbox-protocol/periphery-v3": "^1.6.1",
|
|
51
51
|
"@gearbox-protocol/prettier-config": "^1.4.1",
|
|
52
52
|
"@gearbox-protocol/router": "^1.5.5",
|
|
53
|
-
"@gearbox-protocol/router-v3": "^1.
|
|
53
|
+
"@gearbox-protocol/router-v3": "^1.22.0",
|
|
54
54
|
"@openzeppelin/contracts": "^4.9.3",
|
|
55
55
|
"@redstone-finance/evm-connector": "^0.3.6",
|
|
56
56
|
"@typechain/ethers-v5": "^10.1.0",
|