@sonarwatch/portfolio-plugins 0.11.155 → 0.11.157

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. package/CHANGELOG.md +1351 -1343
  2. package/README.md +3 -3
  3. package/package.json +3 -3
  4. package/src/index.js +4 -0
  5. package/src/index.js.map +1 -1
  6. package/src/plugins/balancer/helpers/pools.js +21 -21
  7. package/src/plugins/marinade/index.js +1 -2
  8. package/src/plugins/marinade/index.js.map +1 -1
  9. package/src/plugins/marinade/rewardsS1Fetcher.js +24 -15
  10. package/src/plugins/marinade/rewardsS1Fetcher.js.map +1 -1
  11. package/src/plugins/meteora/index.js +2 -1
  12. package/src/plugins/meteora/index.js.map +1 -1
  13. package/src/plugins/meteora/multiTokenPools.json +139 -0
  14. package/src/plugins/meteora/multiTokenPoolsJob.d.ts +3 -0
  15. package/src/plugins/meteora/multiTokenPoolsJob.js +76 -0
  16. package/src/plugins/meteora/multiTokenPoolsJob.js.map +1 -0
  17. package/src/plugins/meteora/poolsJob.js +8 -86
  18. package/src/plugins/meteora/poolsJob.js.map +1 -1
  19. package/src/plugins/meteora/vaultsJob.js +7 -8
  20. package/src/plugins/meteora/vaultsJob.js.map +1 -1
  21. package/src/plugins/suilend/obligationsFetcher.js +1 -1
  22. package/src/plugins/suilend/obligationsFetcher.js.map +1 -1
  23. package/src/plugins/sushiswap/helpers.js +24 -24
  24. package/src/plugins/thala/constants.d.ts +3 -3
  25. package/src/plugins/thala/constants.js.map +1 -1
  26. package/src/plugins/tulip/lendingTokensJob.js +1 -9
  27. package/src/plugins/tulip/lendingTokensJob.js.map +1 -1
  28. package/src/plugins/tulip/strategyTokensJob.js +1 -9
  29. package/src/plugins/tulip/strategyTokensJob.js.map +1 -1
  30. package/src/plugins/uniswap-v2/helpers.js +22 -22
  31. package/src/plugins/uxd/constants.d.ts +9 -0
  32. package/src/plugins/uxd/constants.js +22 -0
  33. package/src/plugins/uxd/constants.js.map +1 -0
  34. package/src/plugins/uxd/filters.d.ts +6 -0
  35. package/src/plugins/uxd/filters.js +13 -0
  36. package/src/plugins/uxd/filters.js.map +1 -0
  37. package/src/plugins/uxd/index.d.ts +6 -0
  38. package/src/plugins/uxd/index.js +12 -0
  39. package/src/plugins/uxd/index.js.map +1 -0
  40. package/src/plugins/uxd/stakingFetcher.d.ts +3 -0
  41. package/src/plugins/uxd/stakingFetcher.js +60 -0
  42. package/src/plugins/uxd/stakingFetcher.js.map +1 -0
  43. package/src/plugins/uxd/structs.d.ts +16 -0
  44. package/src/plugins/uxd/structs.js +17 -0
  45. package/src/plugins/uxd/structs.js.map +1 -0
  46. package/src/utils/aptos/getView.d.ts +2 -2
  47. package/src/utils/aptos/getView.js.map +1 -1
  48. package/src/utils/sei/constants.js +8 -8
  49. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  50. package/src/plugins/meteora/pools.d.ts +0 -5
  51. package/src/plugins/meteora/pools.js +0 -143
  52. package/src/plugins/meteora/pools.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,12 +1,12 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.11.155",
3
+ "version": "0.11.157",
4
4
  "type": "commonjs",
5
5
  "generators": "./generators.json",
6
6
  "dependencies": {
7
7
  "@aave/contract-helpers": "^1.18.3",
8
8
  "@aave/math-utils": "^1.18.3",
9
- "@aptos-labs/ts-sdk": "^1.10.0",
9
+ "@aptos-labs/ts-sdk": "^1.11.0",
10
10
  "@bonfida/spl-name-service": "^1.0.10",
11
11
  "@cosmjs/cosmwasm-stargate": "^0.31.1",
12
12
  "@ethersproject/address": "^5.7.0",
@@ -41,7 +41,7 @@
41
41
  "web3-v1": "npm:web3@^1.5.0"
42
42
  },
43
43
  "peerDependencies": {
44
- "@sonarwatch/portfolio-core": "0.11.155"
44
+ "@sonarwatch/portfolio-core": "0.11.157"
45
45
  },
46
46
  "main": "./src/index.js",
47
47
  "types": "./src/index.d.ts"
