@sonarwatch/portfolio-plugins 0.12.139 → 0.12.141

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. package/CHANGELOG.md +2281 -2273
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/plugins/abex/marketsJob.js +2 -3
  5. package/src/plugins/abex/marketsJob.js.map +1 -1
  6. package/src/plugins/aftermath/poolsJob.js +1 -2
  7. package/src/plugins/aftermath/poolsJob.js.map +1 -1
  8. package/src/plugins/aftermath/stakingFetcher.js +1 -2
  9. package/src/plugins/aftermath/stakingFetcher.js.map +1 -1
  10. package/src/plugins/auxexchange/aptosLpJob.js +3 -3
  11. package/src/plugins/auxexchange/aptosLpJob.js.map +1 -1
  12. package/src/plugins/balancer/helpers/pools.js +21 -21
  13. package/src/plugins/circuit/vaultsJob.js +15 -6
  14. package/src/plugins/circuit/vaultsJob.js.map +1 -1
  15. package/src/plugins/debridge/airdropFetcher.js +23 -11
  16. package/src/plugins/debridge/airdropFetcher.js.map +1 -1
  17. package/src/plugins/elixir/positionsFetcher.js +1 -2
  18. package/src/plugins/elixir/positionsFetcher.js.map +1 -1
  19. package/src/plugins/flowx/poolJob.js +3 -4
  20. package/src/plugins/flowx/poolJob.js.map +1 -1
  21. package/src/plugins/flowx/stakingPoolJob.js +2 -3
  22. package/src/plugins/flowx/stakingPoolJob.js.map +1 -1
  23. package/src/plugins/liquidswap/aptosLpJob.js +2 -2
  24. package/src/plugins/liquidswap/aptosLpJob.js.map +1 -1
  25. package/src/plugins/mole/depositsFetcher.js +4 -5
  26. package/src/plugins/mole/depositsFetcher.js.map +1 -1
  27. package/src/plugins/pancakeswap/aptosLpJob.js +5 -5
  28. package/src/plugins/pancakeswap/aptosLpJob.js.map +1 -1
  29. package/src/plugins/sanctum/s1AirdropFetcher.js +63 -10
  30. package/src/plugins/sanctum/s1AirdropFetcher.js.map +1 -1
  31. package/src/plugins/staking-aptos/constants.js +2 -2
  32. package/src/plugins/staking-aptos/constants.js.map +1 -1
  33. package/src/plugins/sushiswap/aptos/poolsJob.js +2 -2
  34. package/src/plugins/sushiswap/aptos/poolsJob.js.map +1 -1
  35. package/src/plugins/sushiswap/helpers.js +24 -24
  36. package/src/plugins/thala/farmingPoolsFetcher.js +1 -1
  37. package/src/plugins/thala/farmingPoolsFetcher.js.map +1 -1
  38. package/src/plugins/thala/lpTokensJob.js +2 -2
  39. package/src/plugins/thala/lpTokensJob.js.map +1 -1
  40. package/src/plugins/tokens/fetchers/aptos.js +1 -1
  41. package/src/plugins/tokens/fetchers/aptos.js.map +1 -1
  42. package/src/plugins/uniswap-v2/helpers.js +22 -22
  43. package/src/plugins/zeta/airdropFetcher.js +14 -14
  44. package/src/utils/aptos/index.d.ts +0 -2
  45. package/src/utils/aptos/index.js +0 -2
  46. package/src/utils/aptos/index.js.map +1 -1
  47. package/src/utils/sei/constants.js +8 -8
  48. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  49. package/src/utils/aptos/parseTypeString.d.ts +0 -2
  50. package/src/utils/aptos/parseTypeString.js +0 -76
  51. package/src/utils/aptos/parseTypeString.js.map +0 -1
  52. package/src/utils/aptos/types.d.ts +0 -8
  53. package/src/utils/aptos/types.js +0 -3
  54. package/src/utils/aptos/types.js.map +0 -1
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # @sonarwatch/portfolio-plugins
2
-
3
- This library is @sonarwatch/portfolio-plugins
1
+ # @sonarwatch/portfolio-plugins
2
+
3
+ This library is @sonarwatch/portfolio-plugins
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.12.139",
3
+ "version": "0.12.141",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
@@ -19,7 +19,6 @@ const clients_1 = require("../../utils/clients");
19
19
  const getDynamicFields_1 = require("../../utils/sui/getDynamicFields");
20
20
  const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
21
21
  const getLpTokenSourceRawOld_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRawOld"));
22
- const aptos_1 = require("../../utils/aptos");
23
22
  const getObject_1 = require("../../utils/sui/getObject");
24
23
  const constants_2 = require("../tokens/constants");
