@gearbox-protocol/sdk 1.2.2 → 1.2.5

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.
@@ -14,5 +14,6 @@ export declare enum AdapterInterface {
14
14
  CONVEX_V1_BASE_REWARD_POOL = 12,
15
15
  CONVEX_V1_BOOSTER = 13,
16
16
  CONVEX_V1_CLAIM_ZAP = 14,
17
- LIDO_V1 = 15
17
+ LIDO_V1 = 15,
18
+ UNIVERSAL = 16
18
19
  }
@@ -19,4 +19,5 @@ var AdapterInterface;
19
19
  AdapterInterface[AdapterInterface["CONVEX_V1_BOOSTER"] = 13] = "CONVEX_V1_BOOSTER";
20
20
  AdapterInterface[AdapterInterface["CONVEX_V1_CLAIM_ZAP"] = 14] = "CONVEX_V1_CLAIM_ZAP";
21
21
  AdapterInterface[AdapterInterface["LIDO_V1"] = 15] = "LIDO_V1";
22
+ AdapterInterface[AdapterInterface["UNIVERSAL"] = 16] = "UNIVERSAL";
22
23
  })(AdapterInterface = exports.AdapterInterface || (exports.AdapterInterface = {}));
@@ -9,7 +9,7 @@ export declare type UniswapV2Contract = "UNISWAP_V2_ROUTER" | "SUSHISWAP_ROUTER"
9
9
  export declare type CurvePoolContract = "CURVE_3CRV_POOL" | "CURVE_STETH_GATEWAY" | "CURVE_FRAX_POOL" | "CURVE_LUSD_POOL" | "CURVE_GUSD_POOL" | "CURVE_SUSD_POOL" | "CURVE_SUSD_DEPOSIT";
10
10
  export declare type YearnVaultContract = "YEARN_DAI_VAULT" | "YEARN_USDC_VAULT" | "YEARN_WETH_VAULT" | "YEARN_WBTC_VAULT" | "YEARN_CURVE_FRAX_VAULT" | "YEARN_CURVE_STETH_VAULT";
11
11
  export declare type ConvexPoolContract = "CONVEX_3CRV_POOL" | "CONVEX_GUSD_POOL" | "CONVEX_SUSD_POOL" | "CONVEX_STECRV_POOL" | "CONVEX_FRAX3CRV_POOL" | "CONVEX_LUSD3CRV_POOL";
12
- export declare type SupportedContract = UniswapV2Contract | "UNISWAP_V3_ROUTER" | CurvePoolContract | YearnVaultContract | "CONVEX_BOOSTER" | ConvexPoolContract | "CONVEX_CLAIM_ZAP" | "LIDO_STETH_GATEWAY";
12
+ export declare type SupportedContract = UniswapV2Contract | "UNISWAP_V3_ROUTER" | CurvePoolContract | YearnVaultContract | "CONVEX_BOOSTER" | ConvexPoolContract | "CONVEX_CLAIM_ZAP" | "LIDO_STETH_GATEWAY" | "UNIVERSAL_ADAPTER";
13
13
  export declare const contractsByNetwork: Record<NetworkType, Record<SupportedContract, string>>;
14
14
  export declare const UNISWAP_V3_QUOTER = "0xb27308f9f90d607463bb33ea1bebb41c27ce5ab6";
15
15
  export interface BaseContractParams {
@@ -63,7 +63,11 @@ export declare type LidoParams = {
63
63
  oracle: Record<NetworkType, string>;
64
64
  lpToken: "steCRV";
65
65
  } & BaseContractParams;
66
- export declare type ContractParams = UniswapV2Params | UniswapV3Params | CurveParams | CurveSteCRVPoolParams | YearnParams | ConvexParams | ConvexPoolParams | LidoParams;
66
+ export declare type UniversalParams = {
67
+ protocol: Protocols.Gearbox;
68
+ type: AdapterInterface.UNIVERSAL;
69
+ } & BaseContractParams;
70
+ export declare type ContractParams = UniswapV2Params | UniswapV3Params | CurveParams | CurveSteCRVPoolParams | YearnParams | ConvexParams | ConvexPoolParams | LidoParams | UniversalParams;
67
71
  export declare const contractParams: Record<SupportedContract, ContractParams>;
68
72
  export declare const contractsByAddress: Record<string, SupportedContract>;
69
73
  export {};
@@ -47,6 +47,8 @@ exports.contractsByNetwork = {
47
47
  CONVEX_CLAIM_ZAP: "0x92Cf9E5e4D1Dfbf7dA0d2BB3e884a68416a65070",
48
48
  // LIDO
49
49
  LIDO_STETH_GATEWAY: "0x55045Eaae19d92680E02231e4Ce7bBEB4814ca64",
50
+ // GEARBOX
51
+ UNIVERSAL_ADAPTER: "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC",
50
52
  },
51
53
  Goerli: {
52
54
  UNISWAP_V2_ROUTER: "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
@@ -78,6 +80,8 @@ exports.contractsByNetwork = {
78
80
  CONVEX_CLAIM_ZAP: "0x6767c6492Df4920Be1e7667531046Bd483eb177E",
79
81
  // LIDO
80
82
  LIDO_STETH_GATEWAY: "TODO: DEPLOY ME",
83
+ // GEARBOX
84
+ UNIVERSAL_ADAPTER: "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC",
81
85
  },
82
86
  };
83
87
  exports.UNISWAP_V3_QUOTER = "0xb27308f9f90d607463bb33ea1bebb41c27ce5ab6";
@@ -282,6 +286,11 @@ exports.contractParams = {
282
286
  },
283
287
  lpToken: "steCRV",
284
288
  },
