@gearbox-protocol/sdk 15.1.0-next.20 → 15.1.0-next.21

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.
@@ -113,6 +113,13 @@ const chains = {
113
113
  address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
114
114
  symbol: "USDC"
115
115
  },
116
+ tokenPrettyNames: require_sdk_utils_AddressMap.AddressMap.fromRecord({
117
+ "0x924d24c238db7ecae2aa3a19430239ed684bde4a": "Beefy WBTC/cbBTC/hemiBTC",
118
+ "0x403cc0d2694ec2639101f32b146b90d766461ce9": "Beefy wstETH/tETH",
119
+ "0x02a4cceed3c400b5ba9fd22ad6ec18d8f7a3d48e": "Beefy ETH+/WETH",
120
+ "0x31454faa1daa04cacf59a6bd37681da9160d092a": "Beefy rETH/WETH",
121
+ "0x1a711a5bc48b5c1352c1882fa65dc14b5b9e829d": "Beefy osETH/WETH"
122
+ }),
116
123
  firstBlock: 22358644n,
117
124
  gasLimit: 550000000n
118
125
  }, "ethereum-rpc"),
@@ -229,6 +236,7 @@ const chains = {
229
236
  address: "0xe7cd86e13AC4309349F30B3435a9d337750fC82D",
230
237
  symbol: "USDT0"
231
238
  },
239
+ tokenPrettyNames: require_sdk_utils_AddressMap.AddressMap.fromRecord({ "0x942644106b073e30d72c2c5d7529d5c296ea91ab": "Curve AUSD/USDC/USDT0" }),
232
240
  firstBlock: 34650262n,
233
241
  gasLimit: 150000000n
234
242
  }),
@@ -302,6 +310,7 @@ const chains = {
302
310
  address: "0x796Ea11Fa2dD751eD01b53C372fFDB4AAa8f00F9",
303
311
  symbol: "USDC"
304
312
  },
313
+ tokenPrettyNames: require_sdk_utils_AddressMap.AddressMap.fromRecord({ "0x5d37f9b272ca7cda2a05245b9a503746eefac88f": "Curve mRe7Yield/USDC" }),
305
314
  firstBlock: 16672963n,
306
315
  gasLimit: 550000000n
307
316
  }),
@@ -178,7 +178,7 @@ var PositionsService = class extends require_sdk_base_SDKConstruct.SDKConstruct
178
178
  timeToLiquidation,
179
179
  liquidationPrice,
