@gearbox-protocol/sdk 1.27.4 → 1.27.6

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.
@@ -3,4 +3,23 @@
3
3
  // (c) Gearbox Foundation, 2023
4
4
  pragma solidity ^0.8.17;
5
5
 
6
- // $ENUM_PRICEFEEDTYPE$
6
+ enum PriceFeedType {
7
+ CHAINLINK_ORACLE,
8
+ YEARN_ORACLE,
9
+ CURVE_2LP_ORACLE,
10
+ CURVE_3LP_ORACLE,
11
+ CURVE_4LP_ORACLE,
12
+ ZERO_ORACLE,
13
+ WSTETH_ORACLE,
14
+ BOUNDED_ORACLE,
15
+ COMPOSITE_ORACLE,
16
+ WRAPPED_AAVE_V2_ORACLE,
17
+ COMPOUND_V2_ORACLE,
18
+ BALANCER_STABLE_LP_ORACLE,
19
+ BALANCER_WEIGHTED_LP_ORACLE,
20
+ CURVE_CRYPTO_ORACLE,
21
+ THE_SAME_AS,
22
+ REDSTONE_ORACLE,
23
+ ERC4626_VAULT_ORACLE,
24
+ NETWORK_DIFFERENT
25
+ }
@@ -5,6 +5,7 @@ pragma solidity ^0.8.17;
5
5
 
6
6
  /// @dev c-Tokens and LUNA are added for unit test purposes
7
7
  enum Tokens {
8
+ NO_TOKEN,
8
9
  _1INCH,
9
10
  AAVE,
10
11
  COMP,
@@ -1,16 +1,14 @@
1
1
  import { NetworkType } from "../core/chains";
2
2
  import { TokenDataPayload } from "../payload/token";
3
3
  import { SupportedToken } from "./token";
4
- type SymbolReplacements = Record<string, string>;
5
4
  export declare class TokenData {
6
5
  readonly id: string;
7
6
  readonly symbol: string;
8
7
  readonly address: string;
9
8
  readonly decimals: number;
10
9
  readonly icon?: string;
11
- constructor(payload: TokenDataPayload, symbolReplacements?: SymbolReplacements);
10
+ constructor(payload: TokenDataPayload, symbolReplacements?: Record<string, string>);
12
11
  compareBySymbol(b: TokenData): number;
13
12
  }
14
13
  export declare const connectors: Record<NetworkType, Array<SupportedToken>>;
15
14
  export declare function getConnectors(networkType: NetworkType): string[];
16
- export {};
@@ -3,17 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getConnectors = exports.connectors = exports.TokenData = void 0;
4
4
  const config_1 = require("../config");
5
5
  const token_1 = require("./token");
6
- const defaultSymbolReplacement = {
7
- dWETH: "dETH",
8
- WETH: "ETH",
9
- };
10
6
  class TokenData {
11
7
  id;
12
8
  symbol;
13
9
  address;
14
10
  decimals;
15
11
  icon;
16
- constructor(payload, symbolReplacements = defaultSymbolReplacement) {
12
+ constructor(payload, symbolReplacements = {}) {
17
13
  this.id = payload.addr.toLowerCase();
18
14
  this.address = payload.addr.toLowerCase();
19
15
  this.symbol = symbolReplacements[payload.symbol] || payload.symbol;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "1.27.4",
3
+ "version": "1.27.6",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",