@gearbox-protocol/sdk 0.0.42 → 0.0.45
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/contracts.d.ts +6 -3
- package/lib/core/contracts.js +12 -7
- package/lib/core/token.d.ts +14 -2
- package/lib/core/token.js +522 -43
- package/lib/core/tokenData.d.ts +0 -4
- package/lib/core/tradeTypes.d.ts +59 -0
- package/lib/core/tradeTypes.js +18 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/package.json +1 -1
- package/src/core/contracts.ts +36 -25
- package/src/core/token.ts +533 -42
- package/src/core/tokenData.ts +0 -6
- package/src/core/tradeTypes.ts +83 -0
- package/src/index.ts +0 -1
- package/lib/devops/loggedDeployer.d.ts +0 -7
- package/lib/devops/loggedDeployer.js +0 -22
- package/lib/devops/verifierDeployer.d.ts +0 -13
- package/lib/devops/verifierDeployer.js +0 -161
- package/src/devops/loggedDeployer.ts +0 -22
- package/src/devops/verifierDeployer.ts +0 -79
package/lib/core/contracts.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { AdapterInterface } from "./adapters";
|
|
2
2
|
import { NetworkType } from "./constants";
|
|
3
3
|
import { Protocols } from "./protocols";
|
|
4
|
-
import { CurveLPToken, NormalToken } from "./token";
|
|
4
|
+
import { ConvexStakedPhantomToken, CurveLPToken, NormalToken } from "./token";
|
|
5
|
+
export declare type UniswapV2Contract = "UNISWAP_V2_ROUTER" | "SUSHISWAP_ROUTER";
|
|
5
6
|
export declare type CurvePoolContract = "CURVE_3POOL" | "CURVE_STETH_GATEWAY" | "CURVE_FRAX" | "CURVE_LUSD" | "CURVE_GUSD" | "CURVE_SUSD";
|
|
7
|
+
export declare type YearnVaultContract = "YEARN_DAI" | "YEARN_USDC" | "YEARN_WETH" | "YEARN_WBTC" | "YEARN_CURVE_FRAX" | "YEARN_CURVE_STETH";
|
|
6
8
|
export declare type ConvexPoolContract = "CONVEX_3CRV" | "CONVEX_GUSD" | "CONVEX_SUSD" | "CONVEX_STECRV" | "CONVEX_FRAX3CRV";
|
|
7
|
-
export declare type SupportedContract =
|
|
9
|
+
export declare type SupportedContract = UniswapV2Contract | "UNISWAP_V3_ROUTER" | CurvePoolContract | YearnVaultContract | "CONVEX_BOOSTER" | ConvexPoolContract | "CONVEX_CLAIM_ZAP" | "LIDO_STETH_GATEWAY";
|
|
8
10
|
export declare const contractsByNetwork: Record<NetworkType, Record<SupportedContract, string>>;
|
|
9
11
|
export declare const UNISWAP_V3_QUOTER = "0xb27308f9f90d607463bb33ea1bebb41c27ce5ab6";
|
|
10
12
|
export declare type ContractParams = {
|
|
@@ -33,8 +35,9 @@ export declare type ContractParams = {
|
|
|
33
35
|
} | {
|
|
34
36
|
protocol: Protocols.Convex;
|
|
35
37
|
type: AdapterInterface.CONVEX_V1_BASE_REWARD_POOL;
|
|
38
|
+
stakedToken: ConvexStakedPhantomToken;
|
|
36
39
|
} | {
|
|
37
40
|
protocol: Protocols.Lido;
|
|
38
41
|
type: AdapterInterface.LIDO_V1;
|
|
39
42
|
};
|
|
40
|
-
export declare const
|
|
43
|
+
export declare const contractParams: Record<SupportedContract, ContractParams>;
|
package/lib/core/contracts.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* (c) Gearbox.fi, 2021
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.
|
|
8
|
+
exports.contractParams = exports.UNISWAP_V3_QUOTER = exports.contractsByNetwork = void 0;
|
|
9
9
|
var adapters_1 = require("./adapters");
|
|
10
10
|
var protocols_1 = require("./protocols");
|
|
11
11
|
var token_1 = require("./token");
|
|
@@ -70,7 +70,7 @@ exports.contractsByNetwork = {
|
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
exports.UNISWAP_V3_QUOTER = "0xb27308f9f90d607463bb33ea1bebb41c27ce5ab6";
|
|
73
|
-
exports.
|
|
73
|
+
exports.contractParams = {
|
|
74
74
|
UNISWAP_V2_ROUTER: {
|
|
75
75
|
protocol: protocols_1.Protocols.Uniswap,
|
|
76
76
|
type: adapters_1.AdapterInterface.UNISWAP_V2_ROUTER
|
|
@@ -150,23 +150,28 @@ exports.knownContracts = {
|
|
|
150
150
|
},
|
|
151
151
|
CONVEX_3CRV: {
|
|
152
152
|
protocol: protocols_1.Protocols.Convex,
|
|
153
|
-
type: adapters_1.AdapterInterface.CONVEX_V1_BASE_REWARD_POOL
|
|
153
|
+
type: adapters_1.AdapterInterface.CONVEX_V1_BASE_REWARD_POOL,
|
|
154
|
+
stakedToken: "stkcvx3Crv"
|
|
154
155
|
},
|
|
155
156
|
CONVEX_GUSD: {
|
|
156
157
|
protocol: protocols_1.Protocols.Convex,
|
|
157
|
-
type: adapters_1.AdapterInterface.CONVEX_V1_BASE_REWARD_POOL
|
|
158
|
+
type: adapters_1.AdapterInterface.CONVEX_V1_BASE_REWARD_POOL,
|
|
159
|
+
stakedToken: "stkcvxgusd3CRV"
|
|
158
160
|
},
|
|
159
161
|
CONVEX_SUSD: {
|
|
160
162
|
protocol: protocols_1.Protocols.Convex,
|
|
161
|
-
type: adapters_1.AdapterInterface.CONVEX_V1_BASE_REWARD_POOL
|
|
163
|
+
type: adapters_1.AdapterInterface.CONVEX_V1_BASE_REWARD_POOL,
|
|
164
|
+
stakedToken: "stkcvxcrvPlain3andSUSD"
|
|
162
165
|
},
|
|
163
166
|
CONVEX_STECRV: {
|
|
164
167
|
protocol: protocols_1.Protocols.Convex,
|
|
165
|
-
type: adapters_1.AdapterInterface.CONVEX_V1_BASE_REWARD_POOL
|
|
168
|
+
type: adapters_1.AdapterInterface.CONVEX_V1_BASE_REWARD_POOL,
|
|
169
|
+
stakedToken: "stkcvxsteCRV"
|
|
166
170
|
},
|
|
167
171
|
CONVEX_FRAX3CRV: {
|
|
168
172
|
protocol: protocols_1.Protocols.Convex,
|
|
169
|
-
type: adapters_1.AdapterInterface.CONVEX_V1_BASE_REWARD_POOL
|
|
173
|
+
type: adapters_1.AdapterInterface.CONVEX_V1_BASE_REWARD_POOL,
|
|
174
|
+
stakedToken: "stkcvxFRAX3CRV"
|
|
170
175
|
},
|
|
171
176
|
CONVEX_CLAIM_ZAP: {
|
|
172
177
|
protocol: protocols_1.Protocols.Convex,
|
package/lib/core/token.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NetworkType } from "./constants";
|
|
2
2
|
import { ConvexPoolContract } from "./contracts";
|
|
3
|
-
|
|
3
|
+
import { TradeAction } from "./tradeTypes";
|
|
4
|
+
export declare enum TokenType {
|
|
4
5
|
CONNECTOR = 0,
|
|
5
6
|
NORMAL_TOKEN = 1,
|
|
6
7
|
CURVE_LP = 2,
|
|
@@ -21,40 +22,51 @@ export declare type SupportedToken = NormalToken | YearnLPToken | CurveLPToken |
|
|
|
21
22
|
export declare type TokenDataI = {
|
|
22
23
|
symbol: NormalToken;
|
|
23
24
|
type: TokenType.CONNECTOR;
|
|
25
|
+
swapActions: Array<TradeAction>;
|
|
26
|
+
lpActions?: Array<TradeAction>;
|
|
24
27
|
} | {
|
|
25
28
|
symbol: NormalToken;
|
|
26
29
|
type: TokenType.NORMAL_TOKEN;
|
|
30
|
+
swapActions: Array<TradeAction>;
|
|
31
|
+
lpActions?: Array<TradeAction>;
|
|
27
32
|
} | {
|
|
28
33
|
symbol: CurveLPToken;
|
|
29
34
|
type: TokenType.CURVE_LP;
|
|
35
|
+
swapActions?: Array<TradeAction>;
|
|
36
|
+
lpActions: Array<TradeAction>;
|
|
30
37
|
} | {
|
|
31
38
|
symbol: YearnLPToken;
|
|
32
39
|
type: TokenType.YEARN_VAULT;
|
|
33
40
|
underlying: NormalToken;
|
|
41
|
+
lpActions: Array<TradeAction>;
|
|
34
42
|
} | {
|
|
35
43
|
symbol: CurveLPToken;
|
|
36
44
|
type: TokenType.META_CURVE_LP;
|
|
45
|
+
lpActions: Array<TradeAction>;
|
|
37
46
|
} | {
|
|
38
47
|
symbol: YearnLPToken;
|
|
39
48
|
type: TokenType.YEARN_VAULT_OF_CURVE_LP;
|
|
40
49
|
underlying: CurveLPToken;
|
|
50
|
+
lpActions: Array<TradeAction>;
|
|
41
51
|
} | {
|
|
42
52
|
symbol: YearnLPToken;
|
|
43
53
|
type: TokenType.YEARN_VAULT_OF_META_CURVE_LP;
|
|
44
54
|
underlying: CurveLPToken;
|
|
55
|
+
lpActions: Array<TradeAction>;
|
|
45
56
|
} | {
|
|
46
57
|
symbol: ConvexLPToken;
|
|
47
58
|
type: TokenType.CONVEX_LP_TOKEN;
|
|
48
59
|
pool: ConvexPoolContract;
|
|
49
60
|
underlying: CurveLPToken;
|
|
50
61
|
stakedToken: ConvexStakedPhantomToken;
|
|
62
|
+
lpActions: Array<TradeAction>;
|
|
51
63
|
} | {
|
|
52
64
|
symbol: ConvexStakedPhantomToken;
|
|
53
65
|
type: TokenType.CONVEX_STAKED_PHANTOM_TOKEN;
|
|
54
66
|
pool: ConvexPoolContract;
|
|
55
67
|
underlying: CurveLPToken;
|
|
56
68
|
lpToken: ConvexLPToken;
|
|
69
|
+
lpActions: Array<TradeAction>;
|
|
57
70
|
};
|
|
58
71
|
export declare const supportedTokens: Record<SupportedToken, TokenDataI>;
|
|
59
72
|
export declare const tokenDataByNetwork: Record<NetworkType, Record<SupportedToken, string>>;
|
|
60
|
-
export {};
|