@sonarwatch/portfolio-plugins 0.11.155 → 0.11.156

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. package/CHANGELOG.md +1347 -1343
  2. package/README.md +3 -3
  3. package/package.json +2 -2
  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/meteora/index.js +2 -1
  8. package/src/plugins/meteora/index.js.map +1 -1
  9. package/src/plugins/meteora/multiTokenPools.json +139 -0
  10. package/src/plugins/meteora/multiTokenPoolsJob.d.ts +3 -0
  11. package/src/plugins/meteora/multiTokenPoolsJob.js +76 -0
  12. package/src/plugins/meteora/multiTokenPoolsJob.js.map +1 -0
  13. package/src/plugins/meteora/poolsJob.js +8 -86
  14. package/src/plugins/meteora/poolsJob.js.map +1 -1
  15. package/src/plugins/meteora/vaultsJob.js +7 -8
  16. package/src/plugins/meteora/vaultsJob.js.map +1 -1
  17. package/src/plugins/sushiswap/helpers.js +24 -24
  18. package/src/plugins/tulip/lendingTokensJob.js +1 -9
  19. package/src/plugins/tulip/lendingTokensJob.js.map +1 -1
  20. package/src/plugins/tulip/strategyTokensJob.js +1 -9
  21. package/src/plugins/tulip/strategyTokensJob.js.map +1 -1
  22. package/src/plugins/uniswap-v2/helpers.js +22 -22
  23. package/src/plugins/uxd/constants.d.ts +9 -0
  24. package/src/plugins/uxd/constants.js +22 -0
  25. package/src/plugins/uxd/constants.js.map +1 -0
  26. package/src/plugins/uxd/filters.d.ts +6 -0
  27. package/src/plugins/uxd/filters.js +13 -0
  28. package/src/plugins/uxd/filters.js.map +1 -0
  29. package/src/plugins/uxd/index.d.ts +6 -0
  30. package/src/plugins/uxd/index.js +12 -0
  31. package/src/plugins/uxd/index.js.map +1 -0
  32. package/src/plugins/uxd/stakingFetcher.d.ts +3 -0
  33. package/src/plugins/uxd/stakingFetcher.js +60 -0
  34. package/src/plugins/uxd/stakingFetcher.js.map +1 -0
  35. package/src/plugins/uxd/structs.d.ts +16 -0
  36. package/src/plugins/uxd/structs.js +17 -0
  37. package/src/plugins/uxd/structs.js.map +1 -0
  38. package/src/utils/sei/constants.js +8 -8
  39. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  40. package/src/plugins/meteora/pools.d.ts +0 -5
  41. package/src/plugins/meteora/pools.js +0 -143
  42. 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,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.11.155",
3
+ "version": "0.11.156",
4
4
  "type": "commonjs",
5
5
  "generators": "./generators.json",