package/src/index.js CHANGED
@@ -98,6 +98,7 @@ const symmetry_1 = require("./plugins/symmetry");
98
98
  const staratlas_1 = require("./plugins/staratlas");
99
99
  const tulip_1 = require("./plugins/tulip");
100
100
  const phoenix_1 = require("./plugins/phoenix");
101
+ const uxd_1 = require("./plugins/uxd");
101
102
  var constants_1 = require("./plugins/tokens/constants");
102
103
  Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
103
104
  Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
@@ -189,6 +190,7 @@ exports.platforms = [
189
190
  ...staratlas_1.platforms,
190
191
  ...tulip_1.platforms,
191
192
  ...phoenix_1.platforms,
193
+ ...uxd_1.platforms,
192
194
  ];
193
195
  // JOBS //
194
196
  exports.jobs = [
@@ -263,6 +265,7 @@ exports.jobs = [
263
265
  ...staratlas_1.jobs,
264
266
  ...tulip_1.jobs,
265
267
  ...phoenix_1.jobs,
268
+ ...uxd_1.jobs,
266
269
  ];
267
270
  // FETCHERS //
268
271
  exports.fetchers = [
@@ -339,6 +342,7 @@ exports.fetchers = [
339
342
  ...staratlas_1.fetchers,
340
343
  ...tulip_1.fetchers,
341
344
  ...phoenix_1.fetchers,
345
+ ...uxd_1.fetchers,
342
346
  ];
343
347
  exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
344
348
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,iDAG4B;AAC5B,iDAI4B;AAC5B,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BAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,eAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,eAAY;IACf,GAAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,cAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,qBAAkB;IACrB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,sBAAmB;IACtB,GAAG,yBAAsB;IACzB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,iBAAc;IACjB,GAAG,2BAAsB;IACzB,GAAG,yBAAkB;IACrB,GAAG,eAAY;IACf,GAAG,cAAW;IACd,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,kBAAe;CACnB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,6CAI0B;AAC1B,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CA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AAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,cAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,qBAAkB;IACrB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,sBAAmB;IACtB,GAAG,yBAAsB;IACzB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,iBAAc;IACjB,GAAG,2BAAsB;IACzB,GAAG,yBAAkB;IACrB,GAAG,eAAY;IACf,GAAG,cAAW;IACd,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,kBAAe;IAClB,GAAG,cAAW;CACf,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,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;
@@ -5,13 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fetchers = exports.platforms = void 0;
7
7
  const ticketsFetcher_1 = __importDefault(require("./ticketsFetcher"));
8
- const rewardsS2Fetcher_1 = __importDefault(require("./rewardsS2Fetcher"));
9
8
  const rewardsS1Fetcher_1 = __importDefault(require("./rewardsS1Fetcher"));
10
9
  const constants_1 = require("./constants");
11
10
  exports.platforms = [constants_1.marinadePlatform];
12
11
  exports.fetchers = [
13
12
  ticketsFetcher_1.default,
14
13
  rewardsS1Fetcher_1.default,
15
- rewardsS2Fetcher_1.default,
14
+ // rewardsS2Fetcher,
16
15
  ];
17
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/marinade/index.ts"],"names":[],"mappings":";;;;;;AAEA,sEAA8C;AAC9C,0EAAkD;AAClD,0EAAkD;AAClD,2CAA+C;AAElC,QAAA,SAAS,GAAe,CAAC,4BAAgB,CAAC,CAAC;AAC3C,QAAA,QAAQ,GAAc;IACjC,wBAAc;IACd,0BAAgB;IAChB,0BAAgB;CACjB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/marinade/index.ts"],"names":[],"mappings":";;;;;;AAEA,sEAA8C;AAC9C,0EAAkD;AAClD,2CAA+C;AAElC,QAAA,SAAS,GAAe,CAAC,4BAAgB,CAAC,CAAC;AAC3C,QAAA,QAAQ,GAAc;IACjC,wBAAc;IACd,0BAAgB;IAChB,oBAAoB;CACrB,CAAC"}
@@ -13,8 +13,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
- const axios_1 = __importDefault(require("axios"));
17
- const bignumber_js_1 = __importDefault(require("bignumber.js"));
18
16
  const constants_1 = require("./constants");
19
17
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
20
18
  const clients_1 = require("../../utils/clients");
@@ -26,11 +24,13 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
26
24
  const promises = [
27
25
  cache.getTokenPrice(constants_1.mndeMint, portfolio_core_1.NetworkId.solana),
28
26
  (0, getParsedAccountInfo_1.getParsedAccountInfo)(client, structs_1.claimRecordStruct, (0, helpers_1.getClaimPda)(owner)),
29
- axios_1.default
30
- .get(constants_1.baseRewardsUrl + constants_1.referrerRoute + owner)
31
- .catch(() => null),
27
+ // axios
28
+ // .get<unknown, AxiosResponse<ReferreResponse>>(
29
+ // baseRewardsUrl + referrerRoute + owner
30
+ // )
31
+ // .catch(() => null),
32
32
  ];
33
- const [mndeTokenPrice, claimRecord, getReferrerRewards] = yield Promise.all(promises);
33
+ const [mndeTokenPrice, claimRecord] = yield Promise.all(promises);
34
34
  const assets = [];
35
35
  if (claimRecord && !claimRecord.nonClaimedAmount.isZero()) {
36
36
  assets.push(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(constants_1.mndeMint, claimRecord.nonClaimedAmount.dividedBy(Math.pow(10, constants_1.mndeDecimals)).toNumber(), portfolio_core_1.NetworkId.solana, mndeTokenPrice, undefined, {
@@ -38,15 +38,24 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
38
38
  tags: ['Staking'],
39
39
  })));
40
40
  }
41
- if (getReferrerRewards) {
42
- const rewardAmount = new bignumber_js_1.default(getReferrerRewards.data.rewards);
43
- if (!rewardAmount.isZero()) {
44
- assets.push(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(constants_1.mndeMint, rewardAmount.dividedBy(Math.pow(10, constants_1.mndeDecimals)).toNumber(), portfolio_core_1.NetworkId.solana, mndeTokenPrice, undefined, {
45
- lockedUntil: constants_1.season2Unlock.getTime(),
46
- tags: ['Referrer'],
47
- })));
48
- }
49
- }
41
+ // if (getReferrerRewards) {
42
+ // const rewardAmount = new BigNumber(getReferrerRewards.data.rewards);
43
+ // if (!rewardAmount.isZero()) {
44
+ // assets.push({
45
+ // ...tokenPriceToAssetToken(
46
+ // mndeMint,
47
+ // rewardAmount.dividedBy(10 ** mndeDecimals).toNumber(),
48
+ // NetworkId.solana,
49
+ // mndeTokenPrice,
50
+ // undefined,
51
+ // {
52
+ // lockedUntil: season2Unlock.getTime(),
53
+ // tags: ['Referrer'],
54
+ // }
55
+ // ),
56
+ // });
57
+ // }
58
+ // }
50
59
  if (assets.length === 0)
