@sonarwatch/portfolio-plugins 0.12.187 → 0.12.189

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/src/plugins/aave/constants.js +1 -1
  4. package/src/plugins/auxexchange/aptosLpJob.js +3 -3
  5. package/src/plugins/auxexchange/aptosLpJob.js.map +1 -1
  6. package/src/plugins/balancer/index.js +4 -2
  7. package/src/plugins/balancer/index.js.map +1 -1
  8. package/src/plugins/bluefin/bankFetcher.js +2 -2
  9. package/src/plugins/bluefin/bankFetcher.js.map +1 -1
  10. package/src/plugins/bluefin/poolFetcher.js +3 -3
  11. package/src/plugins/bluefin/poolFetcher.js.map +1 -1
  12. package/src/plugins/bluefin/positionFetcher.js +1 -1
  13. package/src/plugins/bluefin/positionFetcher.js.map +1 -1
  14. package/src/plugins/bluemove/poolsJob.js +18 -11
  15. package/src/plugins/bluemove/poolsJob.js.map +1 -1
  16. package/src/plugins/liquiditypools-sei/index.js +4 -2
  17. package/src/plugins/liquiditypools-sei/index.js.map +1 -1
  18. package/src/plugins/liquiditypools-sei/job.js +3 -3
  19. package/src/plugins/liquiditypools-sei/job.js.map +1 -1
  20. package/src/plugins/orca/lpTokensJob.js +2 -2
  21. package/src/plugins/orca/lpTokensJob.js.map +1 -1
  22. package/src/plugins/pancakeswap/index.js +2 -2
  23. package/src/plugins/pancakeswap/index.js.map +1 -1
  24. package/src/plugins/sushiswap/index.js +5 -5
  25. package/src/plugins/sushiswap/index.js.map +1 -1
  26. package/src/plugins/whalesmarket/constants.d.ts +1 -1
  27. package/src/plugins/whalesmarket/constants.js +1 -1
  28. package/src/plugins/whalesmarket/constants.js.map +1 -1
  29. package/src/plugins/whalesmarket/tokensJob.js +2 -0
  30. package/src/plugins/whalesmarket/tokensJob.js.map +1 -1
  31. package/src/utils/clmm/tokenPricesFromSqrt.js +7 -3
  32. package/src/utils/clmm/tokenPricesFromSqrt.js.map +1 -1
  33. package/src/utils/misc/MemoizedCache.d.ts +2 -1
  34. package/src/utils/misc/MemoizedCache.js +7 -2
  35. package/src/utils/misc/MemoizedCache.js.map +1 -1
  36. package/src/utils/misc/checkComputeAndStoreTokensPrices.js +3 -3
  37. package/src/utils/misc/checkComputeAndStoreTokensPrices.js.map +1 -1
  38. package/src/utils/misc/{getDecimalsForToken.d.ts → getCachedDecimalsForToken.d.ts} +5 -2
  39. package/src/utils/misc/{getDecimalsForToken.js → getCachedDecimalsForToken.js} +30 -12
  40. package/src/utils/misc/getCachedDecimalsForToken.js.map +1 -0
  41. package/src/utils/misc/getLpUnderlyingTokenSource.js +2 -1
  42. package/src/utils/misc/getLpUnderlyingTokenSource.js.map +1 -1
  43. package/src/utils/sui/constants.d.ts +2 -1
  44. package/src/utils/sui/constants.js +3 -2
  45. package/src/utils/sui/constants.js.map +1 -1
  46. package/src/utils/misc/getDecimalsForToken.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.12.189](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.188...plugins-0.12.189) (2024-10-14)
6
+
7
+
8
+
9
+ ## [0.12.188](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.187...plugins-0.12.188) (2024-10-11)
10
+
11
+
12
+
5
13
  ## [0.12.187](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.186...plugins-0.12.187) (2024-10-11)
6
14
 
7
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.12.187",
3
+ "version": "0.12.189",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
@@ -37,7 +37,7 @@ exports.lendingConfigs = new Map([
37
37
  elementName: 'Aave V3',
38
38
  lendingPoolAddressProvider: '0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb',
39
39
  uiIncentiveDataProviderAddress: '0x265d414f80b0fca9505710e6F16dB4b67555D365',
40
- uiPoolDataProviderAddress: '0xF71DBe0FAEF1473ffC607d4c555dfF0aEaDb878d',
40
+ uiPoolDataProviderAddress: '0x374a2592f0265b3bb802d75809e61b1b5BbD85B7',
41
41
  version: 3,
42
42
  },
43
43
  ],
@@ -17,7 +17,7 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
17
17
  const aptos_1 = require("../../utils/aptos");
18
18
  const clients_1 = require("../../utils/clients");
19
19
  const constants_1 = require("./constants");
20
- const getDecimalsForToken_1 = require("../../utils/misc/getDecimalsForToken");
20
+ const getCachedDecimalsForToken_1 = require("../../utils/misc/getCachedDecimalsForToken");
21
21
  const getLpUnderlyingTokenSourceOld_1 = __importDefault(require("../../utils/misc/getLpUnderlyingTokenSourceOld"));
22
22
  const getLpTokenSourceRawOld_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRawOld"));
23
23
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -67,8 +67,8 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
67
67
  tokenPrices.get((0, portfolio_core_1.formatTokenAddress)(typeY, portfolio_core_1.NetworkId.aptos)),
68
68
  ];
69
69
  const [decimalsX, decimalsY] = yield Promise.all([
70
- (0, getDecimalsForToken_1.getDecimalsForToken)(cache, typeX, portfolio_core_1.NetworkId.aptos),
71
- (0, getDecimalsForToken_1.getDecimalsForToken)(cache, typeY, portfolio_core_1.NetworkId.aptos),
70
+ (0, getCachedDecimalsForToken_1.getCachedDecimalsForToken)(cache, typeX, portfolio_core_1.NetworkId.aptos),
71
+ (0, getCachedDecimalsForToken_1.getCachedDecimalsForToken)(cache, typeY, portfolio_core_1.NetworkId.aptos),
72
72
  ]);
73
73
  if (!decimalsX || !decimalsY)
74
74
  continue;
@@ -1 +1 @@
1
- {"version":3,"file":"aptosLpJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/auxexchange/aptosLpJob.ts"],"names":[],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AU;YACpB,SAAS,EAAE,QAAQ;SACpB,EACD;YACE;gBACE,OAAO,EAAE,WAAW,CAAC,OAAO;gBAC5B,QAAQ,EAAE,WAAW,CAAC,QAAQ;gBAC9B,KAAK,EAAE,WAAW,CAAC,KAAK;gBACxB,gBAAgB,EAAE,iBAAiB;aACpC;YACD;gBACE,OAAO,EAAE,WAAW,CAAC,OAAO;gBAC5B,QAAQ,EAAE,WAAW,CAAC,QAAQ;gBAC9B,KAAK,EAAE,WAAW,CAAC,KAAK;gBACxB,gBAAgB,EAAE,iBAAiB;aACpC;SACF,EACD,EAAE,CACH,CAAC;QACF,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;IACD,MAAM,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAC9C,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -6,10 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fetchers = exports.jobs = exports.platforms = void 0;
7
7
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
8
8
  const constants_1 = require("./constants");
9
- const v2Job_1 = __importDefault(require("./v2Job"));
9
+ // import v2Job from './v2Job';
10
10
  const getV2Fetcher_1 = __importDefault(require("./getV2Fetcher"));
11
11
  exports.platforms = [constants_1.platform];