6
6
  "dependencies": {
@@ -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.156"
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,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,2CAIyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAG6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAI0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAG6B;AAC7B,yCAIwB;AACxB,2C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AAc;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,2CAIyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAG6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAI0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAG6B;AAC7B,yCAIwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,+CAI2B;AAC3B,yCAIwB;AACxB,2CAIyB;AACzB,mDAI6B;AAC7B,2CAIyB;AACzB,2CAIyB;AACzB,sCAIsB;AACtB,+CAI2B;AAC3B,iDAI4B;AAC5B,yCAIwB;AACxB,mDAI6B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G,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;
@@ -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,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IACrC,MAAM,gBAAgB,GAAG,8BAAe;SACrC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,mBAAS,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1D,IAAI,EAAE,CAAC;IACV,MAAM,eAAe,GAAG,MAAM,IAAA,sCAA6B,EACzD,UA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WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;YACnE,IAAI,CAAC,UAAU;gBAAE,OAAO;YAExB,kBAAkB,CAAC,IAAI,CAAC;gBACtB,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,gBAAgB,EAAE,cAAc,CAAC,MAAM;aACxC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,IAAI,kBAAkB,CAAC,MAAM,KAAK,IAAI,CAAC,eAAe,CAAC,MAAM;YAAE,SAAS;QAExE,MAAM,QAAQ,GAAG,IAAA,6BAAmB,EAClC,0BAAS,CAAC,MAAM,EAChB,IAAI,CAAC,OAAO,EACZ,sBAAU,EACV;YACE,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,QAAQ,EAAE,aAAa,CAAC,QAAQ;YAChC,SAAS,EAAE,aAAa,CAAC,MAAM;SAChC,EACD,kBAAkB,CACnB,CAAC;QACF,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;IACD,MAAM,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAC9C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,mBAAmB;IACpC,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`,
@@ -1 +1 @@
1
- {"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAC5C,gEAAqC;AACrC,2CAAyD;AACzD,iDAAsD;AACtD,+CAO4B;AAC5B,mCAAgC;AAChC,gGAA6F;AAC7F,qCAAsD;AACtD,uCAAqE;AAGrE,6FAAoE;AACpE,+FAAuE;AACvE,6GAAqF;AAErF,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,yCAAyC;IACzC,MAAM,qBAAqB,GAAG,MAAM,IAAA,iCAAwB,EAC1D,MAAM,EACN,wBAAe,EACf,0BAAc,EACd,8BAAoB,CACrB,CAAC;IACF,MAAM,mBAAmB,GAAG,MAAM,IAAA,iCAAwB,EACxD,MAAM,EACN,wBAAe,EACf,0BAAc,EACd,4BAAkB,CACnB,CAAC;IAEF,SAAS;IACT,MAAM,YAAY,GAAG,aAAK,CAAC;IAC3B,6BAA6B;IAC7B,MAAM,iBAAiB,GAAmB,IAAI,GAAG,EAAE,CAAC;IACpD,YAAY,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC5B,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACvC,iBAAiB,CAAC,GAAG,CAAC,IAAI,mBAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,MAAM,eAAe,GAAG,MAAM,IAAA,sCA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S,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,QAAQ;IACzB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -8,9 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
11
  Object.defineProperty(exports, "__esModule", { value: true });
15
12
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
13
  const constants_1 = require("./constants");
@@ -19,16 +16,16 @@ const solana_1 = require("../../utils/solana");
19
16
  const struct_1 = require("./struct");
20
17
  const fetchTokenSupplyAndDecimals_1 = require("../../utils/solana/fetchTokenSupplyAndDecimals");
21
18
  const filters_1 = require("./filters");
22
- const getTokensPricesMap_1 = __importDefault(require("../../utils/misc/getTokensPricesMap"));
23
19
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
24
20
  const client = (0, clients_1.getClientSolana)();
25
21
  const vaultAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.vaultStruct, constants_1.vaultsProgramId, filters_1.vaultsFilters);
26
- const tokensById = yield (0, getTokensPricesMap_1.default)(vaultAccounts.map((vault) => vault.token_mint.toString()), portfolio_core_1.NetworkId.solana, cache);
22
+ const tokenPrices = yield cache.getTokenPricesAsMap(vaultAccounts.map((vault) => vault.token_mint.toString()), portfolio_core_1.NetworkId.solana);
23
+ const lpSources = [];
27
24
  for (let i = 0; i < vaultAccounts.length; i += 1) {
28
25
  const vault = vaultAccounts[i];
29
26
  if (vault.total_amount.isZero())
30
27
  continue;
31
- const vaultTokenPrice = tokensById.get(vault.token_mint.toString());
28
+ const vaultTokenPrice = tokenPrices.get(vault.token_mint.toString());
32
29
  if (!vaultTokenPrice)
33
30
  continue;
34
31
  const lpSupplyRes = yield (0, fetchTokenSupplyAndDecimals_1.fetchTokenSupplyAndDecimals)(vault.lp_mint, client, 0);
@@ -40,7 +37,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
40
37
  .toNumber();
41
38
  const vaultValue = vaultAmount * vaultTokenPrice.price;
42
39
  const price = vaultValue / lpSupply;
43
- yield cache.setTokenPriceSource({
40
+ const lpSource = {
44
41
  id: constants_1.platformId,
45
42
  weight: 1,
46
43
  address: vault.lp_mint.toString(),
@@ -59,8 +56,10 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
59
56
  },
60
57
  ],
61
58
  timestamp: Date.now(),
62
- });
59
+ };
60
+ lpSources.push(lpSource);
63
61
  }
62
+ yield cache.setTokenPriceSources(lpSources);
64
63
  });
65
64
  const job = {
66
65
  id: `${constants_1.platformId}-vaults`,
@@ -1 +1 @@
1
- {"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/vaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,2CAA0D;AAC1D,iDAAsD;AACtD,+CAA8D;AAC9D,qCAAuC;AACvC,gGAA6F;AAC7F,uCAA0C;AAG1C,6FAAoE;AAEpE,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,aAAa,GAAG,MAAM,IAAA,iCAAwB,EAClD,MAAM,EACN,oBAAW,EACX,2BAAe,EACf,uBAAa,CACd,CAAC;IAEF,MAAM,UAAU,GAAG,MAAM,IAAA,4BAAiB,EACxC,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,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