51
60
  return [];
52
61
  return [
@@ -1 +1 @@
1
- {"version":3,"file":"rewardsS1Fetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/marinade/rewardsS1Fetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,kDAA6C;AAC7C,gEAAqC;AAGrC,2CAQqB;AAErB,qGAA6E;AAC7E,iDAAsD;AACtD,uCAA8C;AAC9C,uCAAwC;AACxC,kFAA+E;AAE/E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,QAAQ,GAAG;QACf,KAAK,CAAC,aAAa,CAAC,oBAAQ,EAAE,0BAAS,CAAC,MAAM,CAAC;QAC/C,IAAA,2CAAoB,EAAC,MAAM,EAAE,2BAAiB,EAAE,IAAA,qBAAW,EAAC,KAAK,CAAC,CAAC;QACnE,eAAK;aACF,GAAG,CACF,0BAAc,GAAG,yBAAa,GAAG,KAAK,CACvC;aACA,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;KACZ,CAAC;IA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,CAAC,IAAI,mBACN,IAAA,gCAAsB,EACvB,oBAAQ,EACR,WAAW,CAAC,gBAAgB,CAAC,SAAS,CAAC,SAAA,EAAE,EAAI,wBAAY,CAAA,CAAC,CAAC,QAAQ,EAAE,EACrE,0BAAS,CAAC,MAAM,EAChB,cAAc,EACd,SAAS,EACT;YACE,WAAW,EAAE,yBAAa,CAAC,OAAO,EAAE;YACpC,IAAI,EAAE,CAAC,SAAS,CAAC;SAClB,CACF,EACD,CAAC;IACL,CAAC;IAED,4BAA4B;IAC5B,yEAAyE;IACzE,kCAAkC;IAClC,oBAAoB;IACpB,mCAAmC;IACnC,oBAAoB;IACpB,iEAAiE;IACjE,4BAA4B;IAC5B,0BAA0B;IAC1B,qBAAqB;IACrB,YAAY;IACZ,kDAAkD;IAClD,gCAAgC;IAChC,YAAY;IACZ,WAAW;IACX,UAAU;IACV,MAAM;IACN,IAAI;IAEJ,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACnC,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,UAAU;YAChB,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;SAC1D;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,aAAa;IAC9B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -6,11 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fetchers = exports.jobs = exports.platforms = void 0;
7
7
  const vaultsJob_1 = __importDefault(require("./vaultsJob"));
8
8
  const poolsJob_1 = __importDefault(require("./poolsJob"));
9
+ const multiTokenPoolsJob_1 = __importDefault(require("./multiTokenPoolsJob"));
9
10
  const farmsJob_1 = __importDefault(require("./farmsJob"));
10
11
  const constants_1 = require("./constants");
11
12
  const farmsFetcher_1 = __importDefault(require("./farmsFetcher"));
12
13
  const dlmmPositionsFetcher_1 = __importDefault(require("./dlmmPositionsFetcher"));
13
14
  exports.platforms = [constants_1.meteoraPlatform];
14
- exports.jobs = [vaultsJob_1.default, poolsJob_1.default, farmsJob_1.default];
15
+ exports.jobs = [vaultsJob_1.default, poolsJob_1.default, farmsJob_1.default, multiTokenPoolsJob_1.default];
15
16
  exports.fetchers = [farmsFetcher_1.default, dlmmPositionsFetcher_1.default];
16
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/index.ts"],"names":[],"mappings":";;;;;;AACA,4DAAoC;AACpC,0DAAkC;AAClC,0DAAkC;AAGlC,2CAA8C;AAC9C,kEAA0C;AAC1C,kFAAyD;AAE5C,QAAA,SAAS,GAAe,CAAC,2BAAe,CAAC,CAAC;AAC1C,QAAA,IAAI,GAAU,CAAC,mBAAS,EAAE,kBAAQ,EAAE,kBAAQ,CAAC,CAAC;AAC9C,QAAA,QAAQ,GAAc,CAAC,sBAAY,EAAE,8BAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/index.ts"],"names":[],"mappings":";;;;;;AACA,4DAAoC;AACpC,0DAAkC;AAClC,8EAAsD;AACtD,0DAAkC;AAGlC,2CAA8C;AAC9C,kEAA0C;AAC1C,kFAAyD;AAE5C,QAAA,SAAS,GAAe,CAAC,2BAAe,CAAC,CAAC;AAC1C,QAAA,IAAI,GAAU,CAAC,mBAAS,EAAE,kBAAQ,EAAE,kBAAQ,EAAE,4BAAkB,CAAC,CAAC;AAClE,QAAA,QAAQ,GAAc,CAAC,sBAAY,EAAE,8BAAmB,CAAC,CAAC"}
@@ -0,0 +1,139 @@
1
+ [
2
+ {
3
+ "symbol": "PAI-3Pool",
4
+ "address": "9s6dXtMgV5E6v3rHqBF2LejHcA2GWoZb7xNUkgXgsBqt",
5
+ "reserveAccounts": [
6
+ "J7xkQZ4eCsyHR7XDMcGbHeiFZo6vXPmQC2Va8aqo8jLx",
7
+ "bqPxs71QGXNW2SXEvjAaBgLzjhSZfQpmhcVBYoisBo6",
8
+ "EpehbDhGq8xEc3Yy5nJ2dgY2zWRHaRsbUiMTgh36N8J7"
9
+ ]
10
+ },
11
+ {
12
+ "symbol": "UST-3Pool",
13
+ "address": "57h4LEnBooHrKbacYWGCFghmrTzYPVn8PwZkzTzRLvHa",
14
+ "reserveAccounts": [
15
+ "Go93HBNLMK6QnSHyZTViAoti9GCmSRhkeZMiVoJmcrud",
16
+ "2uZVPMdS8VFwMEZjZNzP1f78m1zaqvT3R2JwMs1w9fU3",
17
+ "5nazSj6MfaEeuAoQezMG3raWuZiyFjE7fmURUgDeP8cF"
18
+ ]
19
+ },
20
+ {
21
+ "symbol": "pSOL-SOL",
22
+ "address": "GHhDU9Y7HM37v6cQyaie1A3aZdfpCDp6ScJ5zZn2c3uk",
23
+ "reserveAccounts": [
24
+ "9odMAiRbk5aDEbFWeYrsLZAS54C7XdBUv63t4oMRcWkM",
25
+ "9AnyD3bAeTsFvFPjYj12FMaDERBHX3vNKuuHJqZsKH6D"
26
+ ]
27
+ },
28
+ {
29
+ "symbol": "wUSD-4Pool",
30
+ "address": "DSmqf5Je3FEUmZntxBzG7c7EYJN3WK3feBV5Zgidukjj",
31
+ "reserveAccounts": [
32
+ "54q2ct7kTknGvADuHSXjtnKqMbmNQ4xpDVK2xgcnh1xv",
33
+ "5cvqiPREvEYmhvBt3cZ7fmrCE6tbYvwkAiuvf1pHUPBq",
34
+ "9gVstb8HkuYX8PqjLSc9b9zLMhFZwWX7k3ofLcWy7wyS",
35
+ "HLdcfovcXkHKm4iQWNQZhJypySmuGa1PGoTuB6L68hhZ"
36
+ ]
37
+ },
38
+ {
39
+ "symbol": "stSOL-2Pool",
40
+ "address": "4q19vhpG6y4ZeMPLQiUNNaJStb8XivCFQy4m4mdnVnQZ",
41
+ "reserveAccounts": [
42
+ "9gizzFG33czvcTzn5N4V23uunV6YR55UNW8ow6qNPoX3",
43
+ "FqLtqRJvoVNYU5Xpcgp5FNPv8cXCZw7CiNddjQ4nqkRo"
44
+ ]
45
+ },
46
+ {
47
+ "symbol": "mSOL-2Pool",
48
+ "address": "7HqhfUqig7kekN8FbJCtQ36VgdXKriZWQ62rTve9ZmQ",
49
+ "reserveAccounts": [
50
+ "EWy2hPdVT4uGrYokx65nAyn2GFBv7bUYA2pFPY96pw7Y",
51
+ "GM48qFn8rnqhyNMrBHyPJgUVwXQ1JvMbcu3b9zkThW9L"
52
+ ]
53
+ },
54
+ {
55
+ "symbol": "wbBUSD-4Pool",
56
+ "address": "FcjViE1oVbXFza5ry9Q7WZ9XNd95zu1LqEiSUdeJMPTP",
57
+ "reserveAccounts": [
58
+ "2FRWh8BZfpeuh8Pmg7ezHvBezW8yiEGG6Fy8pCnHVyq1",
59
+ "8m5D8rtDdP67qZyZTXwLozVCsXJMcSiXnroWoRn9GZga",
60
+ "3CF2cmVJxnWKt4J4u5tzsNSYVcSvmWqbbb4iJMEmzSRr",
61
+ "5Nn1Fm15FqjD5DbMFBQ93Rrwppzei5GghENMmJt5qRpR"
62
+ ]
63
+ },
64
+ {
65
+ "symbol": "UXD-3Pool",
66
+ "address": "HG2UzJS8rbgsd16tZorT1mNiPJBjE7Xq4ifqsfZNK6h6",
67
+ "reserveAccounts": [
68
+ "BLcaKjTnX3ggFMxhUeiZz32mpgiLeKYV2QWQ72JxgjdV",
69
+ "GgstY3wF2avMfPd7pAgVWUXaHaPFDkvyjMkTTsPNqmwE",
70
+ "BZRKweQTuVGWKZAL6Qrtgi1HPkuqzKxnJWLLJrqSm8Xs"
71
+ ]
72
+ },
73
+ {
74
+ "symbol": "USTv2-3Pool",
75
+ "address": "DJjevoCBomzgNe76pNDd8stAcMS4x7Y99giuNpqGLa2f",
76
+ "reserveAccounts": [
77
+ "65sR8agQm768HYCjktunDJG3bbQszi7U8VD4pAKEYiXW",
78
+ "G5Q7dTUPYw5pEXbfzZbAFSaPstP9bdFmEJ7XXcyrkxVJ",
79
+ "EZd87x1Fu1ufV7pVRuXAEcL9y6aEMWWqtpcr7AHdU8ms"
80
+ ]
81
+ },
82
+ {
83
+ "symbol": "USDH-3Pool",
84
+ "address": "HcpqAC3QTAZ1h3BuRCXtRfaUwFxjMCneuoqwAni4c2qm",
85
+ "reserveAccounts": [
86
+ "3bFWy2hz9yGxvbgoRmzjUqkoYbCTWUDu7sZPHUYV39Pf",
87
+ "49gyyvxzf61PknHoTg2cFGYQCJRnUrC7Web8h8go7ceM",
88
+ "92P9U8L43ZCAKfdZxJaBAwmbb3MazdoVgrCm7R3xRnhn"
89
+ ]
90
+ },
91
+ {
92
+ "symbol": "aUSDC-4Pool",
93
+ "address": "5ZDQYA8LN5tooABpPFCrDwx5wcaTgXMragLwFim27mar",
94
+ "reserveAccounts": [
95
+ "66guLcMF3qXkrMyLqDfuNKcHc7B6B36id9ZDDww4hiMv",
96
+ "8KX8TLQHfq9UyqNvzUrUCLiECNBdMspMmU8mghdM2SAM",
97
+ "2vhaJumb3hbRLUSDDy3Qk8KGGfzqThdwo8ai4tAvztGh",
98
+ "CC3FtDKTueNP1pmgtNWvKHZwbznyigSaiGhKsQYAfufD"
99
+ ]
100
+ },
101
+ {
102
+ "symbol": "fUSD-3Pool",
103
+ "address": "ALkfYpjMp1Bzn1JHCJkAKm4sU1EQt8RiFfX1ufVawuLV",
104
+ "reserveAccounts": [
105
+ "3tu1Pac9N8sP8R9zHwmFvU258CPhbRSweVjdb2K2SVjt",
106
+ "9SbaPafChbA5aCm2ZB52viFVTEb6Mf9VeHxGeJetdHCf",
107
+ "9AWmAX6AgzVBWYHLRbjbHH5g9XJuoHM1vvaa3HfHxDx3"
108
+ ]
109
+ },
110
+ {
111
+ "symbol": "abBUSD-4Pool",
112
+ "address": "JAQai7Pd6TP2ca3qowQoRw2Qygrhh7PpoLPAf9jvvgMQ",
113
+ "reserveAccounts": [
114
+ "FEPtjpdDrEMfUTjCkimXH2e3h8KJTjsZYMLC6FtviTUW",
115
+ "CRj4DCzp7hDXyNgVhagNJmTmKjtsVLBtPDzjk6JeE2CL",
116
+ "2hHSmtBb7WzCaNFVun7CCmNq445dyQ9e1Tf66GCQGtjV",
117
+ "4ZYrDMtLE3HGWjeE9W2L3psZP7SMASnez9rzqmpfnTxa"
118
+ ]
119
+ },
120
+ {
121
+ "symbol": "avaxUSD-3Pool",
122
+ "address": "2jDEKWC4LYcyhxtQ6ZGZzK1Q9NYDrmZcR2EPRoHyx6Vy",
123
+ "reserveAccounts": [
124
+ "CJNW2xGWHzyfZ2y2up9i11p7ZUm1ARvgfQ9Smzzj9arb",
125
+ "FaqLJMJNLs1cFULzHFzhmoJd4FJukq9f1HHTHJnvbEyx",
126
+ "V1pdBYfXxCx1sidPpQ3HoQfoEiHBCnPZe3iPEBSDJBr"
127
+ ]
128
+ },
129
+ {
130
+ "symbol": "aaUSDT-4Pool",
131
+ "address": "FFM9rneg7pFbedUbuJdrwzje9WfKzJzv7jqcpeUQuGCy",
132
+ "reserveAccounts": [
133
+ "7AiubbXXefRK3Tw83Y2XGovBwZ691pcdkts2S7zNE43Q",
134
+ "9UMESFcuCBj8bUw6kGDx8zut1g495Y6TcyATm3ht2kqP",
135
+ "FznWTeu44sR9WvqVtekzGQn82z7BxErkcpDDDSmvncYY",
136
+ "Ez1dYUW8FGhrJGHe4e84JTmyZYFwpjwM7GuhSaBth5Xh"
137
+ ]
138
+ }
139
+ ]
@@ -0,0 +1,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
+ const web3_js_1 = require("@solana/web3.js");
17
+ const constants_1 = require("./constants");
18
+ const multiTokenPools_json_1 = __importDefault(require("./multiTokenPools.json"));
19
+ const solana_1 = require("../../utils/solana");
20
+ const clients_1 = require("../../utils/clients");
21
+ const getLpTokenSourceRaw_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRaw"));
22
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
23
+ const connection = (0, clients_1.getClientSolana)();
24
+ const reserveAddresses = multiTokenPools_json_1.default
25
+ .map((p) => p.reserveAccounts.map((a) => new web3_js_1.PublicKey(a)))
26
+ .flat();
27
+ const reserveAccounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(connection, solana_1.tokenAccountStruct, reserveAddresses);
28
+ const reserves = new Map();
29
+ const tokenAddresses = [];
30
+ reserveAccounts.forEach((acc) => {
31
+ if (!acc)
32
+ return;
33
+ reserves.set(acc.pubkey.toString(), acc);
34
+ tokenAddresses.push(acc.mint.toString());
35
+ });
36
+ const tokenPrices = yield cache.getTokenPricesAsMap(tokenAddresses, portfolio_core_1.NetworkId.solana);
37
+ const lpMintAccounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(connection, solana_1.mintAccountStruct, multiTokenPools_json_1.default.map((p) => new web3_js_1.PublicKey(p.address)));
38
+ const lpSources = [];
39
+ for (let i = 0; i < multiTokenPools_json_1.default.length; i++) {
40
+ const pool = multiTokenPools_json_1.default[i];
41
+ const lpMintAccount = lpMintAccounts[i];
42
+ if (!lpMintAccount)
43
+ continue;
44
+ const poolUnderlyingsRaw = [];
45
+ pool.reserveAccounts.forEach((reserveAddress) => {
46
+ const reserveAccount = reserves.get(reserveAddress);
47
+ if (!reserveAccount)
48
+ return;
49
+ const tokenPrice = tokenPrices.get(reserveAccount.mint.toString());
50
+ if (!tokenPrice)
51
+ return;
52
+ poolUnderlyingsRaw.push({
53
+ address: reserveAccount.mint.toString(),
54
+ decimals: tokenPrice.decimals,
55
+ price: tokenPrice.price,
56
+ reserveAmountRaw: reserveAccount.amount,
57
+ });
58
+ });
59
+ if (poolUnderlyingsRaw.length !== pool.reserveAccounts.length)
60
+ continue;
61
+ const lpSource = (0, getLpTokenSourceRaw_1.default)(portfolio_core_1.NetworkId.solana, pool.address, constants_1.platformId, {
62
+ address: pool.address,
63
+ decimals: lpMintAccount.decimals,
64
+ supplyRaw: lpMintAccount.supply,
65
+ }, poolUnderlyingsRaw);
66
+ lpSources.push(lpSource);
67
+ }
68
+ yield cache.setTokenPriceSources(lpSources);
69
+ });
70
+ const job = {
71
+ id: `${constants_1.platformId}-multitoken-pools`,
72
+ executor,
73
+ label: 'normal',
74
+ };
75
+ exports.default = job;
76
+ //# sourceMappingURL=multiTokenPoolsJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multiTokenPoolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/multiTokenPoolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAyE;AACzE,6CAA4C;AAG5C,2CAAyC;AACzC,kFAAqD;AACrD,+CAM4B;AAC5B,iDAAsD;AACtD,+FAE8C;AAE9C,MAAM,QAAQ,GAAgB,CAA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C,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -14,15 +14,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
16
  const web3_js_1 = require("@solana/web3.js");
