@gearbox-protocol/sdk 2.1.28 → 2.1.30

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.
@@ -12,7 +12,7 @@ export type YearnVaultContract = "YEARN_DAI_VAULT" | "YEARN_USDC_VAULT" | "YEARN
12
12
  export type ConvexPoolContract = "CONVEX_3CRV_POOL" | "CONVEX_FRAX_USDC_POOL" | "CONVEX_GUSD_POOL" | "CONVEX_SUSD_POOL" | "CONVEX_STECRV_POOL" | "CONVEX_FRAX3CRV_POOL" | "CONVEX_LUSD3CRV_POOL" | "CONVEX_OHMFRAXBP_POOL" | "CONVEX_MIM3CRV_POOL" | "CONVEX_CRVETH_POOL" | "CONVEX_CVXETH_POOL" | "CONVEX_3CRYPTO_POOL" | "CONVEX_LDOETH_POOL";
13
13
  export type AaveV2PoolContract = "AAVE_V2_DAI_POOL" | "AAVE_V2_USDC_POOL" | "AAVE_V2_USDT_POOL" | "AAVE_V2_WETH_POOL";
14
14
  export type AaveV2TokenWrapperContract = "AAVE_V2_DAI_TOKEN_WRAPPER" | "AAVE_V2_USDC_TOKEN_WRAPPER" | "AAVE_V2_USDT_TOKEN_WRAPPER" | "AAVE_V2_WETH_TOKEN_WRAPPER";
15
- export type CompoundV2PoolContract = "COMPOUND_V2_DAI_POOL" | "COMPOUND_V2_USDC_POOL" | "COMPOUND_V2_USDT_POOL" | "COMPOUND_V2_WETH_POOL" | "COMPOUND_V2_LINK_POOL";
15
+ export type CompoundV2PoolContract = "COMPOUND_V2_DAI_POOL" | "COMPOUND_V2_USDC_POOL" | "COMPOUND_V2_USDT_POOL" | "COMPOUND_V2_ETH_POOL" | "COMPOUND_V2_LINK_POOL";
16
16
  export type SupportedContract = UniswapV2Contract | "UNISWAP_V3_ROUTER" | CurvePoolContract | "CURVE_GEAR_POOL" | YearnVaultContract | "CONVEX_BOOSTER" | ConvexPoolContract | "CONVEX_CLAIM_ZAP" | "LIDO_STETH_GATEWAY" | "LIDO_WSTETH" | "UNIVERSAL_ADAPTER" | "BALANCER_VAULT" | AaveV2PoolContract | AaveV2TokenWrapperContract | CompoundV2PoolContract;
17
17
  export declare const contractsByNetwork: Record<NetworkType, Record<SupportedContract, string>>;
18
18
  export declare const UNISWAP_V3_QUOTER = "NOT DEPLOYED";
@@ -74,7 +74,7 @@ exports.contractsByNetwork = {
74
74
  COMPOUND_V2_USDC_POOL: token_1.tokenDataByNetwork.Mainnet.cUSDC,
75
75
  COMPOUND_V2_USDT_POOL: token_1.tokenDataByNetwork.Mainnet.cUSDT,
76
76
  COMPOUND_V2_LINK_POOL: token_1.tokenDataByNetwork.Mainnet.cLINK,
77
- COMPOUND_V2_WETH_POOL: token_1.tokenDataByNetwork.Mainnet.cWETH,
77
+ COMPOUND_V2_ETH_POOL: token_1.tokenDataByNetwork.Mainnet.cETH,
78
78
  },
79
79
  //
80
80
  //
@@ -152,7 +152,7 @@ exports.contractsByNetwork = {
152
152
  COMPOUND_V2_USDC_POOL: token_1.tokenDataByNetwork.Arbitrum.cUSDC,
153
153
  COMPOUND_V2_USDT_POOL: token_1.tokenDataByNetwork.Arbitrum.cUSDT,
154
154
  COMPOUND_V2_LINK_POOL: token_1.tokenDataByNetwork.Mainnet.cLINK,
155
- COMPOUND_V2_WETH_POOL: token_1.tokenDataByNetwork.Arbitrum.cWETH,
155
+ COMPOUND_V2_ETH_POOL: token_1.tokenDataByNetwork.Arbitrum.cETH,
156
156
  },
157
157
  };
158
158
  exports.UNISWAP_V3_QUOTER = constants_1.NOT_DEPLOYED;