180
180
  collaterals: ca.tokens.flatMap((t) => {
181
- if ((t.mask & ca.enabledTokensMask) === 0n || t.balance <= 10n) return [];
181
+ if (t.balance <= 10n) return [];
182
182
  return [{
183
183
  collateral: priceOracle.toTokenAmount(t.token, t.balance),
184
184
  quota: priceOracle.toTokenAmount(market.underlying, t.quota),
@@ -2,15 +2,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../constants/math.js");
3
3
  //#region src/sdk/positions/types.ts
4
4
  /**
5
- * Builds an {@link AccountSnapshot} from on-chain credit account data: the
6
- * enabled, above-dust tokens become assets and quotas, and `totalDebt` is
7
- * principal plus accrued interest and fees.
5
+ * Builds an {@link AccountSnapshot} from on-chain credit account data
8
6
  **/
9
7
  function accountSnapshotFromCreditAccountData(ca) {
10
8
  const assets = [];
11
9
  const quotas = [];
12
10
  for (const t of ca.tokens) {
13
- if ((t.mask & ca.enabledTokensMask) === 0n || t.balance <= 10n) continue;
11
+ if (t.balance <= 10n) continue;
14
12
  assets.push({
15
13
  token: t.token,
16
14
  balance: t.balance
@@ -112,6 +112,13 @@ const chains = {
112
112
  address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
113
113
  symbol: "USDC"
114
114
  },
115
+ tokenPrettyNames: AddressMap.fromRecord({
116
+ "0x924d24c238db7ecae2aa3a19430239ed684bde4a": "Beefy WBTC/cbBTC/hemiBTC",
117
+ "0x403cc0d2694ec2639101f32b146b90d766461ce9": "Beefy wstETH/tETH",
118
+ "0x02a4cceed3c400b5ba9fd22ad6ec18d8f7a3d48e": "Beefy ETH+/WETH",
119
+ "0x31454faa1daa04cacf59a6bd37681da9160d092a": "Beefy rETH/WETH",
120
+ "0x1a711a5bc48b5c1352c1882fa65dc14b5b9e829d": "Beefy osETH/WETH"
121
+ }),
115
122
  firstBlock: 22358644n,
116
123
  gasLimit: 550000000n
117
124
  }, "ethereum-rpc"),
@@ -228,6 +235,7 @@ const chains = {
228
235
  address: "0xe7cd86e13AC4309349F30B3435a9d337750fC82D",
229
236
  symbol: "USDT0"
230
237
  },
238
+ tokenPrettyNames: AddressMap.fromRecord({ "0x942644106b073e30d72c2c5d7529d5c296ea91ab": "Curve AUSD/USDC/USDT0" }),
231
239
  firstBlock: 34650262n,
232
240
  gasLimit: 150000000n
233
241
  }),
@@ -301,6 +309,7 @@ const chains = {
301
309
  address: "0x796Ea11Fa2dD751eD01b53C372fFDB4AAa8f00F9",
302
310
  symbol: "USDC"
303
311
  },
312
+ tokenPrettyNames: AddressMap.fromRecord({ "0x5d37f9b272ca7cda2a05245b9a503746eefac88f": "Curve mRe7Yield/USDC" }),
304
313
  firstBlock: 16672963n,
305
314
  gasLimit: 550000000n
306
315
  }),
@@ -177,7 +177,7 @@ var PositionsService = class extends SDKConstruct {
177
177
  timeToLiquidation,
178
178
  liquidationPrice,
179
179
  collaterals: ca.tokens.flatMap((t) => {
180
- if ((t.mask & ca.enabledTokensMask) === 0n || t.balance <= 10n) return [];
180
+ if (t.balance <= 10n) return [];
181
181
  return [{
182
182
  collateral: priceOracle.toTokenAmount(t.token, t.balance),
183
183
  quota: priceOracle.toTokenAmount(market.underlying, t.quota),
@@ -1,15 +1,13 @@
1
1
  import "../constants/math.js";
2
2
  //#region src/sdk/positions/types.ts
3
3
  /**
4
- * Builds an {@link AccountSnapshot} from on-chain credit account data: the
5
- * enabled, above-dust tokens become assets and quotas, and `totalDebt` is
6
- * principal plus accrued interest and fees.
4
+ * Builds an {@link AccountSnapshot} from on-chain credit account data
7
5
  **/
8
6
  function accountSnapshotFromCreditAccountData(ca) {
9
7
  const assets = [];
10
8
  const quotas = [];
11
9
  for (const t of ca.tokens) {
12
- if ((t.mask & ca.enabledTokensMask) === 0n || t.balance <= 10n) continue;
10
+ if (t.balance <= 10n) continue;
13
11
  assets.push({
14
12
  token: t.token,
15
13
  balance: t.balance
@@ -82,9 +82,7 @@ interface AccountSnapshot {
82
82
  totalValue: bigint;
83
83
  }
84
84
  /**
85
- * Builds an {@link AccountSnapshot} from on-chain credit account data: the
86
- * enabled, above-dust tokens become assets and quotas, and `totalDebt` is
87
- * principal plus accrued interest and fees.
85
+ * Builds an {@link AccountSnapshot} from on-chain credit account data
88
86
  **/
89
87
  declare function accountSnapshotFromCreditAccountData(ca: CreditAccountData): AccountSnapshot;
90
88
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "15.1.0-next.20",
3
+ "version": "15.1.0-next.21",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "repository": {