@gearbox-protocol/sdk 2.1.33 → 2.1.35
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 +8 -0
- package/lib/contracts/protocols.d.ts +0 -5
- package/lib/contracts/protocols.js +1 -43
- package/lib/core/creditManager.d.ts +4 -1
- package/lib/core/creditManager.js +26 -4
- package/lib/core/pool/index.d.ts +0 -1
- package/lib/core/pool/index.js +0 -1
- package/lib/core/trade.d.ts +29 -16
- package/lib/core/trade.js +67 -10
- package/lib/index.d.ts +0 -11
- package/lib/index.js +1 -14
- package/lib/parsers/creditFacadeParser.js +2 -2
- package/lib/parsers/creditFacadeParser.spec.js +1 -2
- package/lib/parsers/txParser.js +1 -1
- package/lib/tokens/aave.d.ts +0 -3
- package/lib/tokens/aave.js +0 -57
- package/lib/tokens/balancer.d.ts +0 -10
- package/lib/tokens/balancer.js +0 -29
- package/lib/tokens/compound.d.ts +0 -2
- package/lib/tokens/compound.js +0 -36
- package/lib/tokens/convex.d.ts +2 -2
- package/lib/tokens/convex.js +9 -322
- package/lib/tokens/curveLP.d.ts +3 -4
- package/lib/tokens/curveLP.js +17 -240
- package/lib/tokens/gear.d.ts +0 -2
- package/lib/tokens/normal.d.ts +0 -3
- package/lib/tokens/normal.js +0 -718
- package/lib/tokens/yearn.d.ts +0 -4
- package/lib/tokens/yearn.js +0 -43
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/BalanceOps.d.ts +27 -0
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/index.d.ts +1 -0
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/index.js +2 -0
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacade.d.ts +147 -80
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeEvents.d.ts +35 -0
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExtended.d.ts +7 -7
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeV2.d.ts +66 -0
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeV2.js +2 -0
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/index.d.ts +1 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/BalanceOps__factory.d.ts +28 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/BalanceOps__factory.js +53 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/index.d.ts +1 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/index.js +8 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeEvents__factory.js +45 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExceptions__factory.js +10 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExtended__factory.js +0 -5
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeV2__factory.d.ts +18 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeV2__factory.js +42 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacade__factory.js +198 -46
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/index.d.ts +1 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/index.js +3 -1
- package/package.json +7 -2
- package/lib/core/adapter.d.ts +0 -20
- package/lib/core/adapter.js +0 -20
- package/lib/core/creditOperation.d.ts +0 -9
- package/lib/core/operations.d.ts +0 -22
- package/lib/core/operations.js +0 -26
- package/lib/core/pool/operation.d.ts +0 -28
- package/lib/core/pool/operation.js +0 -36
- package/lib/pathfinder/tradeTypes.d.ts +0 -113
- package/lib/pathfinder/tradeTypes.js +0 -28
- package/lib/strategies/convex.d.ts +0 -57
- package/lib/strategies/convex.js +0 -220
- package/lib/strategies/creditFacade.d.ts +0 -21
- package/lib/strategies/creditFacade.js +0 -71
- package/lib/strategies/curve.d.ts +0 -45
- package/lib/strategies/curve.js +0 -207
- package/lib/strategies/lido.d.ts +0 -18
- package/lib/strategies/lido.js +0 -51
- package/lib/strategies/uniswapV2.d.ts +0 -15
- package/lib/strategies/uniswapV2.js +0 -44
- package/lib/strategies/uniswapV3.d.ts +0 -21
- package/lib/strategies/uniswapV3.js +0 -71
- package/lib/strategies/yearn.d.ts +0 -20
- package/lib/strategies/yearn.js +0 -128
- package/lib/utils/extracter.d.ts +0 -11
- package/lib/utils/extracter.js +0 -19
- /package/lib/{core/creditOperation.js → types/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/BalanceOps.js} +0 -0
package/lib/tokens/yearn.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { YearnVaultContract } from "../contracts/contracts";
|
|
2
|
-
import { TradeAction } from "../pathfinder/tradeTypes";
|
|
3
2
|
import type { CurveLPToken } from "./curveLP";
|
|
4
3
|
import { NormalToken } from "./normal";
|
|
5
4
|
import type { TokenBase } from "./token";
|
|
@@ -9,21 +8,18 @@ export type YearnVaultTokenData = {
|
|
|
9
8
|
symbol: YearnLPToken;
|
|
10
9
|
type: TokenType.YEARN_ON_NORMAL_TOKEN;
|
|
11
10
|
underlying: NormalToken;
|
|
12
|
-
lpActions: Array<TradeAction>;
|
|
13
11
|
vault: YearnVaultContract;
|
|
14
12
|
} & TokenBase;
|
|
15
13
|
export type YearnVaultOfCurveLPTokenData = {
|
|
16
14
|
symbol: YearnLPToken;
|
|
17
15
|
type: TokenType.YEARN_ON_CURVE_TOKEN;
|
|
18
16
|
underlying: CurveLPToken;
|
|
19
|
-
lpActions: Array<TradeAction>;
|
|
20
17
|
vault: YearnVaultContract;
|
|
21
18
|
} & TokenBase;
|
|
22
19
|
export type YearnVaultOfMetaCurveLPTokenData = {
|
|
23
20
|
symbol: YearnLPToken;
|
|
24
21
|
type: TokenType.YEARN_ON_CURVE_TOKEN;
|
|
25
22
|
underlying: CurveLPToken;
|
|
26
|
-
lpActions: Array<TradeAction>;
|
|
27
23
|
vault: YearnVaultContract;
|
|
28
24
|
} & TokenBase;
|
|
29
25
|
export declare const yearnTokens: Record<YearnLPToken, YearnVaultTokenData | YearnVaultOfCurveLPTokenData | YearnVaultOfMetaCurveLPTokenData>;
|
package/lib/tokens/yearn.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isYearnLPToken = exports.yearnTokens = void 0;
|
|
4
|
-
const tradeTypes_1 = require("../pathfinder/tradeTypes");
|
|
5
4
|
const tokenType_1 = require("./tokenType");
|
|
6
5
|
exports.yearnTokens = {
|
|
7
6
|
// YEARN TOKENS
|
|
@@ -11,13 +10,6 @@ exports.yearnTokens = {
|
|
|
11
10
|
type: tokenType_1.TokenType.YEARN_ON_NORMAL_TOKEN,
|
|
12
11
|
underlying: "DAI",
|
|
13
12
|
vault: "YEARN_DAI_VAULT",
|
|
14
|
-
lpActions: [
|
|
15
|
-
{
|
|
16
|
-
type: tradeTypes_1.TradeType.YearnWithdraw,
|
|
17
|
-
contract: "YEARN_DAI_VAULT",
|
|
18
|
-
tokenOut: "DAI",
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
13
|
},
|
|
22
14
|
yvUSDC: {
|
|
23
15
|
name: "Yearn yvUSDC",
|
|
@@ -25,13 +17,6 @@ exports.yearnTokens = {
|
|
|
25
17
|
type: tokenType_1.TokenType.YEARN_ON_NORMAL_TOKEN,
|
|
26
18
|
underlying: "USDC",
|
|
27
19
|
vault: "YEARN_USDC_VAULT",
|
|
28
|
-
lpActions: [
|
|
29
|
-
{
|
|
30
|
-
type: tradeTypes_1.TradeType.YearnWithdraw,
|
|
31
|
-
contract: "YEARN_USDC_VAULT",
|
|
32
|
-
tokenOut: "USDC",
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
20
|
},
|
|
36
21
|
yvWETH: {
|
|
37
22
|
name: "Yearn yvWETH",
|
|
@@ -39,13 +24,6 @@ exports.yearnTokens = {
|
|
|
39
24
|
type: tokenType_1.TokenType.YEARN_ON_NORMAL_TOKEN,
|
|
40
25
|
underlying: "WETH",
|
|
41
26
|
vault: "YEARN_WETH_VAULT",
|
|
42
|
-
lpActions: [
|
|
43
|
-
{
|
|
44
|
-
type: tradeTypes_1.TradeType.YearnWithdraw,
|
|
45
|
-
contract: "YEARN_WETH_VAULT",
|
|
46
|
-
tokenOut: "WETH",
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
27
|
},
|
|
50
28
|
yvWBTC: {
|
|
51
29
|
name: "Yearn yvWBTC",
|
|
@@ -53,13 +31,6 @@ exports.yearnTokens = {
|
|
|
53
31
|
type: tokenType_1.TokenType.YEARN_ON_NORMAL_TOKEN,
|
|
54
32
|
underlying: "WBTC",
|
|
55
33
|
vault: "YEARN_WBTC_VAULT",
|
|
56
|
-
lpActions: [
|
|
57
|
-
{
|
|
58
|
-
type: tradeTypes_1.TradeType.YearnWithdraw,
|
|
59
|
-
contract: "YEARN_WBTC_VAULT",
|
|
60
|
-
tokenOut: "WBTC",
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
34
|
},
|
|
64
35
|
// YEARN- CURVE TOKENS
|
|
65
36
|
yvCurve_stETH: {
|
|
@@ -68,13 +39,6 @@ exports.yearnTokens = {
|
|
|
68
39
|
type: tokenType_1.TokenType.YEARN_ON_CURVE_TOKEN,
|
|
69
40
|
underlying: "steCRV",
|
|
70
41
|
vault: "YEARN_CURVE_STETH_VAULT",
|
|
71
|
-
lpActions: [
|
|
72
|
-
{
|
|
73
|
-
type: tradeTypes_1.TradeType.YearnWithdraw,
|
|
74
|
-
contract: "YEARN_CURVE_STETH_VAULT",
|
|
75
|
-
tokenOut: "steCRV",
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
42
|
},
|
|
79
43
|
yvCurve_FRAX: {
|
|
80
44
|
name: "Yearn yvCurve-FRAX",
|
|
@@ -82,13 +46,6 @@ exports.yearnTokens = {
|
|
|
82
46
|
type: tokenType_1.TokenType.YEARN_ON_CURVE_TOKEN,
|
|
83
47
|
underlying: "FRAX3CRV",
|
|
84
48
|
vault: "YEARN_CURVE_FRAX_VAULT",
|
|
85
|
-
lpActions: [
|
|
86
|
-
{
|
|
87
|
-
type: tradeTypes_1.TradeType.YearnWithdraw,
|
|
88
|
-
contract: "YEARN_CURVE_FRAX_VAULT",
|
|
89
|
-
tokenOut: "FRAX3CRV",
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
49
|
},
|
|
93
50
|
};
|
|
94
51
|
const isYearnLPToken = (t) => typeof t === "string" && !!exports.yearnTokens[t];
|
|
@@ -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 BalanceOpsInterface extends utils.Interface {
|
|
5
|
+
functions: {};
|
|
6
|
+
events: {};
|
|
7
|
+
}
|
|
8
|
+
export interface BalanceOps extends BaseContract {
|
|
9
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
10
|
+
attach(addressOrName: string): this;
|
|
11
|
+
deployed(): Promise<this>;
|
|
12
|
+
interface: BalanceOpsInterface;
|
|
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 @@
|
|
|
1
|
+
export type { BalanceOps } from "./BalanceOps";
|