@@ -637,8 +637,8 @@ exports.contractParams = {
637
637
  type: adapters_1.AdapterInterface.COMPOUND_V2_CERC20,
638
638
  underlying: "LINK",
639
639
  },
640
- COMPOUND_V2_WETH_POOL: {
641
- name: "Compound V2 DAI",
640
+ COMPOUND_V2_ETH_POOL: {
641
+ name: "Compound V2 ETH",
642
642
  protocol: protocols_1.Protocols.CompoundV2,
643
643
  type: adapters_1.AdapterInterface.COMPOUND_V2_CETHER,
644
644
  underlying: "WETH",
@@ -2,7 +2,7 @@ import { TradeAction } from "../pathfinder/tradeTypes";
2
2
  import { NormalToken } from "./normal";
3
3
  import type { TokenBase } from "./token";
4
4
  import { TokenType } from "./tokenType";
5
- export type CompoundV2LPToken = "cDAI" | "cUSDC" | "cWETH" | "cUSDT" | "cLINK";
5
+ export type CompoundV2LPToken = "cDAI" | "cUSDC" | "cETH" | "cUSDT" | "cLINK";
6
6
  export type CompoundV2PoolTokenData = {
7
7
  symbol: CompoundV2LPToken;
8
8
  type: TokenType.COMPOUND_V2_C_TOKEN;
@@ -43,15 +43,15 @@ exports.compoundV2Tokens = {
43
43
  },
44
44
  ],
45
45
  },
46
- cWETH: {
47
- name: "CompoundV2 cWETH",
48
- symbol: "cWETH",
46
+ cETH: {
47
+ name: "CompoundV2 cETH",
48
+ symbol: "cETH",
49
49
  type: tokenType_1.TokenType.COMPOUND_V2_C_TOKEN,
50
50
  underlying: "WETH",
51
51
  lpActions: [
52
52
  {
53
53
  type: tradeTypes_1.TradeType.CompoundV2Withdraw,
54
- contract: "COMPOUND_V2_WETH_POOL",
54
+ contract: "COMPOUND_V2_ETH_POOL",
55
55
  tokenOut: "WETH",
56
56
  },
57
57
  ],
@@ -109,6 +109,6 @@ exports.decimals = {
109
109
  cUSDC: 6,
110
110
  cUSDT: 6,
111
111
  cLINK: 18,
112
- cWETH: 18,
112
+ cETH: 18,
113
113
  SHIB: 18,
114
114
  };
@@ -142,11 +142,11 @@ exports.tokenDataByNetwork = {
142
142
  waUSDC: constants_1.NOT_DEPLOYED,
143
143
  waUSDT: constants_1.NOT_DEPLOYED,
144
144
  waWETH: constants_1.NOT_DEPLOYED,
145
- cDAI: constants_1.NOT_DEPLOYED,
146
- cUSDC: constants_1.NOT_DEPLOYED,
147
- cUSDT: constants_1.NOT_DEPLOYED,
148
- cWETH: constants_1.NOT_DEPLOYED,
149
- cLINK: constants_1.NOT_DEPLOYED,
145
+ cDAI: "0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643",
146
+ cUSDC: "0x39AA39c021dfbaE8faC545936693aC917d5E7563",
147
+ cUSDT: "0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9",
148
+ cETH: "0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5",
149
+ cLINK: "0xFAce851a4921ce59e912d19329929CE6da6EB0c7",
150
150
  },
151
151
  ///
152
152
  ///
@@ -270,7 +270,7 @@ exports.tokenDataByNetwork = {
270
270
  cDAI: constants_1.NOT_DEPLOYED,
271
271
  cUSDC: constants_1.NOT_DEPLOYED,
272
272
  cUSDT: constants_1.NOT_DEPLOYED,
273
- cWETH: constants_1.NOT_DEPLOYED,
273
+ cETH: constants_1.NOT_DEPLOYED,
274
274
  cLINK: constants_1.NOT_DEPLOYED,
275
275
  },
276
276
  };
@@ -17,8 +17,9 @@ class CreditAccountWatcher {
17
17
  * @returns Arrays of hashes for opened accounts
18
18
  */
19
19
  static async getOpenAccounts(creditManager, provider, toBlock) {
20
- if (creditManager.version !== 2)
20
+ if (!(creditManager.version === 2 || creditManager.version === 210)) {
21
21
  throw new Error("Works for V2 only");
22
+ }
22
23
  const eventsByDate = [];
23
24
  const addToEvents = (e, address, operation) => {
24
25
  eventsByDate.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "2.1.28",
3
+ "version": "2.1.30",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",