17
- const bignumber_js_1 = __importDefault(require("bignumber.js"));
18
17
  const constants_1 = require("./constants");
19
18
  const clients_1 = require("../../utils/clients");
20
19
  const solana_1 = require("../../utils/solana");
21
- const pools_1 = require("./pools");
22
- const fetchTokenSupplyAndDecimals_1 = require("../../utils/solana/fetchTokenSupplyAndDecimals");
23
20
  const struct_1 = require("./struct");
24
21
  const filters_1 = require("./filters");
25
- const getTokensPricesMap_1 = __importDefault(require("../../utils/misc/getTokensPricesMap"));
26
22
  const getLpTokenSourceRaw_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRaw"));
27
23
  const getLpUnderlyingTokenSource_1 = __importDefault(require("../../utils/misc/getLpUnderlyingTokenSource"));
28
24
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -30,22 +26,6 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
30
26
  // Get all 2-tokens pool (permissionless)
31
27
  const constantPoolsAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.poolStateStruct, constants_1.poolsProgramId, filters_1.constantPoolsFilters);
32
28
  const stablePoolsAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.poolStateStruct, constants_1.poolsProgramId, filters_1.stablePoolsFilters);
33
- // 4pools
34
- const meteoraPools = pools_1.pools;
35
- // Get all multi-tokens pools
36
- const reserverAddresses = new Set();
37
- meteoraPools.forEach((pool) => {
38
- pool.reserveAccounts.forEach((reserve) => {
39
- reserverAddresses.add(new web3_js_1.PublicKey(reserve));
40
- });
41
- });
42
- const reserveAccounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.tokenAccountStruct, Array.from(reserverAddresses));
43
- const reservesAccountByAddress = new Map();
44
- reserveAccounts.forEach((reserve) => {
45
- if (!reserve)
46
- return;
47
- reservesAccountByAddress.set(reserve.pubkey.toString(), reserve);
48
- });
49
29
  const poolsAcountsUnfiltered = [
50
30
  ...stablePoolsAccounts,
51
31
  ...constantPoolsAccounts,
@@ -70,12 +50,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
70
50
  tokensMint.add(poolAccount.tokenBMint.toString());
71
51
  lpMints.add(poolAccount.lpMint);
72
52
  });