12
- exports.jobs = [v2Job_1.default];
12
+ exports.jobs = [
13
+ /* v2Job */
14
+ ];
13
15
  exports.fetchers = [
14
16
  (0, getV2Fetcher_1.default)(portfolio_core_1.NetworkId.ethereum),
15
17
  (0, getV2Fetcher_1.default)(portfolio_core_1.NetworkId.avalanche),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/balancer/index.ts"],"names":[],"mappings":";;;;;;AAAA,+DAAiE;AAGjE,2CAAuC;AACvC,oDAA4B;AAC5B,kEAA0C;AAE7B,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,eAAK,CAAC,CAAC;AACtB,QAAA,QAAQ,GAAc;IACjC,IAAA,sBAAY,EAAC,0BAAS,CAAC,QAAQ,CAAC;IAChC,IAAA,sBAAY,EAAC,0BAAS,CAAC,SAAS,CAAC;IACjC,IAAA,sBAAY,EAAC,0BAAS,CAAC,OAAO,CAAC;CAChC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/balancer/index.ts"],"names":[],"mappings":";;;;;;AAAA,+DAAiE;AAGjE,2CAAuC;AACvC,+BAA+B;AAC/B,kEAA0C;AAE7B,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU;AACzB,WAAW;CACZ,CAAC;AACW,QAAA,QAAQ,GAAc;IACjC,IAAA,sBAAY,EAAC,0BAAS,CAAC,QAAQ,CAAC;IAChC,IAAA,sBAAY,EAAC,0BAAS,CAAC,SAAS,CAAC;IACjC,IAAA,sBAAY,EAAC,0BAAS,CAAC,OAAO,CAAC;CAChC,CAAC"}
@@ -25,7 +25,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
25
25
  const client = (0, clients_1.getClientSui)();
26
26
  const [bank, tokenPrice] = yield Promise.all([
27
27
  (0, getObject_1.getObject)(client, constants_1.bankObjectId),
28
- cache.getTokenPrice((0, portfolio_core_1.formatMoveTokenAddress)(constants_2.usdcSuiType), portfolio_core_1.NetworkId.sui),
28
+ cache.getTokenPrice((0, portfolio_core_1.formatMoveTokenAddress)(constants_2.wUsdcSuiType), portfolio_core_1.NetworkId.sui),
29
29
  ]);
30
30
  if (!((_b = (_a = bank.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.accounts.fields.id.id) || !tokenPrice)
31
31
  return [];
@@ -41,7 +41,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
41
41
  const assets = [];
42
42
  if (((_f = (_e = account.data) === null || _e === void 0 ? void 0 : _e.content) === null || _f === void 0 ? void 0 : _f.fields.value.fields.balance) &&
43
43
  ((_h = (_g = account.data) === null || _g === void 0 ? void 0 : _g.content) === null || _h === void 0 ? void 0 : _h.fields.value.fields.balance) !== '0')
44
- assets.push((0, tokenPriceToAssetToken_1.default)(constants_2.usdcSuiType, new bignumber_js_1.default((_k = (_j = account.data) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.fields.value.fields.balance)
44
+ assets.push((0, tokenPriceToAssetToken_1.default)(constants_2.wUsdcSuiType, new bignumber_js_1.default((_k = (_j = account.data) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.fields.value.fields.balance)
45
45
  .dividedBy(Math.pow(10, 9))
46
46
  .toNumber(), portfolio_core_1.NetworkId.sui, tokenPrice));
47
47
  if (assets.length === 0)
@@ -1 +1 @@
1
- {"version":3,"file":"bankFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bluefin/bankFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAGrC,2CAAuD;AACvD,iDAAmD;AACnD,yDAAsD;AACtD,iFAA8E;AAE9E,qGAA6E;AAC7E,yDAAwD;AAExD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC3C,IAAA,qBAAS,EAAO,MAAM,EAAE,wBAAY,CAAC;QACrC,KAAK,CAAC,aAAa,CAAC,IAAA,uCAAsB,EAAC,uBAAW,CAAC,EAAE,0BAAS,CAAC,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AAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1D;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -27,7 +27,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
27
27
  prefix: constants_1.platformId,
28
28
  networkId: portfolio_core_1.NetworkId.sui,
29
29
  }),
30
- cache.getTokenPrice((0, portfolio_core_1.formatMoveTokenAddress)(constants_2.usdcSuiType), portfolio_core_1.NetworkId.sui),
30
+ cache.getTokenPrice((0, portfolio_core_1.formatMoveTokenAddress)(constants_2.wUsdcSuiType), portfolio_core_1.NetworkId.sui),
31
31
  ]);
32
32
  if (!vault || !tokenPrice)
33
33
  return [];
@@ -42,11 +42,11 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
42
42
  return [];
43
43
  const assets = [];
44
44
  if (((_d = (_c = vaultAccount.data) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.fields.value.fields.amount_locked) !== '0')
45
- assets.push((0, tokenPriceToAssetToken_1.default)(constants_2.usdcSuiType, new bignumber_js_1.default((_f = (_e = vaultAccount.data) === null || _e === void 0 ? void 0 : _e.content) === null || _f === void 0 ? void 0 : _f.fields.value.fields.amount_locked)
45
+ assets.push((0, tokenPriceToAssetToken_1.default)(constants_2.wUsdcSuiType, new bignumber_js_1.default((_f = (_e = vaultAccount.data) === null || _e === void 0 ? void 0 : _e.content) === null || _f === void 0 ? void 0 : _f.fields.value.fields.amount_locked)
46
46
  .dividedBy(Math.pow(10, tokenPrice.decimals))
47
47
  .toNumber(), portfolio_core_1.NetworkId.sui, tokenPrice));
48
48
  if (((_h = (_g = vaultAccount.data) === null || _g === void 0 ? void 0 : _g.content) === null || _h === void 0 ? void 0 : _h.fields.value.fields.pending_withdrawal) !== '0')
49
- assets.push(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(constants_2.usdcSuiType, new bignumber_js_1.default((_k = (_j = vaultAccount.data) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.fields.value.fields.pending_withdrawal)
49
+ assets.push(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(constants_2.wUsdcSuiType, new bignumber_js_1.default((_k = (_j = vaultAccount.data) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.fields.value.fields.pending_withdrawal)
50
50
  .dividedBy(Math.pow(10, tokenPrice.decimals))
51
51
  .toNumber(), portfolio_core_1.NetworkId.sui, tokenPrice)));
52
52
  if (assets.length === 0)
@@ -1 +1 @@
1
- {"version":3,"file":"poolFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bluefin/poolFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAGrC,2CAAkD;AAElD,qGAA6E;AAC7E,iFAA8E;AAC9E,iDAAmD;AACnD,yDAAwD;AAExD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC5C,KAAK,CAAC,OAAO,CAAQ,mBAAO,EAAE;YAC5B,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;SACzB,CAAC;QACF,KAAK,CAAC,aAAa,CAAC,IAAA,uCAAsB,EAAC,uBAAW,CAAC,EAAE,0BAAS,CAAC,GAAG,CAAC;KACxE,CAAC,CAAC;IAEH,IAAI,CAAC,KAAK,IAAI,CAAC,UAAU;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,YAAY,GAAG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AU,CAAC,QAAQ,CAAA,CAAC;aACpC,QAAQ,EAAE,EACb,0BAAS,CAAC,GAAG,EACb,UAAU,CACX,EACD,CAAC;IAEL,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,KAAK,EAAE,eAAe;YACtB,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,EAAE,MAAM,EAAE;YAChB,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACzD,IAAI,EAAE,KAAK,CAAC,IAAI;SACjB;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -49,7 +49,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
49
49
  value: owner,
50
50
  },
51
51
  })));
52
- const tokenPrice = yield cache.getTokenPrice(constants_2.usdcSuiType, portfolio_core_1.NetworkId.sui);
52
+ const tokenPrice = yield cache.getTokenPrice(constants_2.wUsdcSuiType, portfolio_core_1.NetworkId.sui);
53
53
  if (!tokenPrice)
54
54
  return [];
55
55
  const elements = [];
@@ -1 +1 @@
1
- {"version":3,"file":"positionFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bluefin/positionFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AAGrC,2CAA0D;AAC1D,iFAA8E;AAC9E,iDAAmD;AAEnD,qEAAkE;AAClE,qGAA6E;AAC7E,yDAAwD;AACxD,0DAAyD;AAE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AAE,MAAM,CAAC,aAAa;YACtE,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,OAAO,CAAC;QAEZ,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,UAAU;YACjB,KAAK;YACL,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG;YAC1D,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa,EAAE,IAAA,+BAAc,EAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACjE,cAAc;gBACd,cAAc;gBACd,aAAa,EAAE,IAAA,+BAAc,EAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACjE,cAAc;gBACd,YAAY;gBACZ,WAAW,EAAE,IAAA,+BAAc,EAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBAC7D,WAAW,EAAE,IAAI;gBACjB,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"positionFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bluefin/positionFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AAGrC,2C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= require("../../utils/clients");
15
15
  const getDynamicFieldObjects_1 = require("../../utils/sui/getDynamicFieldObjects");
16
16
  const getLpTokenSourceRaw_1 = require("../../utils/misc/getLpTokenSourceRaw");
17
+ const getCachedDecimalsForToken_1 = require("../../utils/misc/getCachedDecimalsForToken");
17
18
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
19
+ var _a, _b, _c;
18
20
  const client = (0, clients_1.getClientSui)();
19
21
  const pools = yield (0, getDynamicFieldObjects_1.getDynamicFieldObjects)(client, constants_1.dexInfoId);
20
22
  const mints = new Set();
@@ -37,28 +39,33 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
37
39
  });
38
40
  const tokenPrices = yield cache.getTokenPricesAsMap(mints, portfolio_core_1.NetworkId.sui);
39
41
  const lpSources = [];
40
- pools.forEach((pool) => {
41
- var _a, _b, _c;
42
+ for (const pool of pools) {
42
43
  if (!pool.data ||
43
44
  !pool.data.type ||
44
45
  ((_a = pool.data.content) === null || _a === void 0 ? void 0 : _a.fields.is_freeze) ||
45
46
  !((_c = (_b = pool.data.content) === null || _b === void 0 ? void 0 : _b.fields.lsp_supply) === null || _c === void 0 ? void 0 : _c.type))
46
- return;
47
+ continue;
47
48
  const { keys: coinTypeKeys } = (0, portfolio_core_1.parseTypeString)(pool.data.type);
48
49
  if (!coinTypeKeys)
49
- return;
50
+ continue;
50
51
  const coinTypeX = coinTypeKeys[0].type;
51
52
  const coinTypeY = coinTypeKeys[1].type;
52
53
  const { keys: lpCoinTypeKeys } = (0, portfolio_core_1.parseTypeString)(pool.data.content.fields.lsp_supply.type);
53
54
  if (!lpCoinTypeKeys)
54
- return;
55
+ continue;
55
56
  const lpCoinType = lpCoinTypeKeys[0].type;
56
57
  if (!coinTypeX || !coinTypeY || !lpCoinType)
57
- return;
58
+ continue;
58
59
  const tokenPriceX = tokenPrices.get(coinTypeX);
59
60
  const tokenPriceY = tokenPrices.get(coinTypeY);
60
- if (!tokenPriceX || !tokenPriceY)
61
- return;
61
+ const decimalsX = tokenPriceX
62
+ ? tokenPriceX.decimals
63
+ : yield (0, getCachedDecimalsForToken_1.getCachedDecimalsForToken)(cache, coinTypeX, portfolio_core_1.NetworkId.sui);
64
+ const decimalsY = tokenPriceY
65
+ ? tokenPriceY.decimals
66
+ : yield (0, getCachedDecimalsForToken_1.getCachedDecimalsForToken)(cache, coinTypeY, portfolio_core_1.NetworkId.sui);
67
+ if (!decimalsX || !decimalsY)
68
+ continue;
62
69
  const newLpSources = (0, getLpTokenSourceRaw_1.getLpTokenSourceRaw)({
63
70
  networkId: portfolio_core_1.NetworkId.sui,
64
71
  sourceId: lpCoinType,
@@ -72,14 +79,14 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
72
79
  poolUnderlyingsRaw: [
73
80
  {
74
81
  address: (0, portfolio_core_1.formatTokenAddress)(coinTypeX, portfolio_core_1.NetworkId.sui),
75
- decimals: tokenPriceX.decimals,
82
+ decimals: decimalsX,
76
83
  reserveAmountRaw: pool.data.content.fields.reserve_x,
77
84
  weight: 0.5,
78
85
  tokenPrice: tokenPriceX,
79
86
  },
80
87
  {
81
88
  address: (0, portfolio_core_1.formatTokenAddress)(coinTypeY, portfolio_core_1.NetworkId.sui),
82
- decimals: tokenPriceY.decimals,
89
+ decimals: decimalsY,
83
90
  reserveAmountRaw: pool.data.content.fields.reserve_y,
84
91
  weight: 0.5,
85
92
  tokenPrice: tokenPriceY,
@@ -87,7 +94,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
87
94
  ],
88
95
  });
89
96
  lpSources.push(...newLpSources);
90
- });
97
+ }
91
98
  yield cache.setTokenPriceSources(lpSources);
92
99
  });
93
100
  const job = {
@@ -1 +1 @@
1
- {"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bluemove/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAKoC;AAGpC,2CAAgE;AAChE,iDAAmD;AACnD,mFAAgF;AA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"}
@@ -4,10 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fetchers = exports.jobs = exports.platforms = void 0;
7
- const job_1 = __importDefault(require("./job"));
7
+ // import job from './job';
8
8
  const fetcher_1 = __importDefault(require("./fetcher"));
9
9
  const constants_1 = require("./constants");
10
10
  exports.platforms = [constants_1.seaswapPlatform, constants_1.astroportPlatform];
11
- exports.jobs = [job_1.default];
11
+ exports.jobs = [
12
+ /* job */
13
+ ];
12
14
  exports.fetchers = [fetcher_1.default];
13
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/liquiditypools-sei/index.ts"],"names":[],"mappings":";;;;;;AAGA,gDAAwB;AACxB,wDAAgC;AAChC,2CAAiE;AAEpD,QAAA,SAAS,GAAe,CAAC,2BAAe,EAAE,6BAAiB,CAAC,CAAC;AAC7D,QAAA,IAAI,GAAU,CAAC,aAAG,CAAC,CAAC;AACpB,QAAA,QAAQ,GAAc,CAAC,iBAAO,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/liquiditypools-sei/index.ts"],"names":[],"mappings":";;;;;;AAGA,2BAA2B;AAC3B,wDAAgC;AAChC,2CAAiE;AAEpD,QAAA,SAAS,GAAe,CAAC,2BAAe,EAAE,6BAAiB,CAAC,CAAC;AAC7D,QAAA,IAAI,GAAU;AACzB,SAAS;CACV,CAAC;AACW,QAAA,QAAQ,GAAc,CAAC,iBAAO,CAAC,CAAC"}
@@ -19,7 +19,7 @@ const constants_1 = require("../../utils/clients/constants");
19
19
  const constants_2 = require("./constants");
20
20
  const sei_1 = require("../../utils/sei");
21
21
  const isAContract_1 = __importDefault(require("../../utils/sei/isAContract"));
22
- const getDecimalsForToken_1 = require("../../utils/misc/getDecimalsForToken");
22
+ const getCachedDecimalsForToken_1 = require("../../utils/misc/getCachedDecimalsForToken");
23
23
  const getLpUnderlyingTokenSourceOld_1 = __importDefault(require("../../utils/misc/getLpUnderlyingTokenSourceOld"));
24
24
  const getLpTokenSourceRawOld_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRawOld"));
25
25
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -55,8 +55,8 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
55
55
  continue;
56
56
  const [tokenPriceX, tokenPriceY] = yield cache.getTokenPrices([poolInfo.mintX, poolInfo.mintY], portfolio_core_1.NetworkId.sei);
57
57
  const [decimalsX, decimalsY] = yield Promise.all([
58
- (0, getDecimalsForToken_1.getDecimalsForToken)(cache, poolInfo.mintX, portfolio_core_1.NetworkId.sei),
59
- (0, getDecimalsForToken_1.getDecimalsForToken)(cache, poolInfo.mintY, portfolio_core_1.NetworkId.sei),
58
+ (0, getCachedDecimalsForToken_1.getCachedDecimalsForToken)(cache, poolInfo.mintX, portfolio_core_1.NetworkId.sei),
59
+ (0, getCachedDecimalsForToken_1.getCachedDecimalsForToken)(cache, poolInfo.mintY, portfolio_core_1.NetworkId.sei),
60
60
  ]);
61
61
  const [reserveAmountRawX, reserveAmountRawY] = [
62
62
  new bignumber_js_1.default(poolInfo.amountX),
@@ -1 +1 @@
1
- {"version":3,"file":"job.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/liquiditypools-sei/job.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,uCAAiD;AACjD,+DAAuD;AACvD,gEAAqC;AAGrC,6DAA+D;AAC/D,2CAAqE;AACrE,yCAKyB;AACzB,8EAAsD;AACtD,8EAA2E;AAC3E,mHAA2F;AAC3F,qGAA6E;AAG7E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,cAAc,GAAG,MAAM,IAAA,wBAAiB,EAAC,IAAA,0BAAc,EAAC,0BAAS,CAAC,GAAG,CAAC,CAAC,C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AAiB,EAAE,KAAK,EAAE;QAC5C,MAAM,EAAE,6BAAiB;QACzB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,oBAAoB;IACxB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -22,7 +22,7 @@ const solana_1 = require("../../utils/solana");
22
22
  const fetchTokenSupplyAndDecimals_1 = require("../../utils/solana/fetchTokenSupplyAndDecimals");
23
23
  const runInBatch_1 = __importDefault(require("../../utils/misc/runInBatch"));
24
24
  const computeAndStoreLpPrice_1 = require("../../utils/misc/computeAndStoreLpPrice");
25
- const getDecimalsForToken_1 = require("../../utils/misc/getDecimalsForToken");
25
+ const getCachedDecimalsForToken_1 = require("../../utils/misc/getCachedDecimalsForToken");
26
26
  const getLpTokenSource_1 = require("../../utils/misc/getLpTokenSource");
27
27
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
28
28
  const client = (0, clients_1.getClientSolana)();
@@ -49,7 +49,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
49
49
  (0, runInBatch_1.default)(farmsAccounts.map((farm) => () => (0, fetchTokenSupplyAndDecimals_1.fetchTokenSupplyAndDecimals)(farm.farmTokenMint, client, 0))),
50
50
  ]);
51
51
  const unknownMints = mints.filter((mint) => !tokenPriceById.get(mint));
52
- const mintDecimals = yield (0, runInBatch_1.default)(unknownMints.map((mint) => () => (0, getDecimalsForToken_1.getDecimalsForToken)(cache, mint, portfolio_core_1.NetworkId.solana)));
52
+ const mintDecimals = yield (0, runInBatch_1.default)(unknownMints.map((mint) => () => (0, getCachedDecimalsForToken_1.getCachedDecimalsForToken)(cache, mint, portfolio_core_1.NetworkId.solana)));
53
53
  const tokenAccountByAddress = new Map();
54
54
  const tokensSupplyAndDecimalsByMint = new Map();
55
55
  const decimalsByMint = new Map();
@@ -1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C,QAAQ,EAAE;YACjC,8CAA8C,EAC9C,CAAC;YACD,OAAO,CAAC,IAAI,CAAC;gBACX,EAAE,EAAE,iCAAqB;gBACzB,WAAW,EAAE,cAAc;gBAC3B,MAAM,EAAE,CAAC;gBACT,OAAO,EAAE,QAAQ,CAAC,QAAQ,EAAE;gBAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;gBAC3B,UAAU,EAAV,sBAAU;gBACV,QAAQ,EAAE,YAAY;gBACtB,KAAK;gBACL,WAAW,EAAE,cAAc,CAAC,WAAW,IAAI;oDACpC,cAAc,KAAE,WAAW,EAAE,CAAC;iBACpC;gBACD,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;aACtB,CAAC,CAAC;YACH,SAAS;QACX,CAAC;QAED,OAAO,CAAC,IAAI,CAAC;YACX,EAAE,EAAE,sBAAU;YACd,WAAW,EAAE,wBAAwB;YACrC,MAAM,EAAE,CAAC;YACT,OAAO,EAAE,QAAQ,CAAC,QAAQ,EAAE;YAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,QAAQ,EAAE,YAAY;YACtB,KAAK;YACL,WAAW,EAAE,cAAc,CAAC,WAAW,IAAI;gDACpC,cAAc,KAAE,WAAW,EAAE,CAAC;aACpC;YACD,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;SACtB,CAAC,CAAC;IACL,CAAC;IAED,MAAM,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -7,7 +7,7 @@ exports.fetchers = exports.jobs = exports.platforms = void 0;
7
7
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
8
8
  const aptosLpJob_1 = __importDefault(require("./aptosLpJob"));
9
9
  const constants_1 = require("./constants");
10
- const getPoolsJob_1 = __importDefault(require("../uniswap-v2/getPoolsJob"));
10
+ // import getPoolsJob from '../uniswap-v2/getPoolsJob';
11
11
  const getPositionsV2Fetcher_1 = __importDefault(require("../uniswap-v2/getPositionsV2Fetcher"));
12
12
  const getStakersBalancesFetcher_1 = __importDefault(require("./getStakersBalancesFetcher"));
13
13
  const stakerCakeFetcher_1 = __importDefault(require("./stakerCakeFetcher"));
@@ -18,7 +18,7 @@ exports.jobs = [
18
18
  // Aptos
19
19
  aptosLpJob_1.default,
20
20
  // Ethereum
21
- (0, getPoolsJob_1.default)(portfolio_core_1.NetworkId.ethereum, constants_1.platformId, 'V2', constants_1.theGraphUrlEthV2),
21
+ // getPoolsJob(NetworkId.ethereum, platformId, 'V2', theGraphUrlEthV2),
22
22
  // BNB
23
23
  // getPoolsJob(NetworkId.bnb, platformId, 'V1', factoryV2Bnb),
24
24
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/pancakeswap/index.ts"],"names":[],"mappings":";;;;;;AAAA,+DAAiE;AAGjE,8DAAoC;AACpC,2CAUqB;AACrB,4EAAoD;AACpD,gGAAwE;AACxE,4FAAoE;AACpE,4EAAoD;AACpD,kFAA+E;AAC/E,4EAAoD;AAEvC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU;IACzB,QAAQ;IACR,oBAAQ;IACR,WAAW;IACX,IAAA,qBAAW,EAAC,0BAAS,CAAC,QAAQ,EAAE,sBAAU,EAAE,IAAI,EAAE,4BAAgB,CAAC;IACnE,MAAM;IACN,8DAA8D;CAC/D,CAAC;AACW,QAAA,QAAQ,GAAc;IACjC,gBAAgB;IAChB,GAAG,2BAAe,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAChC,IAAA,mDAAwB,EAAC,MAAM,EAAE,sBAAU,EAAE,IAAI,CAAC,CACnD;IACD,cAAc;IACd,IAAA,+BAAqB,EAAC,0BAAS,CAAC,QAAQ,EAAE,sBAAU,EAAE,IAAI,CAAC;IAC3D,IAAA,2BAAiB,EAAC,0BAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,gCAAoB,CAAC;IACjE,IAAA,mCAAyB,EAAC,0BAAS,CAAC,QAAQ,EAAE,sBAAU,EAAE,2BAAe,CAAC;IAE1E,SAAS;IACT,IAAA,+BAAqB,EAAC,0BAAS,CAAC,GAAG,EAAE,sBAAU,EAAE,IAAI,CAAC;IACtD,IAAI;IACJ,kDAAkD;IAClD,wEAAwE;IACxE,8BAA8B;IAC9B,KAAK;IACL,IAAA,2BAAiB,EAAC,0BAAS,CAAC,GAAG,EAAE,IAAI,EAAE,2BAAe,CAAC;IACvD,IAAA,mCAAyB,EAAC,0BAAS,CAAC,GAAG,EAAE,sBAAU,EAAE,sBAAU,CAAC;IAChE,2BAAiB;CAClB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/pancakeswap/index.ts"],"names":[],"mappings":";;;;;;AAAA,+DAAiE;AAGjE,8DAAoC;AACpC,2CAUqB;AACrB,uDAAuD;AACvD,gGAAwE;AACxE,4FAAoE;AACpE,4EAAoD;AACpD,kFAA+E;AAC/E,4EAAoD;AAEvC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU;IACzB,QAAQ;IACR,oBAAQ;IACR,WAAW;IACX,uEAAuE;IACvE,MAAM;IACN,8DAA8D;CAC/D,CAAC;AACW,QAAA,QAAQ,GAAc;IACjC,gBAAgB;IAChB,GAAG,2BAAe,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAChC,IAAA,mDAAwB,EAAC,MAAM,EAAE,sBAAU,EAAE,IAAI,CAAC,CACnD;IACD,cAAc;IACd,IAAA,+BAAqB,EAAC,0BAAS,CAAC,QAAQ,EAAE,sBAAU,EAAE,IAAI,CAAC;IAC3D,IAAA,2BAAiB,EAAC,0BAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,gCAAoB,CAAC;IACjE,IAAA,mCAAyB,EAAC,0BAAS,CAAC,QAAQ,EAAE,sBAAU,EAAE,2BAAe,CAAC;IAE1E,SAAS;IACT,IAAA,+BAAqB,EAAC,0BAAS,CAAC,GAAG,EAAE,sBAAU,EAAE,IAAI,CAAC;IACtD,IAAI;IACJ,kDAAkD;IAClD,wEAAwE;IACxE,8BAA8B;IAC9B,KAAK;IACL,IAAA,2BAAiB,EAAC,0BAAS,CAAC,GAAG,EAAE,IAAI,EAAE,2BAAe,CAAC;IACvD,IAAA,mCAAyB,EAAC,0BAAS,CAAC,GAAG,EAAE,sBAAU,EAAE,sBAAU,CAAC;IAChE,2BAAiB;CAClB,CAAC"}
@@ -6,16 +6,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fetchers = exports.jobs = exports.platforms = void 0;
7
7
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
8
8
  const constants_1 = require("./constants");
9
- const getPoolsJob_1 = __importDefault(require("../uniswap-v2/getPoolsJob"));
9
+ // import getPoolsJob from '../uniswap-v2/getPoolsJob';
10
10
  const getPositionsV2Fetcher_1 = __importDefault(require("../uniswap-v2/getPositionsV2Fetcher"));
11
11
  const poolsJob_1 = __importDefault(require("./aptos/poolsJob"));
12
12
  exports.platforms = [constants_1.platform];
13
13
  exports.jobs = [
14
14
  poolsJob_1.default,
15
- (0, getPoolsJob_1.default)(portfolio_core_1.NetworkId.ethereum, constants_1.platform.id, 'v2', constants_1.ethereumTheGraphV2),
16
- (0, getPoolsJob_1.default)(portfolio_core_1.NetworkId.polygon, constants_1.platform.id, 'v2', constants_1.polygonTheGraphV2),
17
- (0, getPoolsJob_1.default)(portfolio_core_1.NetworkId.avalanche, constants_1.platform.id, 'v2', constants_1.avalancheTheGraphV2),
18
- (0, getPoolsJob_1.default)(portfolio_core_1.NetworkId.bnb, constants_1.platform.id, 'v2', constants_1.bnbTheGraphV2),
15
+ // getPoolsJob(NetworkId.ethereum, platform.id, 'v2', ethereumTheGraphV2),
16
+ // getPoolsJob(NetworkId.polygon, platform.id, 'v2', polygonTheGraphV2),
17
+ // getPoolsJob(NetworkId.avalanche, platform.id, 'v2', avalancheTheGraphV2),
18
+ // getPoolsJob(NetworkId.bnb, platform.id, 'v2', bnbTheGraphV2),
19
19
  ];
20
20
  exports.fetchers = [
21
21
  (0, getPositionsV2Fetcher_1.default)(portfolio_core_1.NetworkId.ethereum, constants_1.platform.id, 'v2'),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sushiswap/index.ts"],"names":[],"mappings":";;;;;;AAAA,+DAAiE;AAGjE,2CAMqB;AACrB,4EAAoD;AACpD,gGAAwE;AACxE,gEAA6C;AAEhC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU;IACzB,kBAAa;IACb,IAAA,qBAAW,EAAC,0BAAS,CAAC,QAAQ,EAAE,oBAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,8BAAkB,CAAC;IACtE,IAAA,qBAAW,EAAC,0BAAS,CAAC,OAAO,EAAE,oBAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,6BAAiB,CAAC;IACpE,IAAA,qBAAW,EAAC,0BAAS,CAAC,SAAS,EAAE,oBAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,+BAAmB,CAAC;IACxE,IAAA,qBAAW,EAAC,0BAAS,CAAC,GAAG,EAAE,oBAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,yBAAa,CAAC;CAC7D,CAAC;AACW,QAAA,QAAQ,GAAc;IACjC,IAAA,+BAAqB,EAAC,0BAAS,CAAC,QAAQ,EAAE,oBAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAC5D,IAAA,+BAAqB,EAAC,0BAAS,CAAC,OAAO,EAAE,oBAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAC3D,IAAA,+BAAqB,EAAC,0BAAS,CAAC,SAAS,EAAE,oBAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAC7D,2DAA2D;IAC3D,4BAA4B;IAC5B,MAAM;IACN,qCAAqC;IACrC,6DAA6D;IAC7D,qEAAqE;IACrE,OAAO;IACP,iBAAiB;IACjB,SAAS;IACT,KAAK;CACN,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sushiswap/index.ts"],"names":[],"mappings":";;;;;;AAAA,+DAAiE;AAGjE,2CAMqB;AACrB,uDAAuD;AACvD,gGAAwE;AACxE,gEAA6C;AAEhC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU;IACzB,kBAAa;IACb,0EAA0E;IAC1E,wEAAwE;IACxE,4EAA4E;IAC5E,gEAAgE;CACjE,CAAC;AACW,QAAA,QAAQ,GAAc;IACjC,IAAA,+BAAqB,EAAC,0BAAS,CAAC,QAAQ,EAAE,oBAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAC5D,IAAA,+BAAqB,EAAC,0BAAS,CAAC,OAAO,EAAE,oBAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAC3D,IAAA,+BAAqB,EAAC,0BAAS,CAAC,SAAS,EAAE,oBAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAC7D,2DAA2D;IAC3D,4BAA4B;IAC5B,MAAM;IACN,qCAAqC;IACrC,6DAA6D;IAC7D,qEAAqE;IACrE,OAAO;IACP,iBAAiB;IACjB,SAAS;IACT,KAAK;CACN,CAAC"}
@@ -3,6 +3,6 @@ import { Platform } from '@sonarwatch/portfolio-core';
3
3
  export declare const platformId = "whalesmarket";
4
4
  export declare const platform: Platform;
5
5
  export declare const pid: PublicKey;
6
- export declare const whalesApi = "https://api-v2.whales.market/v2/tokens/";
6
+ export declare const whalesApi = "https://api.whales.market/v2/tokens";
7
7
  export declare const tokensKey = "tokens";
8
8
  export declare const lastCountKey = "lastCount";
@@ -12,7 +12,7 @@ exports.platform = {
12
12
  twitter: 'https://twitter.com/WhalesMarket',
13
13
  };
14
14
  exports.pid = new web3_js_1.PublicKey('stPdYNaJNsV3ytS9Xtx4GXXXRcVqVS6x66ZFa26K39S');
15
- exports.whalesApi = 'https://api-v2.whales.market/v2/tokens/';
15
+ exports.whalesApi = 'https://api.whales.market/v2/tokens';
16
16
  exports.tokensKey = 'tokens';
17
17
  exports.lastCountKey = 'lastCount';
18
18
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,cAAc,CAAC;AAC5B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,qDAAqD;IAC5D,WAAW,EAAE,eAAe,EAAE,sCAAsC;IACpE,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,GAAG,GAAG,IAAI,mBAAS,CAAC,6CAA6C,CAAC,CAAC;AACnE,QAAA,SAAS,GAAG,yCAAyC,CAAC;AACtD,QAAA,SAAS,GAAG,QAAQ,CAAC;AACrB,QAAA,YAAY,GAAG,WAAW,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,cAAc,CAAC;AAC5B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,qDAAqD;IAC5D,WAAW,EAAE,eAAe,EAAE,sCAAsC;IACpE,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,GAAG,GAAG,IAAI,mBAAS,CAAC,6CAA6C,CAAC,CAAC;AACnE,QAAA,SAAS,GAAG,qCAAqC,CAAC;AAElD,QAAA,SAAS,GAAG,QAAQ,CAAC;AACrB,QAAA,YAAY,GAAG,WAAW,CAAC"}
@@ -30,6 +30,8 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
30
30
  params: { take: lastCount || minToTake, chain_id: 666666 },
31
31
  })
32
32
  .catch(() => null);
33
+ if (!apiRes)
34
+ console.log('WhalesMarket Job : unable to reach the API :', constants_1.whalesApi);
33
35
  if (apiRes === null || apiRes === void 0 ? void 0 : apiRes.data.data) {
34
36
  const tokens = apiRes.data.data.list;
35
37
  yield cache.setItem(constants_1.tokensKey, tokens, {
@@ -1 +1 @@
1
- {"version":3,"file":"tokensJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/tokensJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,+DAAuD;AAGvD,2CAA6E;AAE7E,mDAA2D;AAE3D,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE,EAAE,IAAI,EAAE,8CAA8C,EAAE,QAAQ,EAAE,CAAC,EAAE;CAC7E,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,OAAO,CAAS,wBAAY,EAAE;QAC1D,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IAEH,MAAM,MAAM,GAAyC,MAAM,eAAK;SAC7D,GAAG,CAAC,qBAAS,EAAE;QACd,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,IAAI,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE;KAC3D,CAAC;SACD,KAAK,CAAC,GAAG,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AY,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACxD,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC,CAAC;QAEH,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;YAC5D,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;YACtD,IAAI,KAAK,EAAE,CAAC;gBACV,MAAM,KAAK,CAAC,mBAAmB,CAAC;oBAC9B,OAAO,EAAE,KAAK,CAAC,IAAI;oBACnB,QAAQ,EAAE,KAAK,CAAC,QAAQ;oBACxB,MAAM,EAAE,KAAK;oBACb,EAAE,EAAE,sBAAU;oBACd,SAAS,EAAE,0BAAS,CAAC,MAAM;oBAC3B,UAAU,EAAE,gCAAoB,CAAC,EAAE;oBACnC,KAAK,EAAE,KAAK,CAAC,UAAU;oBACvB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;iBACtB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.sqrtPriceX64ToPrice = void 0;
16
16
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
17
17
  const decimal_js_1 = __importDefault(require("decimal.js"));
18
- const getDecimalsForToken_1 = require("../misc/getDecimalsForToken");
18
+ const getCachedDecimalsForToken_1 = require("../misc/getCachedDecimalsForToken");
19
19
  const constants_1 = require("../../plugins/tokens/constants");
20
20
  const getSourceWeight_1 = __importDefault(require("../misc/getSourceWeight"));
21
21
  const computeAndStoreLpPrice_1 = require("../misc/computeAndStoreLpPrice");
@@ -34,8 +34,12 @@ function storeTokenPricesFromSqrt(cache, networkId, source, reserveX, reserveY,
34
34
  const [tokenPriceX, tokenPriceY] = yield cache.getTokenPrices([mintX, mintY], networkId);
35
35
  if (!tokenPriceX && !tokenPriceY)
36
36
  return undefined;
37
- const decimalsX = tempDecimalsX || (yield (0, getDecimalsForToken_1.getDecimalsForToken)(cache, mintX, networkId));
38
- const decimalsY = tempDecimalsY || (yield (0, getDecimalsForToken_1.getDecimalsForToken)(cache, mintY, networkId));
37
+ const decimalsX = tempDecimalsX ||
38
+ (tokenPriceX === null || tokenPriceX === void 0 ? void 0 : tokenPriceX.decimals) ||
39
+ (yield (0, getCachedDecimalsForToken_1.getCachedDecimalsForToken)(cache, mintX, networkId));
40
+ const decimalsY = tempDecimalsY ||
41
+ (tokenPriceY === null || tokenPriceY === void 0 ? void 0 : tokenPriceY.decimals) ||
42
+ (yield (0, getCachedDecimalsForToken_1.getCachedDecimalsForToken)(cache, mintY, networkId));
39
43
  if (!decimalsX || !decimalsY)
40
44
  return undefined;
41
45
  const xToYPrice = sqrtPriceX64ToPrice(sqrtPrice, decimalsX, decimalsY);
@@ -1 +1 @@
1
- {"version":3,"file":"tokenPricesFromSqrt.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clmm/tokenPricesFromSqrt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAIoC;AAEpC,4DAAiC;AAEjC,qEAAkE;AAClE,8DAAsE;AACtE,8EAAsD;AACtD,2EAAkE;AAClE,mFAA0E;AAE1E,SAA8B,wBAAwB,CACpD,KAAY,EACZ,SAAwB,EACxB,MAAc,EACd,QAAmB,EACnB,QAAmB,EACnB,SAAoB,EACpB,KAAa,EACb,KAAa,EACb,aAAsB,EACtB,aAAsB;;;QAEtB,MAAM,WAAW,GACf,MAAA,MAAA,iDAAoB;aACjB,GA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AAE;aACtB,CAAC;YACF,MAAM,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;YAClD,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;QAED,OAAO,SAAS,CAAC;;CAClB;AAjFD,2CAiFC;AAED,MAAM,cAAc,GAAG,CAAC,GAAY,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,oBAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAExE,SAAgB,mBAAmB,CACjC,YAAuB,EACvB,SAAiB,EACjB,SAAiB;IAEjB,OAAO,cAAc,CAAC,IAAI,oBAAO,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;SACxD,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,oBAAO,CAAC,GAAG,CAAC,EAAE,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC;AACjD,CAAC;AARD,kDAQC"}
1
+ {"version":3,"file":"tokenPricesFromSqrt.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clmm/tokenPricesFromSqrt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAIoC;AAEpC,4DAAiC;AAEjC,iFAA8E;AAC9E,8DAAsE;AACtE,8EAAsD;AACtD,2EAAkE;AAClE,mFAA0E;AAE1E,SAA8B,wBAAwB,CACpD,KAAY,EACZ,SAAwB,EACxB,MAAc,EACd,QAAmB,EACnB,QAAmB,EACnB,SAAoB,EACpB,KAAa,EACb,KAAa,EACb,aAAsB,EACtB,aAAsB;;;QAEtB,MAAM,WAAW,GACf,MAAA,MAAA,iDAAoB;aACjB,GAAG,CAAC,SAAS,CAAC,0CACb,QAAQ,CAAC,IAAA,mCAAkB,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC,mCAAI,KAAK,CAAC;QAC9D,MAAM,WAAW,GACf,MAAA,MAAA,iDAAoB;aACjB,GAAG,CAA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AgB,CAAC,CAAC;YAClD,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;QAED,OAAO,SAAS,CAAC;;CAClB;AArFD,2CAqFC;AAED,MAAM,cAAc,GAAG,CAAC,GAAY,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,oBAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAExE,SAAgB,mBAAmB,CACjC,YAAuB,EACvB,SAAiB,EACjB,SAAiB;IAEjB,OAAO,cAAc,CAAC,IAAI,oBAAO,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;SACxD,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,oBAAO,CAAC,GAAG,CAAC,EAAE,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC;AACjD,CAAC;AARD,kDAQC"}
@@ -5,8 +5,9 @@ export declare class MemoizedCache<T extends StorageValue, K = T> {
5
5
  private readonly opts;
6
6
  private readonly transform;
7
7
  private readonly ttl;
8
+ private readonly fetch;
8
9
  private item;
9
10
  private lastUpdate;
10
- constructor(key: string, opts: TransactionOptions, transform?: (i: T | undefined) => K, ttl?: number);
11
+ constructor(key: string, opts: TransactionOptions, transform?: (i: T | undefined) => K, ttl?: number, fetch?: () => Promise<T>);
11
12
  getItem: (cache: Cache) => Promise<K>;
12
13
  }
@@ -14,11 +14,15 @@ const defaultMemoizedCacheRefreshInterval = 3600000;
14
14
  // T is the type of stored item in cache
15
15
  // K is the type of the item after transformation
16
16
  class MemoizedCache {
17
- constructor(key, opts, transform, ttl = defaultMemoizedCacheRefreshInterval) {
17
+ constructor(key, opts, transform, ttl = defaultMemoizedCacheRefreshInterval, fetch) {
18
18
  this.getItem = (cache) => __awaiter(this, void 0, void 0, function* () {
19
19
  const now = Date.now();
20
20
  if (!this.item || this.lastUpdate + this.ttl < now) {
21
- const rawItem = yield cache.getItem(this.key, this.opts);
21
+ let rawItem = yield cache.getItem(this.key, this.opts);
22
+ if (!rawItem && this.fetch) {
23
+ rawItem = yield this.fetch();
24
+ yield cache.setItem(this.key, rawItem, this.opts);
25
+ }
22
26
  this.item = this.transform ? this.transform(rawItem) : rawItem;
23
27
  this.lastUpdate = now;
24
28
  }
@@ -29,6 +33,7 @@ class MemoizedCache {
29
33
  this.transform = transform;
30
34
  this.ttl = ttl;
31
35
  this.lastUpdate = 0;
36
+ this.fetch = fetch;
32
37
  }
33
38
  }
34
39
  exports.MemoizedCache = MemoizedCache;
@@ -1 +1 @@
1
- {"version":3,"file":"MemoizedCache.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/MemoizedCache.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,MAAM,mCAAmC,GAAG,OAAO,CAAC;AAEpD,wCAAwC;AACxC,iDAAiD;AACjD,MAAa,aAAa;IASxB,YACE,GAAW,EACX,IAAwB,EACxB,SAAmC,EACnC,MAAc,mCAAmC;QASnD,YAAO,GAAG,CAAO,KAAY,EAAE,EAAE;YAC/B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YAEvB,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;gBACnD,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,CAAI,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC5D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAE,OAAa,CAAC;gBACtE,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;YACxB,CAAC;YAED,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC,CAAA,CAAC;QAjBA,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CA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AI,CAAC;QACnB,CAAC,CAAA,CAAC;QAxBA,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CAmBF;AA1CD,sCA0CC"}
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.tokensToRelyOnByNetwork = void 0;
16
16
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
17
17
  const getSourceWeight_1 = __importDefault(require("./getSourceWeight"));
18
- const getDecimalsForToken_1 = require("./getDecimalsForToken");
18
+ const getCachedDecimalsForToken_1 = require("./getCachedDecimalsForToken");
19
19
  const constants_1 = require("../../plugins/tokens/constants");
20
20
  const solana_1 = require("../solana");
21
21
  /**
@@ -114,7 +114,7 @@ function checkComputeAndStoreTokensPrices(cache, source, networkId, tokenX, toke
114
114
  decimalsTokenX = tokenPriceX.decimals;
115
115
  }
116
116
  else {
117
- decimalsTokenX = yield (0, getDecimalsForToken_1.getDecimalsForToken)(cache, tokenX.mint, networkId);
117
+ decimalsTokenX = yield (0, getCachedDecimalsForToken_1.getCachedDecimalsForToken)(cache, tokenX.mint, networkId);
118
118
  }
119
119
  let decimalsTokenY;
120
120
  if (tokenY.decimal) {
@@ -124,7 +124,7 @@ function checkComputeAndStoreTokensPrices(cache, source, networkId, tokenX, toke
124
124
  decimalsTokenY = tokenPriceY.decimals;
125
125
  }
126
126
  else {
127
- decimalsTokenY = yield (0, getDecimalsForToken_1.getDecimalsForToken)(cache, tokenY.mint, networkId);
127
+ decimalsTokenY = yield (0, getCachedDecimalsForToken_1.getCachedDecimalsForToken)(cache, tokenY.mint, networkId);
128
128
  }
129
129
  if (decimalsTokenX === null || decimalsTokenY === null)
130
130
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"checkComputeAndStoreTokensPrices.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/checkComputeAndStoreTokensPrices.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAMoC;AAGpC,wEAAgD;AAChD,+DAA4D;AAC5D,8DAAsE;AACtE,sCAA2C;AAe3C;;;;;;;;;GASG;AACU,QAAA,uBAAuB,GAAiC,IAAI,GAAG,CAAC;IAC3E;QACE,0BAAS,CAAC,GAAG;QACb;YACE,yBAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO;YAC3B,sEAAsE,EAAE,OAAO;YAC/E,qHAAqH,EAAE,SAAS;SACjI;KACF;IACD;QACE,0BAAS,CAAC,MAAM;QAChB;YACE,yBAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO;YAC9B,2CAA0B,EAAE,OAAO;YACnC,8CAA8C,EAAE,WAAW;YAC3D,6CAA6C,EAAE,OAAO;YACtD,8CAA8C,EAAE,WAAW;YAC3D,uBAAc,EAAE,OAAO;YACvB,8CAA8C,EAAE,OAAO;SACxD;KACF;IACD;QACE,0BAAS,CAAC,KAAK;QACf;YACE,yBAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO;YAC7B,6EAA6E,EAAE,SAAS;YACxF,mFAAmF,EAAE,oBAAoB;SAC1G;KACF;IACD;QACE,0BAAS,CAAC,GAAG;QACb;YACE,yBAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO;YAC3B,gFAAgF,EAAE,SAAS;YAC3F,iFAAiF,EAAE,QAAQ;YAC3F,eAAe;SAChB;KACF;CACF,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,SAA8B,gCAAgC,CAC5D,KAAY,EACZ,MAAc,EACd,SAAwB,EACxB,MAAiB,EACjB,MAAiB;;QAQjB,MAAM,cAAc,GAAG,+BAAuB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAE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puteAndStoreTokensPrices.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/checkComputeAndStoreTokensPrices.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAMoC;AAGpC,wEAAgD;AAChD,2EAAwE;AACxE,8DAAsE;AACtE,sCAA2C;AAe3C;;;;;;;;;GASG;AACU,QAAA,uBAAuB,GAAiC,IAAI,GAAG,CAAC;IAC3E;QACE,0BAAS,CAAC,GAAG;QACb;YACE,yBAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO;YAC3B,sEAAsE,EAAE,OAAO;YAC/E,qHAAqH,EAAE,SAAS;SACjI;KACF;IACD;QACE,0BAAS,CAAC,MAAM;QAChB;YACE,yBAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO;YAC9B,2CAA0B,EAAE,OAAO;YACnC,8CAA8C,EAAE,WAAW;YAC3D,6CAA6C,EAAE,OAAO;YACtD,8CAA8C,EAAE,WAAW;YAC3D,uBAAc,EAAE,OAAO;YACvB,8CAA8C,EAAE,OAAO;SACxD;KACF;IACD;QACE,0BAAS,CAAC,KAAK;QACf;YACE,yBAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO;YAC7B,6EAA6E,EAAE,SAAS;YACxF,mFAAmF,EAAE,oBAAoB;SAC1G;KACF;IACD;QACE,0BAAS,CAAC,GAAG;QACb;YACE,yBAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO;YAC3B,gFAAgF,EAAE,SAAS;YAC3F,iFAAiF,EAAE,QAAQ;YAC3F,eAAe;SAChB;KACF;CACF,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,SAA8B,gCAAgC,CAC5D,KAAY,EACZ,MAAc,EACd,SAAwB,EACxB,MAAiB,EACjB,MAAiB;;QAQjB,MAAM,cAAc,GAAG,+BAAuB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAE9D,IAAI,CAAC,cAAc;YAAE,OAAO,SAAS,CAAC;QAEtC,IACE,C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
+ type Decimal = number | null;
4
+ export declare function getDecimalsForToken(address: string, networkId: NetworkIdType): Promise<Decimal>;
3
5
  /**
4
6
  * Return the decimals of a token on any network using RPC calls or TokenList.
5
7
  *
@@ -7,6 +9,7 @@ import { Cache } from '../../Cache';
7
9
  * @param address The mint/address of the token.
8
10
  * @param networkId The network on which to execute the request.
9
11
  *
10
- * @returns The number of decimals or undefined if unsucessful request.
12
+ * @returns The number of decimals or undefined if unsuccessful request.
11
13
  */
12
- export declare function getDecimalsForToken(cache: Cache, address: string, networkId: NetworkIdType): Promise<number | null>;
14
+ export declare function getCachedDecimalsForToken(cache: Cache, address: string, networkId: NetworkIdType): Promise<Decimal>;
15
+ export {};
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getDecimalsForToken = void 0;
12
+ exports.getCachedDecimalsForToken = exports.getDecimalsForToken = void 0;
13
13
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
14
14
  const web3_js_1 = require("@solana/web3.js");
15
15
  const core_1 = require("@sei-js/core");
@@ -19,16 +19,10 @@ const sei_1 = require("../sei");
19
19
  const getDecimals_1 = require("../aptos/getDecimals");
20
20
  const getDecimals_2 = require("../solana/getDecimals");
21
21
  const getDecimals_3 = require("../sui/getDecimals");
22
- /**
23
- * Return the decimals of a token on any network using RPC calls or TokenList.
24
- *
25
- * @param cache Cache where to look for decimals
26
- * @param address The mint/address of the token.
27
- * @param networkId The network on which to execute the request.
28
- *
29
- * @returns The number of decimals or undefined if unsucessful request.
30
- */
31
- function getDecimalsForToken(cache, address, networkId) {
22
+ const MemoizedCache_1 = require("./MemoizedCache");
23
+ const ttl = 60 * 60 * 24;
24
+ const decimalsMemo = new Map();
25
+ function getDecimalsForToken(address, networkId) {
32
26
  return __awaiter(this, void 0, void 0, function* () {
33
27
  switch (networkId) {
34
28
  case 'aptos': {
@@ -69,4 +63,28 @@ function getDecimalsForToken(cache, address, networkId) {
69
63
  });
70
64
  }
71
65
  exports.getDecimalsForToken = getDecimalsForToken;
72
- //# sourceMappingURL=getDecimalsForToken.js.map
66
+ /**
67
+ * Return the decimals of a token on any network using RPC calls or TokenList.
68
+ *
69
+ * @param cache Cache where to look for decimals
70
+ * @param address The mint/address of the token.
71
+ * @param networkId The network on which to execute the request.
72
+ *
73
+ * @returns The number of decimals or undefined if unsuccessful request.
74
+ */
75
+ function getCachedDecimalsForToken(cache, address, networkId) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ const key = `${networkId}-${(0, portfolio_core_1.formatTokenAddress)(address, networkId)}`;
78
+ let decimalMemo = decimalsMemo.get(key);
79
+ if (!decimalMemo) {
80
+ decimalMemo = new MemoizedCache_1.MemoizedCache((0, portfolio_core_1.formatTokenAddress)(address, networkId), {
81
+ prefix: 'decimalsfortoken',
82
+ networkId,
83
+ }, undefined, ttl, () => __awaiter(this, void 0, void 0, function* () { return getDecimalsForToken(address, networkId); }));
84
+ decimalsMemo.set(key, decimalMemo);
85
+ }
86
+ return decimalMemo.getItem(cache);
87
+ });
88
+ }
89
+ exports.getCachedDecimalsForToken = getCachedDecimalsForToken;
90
+ //# sourceMappingURL=getCachedDecimalsForToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCachedDecimalsForToken.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getCachedDecimalsForToken.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAC5C,uCAAiD;AACjD,wCAKoB;AACpB,oDAAsD;AACtD,gCAAsD;AAEtD,sDAAuE;AACvE,uDAAyE;AACzE,oDAAmE;AACnE,mDAAgD;AAGhD,MAAM,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEzB,MAAM,YAAY,GAAwC,IAAI,GAAG,EAAE,CAAC;AAEpE,SAAsB,mBAAmB,CACvC,OAAe,EACf,SAAwB;;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C,QAAQ,IAAI,IAAI,CAAC;gBACpC,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC;YACD,KAAK,KAAK,CAAC,CAAC,CAAC;gBACX,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;gBAC9B,OAAO,IAAA,yBAAc,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YACzC,CAAC;YACD;gBACE,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;CAAA;AA3CD,kDA2CC;AAED;;;;;;;;GAQG;AACH,SAAsB,yBAAyB,CAC7C,KAAY,EACZ,OAAe,EACf,SAAwB;;QAExB,MAAM,GAAG,GAAG,GAAG,SAAS,IAAI,IAAA,mCAAkB,EAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC;QAErE,IAAI,WAAW,GAAG,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAExC,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,WAAW,GAAG,IAAI,6BAAa,CAC7B,IAAA,mCAAkB,EAAC,OAAO,EAAE,SAAS,CAAC,EACtC;gBACE,MAAM,EAAE,kBAAkB;gBAC1B,SAAS;aACV,EACD,SAAS,EACT,GAAG,EACH,GAAS,EAAE,gDAAC,OAAA,mBAAmB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA,GAAA,CACpD,CAAC;YACF,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;QACrC,CAAC;QAED,OAAO,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;CAAA;AAxBD,8DAwBC"}
@@ -41,8 +41,9 @@ exports.defaultAcceptedPairs = new Map([
41
41
  [
42
42
  portfolio_core_1.suiNativeAddress,
43
43
  '0x2::sui::SUI',
44
- constants_2.usdcSuiType, // USDCet
44
+ constants_2.wUsdcSuiType, // USDCet
45
45
  '0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN', // USDCet
46
+ constants_2.usdcSuiType, // native USDC
46
47
  ].map((a) => (0, portfolio_core_1.formatTokenAddress)(a, portfolio_core_1.NetworkId.sui)),
47
48
  ],
48
49
  ]);
@@ -1 +1 @@
1
- {"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAYoC;AACpC,8DAAsE;AACtE,wEAAgD;AAChD,gDAA+C;AAC/C,2CAAkD;AAClD,sCAA2C;AAE9B,QAAA,oBAAoB,GAAG,IAAI,GAAG,CAA0B;IACnE;QACE,0BAAS,CAAC,GAAG;QACb;YACE,iCAAgB;YAChB,sEAAsE,EAAE,OAAO;YAC/E,qHAAqH,EAAE,SAAS;SACjI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,GAAG,CAAC,CAAC;KACnD;IACD;QACE,0BAAS,CAAC,MAAM;QAChB;YACE,oCAAmB;YACnB,2CAA0B;YAC1B,uBAAc,EAAE,OAAO;YACvB,8CAA8C,EAAE,OAAO;SACxD,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,MAAM,CAAC,CAAC;KACtD;IACD;QACE,0BAAS,CAAC,KAAK;QACf;YACE,mCAAkB;YAClB,6EAA6E,EAAE,SAAS;YACxF,mFAAmF,EAAE,oBAAoB;SAC1G,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,KAAK,CAAC,CAAC;KACrD;IACD;QACE,0BAAS,CAAC,GAAG;QACb;YACE,iCAAgB;YAChB,eAAe;YACf,uBAAW,EAAE,SAAS;YACtB,gFAAgF,EAAE,SAAS;SAC5F,CAAC,GAAG,CA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E,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,kCAAiB,CAAC;YAE5D,SAAS;QAEX,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,CAAC,MAAM,IAAI,eAAe,CAAC,MAAM;YACpC,YAAY,GAAG,CAAC,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;QACnD,MAAM,KAAK,GAAG,CAAC,YAAY,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC;QAEnE,MAAM,MAAM,GAAqB;YAC/B,EAAE,EAAE,QAAQ;YACZ,SAAS;YACT,UAAU,EAAE,gCAAoB,CAAC,EAAE;YACnC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;YACtB,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,KAAK;YACL,MAAM,EAAE,IAAA,yBAAe,EAAC,iBAAiB,CAAC;YAC1C,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,aAAa;YACb,WAAW;SACZ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAnFD,gEAmFC"}
1
+ {"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAYoC;AACpC,8DAAsE;AACtE,wEAAgD;AAChD,gDAA6D;AAC7D,2CAAkD;AAClD,sCAA2C;AAE9B,QAAA,oBAAoB,GAAG,IAAI,GAAG,CAA0B;IACnE;QACE,0BAAS,CAAC,GAAG;QACb;YACE,iCAAgB;YAChB,sEAAsE,EAAE,OAAO;YAC/E,qHAAqH,EAAE,SAAS;SACjI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,GAAG,CAAC,CAAC;KACnD;IACD;Q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,WAAW;SACZ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAnFD,gEAmFC"}
@@ -1,3 +1,4 @@
1
1
  export declare const kioskItemType = "0x2::kiosk::Item";
2
2
  export declare const obKioskStructType = "0x95a441d389b07437d00dd07e0b6f05f513d7659b13fd7c5d3923c7d9d847199b::ob_kiosk::OwnerToken";
3
- export declare const usdcSuiType = "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN";
3
+ export declare const wUsdcSuiType = "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN";
4
+ export declare const usdcSuiType = "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC";
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.usdcSuiType = exports.obKioskStructType = exports.kioskItemType = void 0;
3
+ exports.usdcSuiType = exports.wUsdcSuiType = exports.obKioskStructType = exports.kioskItemType = void 0;
4
4
  exports.kioskItemType = '0x2::kiosk::Item';
5
5
  exports.obKioskStructType = '0x95a441d389b07437d00dd07e0b6f05f513d7659b13fd7c5d3923c7d9d847199b::ob_kiosk::OwnerToken';
6
- exports.usdcSuiType = '0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN';
6
+ exports.wUsdcSuiType = '0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN';
7
+ exports.usdcSuiType = '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC';
7
8
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/sui/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG,kBAAkB,CAAC;AACnC,QAAA,iBAAiB,GAC5B,0FAA0F,CAAC;AAChF,QAAA,WAAW,GACtB,gFAAgF,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/sui/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG,kBAAkB,CAAC;AACnC,QAAA,iBAAiB,GAC5B,0FAA0F,CAAC;AAChF,QAAA,YAAY,GACvB,gFAAgF,CAAC;AACtE,QAAA,WAAW,GACtB,gFAAgF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDecimalsForToken.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getDecimalsForToken.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAAsE;AACtE,6CAA4C;AAC5C,uCAAiD;AACjD,wCAKoB;AACpB,oDAAsD;AACtD,gCAAsD;AAEtD,sDAAuE;AACvE,uDAAyE;AACzE,oDAAmE;AAEnE;;;;;;;;GAQG;AACH,SAAsB,mBAAmB,CACvC,KAAY,EACZ,OAAe,EACf,SAAwB;;QAExB,QAAQ,SAAS,EAAE,CAAC;YAClB,KAAK,OAAO,CAAC,CAAC,CAAC;gBACb,MAAM,MAAM,GAAG,IAAA,wBAAc,GAAE,CAAC;gBAChC,OAAO,IAAA,yBAAgB,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC3C,CAAC;YACD,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACd,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;gBACjC,OAAO,IAAA,yBAAiB,EAAC,MAAM,EAAE,IAAI,mBAAS,CAAC,OAAO,CAAC,CAAC,CAAC;YAC3D,CAAC;YACD,KAAK,KAAK,CAAC,CAAC,CAAC;gBACX,IAAI,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;oBAClC,MAAM,MAAM,GAAG,MAAM,IAAA,sBAAY,GAAE,CAAC;oB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