289
+ UNIVERSAL_ADAPTER: {
290
+ name: "Gearbox universal adapter",
291
+ protocol: protocols_1.Protocols.Gearbox,
292
+ type: adapters_1.AdapterInterface.UNIVERSAL,
293
+ },
285
294
  };
286
295
  exports.contractsByAddress = (0, mappers_1.objectEntries)(exports.contractsByNetwork).reduce(function (acc, _a) {
287
296
  var contracts = _a[1];
@@ -4,7 +4,8 @@ export declare enum Protocols {
4
4
  Curve = 2,
5
5
  Yearn = 3,
6
6
  Convex = 4,
7
- Lido = 5
7
+ Lido = 5,
8
+ Gearbox = 6
8
9
  }
9
10
  export interface ProtocolData {
10
11
  name: string;
@@ -10,6 +10,7 @@ var Protocols;
10
10
  Protocols[Protocols["Yearn"] = 3] = "Yearn";
11
11
  Protocols[Protocols["Convex"] = 4] = "Convex";
12
12
  Protocols[Protocols["Lido"] = 5] = "Lido";
13
+ Protocols[Protocols["Gearbox"] = 6] = "Gearbox";
13
14
  })(Protocols = exports.Protocols || (exports.Protocols = {}));
14
15
  exports.protocolData = (_a = {},
15
16
  _a[Protocols.Uniswap] = {
@@ -36,4 +37,8 @@ exports.protocolData = (_a = {},
36
37
  name: "Lido",
37
38
  icon: "/protocols/lido.svg",
38
39
  },
40
+ _a[Protocols.Gearbox] = {
41
+ name: "Gearbox",
42
+ icon: "",
43
+ },
39
44
  _a);
@@ -33,5 +33,5 @@ export declare type PriceFeedData = {
33
33
  };
34
34
  export interface TokenPriceFeedData {
35
35
  priceFeedETH?: PriceFeedData;
36
- priceFeedUSD?: PriceFeedData;
36
+ priceFeedUSD: PriceFeedData;
37
37
  }
@@ -62,7 +62,7 @@ exports.priceFeedsByNetwork = {
62
62
  priceFeedUSD: {
63
63
  type: oracles_1.OracleType.CHAINLINK_ORACLE,
64
64
  address: {
65
- Mainnet: "0xcd627aa160a6fa45eb793d19ef54f5062f20f33f",
65
+ Mainnet: "0xCd627aA160A6fA45Eb793D19Ef54f5062F20f33f",
66
66
  Goerli: "0x7f93084ECf52D4361A3E3E25F9Dafe005830C98C",
67
67
  },
68
68
  },
@@ -110,7 +110,7 @@ exports.priceFeedsByNetwork = {
110
110
  priceFeedUSD: {
111
111
  type: oracles_1.OracleType.CHAINLINK_ORACLE,
112
112
  address: {
113
- Mainnet: "0x31e0a88fecb6ec0a411dbe0e9e76391498296ee9",
113
+ Mainnet: "0x31e0a88fecB6eC0a411DBe0e9E76391498296EE9",
114
114
  Goerli: "0xAF884aF60E28214233039c243F5DF98a52355CFB",
115
115
  },
116
116
  },
@@ -167,7 +167,7 @@ exports.priceFeedsByNetwork = {
167
167
  priceFeedUSD: {
168
168
  type: oracles_1.OracleType.CHAINLINK_ORACLE,
169
169
  address: {
170
- Mainnet: "0xcc70f09a6cc17553b2e31954cd36e4a2d89501f7",
170
+ Mainnet: "0xCc70F09A6CC17553b2E31954cD36E4A2d89501f7",
171
171
  Goerli: "0xD49468DFB9512a657D1B308d04B7e31DdC483960",
172
172
  },
173
173
  },
@@ -215,7 +215,7 @@ exports.priceFeedsByNetwork = {
215
215
  priceFeedUSD: {
216
216
  type: oracles_1.OracleType.CHAINLINK_ORACLE,
217
217
  address: {
218
- Mainnet: "0x3e7d1eab13ad0104d2750b8863b489d65364e32d",
218
+ Mainnet: "0x3E7d1eAB13ad0104d2750B8863b489D65364e32D",
219
219
  Goerli: "0x45a963a68848a850262Cb5aa1F5Be7dC4a6f0Abd",
220
220
  },
221
221
  },
@@ -294,7 +294,7 @@ exports.priceFeedsByNetwork = {
294
294
  priceFeedUSD: {
295
295
  type: oracles_1.OracleType.CHAINLINK_ORACLE,
296
296
  address: {
297
- Mainnet: "0xd962fc30a72a84ce50161031391756bf2876af5d",
297
+ Mainnet: "0xd962fC30A72A84cE50161031391756Bf2876Af5D",
298
298
  Goerli: "0xF958760fd9c0E019e355f31c3D69f0E5239597D0",
299
299
  },
300
300
  },
@@ -303,7 +303,7 @@ exports.priceFeedsByNetwork = {
303
303
  priceFeedUSD: {
304
304
  type: oracles_1.OracleType.CHAINLINK_ORACLE,
305
305
  address: {
306
- Mainnet: "0xb9e1e3a9feff48998e45fa90847ed4d467e8bcfd",
306
+ Mainnet: "0xB9E1E3A9feFf48998E45Fa90847ed4D467E8BcfD",
307
307
  Goerli: "0xC095CEa800dBAdcCc742124b68399Ac6ADF5d8eC",
308
308
  },
309
309
  },
@@ -321,7 +321,7 @@ exports.priceFeedsByNetwork = {
321
321
  priceFeedUSD: {
322
322
  type: oracles_1.OracleType.CHAINLINK_ORACLE,
323
323
  address: {
324
- Mainnet: "0xad35bd71b9afe6e4bdc266b345c198eadef9ad94",
324
+ Mainnet: "0xad35Bd71b9aFE6e4bDc266B345c198eaDEf9Ad94",
325
325
  Goerli: "0x725F188BF87DaF7A7c3de39276ad78a2b8559793",
326
326
  },
327
327
  },
@@ -330,7 +330,7 @@ exports.priceFeedsByNetwork = {
330
330
  priceFeedUSD: {
331
331
  type: oracles_1.OracleType.CHAINLINK_ORACLE,
332
332
  address: {
333
- Mainnet: "0x6ebc52c8c1089be9eb3945c4350b68b8e4c2233f",
333
+ Mainnet: "0x6Ebc52C8C1089be9eB3945C4350B68B8E4C2233f",
334
334
  Goerli: "0x2E49F1FbBdA0000E89376D3332A1d42dBeF3D205",
335
335
  },
336
336
  },
@@ -357,7 +357,7 @@ exports.priceFeedsByNetwork = {
357
357
  priceFeedUSD: {
358
358
  type: oracles_1.OracleType.CHAINLINK_ORACLE,
359
359
  address: {
360
- Mainnet: "0x8c110b94c5f1d347facf5e1e938ab2db60e3c9a8",
360
+ Mainnet: "0x8c110B94C5f1d347fAcF5E1E938AB2db60E3c9a8",
361
361
  Goerli: "0x7F2414A025EA6BbF06e422bC9E78Acd66c94873a",
362
362
  },
363
363
  },
@@ -63,7 +63,7 @@ exports.tokenDataByNetwork = {
63
63
  // CONVEX LP TOKENS
64
64
  cvx3Crv: "0x30D9410ED1D5DA1F6C8391af5338C93ab8d4035C",
65
65
  cvxsteCRV: "0x9518c9063eB0262D791f38d8d6Eb0aca33c63ed0",
66
- cvxFRAX3CRV: "0xd632f22692FaC7611d2AA1C0D552930D43CAEd3B",
66
+ cvxFRAX3CRV: "0xbE0F6478E0E4894CFb14f32855603A083A57c7dA",
67
67
  cvxLUSD3CRV: "0xFB9B2f06FDb404Fd3E2278E9A9edc8f252F273d0",
68
68
  cvxcrvPlain3andSUSD: "0x11D200ef1409cecA8D6d23e6496550f707772F11",
69
69
  cvxgusd3CRV: "0x15c2471ef46Fa721990730cfa526BcFb45574576",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "1.2.2",
3
+ "version": "1.2.5",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",