73
- const tokenPriceById = yield (0, getTokensPricesMap_1.default)([
74
- ...Array.from(tokensMint),
75
- ...reserveAccounts
76
- .map((account) => (account ? account.mint.toString() : []))
77
- .flat(),
78
- ], portfolio_core_1.NetworkId.solana, cache);
53
+ const tokenPrices = yield cache.getTokenPricesAsMap([...Array.from(tokensMint)], portfolio_core_1.NetworkId.solana);
79
54
  // Get all vaults token accounts
80
55
  const tokensAccounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.tokenAccountStruct, Array.from(vaultsLpAddresses));
81
56
  if (!tokensAccounts)
@@ -97,12 +72,13 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
97
72
  return;
98
73
  mintsAccountByAddress.set(mintAccount.pubkey.toString(), mintAccount);
99
74
  });
75
+ const lpSources = [];
100
76
  for (let id = 0; id < poolsAccounts.length; id++) {
101
77
  const poolAccount = poolsAccounts[id];
102
78
  const aTokenMint = poolAccount.tokenAMint.toString();
103
79
  const bTokenMint = poolAccount.tokenBMint.toString();
104
- const aTokenPrice = tokenPriceById.get(aTokenMint);
105
- const bTokenPrice = tokenPriceById.get(bTokenMint);
80
+ const aTokenPrice = tokenPrices.get(aTokenMint);
81
+ const bTokenPrice = tokenPrices.get(bTokenMint);
106
82
  const aMintAccount = mintsAccountByAddress.get(aTokenMint);
107
83
  const bMintAccount = mintsAccountByAddress.get(bTokenMint);
108
84
  const tAccountA = tokenAccountsMap.get(poolAccount.aVaultLp.toString());
@@ -127,9 +103,8 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
127
103
  reserveAmountRaw: tAccountB.amount,
128
104
  tokenPrice: bTokenPrice,
129
105
  });
