@gearbox-protocol/sdk 0.0.57 → 0.0.58
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/adapters.d.ts +6 -5
- package/lib/core/adapters.js +6 -5
- package/lib/core/contracts.d.ts +9 -2
- package/lib/core/contracts.js +14 -1
- package/package.json +1 -1
package/lib/core/adapters.d.ts
CHANGED
|
@@ -6,9 +6,10 @@ export declare enum AdapterInterface {
|
|
|
6
6
|
CURVE_V1_3ASSETS = 4,
|
|
7
7
|
CURVE_V1_4ASSETS = 5,
|
|
8
8
|
CURVE_V1_STECRV_POOL = 6,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
CURVE_V1_DEPOSIT = 7,
|
|
10
|
+
YEARN_V2 = 8,
|
|
11
|
+
CONVEX_V1_BASE_REWARD_POOL = 9,
|
|
12
|
+
CONVEX_V1_BOOSTER = 10,
|
|
13
|
+
CONVEX_V1_CLAIM_ZAP = 11,
|
|
14
|
+
LIDO_V1 = 12
|
|
14
15
|
}
|
package/lib/core/adapters.js
CHANGED
|
@@ -10,9 +10,10 @@ var AdapterInterface;
|
|
|
10
10
|
AdapterInterface[AdapterInterface["CURVE_V1_3ASSETS"] = 4] = "CURVE_V1_3ASSETS";
|
|
11
11
|
AdapterInterface[AdapterInterface["CURVE_V1_4ASSETS"] = 5] = "CURVE_V1_4ASSETS";
|
|
12
12
|
AdapterInterface[AdapterInterface["CURVE_V1_STECRV_POOL"] = 6] = "CURVE_V1_STECRV_POOL";
|
|
13
|
-
AdapterInterface[AdapterInterface["
|
|
14
|
-
AdapterInterface[AdapterInterface["
|
|
15
|
-
AdapterInterface[AdapterInterface["
|
|
16
|
-
AdapterInterface[AdapterInterface["
|
|
17
|
-
AdapterInterface[AdapterInterface["
|
|
13
|
+
AdapterInterface[AdapterInterface["CURVE_V1_DEPOSIT"] = 7] = "CURVE_V1_DEPOSIT";
|
|
14
|
+
AdapterInterface[AdapterInterface["YEARN_V2"] = 8] = "YEARN_V2";
|
|
15
|
+
AdapterInterface[AdapterInterface["CONVEX_V1_BASE_REWARD_POOL"] = 9] = "CONVEX_V1_BASE_REWARD_POOL";
|
|
16
|
+
AdapterInterface[AdapterInterface["CONVEX_V1_BOOSTER"] = 10] = "CONVEX_V1_BOOSTER";
|
|
17
|
+
AdapterInterface[AdapterInterface["CONVEX_V1_CLAIM_ZAP"] = 11] = "CONVEX_V1_CLAIM_ZAP";
|
|
18
|
+
AdapterInterface[AdapterInterface["LIDO_V1"] = 12] = "LIDO_V1"; // 12 - 4096
|
|
18
19
|
})(AdapterInterface = exports.AdapterInterface || (exports.AdapterInterface = {}));
|
package/lib/core/contracts.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { NetworkType } from "./constants";
|
|
|
3
3
|
import { Protocols } from "./protocols";
|
|
4
4
|
import { CurveLPToken, NormalToken, ConvexStakedPhantomToken } from "./token";
|
|
5
5
|
export declare type UniswapV2Contract = "UNISWAP_V2_ROUTER" | "SUSHISWAP_ROUTER";
|
|
6
|
-
export declare type CurvePoolContract = "CURVE_3CRV_POOL" | "CURVE_STETH_GATEWAY" | "CURVE_FRAX_POOL" | "CURVE_LUSD_POOL" | "CURVE_GUSD_POOL" | "CURVE_SUSD_POOL";
|
|
6
|
+
export declare type CurvePoolContract = "CURVE_3CRV_POOL" | "CURVE_STETH_GATEWAY" | "CURVE_FRAX_POOL" | "CURVE_LUSD_POOL" | "CURVE_GUSD_POOL" | "CURVE_SUSD_DEPOSIT" | "CURVE_SUSD_POOL";
|
|
7
7
|
export declare type YearnVaultContract = "YEARN_DAI_VAULT" | "YEARN_USDC_VAULT" | "YEARN_WETH_VAULT" | "YEARN_WBTC_VAULT" | "YEARN_CURVE_FRAX_VAULT" | "YEARN_CURVE_STETH_VAULT";
|
|
8
8
|
export declare type ConvexPoolContract = "CONVEX_3CRV_POOL" | "CONVEX_GUSD_POOL" | "CONVEX_SUSD_POOL" | "CONVEX_STECRV_POOL" | "CONVEX_FRAX3CRV_POOL";
|
|
9
9
|
export declare type SupportedContract = UniswapV2Contract | "UNISWAP_V3_ROUTER" | CurvePoolContract | YearnVaultContract | "CONVEX_BOOSTER" | ConvexPoolContract | "CONVEX_CLAIM_ZAP" | "LIDO_STETH_GATEWAY";
|
|
@@ -33,6 +33,13 @@ export declare type CurveSteCRVPoolParams = {
|
|
|
33
33
|
pool: Record<NetworkType, string>;
|
|
34
34
|
lpToken: "steCRV";
|
|
35
35
|
} & BaseContractParams;
|
|
36
|
+
export declare type CurveDepositParams = {
|
|
37
|
+
protocol: Protocols.Curve;
|
|
38
|
+
type: AdapterInterface.CURVE_V1_DEPOSIT;
|
|
39
|
+
pool: Record<NetworkType, string>;
|
|
40
|
+
lpToken: CurveLPToken;
|
|
41
|
+
nCoins: number;
|
|
42
|
+
} & BaseContractParams;
|
|
36
43
|
declare type YearnParams = {
|
|
37
44
|
protocol: Protocols.Yearn;
|
|
38
45
|
type: AdapterInterface.YEARN_V2;
|
|
@@ -52,7 +59,7 @@ export declare type LidoParams = {
|
|
|
52
59
|
contract: Record<NetworkType, string>;
|
|
53
60
|
lpToken: "steCRV";
|
|
54
61
|
} & BaseContractParams;
|
|
55
|
-
export declare type ContractParams = UniswapV2Params | UniswapV3Params | CurveParams | CurveSteCRVPoolParams | YearnParams | ConvexParams | ConvexPoolParams | LidoParams;
|
|
62
|
+
export declare type ContractParams = UniswapV2Params | UniswapV3Params | CurveParams | CurveSteCRVPoolParams | CurveDepositParams | YearnParams | ConvexParams | ConvexPoolParams | LidoParams;
|
|
56
63
|
export declare const contractParams: Record<SupportedContract, ContractParams>;
|
|
57
64
|
export declare const contractsByAddress: Record<string, SupportedContract>;
|
|
58
65
|
export {};
|
package/lib/core/contracts.js
CHANGED
|
@@ -32,6 +32,7 @@ exports.contractsByNetwork = {
|
|
|
32
32
|
CURVE_FRAX_POOL: token_1.tokenDataByNetwork.Mainnet.FRAX3CRV,
|
|
33
33
|
CURVE_LUSD_POOL: token_1.tokenDataByNetwork.Mainnet.LUSD3CRV,
|
|
34
34
|
CURVE_SUSD_POOL: "0xA5407eAE9Ba41422680e2e00537571bcC53efBfD",
|
|
35
|
+
CURVE_SUSD_DEPOSIT: "0xFCBa3E75865d2d561BE8D220616520c171F12851",
|
|
35
36
|
CURVE_GUSD_POOL: "0x4f062658EaAF2C1ccf8C8e36D6824CDf41167956",
|
|
36
37
|
// YEARN
|
|
37
38
|
YEARN_DAI_VAULT: token_1.tokenDataByNetwork.Mainnet.yvDAI,
|
|
@@ -61,6 +62,7 @@ exports.contractsByNetwork = {
|
|
|
61
62
|
CURVE_FRAX_POOL: "",
|
|
62
63
|
CURVE_LUSD_POOL: token_1.tokenDataByNetwork.Kovan.LUSD3CRV,
|
|
63
64
|
CURVE_SUSD_POOL: "0x032f1cE00865F3499C0052ceBA5F2348842416DB",
|
|
65
|
+
CURVE_SUSD_DEPOSIT: "",
|
|
64
66
|
CURVE_GUSD_POOL: "",
|
|
65
67
|
// YEARN
|
|
66
68
|
YEARN_DAI_VAULT: token_1.tokenDataByNetwork.Kovan.yvDAI,
|
|
@@ -137,12 +139,23 @@ exports.contractParams = {
|
|
|
137
139
|
lpToken: "crvPlain3andSUSD",
|
|
138
140
|
tokens: ["DAI", "USDC", "USDT", "sUSD"]
|
|
139
141
|
},
|
|
142
|
+
CURVE_SUSD_DEPOSIT: {
|
|
143
|
+
name: "Curve SUSD Deposit",
|
|
144
|
+
protocol: protocols_1.Protocols.Curve,
|
|
145
|
+
type: adapters_1.AdapterInterface.CURVE_V1_DEPOSIT,
|
|
146
|
+
lpToken: "crvPlain3andSUSD",
|
|
147
|
+
pool: {
|
|
148
|
+
Mainnet: "0x22eE18aca7F3Ee920D01F25dA85840D12d98E8Ca",
|
|
149
|
+
Kovan: ""
|
|
150
|
+
},
|
|
151
|
+
nCoins: 4
|
|
152
|
+
},
|
|
140
153
|
CURVE_GUSD_POOL: {
|
|
141
154
|
name: "Curve GUSD",
|
|
142
155
|
protocol: protocols_1.Protocols.Curve,
|
|
143
156
|
type: adapters_1.AdapterInterface.CURVE_V1_2ASSETS,
|
|
144
157
|
lpToken: "gusd3CRV",
|
|
145
|
-
tokens: ["3Crv", "
|
|
158
|
+
tokens: ["3Crv", "GUSD"]
|
|
146
159
|
},
|
|
147
160
|
YEARN_DAI_VAULT: {
|
|
148
161
|
name: "Yearn DAI",
|