@sonarwatch/portfolio-plugins 0.12.54 → 0.12.55

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.12.55](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.54...plugins-0.12.55) (2024-07-11)
6
+
7
+
8
+
5
9
  ## [0.12.54](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.53...plugins-0.12.54) (2024-07-09)
6
10
 
7
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.12.54",
3
+ "version": "0.12.55",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
package/src/index.js CHANGED
@@ -127,6 +127,7 @@ const sanctum_1 = require("./plugins/sanctum");
127
127
  const allbridge_1 = require("./plugins/allbridge");
128
128
  const famousfoxfederation_1 = require("./plugins/famousfoxfederation");
129
129
  const nxfinance_1 = require("./plugins/nxfinance");
130
+ const echelon_1 = require("./plugins/echelon");
130
131
  var constants_1 = require("./plugins/tokens/constants");
131
132
  Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
132
133
  Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
@@ -247,6 +248,7 @@ exports.platforms = [
247
248
  ...allbridge_1.platforms,
248
249
  ...famousfoxfederation_1.platforms,
249
250
  ...nxfinance_1.platforms,
251
+ ...echelon_1.platforms,
250
252
  ];
251
253
  // JOBS //
252
254
  exports.jobs = [
@@ -350,6 +352,7 @@ exports.jobs = [
350
352
  ...allbridge_1.jobs,
351
353
  ...famousfoxfederation_1.jobs,
352
354
  ...nxfinance_1.jobs,
355
+ ...echelon_1.jobs,
353
356
  ];
354
357
  // FETCHERS //
355
358
  exports.fetchers = [
@@ -455,6 +458,7 @@ exports.fetchers = [
455
458
  ...allbridge_1.fetchers,
456
459
  ...famousfoxfederation_1.fetchers,
457
460
  ...nxfinance_1.fetchers,
461
+ ...echelon_1.fetchers,
458
462
  ];
459
463
  exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
460
464
  exports.airdropFetchers = [
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,6CAI0B;AAC1B,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAI6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAI0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAG6B;AAC7B,yCAIwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,+CAI2B;AAC3B,yCAIwB;AACxB,2CAIyB;AACzB,mDAI6B;AAC7B,2CAIyB;AACzB,2CAIyB;AACzB,sCAIsB;AACtB,+CAI2B;AAC3B,yCAIwB;AACxB,iDAI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Aa;IAChB,GAAG,gBAAa;IAChB,GAAG,sBAAmB;IACtB,GAAG,yBAAsB;IACzB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,iBAAc;IACjB,GAAG,2BAAsB;IACzB,GAAG,yBAAkB;IACrB,GAAG,eAAY;IACf,GAAG,cAAW;IACd,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,kBAAe;IAClB,GAAG,cAAW;IACd,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,iBAAc;IACjB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,iBAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,uBAAoB;IACvB,GAAG,mBAAgB;IACnB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,iBAAc;IACjB,GAAG,kBAAe;IAClB,GAAG,oBAAiB;IACpB,GAAG,8BAAyB;IAC5B,GAAG,oBAAiB;CACrB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,sBAAmB;IACnB,sBAAmB;CACpB,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG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B,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,iBAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,uBAAoB;IACvB,GAAG,mBAAgB;IACnB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,iBAAc;IACjB,GAAG,kBAAe;IAClB,GAAG,oBAAiB;IACpB,GAAG,8BAA2B;IAC9B,GAAG,oBAAiB;IACpB,GAAG,kBAAe;CACnB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,sBAAmB;IACnB,sBAAmB;CACpB,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
@@ -30,7 +30,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
30
30
  if (!poolInfo)
31
31
  return [];
32
32
  const userDepositPublicKeys = (0, helpers_1.getUserDepositPublicKeys)(poolInfo, owner);
33
- const userDeposits = (yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, constants_1.allbridgeIdlItem, userDepositPublicKeys)).filter((userDeposit) => (userDeposit === null || userDeposit === void 0 ? void 0 : userDeposit.lpAmount) !== '0');
33
+ const userDeposits = (yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, constants_1.allbridgeIdlItem, userDepositPublicKeys)).filter((userDeposit) => userDeposit !== null && (userDeposit === null || userDeposit === void 0 ? void 0 : userDeposit.lpAmount) !== '0');
34
34
  if (userDeposits.length === 0)
35
35
  return [];
36
36
  const tokenPrices = yield cache.getTokenPricesAsMap(poolInfo.tokens.map((pi) => pi.tokenAddress), portfolio_core_1.NetworkId.solana);
@@ -1 +1 @@
1
- {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/allbridge/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAErC,2CAMqB;AAErB,iDAAsD;AACtD,+CAG4B;AAC5B,qGAA6E;AAE7E,uCAAgE;AAChE,kEAA+D;AAE/D,MAAM,YAAY,GAAG,IAAI,6BAAa,CAAQ,yBAAa,EAAE;IAC3D,MAAM,EAAE,uBAAW;IACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAEnD,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IAEzB,MAAM,qBAAqB,GAAG,IAAA,kCAAwB,EAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAExE,MAAM,YAAY,GAAG,CACnB,MAAM,IAAA,0CAAiC,EACrC,UAAU,EACV,4BAAgB,EAChB,qBAAqB,CACtB,CACF,CAAC,MAAM,CACN,CAAC,WAAW,EAA6C,EAAE,CACzD,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,QAAQ,MAAK,GAAG,CAChC,CAAC;IAEF,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEzC,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACjD,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,EAC5C,0BAAS,CAAC,MAAM,CACjB,CAAC;IAEF,MAAM,Q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AE,CAAC,KAAK,CAAC;SACvC,CAAC,CAAC;QAEH,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,KAAK,EAAE,eAAe;YACtB,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,qCAAoB,CAAC,SAAS;YACpC,KAAK;YACL,IAAI,EAAE;gBACJ,WAAW,EAAE;oBACX;wBACE,MAAM,EAAE,CAAC,OAAO,CAAC;wBACjB,WAAW,EAAE,OAAO,CAAC,KAAK;wBAC1B,YAAY,EAAE,aAAa;wBAC3B,iBAAiB,EAAE,IAAA,+BAAc,EAC/B,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CACpC;wBACD,KAAK;wBACL,MAAM,EAAE;4BACN;gCACE,GAAG,EAAE,IAAA,yBAAQ,EAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;gCACpC,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC;6BAC3B;yBACF;qBACF;iBACF;aACF;YACD,IAAI,EAAE,SAAS,CAAC,IAAI;SACrB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/allbridge/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAErC,2CAMqB;AAErB,iDAAsD;AACtD,+CAG4B;AAC5B,qGAA6E;AAE7E,uCAAgE;AAChE,kEAA+D;AAE/D,MAAM,YAAY,GAAG,IAAI,6BAAa,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,EAAE,OAAO,CAAC,KAAK;wBAC1B,YAAY,EAAE,aAAa;wBAC3B,iBAAiB,EAAE,IAAA,+BAAc,EAC/B,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CACpC;wBACD,KAAK;wBACL,MAAM,EAAE;4BACN;gCACE,GAAG,EAAE,IAAA,yBAAQ,EAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;gCACpC,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC;6BAC3B;yBACF;qBACF;iBACF;aACF;YACD,IAAI,EAAE,SAAS,CAAC,IAAI;SACrB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ export declare const platformId = "echelon";
3
+ export declare const platform: Platform;
4
+ export declare const packageId = "0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba";
5
+ export declare const echelonLendingPackage = "0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba::lending::";
6
+ export declare const echelonFarmingPackage = "0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba::farming::";
7
+ export declare const marketKey = "markets";
8
+ export declare const vaultType = "0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba::lending::Vault";
9
+ export declare const stakerType = "0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba::farming::Staker";
10
+ export declare const marketType = "0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba::lending::Market";
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.marketType = exports.stakerType = exports.vaultType = exports.marketKey = exports.echelonFarmingPackage = exports.echelonLendingPackage = exports.packageId = exports.platform = exports.platformId = void 0;
4
+ exports.platformId = 'echelon';
5
+ exports.platform = {
6
+ id: exports.platformId,
7
+ name: 'Echelon',
8
+ image: 'https://sonar.watch/img/platforms/echelon.webp',
9
+ defiLlamaId: 'echelon-market', // from https://defillama.com/docs/api
10
+ website: 'https://app.echelon.market',
11
+ twitter: 'https://twitter.com/EchelonMarket',
12
+ };
13
+ exports.packageId = '0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba';
14
+ exports.echelonLendingPackage = `${exports.packageId}::lending::`;
15
+ exports.echelonFarmingPackage = `${exports.packageId}::farming::`;
16
+ exports.marketKey = `markets`;
17
+ exports.vaultType = `${exports.echelonLendingPackage}Vault`;
18
+ exports.stakerType = `${exports.echelonFarmingPackage}Staker`;
19
+ exports.marketType = `${exports.echelonLendingPackage}Market`;
20
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/echelon/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,gDAAgD;IACvD,WAAW,EAAE,gBAAgB,EAAE,sCAAsC;IACrE,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,mCAAmC;CAC7C,CAAC;AAEW,QAAA,SAAS,GACpB,oEAAoE,CAAC;AAC1D,QAAA,qBAAqB,GAAG,GAAG,iBAAS,aAAa,CAAC;AAClD,QAAA,qBAAqB,GAAG,GAAG,iBAAS,aAAa,CAAC;AAClD,QAAA,SAAS,GAAG,SAAS,CAAC;AACtB,QAAA,SAAS,GAAG,GAAG,6BAAqB,OAAO,CAAC;AAC5C,QAAA,UAAU,GAAG,GAAG,6BAAqB,QAAQ,CAAC;AAC9C,QAAA,UAAU,GAAG,GAAG,6BAAqB,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,178 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
17
+ const constants_1 = require("./constants");
18
+ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
19
+ const clients_1 = require("../../utils/clients");
20
+ const aptos_1 = require("../../utils/aptos");
21
+ const arrayToMap_1 = require("../../utils/misc/arrayToMap");
22
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
23
+ const client = (0, clients_1.getClientAptos)();
24
+ const [userVault, userStaker] = yield Promise.all([
25
+ (0, aptos_1.getAccountResource)(client, owner, constants_1.vaultType),
26
+ (0, aptos_1.getAccountResource)(client, owner, constants_1.stakerType),
27
+ ]);
28
+ if (!userVault && !userStaker)
29
+ return [];
30
+ const markets = yield cache.getItem(constants_1.marketKey, {
31
+ prefix: constants_1.platformId,
32
+ networkId: portfolio_core_1.NetworkId.aptos,
33
+ });
34
+ if (!markets)
35
+ return [];
36
+ const [tokenPrices, collateralBalances, liabilityBalances] = yield Promise.all([
37
+ cache.getTokenPricesAsMap(markets.map((market) => market.coinType), portfolio_core_1.NetworkId.aptos),
38
+ yield Promise.all(((userVault === null || userVault === void 0 ? void 0 : userVault.collaterals.data) || []).map((collateral) => (0, aptos_1.getView)(client, {
39
+ function: `${constants_1.echelonLendingPackage}account_coins`,
40
+ functionArguments: [
41
+ owner,
42
+ collateral.key.inner,
43
+ ],
44
+ }).then((res) => {
45
+ if (!res || !res[0])
46
+ return null;
47
+ return res[0];
48
+ }))),
49
+ yield Promise.all(((userVault === null || userVault === void 0 ? void 0 : userVault.liabilities.data) || []).map((liability) => (0, aptos_1.getView)(client, {
50
+ function: `${constants_1.echelonLendingPackage}account_liability`,
51
+ functionArguments: [
52
+ owner,
53
+ liability.key.inner,
54
+ ],
55
+ }).then((res) => {
56
+ if (!res || !res[0])
57
+ return null;
58
+ return res[0];
59
+ }))),
60
+ ]);
61
+ if (!tokenPrices || tokenPrices.size < 1)
62
+ return [];
63
+ const marketsAsMap = (0, arrayToMap_1.arrayToMap)(markets, 'market');
64
+ const borrowedAssets = [];
65
+ const borrowedYields = [];
66
+ const suppliedAssets = [];
67
+ const suppliedYields = [];
68
+ const rewardAssets = [];
69
+ const suppliedLtvs = [];
70
+ ((userVault === null || userVault === void 0 ? void 0 : userVault.collaterals.data) || []).forEach((collateral, i) => {
71
+ const market = marketsAsMap.get(collateral.key.inner);
72
+ if (!market || !market.collateralFactor)
73
+ return;
74
+ const tokenPrice = tokenPrices.get(market.coinType);
75
+ if (!tokenPrice)
76
+ return;
77
+ const collateralBalance = collateralBalances[i];
78
+ if (!collateralBalance || collateralBalance === '0')
79
+ return;
80
+ suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(market.coinType, new bignumber_js_1.default(collateralBalance)
81
+ .dividedBy(Math.pow(10, tokenPrice.decimals))
82
+ .toNumber(), portfolio_core_1.NetworkId.aptos, tokenPrice));
83
+ suppliedLtvs.push(market.collateralFactor);
84
+ suppliedYields.push([
85
+ {
86
+ apr: new bignumber_js_1.default(market.supplyApr).toNumber(),
87
+ apy: (0, portfolio_core_1.aprToApy)(new bignumber_js_1.default(market.supplyApr).toNumber()),
88
+ },
89
+ ]);
90
+ });
91
+ ((userVault === null || userVault === void 0 ? void 0 : userVault.liabilities.data) || []).forEach((liability, i) => {
92
+ const market = marketsAsMap.get(liability.key.inner);
93
+ if (!market)
94
+ return;
95
+ const tokenPrice = tokenPrices.get(market.coinType);
96
+ if (!tokenPrice)
97
+ return;
98
+ const liabilityBalance = liabilityBalances[i];
99
+ if (!liabilityBalance || liabilityBalance === '0')
100
+ return;
101
+ borrowedAssets.push((0, tokenPriceToAssetToken_1.default)(market.coinType, new bignumber_js_1.default(liabilityBalance)
102
+ .dividedBy(Math.pow(10, tokenPrice.decimals))
103
+ .toNumber(), portfolio_core_1.NetworkId.aptos, tokenPrice));
104
+ borrowedYields.push([
105
+ {
106
+ apr: new bignumber_js_1.default(market.borrowApr).toNumber(),
107
+ apy: (0, portfolio_core_1.aprToApy)(new bignumber_js_1.default(market.borrowApr).toNumber()),
108
+ },
109
+ ]);
110
+ });
111
+ if (userStaker && userStaker.user_pools.data.length > 0) {
112
+ const rewardPromises = [];
113
+ userStaker.user_pools.data.forEach((userPool) => {
114
+ userPool.value.rewards.data.forEach((reward) => {
115
+ rewardPromises.push((0, aptos_1.getView)(client, {
116
+ function: `${constants_1.echelonFarmingPackage}claimable_reward_amount`,
117
+ functionArguments: [
118
+ owner,
119
+ reward.key,
120
+ userPool.value.farming_identifier,
121
+ ],
122
+ }).then((res) => {
123
+ const market = markets.find((m) => m.asset_name === reward.key);
124
+ if (!market || !res || !res[0])
125
+ return null;
126
+ return {
127
+ coinType: market.coinType,
128
+ balance: Number(res[0]),
129
+ };
130
+ }));
131
+ });
132
+ });
133
+ const claimableRewardsAmounts = yield Promise.all(rewardPromises);
134
+ claimableRewardsAmounts.forEach((claimableReward) => {
135
+ if (!claimableReward || claimableReward.balance === 0)
136
+ return;
137
+ const tokenPrice = tokenPrices.get(claimableReward.coinType);
138
+ if (!tokenPrice)
139
+ return;
140
+ rewardAssets.push((0, tokenPriceToAssetToken_1.default)(claimableReward.coinType, new bignumber_js_1.default(claimableReward.balance)
141
+ .dividedBy(Math.pow(10, tokenPrice.decimals))
142
+ .toNumber(), portfolio_core_1.NetworkId.aptos, tokenPrice));
143
+ });
144
+ }
145
+ const { borrowedValue, healthRatio, suppliedValue, value, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({
146
+ suppliedAssets,
147
+ borrowedAssets,
148
+ rewardAssets,
149
+ suppliedLtvs,
150
+ });
151
+ const element = {
152
+ type: portfolio_core_1.PortfolioElementType.borrowlend,
153
+ networkId: portfolio_core_1.NetworkId.aptos,
154
+ platformId: constants_1.platformId,
155
+ label: 'Lending',
156
+ value,
157
+ data: {
158
+ borrowedAssets,
159
+ borrowedValue,
160
+ borrowedYields,
161
+ suppliedAssets,
162
+ suppliedValue,
163
+ suppliedYields,
164
+ healthRatio,
165
+ rewardAssets,
166
+ rewardValue,
167
+ value,
168
+ },
169
+ };
170
+ return [element];
171
+ });
172
+ const fetcher = {
173
+ id: `${constants_1.platformId}-deposits`,
174
+ networkId: portfolio_core_1.NetworkId.aptos,
175
+ executor,
176
+ };
177
+ exports.default = fetcher;
178
+ //# sourceMappingURL=depositsFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/echelon/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AAGrC,2CAOqB;AAErB,qGAA6E;AAC7E,iDAAqD;AACrD,6CAAgE;AAChE,4DAAyD;AAGzD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY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c;QACd,YAAY;QACZ,YAAY;KACb,CAAC,CAAC;IAEL,MAAM,OAAO,GAAqB;QAChC,IAAI,EAAE,qCAAoB,CAAC,UAAU;QACrC,SAAS,EAAE,0BAAS,CAAC,KAAK;QAC1B,UAAU,EAAV,sBAAU;QACV,KAAK,EAAE,SAAS;QAChB,KAAK;QACL,IAAI,EAAE;YACJ,cAAc;YACd,aAAa;YACb,cAAc;YACd,cAAc;YACd,aAAa;YACb,cAAc;YACd,WAAW;YACX,YAAY;YACZ,WAAW;YACX,KAAK;SACN;KACF,CAAC;IAEF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,KAAK;IAC1B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const fp64ToFloat: (a: bigint) => number;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ // input cannot be larger the 2^31
3
+ // this should allow at least 6 digits precision in the fractional part
4
+ // https://stackoverflow.com/questions/45929493/node-js-maximum-safe-floating-point-number
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.fp64ToFloat = void 0;
7
+ const ZERO = BigInt(0);
8
+ const ONE = BigInt(1);
9
+ const fp64ToFloat = (a) => {
10
+ // avoid large number
11
+ let mask = BigInt('0xffffffff000000000000000000000000');
12
+ if ((a & mask) != ZERO) {
13
+ throw new Error('too large');
14
+ }
15
+ // integer part
16
+ mask = BigInt('0x10000000000000000');
17
+ let base = 1;
18
+ let result = 0;
19
+ for (let i = 0; i < 32; ++i) {
20
+ if ((a & mask) != ZERO) {
21
+ result += base;
22
+ }
23
+ base *= 2;
24
+ mask = mask << ONE;
25
+ }
26
+ // fractional part
27
+ mask = BigInt('0x8000000000000000');
28
+ base = 0.5;
29
+ for (let i = 0; i < 32; ++i) {
30
+ if ((a & mask) != ZERO) {
31
+ result += base;
32
+ }
33
+ base /= 2;
34
+ mask = mask >> ONE;
35
+ }
36
+ return result;
37
+ };
38
+ exports.fp64ToFloat = fp64ToFloat;
39
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/echelon/helpers.ts"],"names":[],"mappings":";AAAA,kCAAkC;AAClC,uEAAuE;AACvE,0FAA0F;;;AAE1F,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AACvB,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AAEf,MAAM,WAAW,GAAG,CAAC,CAAS,EAAU,EAAE;IAC/C,qBAAqB;IACrB,IAAI,IAAI,GAAG,MAAM,CAAC,oCAAoC,CAAC,CAAC;IACxD,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;IAC/B,CAAC;IAED,eAAe;IACf,IAAI,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;IACrC,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;QAC5B,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;YACvB,MAAM,IAAI,IAAI,CAAC;QACjB,CAAC;QACD,IAAI,IAAI,CAAC,CAAC;QACV,IAAI,GAAG,IAAI,IAAI,GAAG,CAAC;IACrB,CAAC;IAED,kBAAkB;IAClB,IAAI,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;IACpC,IAAI,GAAG,GAAG,CAAC;IACX,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;QAC5B,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;YACvB,MAAM,IAAI,IAAI,CAAC;QACjB,CAAC;QACD,IAAI,IAAI,CAAC,CAAC;QACV,IAAI,GAAG,IAAI,IAAI,GAAG,CAAC;IACrB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AA9BW,QAAA,WAAW,eA8BtB"}
@@ -0,0 +1,6 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ import { Fetcher } from '../../Fetcher';
3
+ import { Job } from '../../Job';
4
+ export declare const platforms: Platform[];
5
+ export declare const jobs: Job[];
6
+ export declare const fetchers: Fetcher[];
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.fetchers = exports.jobs = exports.platforms = void 0;
7
+ const constants_1 = require("./constants");
8
+ const depositsFetcher_1 = __importDefault(require("./depositsFetcher"));
9
+ const marketsJob_1 = __importDefault(require("./marketsJob"));
10
+ exports.platforms = [constants_1.platform];
11
+ exports.jobs = [marketsJob_1.default];
12
+ exports.fetchers = [depositsFetcher_1.default];
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/echelon/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,wEAAgD;AAChD,8DAAsC;AAEzB,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,oBAAU,CAAC,CAAC;AAC3B,QAAA,QAAQ,GAAc,CAAC,yBAAe,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
+ const constants_1 = require("./constants");
14
+ const clients_1 = require("../../utils/clients");
15
+ const aptos_1 = require("../../utils/aptos");
16
+ const helpers_1 = require("./helpers");
17
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
18
+ const client = (0, clients_1.getClientAptos)();
19
+ const marketsResult = yield (0, aptos_1.getView)(client, {
20
+ function: '0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba::lending::market_objects',
21
+ });
22
+ if (!marketsResult)
23
+ return;
24
+ const marketsIds = marketsResult[0].map((o) => o.inner);
25
+ const markets = yield Promise.all(marketsIds.map((market) => __awaiter(void 0, void 0, void 0, function* () {
26
+ const [borrowApr, supplyApr, coinType, lendingMarket] = yield Promise.all([
27
+ (0, aptos_1.getView)(client, {
28
+ function: `${constants_1.echelonLendingPackage}borrow_interest_rate`,
29
+ functionArguments: [market],
30
+ }).then((res) => {
31
+ if (!res || !res[0]) {
32
+ return null;
33
+ }
34
+ const r = res[0];
35
+ return (0, helpers_1.fp64ToFloat)(BigInt(r.v)) * 100;
36
+ }),
37
+ (0, aptos_1.getView)(client, {
38
+ function: `${constants_1.echelonLendingPackage}supply_interest_rate`,
39
+ functionArguments: [market],
40
+ }).then((res) => {
41
+ if (!res || !res[0]) {
42
+ return null;
43
+ }
44
+ const r = res[0];
45
+ return (0, helpers_1.fp64ToFloat)(BigInt(r.v)) * 100;
46
+ }),
47
+ (0, aptos_1.getView)(client, {
48
+ function: `${constants_1.echelonLendingPackage}market_coin`,
49
+ functionArguments: [market],
50
+ }).then((res) => {
51
+ if (!res || !res[0]) {
52
+ return null;
53
+ }
54
+ return (0, portfolio_core_1.formatTokenAddress)(res[0], portfolio_core_1.NetworkId.aptos);
55
+ }),
56
+ (0, aptos_1.getAccountResource)(client, market, constants_1.marketType),
57
+ ]);
58
+ return {
59
+ market,
60
+ asset_name: lendingMarket === null || lendingMarket === void 0 ? void 0 : lendingMarket.asset_name,
61
+ borrowApr,
62
+ supplyApr,
63
+ coinType,
64
+ collateralFactor: lendingMarket
65
+ ? Number(lendingMarket.collateral_factor_bps) / 1e4
66
+ : null,
67
+ };
68
+ })));
69
+ yield cache.setItem(constants_1.marketKey, markets, {
70
+ prefix: constants_1.platformId,
71
+ networkId: portfolio_core_1.NetworkId.aptos,
72
+ });
73
+ });
74
+ const job = {
75
+ id: `${constants_1.platformId}-markets`,
76
+ executor,
77
+ label: 'normal',
78
+ };
79
+ exports.default = job;
80
+ //# sourceMappingURL=marketsJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/echelon/marketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAA2E;AAG3E,2CAKqB;AACrB,iDAAqD;AACrD,6CAAgE;AAEhE,uCAAwC;AAExC,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,wBAAc,GAAE,CAAC;IAEhC,MAAM,aAAa,GAAG,MAAM,IAAA,eAAO,EAAC,MAAM,EAAE;QAC1C,QAAQ,EACN,6FAA6F;KAChG,CAAC,CAAC;IAEH,IAAI,CAAC,aAAa;QAAE,OAAO;IAE3B,MAAM,UAAU,GAAI,aAAa,CAAC,CAAC,CAAyB,CAAC,GAA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,iCAAqB,aAAa;gBAC/C,iBAAiB,EAAE,CAAC,MAAuB,CAAC;aAC7C,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;gBACd,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;oBACpB,OAAO,IAAI,CAAC;gBACd,CAAC;gBACD,OAAO,IAAA,mCAAkB,EAAC,GAAG,CAAC,CAAC,CAAW,EAAE,0BAAS,CAAC,KAAK,CAAC,CAAC;YAC/D,CAAC,CAAC;YACF,IAAA,0BAAkB,EAAgB,MAAM,EAAE,MAAM,EAAE,sBAAU,CAAC;SAC9D,CACF,CAAC;QAEF,OAAO;YACL,MAAM;YACN,UAAU,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,UAAU;YACrC,SAAS;YACT,SAAS;YACT,QAAQ;YACR,gBAAgB,EAAE,aAAa;gBAC7B,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,qBAAqB,CAAC,GAAG,GAAG;gBACnD,CAAC,CAAC,IAAI;SACC,CAAC;IACd,CAAC,CAAA,CAAC,CACH,CAAC;IAEF,MAAM,KAAK,CAAC,OAAO,CAAC,qBAAS,EAAE,OAAO,EAAE;QACtC,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,KAAK;KAC3B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -0,0 +1,78 @@
1
+ export type UserVault = {
2
+ collaterals: {
3
+ data: Collateral[];
4
+ };
5
+ efficiency_mode_id: number;
6
+ liabilities: {
7
+ data: Liability[];
8
+ };
9
+ };
10
+ export type Collateral = {
11
+ key: {
12
+ inner: string;
13
+ };
14
+ value: string;
15
+ };
16
+ export type Liability = {
17
+ key: {
18
+ inner: string;
19
+ };
20
+ value: {
21
+ interest_accumulated: string;
22
+ last_interest_rate_index: {
23
+ v: string;
24
+ };
25
+ principal: string;
26
+ };
27
+ };
28
+ export type Market = {
29
+ market: string;
30
+ asset_name: string;
31
+ supplyApr: number;
32
+ borrowApr: number;
33
+ coinType: string;
34
+ collateralFactor: number;
35
+ };
36
+ export type LendingMarket = {
37
+ asset_mantissa: string;
38
+ asset_name: string;
39
+ asset_type: string;
40
+ borrow_cap: string;
41
+ collateral_factor_bps: string;
42
+ efficiency_mode_id: number;
43
+ initial_liquidity: string;
44
+ interest_rate_last_update_seconds: string;
45
+ interest_rate_model_type: string;
46
+ paused: boolean;
47
+ supply_cap: string;
48
+ total_cash: string;
49
+ total_liability: string;
50
+ total_reserve: string;
51
+ total_shares: string;
52
+ };
53
+ export type UserStaker = {
54
+ user_pools: {
55
+ data: UserPool[];
56
+ };
57
+ };
58
+ export type UserPool = {
59
+ key: string;
60
+ value: {
61
+ farming_identifier: string;
62
+ rewards: {
63
+ data: Reward[];
64
+ };
65
+ };
66
+ };
67
+ export type Reward = {
68
+ key: string;
69
+ value: {
70
+ last_acc_rewards_per_share: string;
71
+ reward_amount: string;
72
+ reward_name: string;
73
+ };
74
+ };
75
+ export type RewardBalance = {
76
+ coinType: string;
77
+ balance: number;
78
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/echelon/types.ts"],"names":[],"mappings":""}