130
- if (underlyingSource) {
131
- yield cache.setTokenPriceSource(underlyingSource);
132
- }
106
+ if (underlyingSource)
107
+ lpSources.push(underlyingSource);
133
108
  }
134
109
  if (!bTokenPrice || !aTokenPrice)
135
110
  continue;
@@ -151,62 +126,9 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
151
126
  reserveAmountRaw: tAccountB.amount,
152
127
  },
153
128
  ], undefined);
154
- yield cache.setTokenPriceSource(lpSource);
155
- }
156
- // 4 pools
157
- for (let id = 0; id < meteoraPools.length; id++) {
158
- const pool = meteoraPools[id];
159
- const { address } = pool;
160
- const underlyings = [];
161
- let supplyValue = 0;
162
- let checkedTokensPrices = 0;
163
- const numberOfUnderlyings = pool.reserveAccounts.length;
164
- for (let index = 0; index < numberOfUnderlyings; index++) {
165
- const reserveAccount = reservesAccountByAddress.get(pool.reserveAccounts[index]);
166
- if (!reserveAccount)
167
- continue;
168
- const reserveTokenPrice = tokenPriceById.get(reserveAccount.mint.toString());
169
- if (!reserveTokenPrice)
170
- continue;
171
- checkedTokensPrices += 1;
172
- const reserveAmount = new bignumber_js_1.default(reserveAccount.amount.toString()).div(Math.pow(10, reserveTokenPrice.decimals));
173
- const reserveValue = reserveAmount.multipliedBy(reserveTokenPrice.price);
174
- const underlying = {
175
- networkId: portfolio_core_1.NetworkId.solana,
176
- address: reserveTokenPrice.address,
177
- decimals: reserveTokenPrice.decimals,
178
- price: reserveTokenPrice.price,
179
- amountPerLp: reserveAmount
180
- .dividedBy(reserveValue)
181
- .dividedBy(numberOfUnderlyings)
182
- .toNumber(),
183
- };
184
- underlyings.push(underlying);
185
- supplyValue += reserveValue.toNumber();
186
- }
187
- // don't push the LP if one tokenPrice was not found.
188
- if (checkedTokensPrices < pool.reserveAccounts.length)
189
- continue;
190
- const tokenSupplyAndDecimalsRes = yield (0, fetchTokenSupplyAndDecimals_1.fetchTokenSupplyAndDecimals)(new web3_js_1.PublicKey(address), client, 0);
191
- if (!tokenSupplyAndDecimalsRes)
192
- continue;
193
- const { supply, decimals } = tokenSupplyAndDecimalsRes;
194
- if (supplyValue <= 0)
195
- continue;
196
- const price = supplyValue / supply;
197
- yield cache.setTokenPriceSource({
198
- id: constants_1.platformId,
199
- weight: 1,
200
- address,
201
- networkId: portfolio_core_1.NetworkId.solana,
202
- platformId: constants_1.platformId,
203
- decimals,
204
- price,
205
- underlyings,
206
- timestamp: Date.now(),
207
- liquidityName: pool.symbol,
208
- });
129
+ lpSources.push(lpSource);
209
130
  }
131
+ yield cache.setTokenPriceSources(lpSources);
210
132
  });
211
133
  const job = {
212
134
  id: `${constants_1.platformId}-pools`,