25
24
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -46,7 +45,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
46
45
  const oType = (_b = (_a = o.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.value.type;
47
46
  if (!oType)
48
47
  return;
49
- const uType = (_d = (_c = (0, aptos_1.parseTypeString)(oType).keys) === null || _c === void 0 ? void 0 : _c.at(0)) === null || _d === void 0 ? void 0 : _d.type;
48
+ const uType = (_d = (_c = (0, portfolio_core_1.parseTypeString)(oType).keys) === null || _c === void 0 ? void 0 : _c.at(0)) === null || _d === void 0 ? void 0 : _d.type;
50
49
  if (!uType)
51
50
  return;
52
51
  uTypes.push(uType);
@@ -58,7 +57,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
58
57
  const market = (_f = (_e = object.data) === null || _e === void 0 ? void 0 : _e.content) === null || _f === void 0 ? void 0 : _f.fields;
59
58
  if (!market)
60
59
  return;
61
- const uType = (_h = (_g = (0, aptos_1.parseTypeString)(market.value.type).keys) === null || _g === void 0 ? void 0 : _g.at(0)) === null || _h === void 0 ? void 0 : _h.type;
60
+ const uType = (_h = (_g = (0, portfolio_core_1.parseTypeString)(market.value.type).keys) === null || _g === void 0 ? void 0 : _g.at(0)) === null || _h === void 0 ? void 0 : _h.type;
62
61
  if (!uType)
63
62
  return;
64
63
  const tokenPrice = tokenPrices.get((0, portfolio_core_1.formatTokenAddress)(uType, portfolio_core_1.NetworkId.sui));
@@ -1 +1 @@
1
- {"version":3,"file":"marketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/abex/marketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA2E;AAC3E,gEAAq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AK,CAAC,MAAM,CAAC,eAAe,CACpC,CAAC;QACF,aAAa,CAAC,IAAI,CAAC;YACjB,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,UAAU,CAAC,QAAQ;YAC7B,gBAAgB,EAAE,MAAM;YACxB,KAAK,EAAE,UAAU,CAAC,KAAK;SACxB,CAAC,CAAC;IACL,CAAC;IAED,MAAM,QAAQ,GAAG,IAAA,gCAAsB,EACrC,0BAAS,CAAC,GAAG,EACb,sBAAU,EACV,sBAAU,EACV;QACE,OAAO,EAAE,mBAAO;QAChB,QAAQ,EAAE,uBAAW;QACrB,SAAS,EAAE,IAAI,sBAAS,CAAC,QAAQ,CAAC;KACnC,EACD,aAAa,EACb,QAAQ,CACT,CAAC;IACF,MAAM,KAAK,CAAC,mBAAmB,CAAC;QAC9B,EAAE,EAAE,KAAK;QACT,SAAS,EAAE,0BAAS,CAAC,GAAG;QACxB,UAAU,EAAE,gCAAoB,CAAC,EAAE;QACnC,OAAO,EAAE,mBAAO;QAChB,QAAQ,EAAE,uBAAW;QACrB,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,WAAW,EAAE,SAAS;QACtB,WAAW,EAAE,SAAS;QACtB,MAAM,EAAE,CAAC;QACT,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;KACtB,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"}
1
+ {"version":3,"file":"marketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/abex/marketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,gEAAqC;AAGrC,2CAQqB;AACrB,iDAAmD;AACnD,uEAAoE;AAEpE,qEAAkE;AAClE,qGAEiD;AACjD,yDAAsD;AACtD,mDAA2D;AAE3D,MAAM,QAA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gBAAgB,EAAE,MAAM;YACxB,KAAK,EAAE,UAAU,CAAC,KAAK;SACxB,CAAC,CAAC;IACL,CAAC;IAED,MAAM,QAAQ,GAAG,IAAA,gCAAsB,EACrC,0BAAS,CAAC,GAAG,EACb,sBAAU,EACV,sBAAU,EACV;QACE,OAAO,EAAE,mBAAO;QAChB,QAAQ,EAAE,uBAAW;QACrB,SAAS,EAAE,IAAI,sBAAS,CAAC,QAAQ,CAAC;KACnC,EACD,aAAa,EACb,QAAQ,CACT,CAAC;IACF,MAAM,KAAK,CAAC,mBAAmB,CAAC;QAC9B,EAAE,EAAE,KAAK;QACT,SAAS,EAAE,0BAAS,CAAC,GAAG;QACxB,UAAU,EAAE,gCAAoB,CAAC,EAAE;QACnC,OAAO,EAAE,mBAAO;QAChB,QAAQ,EAAE,uBAAW;QACrB,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,WAAW,EAAE,SAAS;QACtB,WAAW,EAAE,SAAS;QACtB,MAAM,EAAE,CAAC;QACT,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;KACtB,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"}
@@ -16,7 +16,6 @@ const bignumber_js_1 = __importDefault(require("bignumber.js"));
16
16
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
17
17
  const clients_1 = require("../../utils/clients");
18
18
  const constants_1 = require("./constants");
19
- const aptos_1 = require("../../utils/aptos");
20
19
  const getDynamicFields_1 = require("../../utils/sui/getDynamicFields");
21
20
  const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
22
21
  const getLpTokenSourceRaw_1 = require("../../utils/misc/getLpTokenSourceRaw");
@@ -53,7 +52,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
53
52
  const poolInfo = (_d = (_c = pool.data) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.fields;
54
53
  if (poolInfo.lp_supply.fields.value === '0')
55
54
  continue;
56
- const moveType = (0, aptos_1.parseTypeString)(poolInfo.lp_supply.type);
55
+ const moveType = (0, portfolio_core_1.parseTypeString)(poolInfo.lp_supply.type);
57
56
  if (!moveType.keys)
58
57
  continue;
59
58
  const lpAddress = moveType.keys[0].type;
@@ -1 +1 @@
1
- {"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aftermath/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,+DAA2E;AAG3E,iDAAmD;AACnD,2CAAuD;AAEvD,6CAAoD;AACpD,uEAAoE;AACpE,qEAAkE;AAClE,8EAG8C;AAE9C,MAAM,SAAS,GAAG,0BAAS,CAAC,GAAG,CAAC;AAEhC,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,gBAAgB,GAAG,MAAM,IAAA,mCAAgB,EAAC,MAAM,EAAE,wBAAY,CAAC,CAAC;IAEtE,MAAM,cAAc,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC/D,IAAI,CAAC,cAAc,CAAC,MAAM;QAAE,OAAO;IAEnC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAe,EAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC/D,MAAM,QAAQ,GAAG,QAAQ;SACtB,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE;;QAClB,IAAI,MAAA,MAAA,UAAU,CAAC,IAAI,0CAAE,OAAO,0CAAE,MAAM,EAAE,CAAC;YACrC,MAAM,MAAM,GAAG,MAAA,MAAA,UAAU,CAAC,IAAI,0CAAE,OAAO,0CAAE,MAIxC,C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BAAU,QAAQ;IACzB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -18,7 +18,6 @@ const constants_1 = require("./constants");
18
18
  const clients_1 = require("../../utils/clients");
19
19
  const getOwnedObjects_1 = require("../../utils/sui/getOwnedObjects");
20
20
  const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
21
- const aptos_1 = require("../../utils/aptos");
22
21
  const tokenPriceToAssetTokens_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetTokens"));
23
22
  const farmFactor = new bignumber_js_1.default(Math.pow(10, 9));
24
23
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -47,7 +46,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
47
46
  var _a, _b;
48
47
  if (!type)
49
48
  return undefined;
50
- const lp = (_b = (_a = (0, aptos_1.parseTypeString)(type).keys) === null || _a === void 0 ? void 0 : _a.at(0)) === null || _b === void 0 ? void 0 : _b.type;
49
+ const lp = (_b = (_a = (0, portfolio_core_1.parseTypeString)(type).keys) === null || _a === void 0 ? void 0 : _a.at(0)) === null || _b === void 0 ? void 0 : _b.type;
51
50
  if (!lp || !lp.includes('af_lp'))
52
51
  return undefined;
53
52
  return (0, portfolio_core_1.formatTokenAddress)(lp, portfolio_core_1.NetworkId.sui);
@@ -1 +1 @@
1
- {"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aftermath/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AAGrC,2CAAsD;AACtD,iDAAmD;AACnD,qEAAkE;AAElE,qEAAkE;AAClE,6CAAoD;AACpD,uGAA+E;AAE/E,MAAM,UAAU,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AAE1C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE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AAC;QAEjE,WAAW,CAAC,IAAI,CAAC;YACf,MAAM;YACN,WAAW,EAAE,KAAK;YAClB,YAAY,EAAE,EAAE;YAChB,iBAAiB,EAAE,IAAI;YACvB,KAAK;YACL,MAAM,EAAE,EAAE;SACX,CAAC,CAAC;IACL,CAAC;IAED,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAExC,OAAO;QACL;YACE,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,EAAE,WAAW,EAAE;YACrB,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SAC3D;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aftermath/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAGrC,2CAAsD;AACtD,iDAAmD;AACnD,qEAAkE;AAElE,qEAAkE;AAClE,uGAA+E;AAE/E,MAAM,UAAU,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AAE1C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,eAAe,GAAG,MAAM,IAAA,iCAAe,EAC3C,MAAM,EACN,KAAK,EACL;QACE,MAAM,EAA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AE,EAAE;SACX,CAAC,CAAC;IACL,CAAC;IAED,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAExC,OAAO;QACL;YACE,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,EAAE,WAAW,EAAE;YACrB,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SAC3D;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -32,7 +32,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
32
32
  });
33
33
  const tokenPrices = yield cache.getTokenPricesAsMap(resources
34
34
  .map((resource) => {
35
- const { keys } = (0, aptos_1.parseTypeString)(resource.type);
35
+ const { keys } = (0, portfolio_core_1.parseTypeString)(resource.type);
36
36
  return keys ? keys.map((key) => key.type) : [];
37
37
  })
38
38
  .flat(), portfolio_core_1.NetworkId.aptos);
@@ -41,7 +41,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
41
41
  const resource = resources[i];
42
42
  if (!resource.type.startsWith(constants_1.lpCoinInfoTypePrefix))
43
43
  continue;
44
- const lpType = (_b = (_a = (0, aptos_1.parseTypeString)(resource.type).keys) === null || _a === void 0 ? void 0 : _a.at(0)) === null || _b === void 0 ? void 0 : _b.type;
44
+ const lpType = (_b = (_a = (0, portfolio_core_1.parseTypeString)(resource.type).keys) === null || _a === void 0 ? void 0 : _a.at(0)) === null || _b === void 0 ? void 0 : _b.type;
45
45
  if (!lpType)
46
46
  continue;
47
47
  const lpInfoData = resource.data;
@@ -52,7 +52,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
52
52
  const lpSupply = new bignumber_js_1.default(lpSupplyString);
53
53
  if (lpSupply.isZero())
54
54
  continue;
55
- const parsedLpType = (0, aptos_1.parseTypeString)(lpType);
55
+ const parsedLpType = (0, portfolio_core_1.parseTypeString)(lpType);
56
56
  const poolId = (_f = parsedLpType.keys) === null || _f === void 0 ? void 0 : _f.map((t) => t.type).join(', ');
57
57
  const typeX = (_h = (_g = parsedLpType.keys) === null || _g === void 0 ? void 0 : _g.at(0)) === null || _h === void 0 ? void 0 : _h.type;
58
58
  const typeY = (_k = (_j = parsedLpType.keys) === null || _j === void 0 ? void 0 : _j.at(1)) === null || _k === void 0 ? void 0 : _k.type;
@@ -1 +1 @@
1
- {"version":3,"file":"aptosLpJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/auxexchange/aptosLpJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,+DAIoC;AAGpC,6CAK2B;AAC3B,iDAAqD;AACrD,2CAA0E;AAC1E,8EAA2E;AAC3E,mHAA2F;AAC3F,qGAA6E;AAO7E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,wBAAc,GAAE,CAAC;IAChC,MAAM,SAAS,GAAG,MAAM,IAAA,2BAAmB,EAAC,MAAM,EAAE,qBAAS,CAAC,CAAC;IAC/D,IAAI,CAAC,SAAS;QAAE,OAAO;IAEvB,MAAM,eAAe,GAAuC,IAAI,GAAG,EAAE,CAAC;IACtE,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC7B,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACj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,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -36,27 +36,27 @@ exports.getBalancerPoolsV2 = void 0;
36
36
  const graphql_request_1 = __importStar(require("graphql-request"));
37
37
  function getBalancerPoolsV2(url) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
39
- const query = (0, graphql_request_1.gql) `
40
- query pools {
41
- pools(
42
- first: 1000
43
- orderBy: totalLiquidity
44
- orderDirection: desc
45
- where: { totalLiquidity_gt: "500" }
46
- ) {
47
- id
48
- address
49
- symbol
50
- totalLiquidity
51
- totalShares
52
- tokens {
53
- balance
54
- decimals
55
- symbol
56
- address
57
- }
58
- }
59
- }
39
+ const query = (0, graphql_request_1.gql) `
40
+ query pools {
41
+ pools(
42
+ first: 1000
43
+ orderBy: totalLiquidity
44
+ orderDirection: desc
45
+ where: { totalLiquidity_gt: "500" }
46
+ ) {
47
+ id
48
+ address
49
+ symbol
50
+ totalLiquidity
51
+ totalShares
52
+ tokens {
53
+ balance
54
+ decimals
55
+ symbol
56
+ address
57
+ }
58
+ }
59
+ }
60
60
  `;
61
61
  const res = yield (0, graphql_request_1.default)(url, query);
62
62
  const pools = res.pools;
@@ -18,11 +18,16 @@ const filters_1 = require("./filters");
18
18
  const structs_1 = require("./structs");
19
19
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
20
20
  const client = (0, clients_1.getClientSolana)();
21
- const vaults = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.vaultStruct, constants_2.circuitPid, filters_1.vaultFilter);
22
- const spotMarkets = (yield cache.getItem(constants_1.keySpotMarkets, {
23
- prefix: constants_1.platformId,
24
- networkId: portfolio_core_1.NetworkId.solana,
25
- })) || [];
21
+ const [vaults, spotMarkets] = yield Promise.all([
22
+ (0, solana_1.getParsedProgramAccounts)(client, structs_1.vaultStruct, constants_2.circuitPid, filters_1.vaultFilter),
23
+ cache.getItem(constants_1.keySpotMarkets, {
24
+ prefix: constants_1.platformId,
25
+ networkId: portfolio_core_1.NetworkId.solana,
26
+ }),
27
+ ]);
28
+ if (!spotMarkets)
29
+ return;
30
+ const cachedItems = [];
26
31
  for (const vault of vaults) {
27
32
  const name = (0, solana_1.u8ArrayToString)(vault.name);
28
33
  const spotMarket = spotMarkets.find((sm) => sm.marketIndex === vault.spotMarketIndex);
@@ -31,8 +36,12 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
31
36
  const mint = spotMarket.mint.toString();
32
37
  const { decimals } = spotMarket;
33
38
  const pubkey = vault.pubkey.toString();
34
- yield cache.setItem(pubkey, { pubkey, name, mint, decimals }, { prefix: constants_2.prefixVaults, networkId: portfolio_core_1.NetworkId.solana });
39
+ cachedItems.push({ key: pubkey, value: { pubkey, name, mint, decimals } });
35
40
  }
41
+ yield cache.setItems(cachedItems, {
42
+ prefix: constants_2.prefixVaults,
43
+ networkId: portfolio_core_1.NetworkId.solana,
44
+ });
36
45
  });
37
46
  const job = {
38
47
  id: `${constants_2.platformId}-vaults`,
@@ -1 +1 @@
1
- {"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/circuit/vaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA+E;AAC/E,kDAG4B;AAC5B,2CAAmE;AACnE,uCAAwC;AACxC,uCAAwC;AAIxC,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,MAAM,GAAG,MAAM,IAAA,iCAAwB,EAC3C,MAAM,EACN,qBAAW,EACX,sBAAU,EACV,qBAAW,CACZ,CAAC;IAEF,MAAM,WAAW,GACf,CAAC,MAAM,KAAK,CAAC,OAAO,CAAuB,0BAAc,EAAE;QACzD,MAAM,EAAE,sBAAe;QACvB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC,IAAI,EAAE,CAAC;IACZ,KAAK,MAAM,KAAK,IAAI,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, void 0, function* () {
23
23
  const apiRes = yield axios_1.default.get(constants_1.apiUrl + owner, {
24
24
  timeout: 1000,
25
25
  });
26
+ if (!apiRes.data.distributions || apiRes.data.distributions.length === 0) {
27
+ return (0, AirdropFetcher_1.getAirdropRaw)({
28
+ statics: constants_1.firstDistribStatics,
29
+ items: [
30
+ {
31
+ amount: 0,
32
+ isClaimed: false,
33
+ label: 'DBR',
34
+ address: constants_1.dbrMint,
35
+ imageUri: constants_1.dbrMint ? undefined : constants_1.platform.image,
36
+ },
37
+ ],
38
+ });
39
+ }
26
40
  const items = [];
27
- if (apiRes.data.distributions) {
28
- for (const distribution of apiRes.data.distributions) {
29
- const tokens = new bignumber_js_1.default(distribution.tokens).div(dbrFactor);
30
- items.push({
31
- amount: tokens.toNumber(),
32
- isClaimed: false,
33
- label: 'DBR',
34
- address: constants_1.dbrMint,
35
- imageUri: constants_1.dbrMint ? undefined : constants_1.platform.image,
36
- });
37
- }
41
+ for (const distribution of apiRes.data.distributions) {
42
+ const tokens = new bignumber_js_1.default(distribution.tokens).div(dbrFactor);
43
+ items.push({
44
+ amount: tokens.toNumber(),
45
+ isClaimed: false,
46
+ label: 'DBR',
47
+ address: constants_1.dbrMint,
48
+ imageUri: constants_1.dbrMint ? undefined : constants_1.platform.image,
49
+ });
38
50
  }
39
51
  return (0, AirdropFetcher_1.getAirdropRaw)({
40
52
  statics: constants_1.firstDistribStatics,
@@ -1 +1 @@
1
- {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AACrC,kDAA6C;AAC7C,yDAI8B;AAC9B,2CAMqB;AAGrB,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,uBAAW,CAAA,CAAC,CAAC;AAEnD,MAAM,QAAQ,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC/D,MAAM,MAAM,GAA+B,MAAM,eAAK,CAAC,GAAG,CAAC,kBAAM,GAAG,KAAK,EAAE;QACzE,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;QAC9B,KAAK,MAAM,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACrD,MAAM,MAAM,GAAG,IAAI,sBAAS,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAEjE,KAAK,CAAC,IAAI,CAAC;gBACT,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE;gBACzB,SAAS,EAAE,KAAK;gBAChB,KAAK,EAAE,KAAK;gBACZ,OAAO,EAAE,mBAAO;gBAChB,QAAQ,EAAE,mBAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAW,CAAC,KAAK;aAClD,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,IAAA,8BAAa,EAAC;QACnB,OAAO,EAAE,+BAAmB;QAC5B,KAAK;KACN,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEW,QAAA,iBAAiB,GAAmB;IAC/C,EAAE,EAAE,GAAG,+BAAmB,CAAC,EAAE,MAAM;IACnC,SAAS,EAAE,0BAAS,CAAC,QAAQ;IAC7B,QAAQ;CACT,CAAC;AAEW,QAAA,oBAAoB,GAAmB;IAClD,EAAE,EAAE,GAAG,+BAAmB,CAAC,EAAE,SAAS;IACtC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AACF,kDAAkD;AAClD,oBAAoB;AACpB,iBAAiB;AACjB,wBAAwB;AACxB,4BAA4B;AAC5B,KAAK"}
1
+ {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/airdropFetcher.ts"],"names":[],"mappings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;SAClD,CAAC,CAAC;IACL,CAAC;IAED,OAAO,IAAA,8BAAa,EAAC;QACnB,OAAO,EAAE,+BAAmB;QAC5B,KAAK;KACN,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEW,QAAA,iBAAiB,GAAmB;IAC/C,EAAE,EAAE,GAAG,+BAAmB,CAAC,EAAE,MAAM;IACnC,SAAS,EAAE,0BAAS,CAAC,QAAQ;IAC7B,QAAQ;CACT,CAAC;AAEW,QAAA,oBAAoB,GAAmB;IAClD,EAAE,EAAE,GAAG,+BAAmB,CAAC,EAAE,SAAS;IACtC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AACF,kDAAkD;AAClD,oBAAoB;AACpB,iBAAiB;AACjB,wBAAwB;AACxB,4BAA4B;AAC5B,KAAK"}
@@ -16,7 +16,6 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
16
  const constants_1 = require("./constants");
17
17
  const clients_1 = require("../../utils/clients");
18
18
  const getDynamicFieldObject_1 = require("../../utils/sui/getDynamicFieldObject");
19
- const aptos_1 = require("../../utils/aptos");
20
19
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
21
20
  const helpers_1 = require("./helpers");
22
21
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -59,7 +58,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
59
58
  return null;
60
59
  if (!((_f = v.data) === null || _f === void 0 ? void 0 : _f.type))
61
60
  return null;
62
- const { keys: coinType } = (0, aptos_1.parseTypeString)((_g = v.data) === null || _g === void 0 ? void 0 : _g.type);
61
+ const { keys: coinType } = (0, portfolio_core_1.parseTypeString)((_g = v.data) === null || _g === void 0 ? void 0 : _g.type);
63
62
  if (!coinType)
64
63
  return null;
65
64
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/elixir/position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xC;oBACE,KAAK;oBACL,MAAM;oBACN,WAAW;oBACX,YAAY,EAAE,EAAE;oBAChB,iBAAiB,EAAE,IAAI;oBACvB,MAAM;oBACN,IAAI,EAAE,MAAA,kBAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,KAAK,CAAC,0CAAE,SAAS;iBAC3D;aACF,CAAC;YAEF,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,EAAE,WAAW,EAAE;gBACrB,KAAK,EAAE,eAAe;gBACtB,SAAS,EAAE,0BAAS,CAAC,GAAG;gBACxB,UAAU,EAAV,sBAAU;gBACV,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;aAC3D,CAAC,CAAC;QACL,CAAC;IACH,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,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/elixir/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAWoC;AAGpC,2CAMqB;AAErB,iDAAmD;AACnD,iFAA8E;AAE9E,qGAA6E;AAC7E,uCAGmB;AAEnB,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAClD,KAA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AAW,EAAE;gBACrB,KAAK,EAAE,eAAe;gBACtB,SAAS,EAAE,0BAAS,CAAC,GAAG;gBACxB,UAAU,EAAV,sBAAU;gBACV,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;aAC3D,CAAC,CAAC;QACL,CAAC;IACH,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,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -15,7 +15,6 @@ const clients_1 = require("../../utils/clients");
15
15
  const getDynamicFields_1 = require("../../utils/sui/getDynamicFields");
16
16
  const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
17
17
  const getLpTokenSourceRaw_1 = require("../../utils/misc/getLpTokenSourceRaw");
18
- const aptos_1 = require("../../utils/aptos");
19
18
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
20
19
  const client = (0, clients_1.getClientSui)();
21
20
  const pairIds = yield (0, getDynamicFields_1.getDynamicFields)(client, constants_1.pairsOwner).then((pairs) => pairs.map((p) => p.objectId));
@@ -31,15 +30,15 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
31
30
  return null;
32
31
  }
33
32
  const enhancedPairInfo = (_d = (_c = pairInfo.data) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.fields.value.fields;
34
- const { keys: coinTypeX } = (0, aptos_1.parseTypeString)(enhancedPairInfo.reserve_x.type);
33
+ const { keys: coinTypeX } = (0, portfolio_core_1.parseTypeString)(enhancedPairInfo.reserve_x.type);
35
34
  if (coinTypeX) {
36
35
  enhancedPairInfo.reserve_x.coinType = coinTypeX[0].type;
37
36
  }
38
- const { keys: coinTypeY } = (0, aptos_1.parseTypeString)(enhancedPairInfo.reserve_y.type);
37
+ const { keys: coinTypeY } = (0, portfolio_core_1.parseTypeString)(enhancedPairInfo.reserve_y.type);
39
38
  if (coinTypeY) {
40
39
  enhancedPairInfo.reserve_y.coinType = coinTypeY[0].type;
41
40
  }
42
- const { keys: coinType } = (0, aptos_1.parseTypeString)(enhancedPairInfo.lp_supply.type);
41
+ const { keys: coinType } = (0, portfolio_core_1.parseTypeString)(enhancedPairInfo.lp_supply.type);
43
42
  if (coinType) {
44
43
  enhancedPairInfo.coinType = coinType[0].type;
45
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"poolJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flowx/poolJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAIoC;AAGpC,2CAAiE;AACjE,iDAAmD;AACnD,uEAAoE;AACpE,qEAAkE;AAClE,8EAA2E;AAE3E,6CAAoD;AAEpD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,OAAO,GAAG,MAAM,IAAA,mCAAgB,EAAC,MAAM,EAAE,sBAAU,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CACxE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAC7B,CAAC;IACF,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAEjC,MAAM,SAAS,GAAuB,EAAE,CAAC;IAEzC,MAAM,WAAW,GAAG,MAAM,IAAA,iCAAe,EAAa,MAAM,EAAE,OAAO,EAAE;QACrE,WAAW,EAAE,IAAI;KAClB,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;;QAC7C,IAAI,CAAC,CAAA,MAAA,M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,CAAC,MAAM,CAAC,OAAO;oBACnD,MAAM,EAAE,GAAG;oBACX,UAAU,EAAE,WAAW;iBACxB;aACF;SACF,CAAC,CAAC;QAEH,SAAS,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,MAAM,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAC9C,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -14,7 +14,6 @@ const constants_1 = require("./constants");
14
14
  const getDynamicFields_1 = require("../../utils/sui/getDynamicFields");
15
15
  const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
16
16
  const clients_1 = require("../../utils/clients");
17
- const aptos_1 = require("../../utils/aptos");
18
17
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
19
18
  var _a, _b, _c, _d;
20
19
  const client = (0, clients_1.getClientSui)();
@@ -30,8 +29,8 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
30
29
  const poolId = (_d = (_c = poolObject.data) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.fields.name;
31
30
  if (!poolId)
32
31
  continue;
33
- const { keys: coinTypeLpToken } = (0, aptos_1.parseTypeString)(poolObjectFields.lp_custodian.type);
34
- const { keys: coinTypeRewardToken } = (0, aptos_1.parseTypeString)(poolObjectFields.reward_token_custodian.type);
32
+ const { keys: coinTypeLpToken } = (0, portfolio_core_1.parseTypeString)(poolObjectFields.lp_custodian.type);
33
+ const { keys: coinTypeRewardToken } = (0, portfolio_core_1.parseTypeString)(poolObjectFields.reward_token_custodian.type);
35
34
  if (!coinTypeLpToken || !coinTypeRewardToken)
36
35
  continue;
37
36
  pools[Number(poolId)] = {
@@ -1 +1 @@
1
- {"version":3,"file":"stakingPool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;IACzB,KAAK,MAAM,UAAU,IAAI,YAAY,EAAE,CAAC;QACtC,MAAM,gBAAgB,GAAG,MAAA,MAAA,UAAU,CAAC,IAAI,0CAAE,OAAO,0CAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;QACvE,IAAI,CAAC,gBAAgB;YAAE,SAAS;QAEhC,MAAM,MAAM,GAAG,MAAA,MAAA,UAAU,CAAC,IAAI,0CAAE,OAAO,0CAAE,MAAM,CAAC,IAAI,CAAC;QACrD,IAAI,CAAC,MAAM;YAAE,SAAS;QAEtB,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,IAAA,gCAAe,EAC/C,gBAAgB,CAAC,YAAY,CAAC,IAAI,CACnC,CAAC;QACF,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,GAAG,IAAA,gCAAe,EACnD,gBAAgB,CAAC,sBAAsB,CAAC,IAAI,CAC7C,CAAC;QACF,IAAI,CAAC,eAAe,IAAI,CAAC,mBAAmB;YAAE,SAAS;QAEvD,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG;YACtB,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI;YAChC,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,IAAI;SACjC,CAAC;IACZ,CAAC;IAED,MAAM,KAAK,CAAC,OAAO,CAAC,oBAAQ,EAAE,KAAK,EAAE;QACnC,MAAM,EAAE,uBAAW;QACnB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,eAAe;IAChC,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -34,11 +34,11 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
34
34
  const lpCoinInfo = resource;
35
35
  const supply = (_c = (_b = (_a = lpCoinInfo.data.supply) === null || _a === void 0 ? void 0 : _a.vec[0]) === null || _b === void 0 ? void 0 : _b.integer.vec[0]) === null || _c === void 0 ? void 0 : _c.value;
36
36
  if (supply && supply !== '0') {
37
- const parsedType = (0, aptos_1.parseTypeString)(lpCoinInfo.type);
37
+ const parsedType = (0, portfolio_core_1.parseTypeString)(lpCoinInfo.type);
38
38
  const lpType = (_e = (_d = parsedType.keys) === null || _d === void 0 ? void 0 : _d.at(0)) === null || _e === void 0 ? void 0 : _e.type;
39
39
  if (!lpType)
40
40
  return;
41
- const parsedLpType = (0, aptos_1.parseTypeString)(lpType);
41
+ const parsedLpType = (0, portfolio_core_1.parseTypeString)(lpType);
42
42
  const typeX = (_g = (_f = parsedLpType.keys) === null || _f === void 0 ? void 0 : _f.at(0)) === null || _g === void 0 ? void 0 : _g.type;
43
43
  const typeY = (_j = (_h = parsedLpType.keys) === null || _h === void 0 ? void 0 : _h.at(1)) === null || _j === void 0 ? void 0 : _j.type;
44
44
  const poolType = (_l = (_k = parsedLpType.keys) === null || _k === void 0 ? void 0 : _k.at(2)) === null || _l === void 0 ? void 0 : _l.type;
@@ -1 +1 @@
1
- {"version":3,"file":"aptosLpJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/liquidswap/aptosLpJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,+DAA2E;AAO3E,6CAK2B;AAC3B,iDAAqD;AACrD,2CAKqB;AACrB,qGAA6E;AAE7E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,wBAAc,GAAE,CAAC;IAChC,MAAM,SAAS,GAAG,MAAM,IAAA,2BAAmB,EAAC,MAAM,EAAE,0BAAc,CAAC,CAAC;IACpE,IAAI,CAAC,SAAS;QAAE,OAAO;IAEvB,MAAM,eAAe,GAAuC,IAAI,GAAG,EAAE,CAAC;IACtE,MAAM,WAAW,GAAiC,EAAE,CAAC;IACrD,MAAM,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B,EAAC,KAAK,EAAE,0BAAS,CAAC,KAAK,CAAC,CAAC;SAC5D,CAAC;QACF,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,GAAG;YAC7C,IAAI,sBAAS,CAAC,iBAAiB,CAAC,cAAc,CAAC,KAAK,CAAC;YACrD,IAAI,sBAAS,CAAC,iBAAiB,CAAC,cAAc,CAAC,KAAK,CAAC;SACtD,CAAC;QAEF,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW;YAAE,SAAS;QAC3C,MAAM,QAAQ,GAAG,IAAA,gCAAsB,EACrC,0BAAS,CAAC,KAAK,EACf,MAAM,EACN,sBAAU,EACV;YACE,OAAO,EAAE,MAAM;YACf,QAAQ,EAAE,UAAU;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,SAAS,CACV,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;IACD,MAAM,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC5C,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"}
@@ -15,7 +15,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
16
  const constants_1 = require("./constants");
17
17
  const clients_1 = require("../../utils/clients");
18
- const aptos_1 = require("../../utils/aptos");
19
18
  const tokenPriceToAssetTokens_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetTokens"));
20
19
  const getDynamicFieldObject_1 = require("../../utils/sui/getDynamicFieldObject");
21
20
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -53,7 +52,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
53
52
  continue;
54
53
  if (!coinBalance.coinType.includes(constants_1.magicCoin))
55
54
  continue;
56
- const { keys: parsedType } = (0, aptos_1.parseTypeString)(coinBalance.coinType);
55
+ const { keys: parsedType } = (0, portfolio_core_1.parseTypeString)(coinBalance.coinType);
57
56
  if (!parsedType)
58
57
  continue;
59
58
  if (!coinsTypes.includes(parsedType[0].type))
@@ -72,13 +71,13 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
72
71
  continue;
73
72
  if (!((_d = (_c = stackedSaving.data) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.type.includes(constants_1.magicCoin)))
74
73
  continue;
75
- const parsedTypeString = (0, aptos_1.parseTypeString)((_f = (_e = stackedSaving.data) === null || _e === void 0 ? void 0 : _e.content) === null || _f === void 0 ? void 0 : _f.type);
74
+ const parsedTypeString = (0, portfolio_core_1.parseTypeString)((_f = (_e = stackedSaving.data) === null || _e === void 0 ? void 0 : _e.content) === null || _f === void 0 ? void 0 : _f.type);
76
75
  if (!parsedTypeString.keys)
77
76
  continue;
78
- const { keys: parsedSubType } = (0, aptos_1.parseTypeString)(parsedTypeString.keys[1].type);
77
+ const { keys: parsedSubType } = (0, portfolio_core_1.parseTypeString)(parsedTypeString.keys[1].type);
79
78
  if (!parsedSubType)
80
79
  continue;
81
- const { keys: parsedSubSubType } = (0, aptos_1.parseTypeString)(parsedSubType[0].type);
80
+ const { keys: parsedSubSubType } = (0, portfolio_core_1.parseTypeString)(parsedSubType[0].type);
82
81
  if (!parsedSubSubType)
83
82
  continue;
84
83
  if (!coinsTypes.includes(parsedSubSubType[0].type))
@@ -1 +1 @@
1
- {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mole/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AAGpC,2CAOqB;AACrB,iDAAmD;AACnD,6CAAoD;AACpD,uGAA+E;AAE/E,iFAA8E;AAE9E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,cAAc,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC9D,KAAK,CAAC,OAAO,CAAsB,mBAAO,EAAE;YAC1C,MAAM,EAAE,wBAAY;YACpB,SAAS,EAAE,0BAAS,CAAC,GAAG;SACzB,CAAC;QACF,MAAM,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,CAAC;QAChC,OAAO,CAAC,GAAG,CACT,mCAAuB,CAAC,GAAG,CAAC,CAAC,sBAAsB,EAAE,EAAE,CACrD,IAAA,6CAAqB,EAAW,MAAM,EAAE;YACtC,QAAQ,EAAE,sBAAsB;YAChC,IAAI,EAAE;gBACJ,IAAI,EAAE,gCAAoB;gBAC1B,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE;aAC5C;SACF,CAAC,CACH,CACF;KACF,CAAC,CAAC;IAEH,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,SAAS,GAAuB,IAAI,GAAG,EAAE,CAAC;IAChD,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,IAAI,CAAC,KAAK;YAAE,OAAO;QACnB,SAAS,CAAC,GAA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oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,EAAE,WAAW,EAAE,oBAAoB,EAAE;YAC3C,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,IAAA,+BAAc,EAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SAChE,CAAC,CAAC;IACL,CAAC;IAED,IAAI,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClC,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,EAAE,WAAW,EAAE,kBAAkB,EAAE;YACzC,KAAK,EAAE,QAAQ;YACf,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,IAAA,+BAAc,EAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SAC9D,CAAC,CAAC;IACL,CAAC;IAED,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":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mole/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AAGpC,2CAOqB;AACrB,iDAAmD;AACnD,uGAA+E;AAE/E,iFAA8E;AAE9E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EA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E,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SAChE,CAAC,CAAC;IACL,CAAC;IAED,IAAI,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClC,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,EAAE,WAAW,EAAE,kBAAkB,EAAE;YACzC,KAAK,EAAE,QAAQ;YACf,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,IAAA,+BAAc,EAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SAC9D,CAAC,CAAC;IACL,CAAC;IAED,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"}
@@ -32,7 +32,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
32
32
  });
33
33
  const tokenPriceById = yield cache.getTokenPricesAsMap(resources
34
34
  .map((ressource) => {
35
- const { keys } = (0, aptos_1.parseTypeString)(ressource.type);
35
+ const { keys } = (0, portfolio_core_1.parseTypeString)(ressource.type);
36
36
  return keys ? keys.map((key) => key.type) : [];
37
37
  })
38
38
  .flat(), portfolio_core_1.NetworkId.aptos);
@@ -41,7 +41,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
41
41
  const resource = resources[i];
42
42
  if (!resource.type.startsWith(constants_1.lpCoinInfoTypePrefix))
43
43
  continue;
44
- const lpType = (_b = (_a = (0, aptos_1.parseTypeString)(resource.type).keys) === null || _a === void 0 ? void 0 : _a.at(0)) === null || _b === void 0 ? void 0 : _b.type;
44
+ const lpType = (_b = (_a = (0, portfolio_core_1.parseTypeString)(resource.type).keys) === null || _a === void 0 ? void 0 : _a.at(0)) === null || _b === void 0 ? void 0 : _b.type;
45
45
  if (!lpType)
46
46
  continue;
47
47
  const lpInfoData = resource.data;
@@ -52,7 +52,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
52
52
  const lpSupply = new bignumber_js_1.default(lpSupplyString);
53
53
  if (lpSupply.isZero())
54
54
  continue;
55
- const tokenPairId = (_f = (0, aptos_1.parseTypeString)(lpType)
55
+ const tokenPairId = (_f = (0, portfolio_core_1.parseTypeString)(lpType)
56
56
  .keys) === null || _f === void 0 ? void 0 : _f.map((t) => t.type).join(', ');
57
57
  if (!tokenPairId)
58
58
  continue;
@@ -61,8 +61,8 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
61
61
  tokenPairId.includes('LPCoinV1::LPCoin') ||
62
62
  tokenPairId.includes('lp_coin::LP'))
63
63
  continue;
64
- const typeX = (_h = (_g = (0, aptos_1.parseTypeString)(lpType).keys) === null || _g === void 0 ? void 0 : _g.at(0)) === null || _h === void 0 ? void 0 : _h.type;
65
- const typeY = (_k = (_j = (0, aptos_1.parseTypeString)(lpType).keys) === null || _j === void 0 ? void 0 : _j.at(1)) === null || _k === void 0 ? void 0 : _k.type;
64
+ const typeX = (_h = (_g = (0, portfolio_core_1.parseTypeString)(lpType).keys) === null || _g === void 0 ? void 0 : _g.at(0)) === null || _h === void 0 ? void 0 : _h.type;
65
+ const typeY = (_k = (_j = (0, portfolio_core_1.parseTypeString)(lpType).keys) === null || _j === void 0 ? void 0 : _j.at(1)) === null || _k === void 0 ? void 0 : _k.type;
66
66
  const tokenPairResource = resourcesByType.get(`${constants_1.programAddress}::swap::TokenPairMetadata<${tokenPairId}>`);
67
67
  if (!tokenPairResource)
68
68
  throw new Error(`Failed to get tokenPairResource: ${lpType}`);