@sonarwatch/portfolio-plugins 0.12.40 → 0.12.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/CHANGELOG.md +1863 -1859
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/Cache.js +2 -7
  5. package/src/Cache.js.map +1 -1
  6. package/src/plugins/balancer/helpers/pools.js +21 -21
  7. package/src/plugins/bonkrewards/constants.js +1 -1
  8. package/src/plugins/bonkrewards/constants.js.map +1 -1
  9. package/src/plugins/cropper/constants.js +1 -1
  10. package/src/plugins/cropper/constants.js.map +1 -1
  11. package/src/plugins/flowx/constants.js +1 -1
  12. package/src/plugins/flowx/constants.js.map +1 -1
  13. package/src/plugins/kriya/constants.js +1 -1
  14. package/src/plugins/kriya/constants.js.map +1 -1
  15. package/src/plugins/meteora/dlmmHelper.js +17 -31
  16. package/src/plugins/meteora/dlmmHelper.js.map +1 -1
  17. package/src/plugins/meteora/dlmmPositionsFetcher.js +27 -5
  18. package/src/plugins/meteora/dlmmPositionsFetcher.js.map +1 -1
  19. package/src/plugins/meteora/poolsJob.js +3 -5
  20. package/src/plugins/meteora/poolsJob.js.map +1 -1
  21. package/src/plugins/phoenix/helpers/deserializeMarketData.js +5 -11
  22. package/src/plugins/phoenix/helpers/deserializeMarketData.js.map +1 -1
  23. package/src/plugins/sushiswap/helpers.js +24 -24
  24. package/src/plugins/uniswap-v2/helpers.js +22 -22
  25. package/src/plugins/zeta/airdropFetcher.js +3 -2
  26. package/src/plugins/zeta/airdropFetcher.js.map +1 -1
  27. package/src/utils/misc/arrayToMap.js +2 -0
  28. package/src/utils/misc/arrayToMap.js.map +1 -1
  29. package/src/utils/misc/toBN.d.ts +3 -0
  30. package/src/utils/misc/toBN.js +22 -0
  31. package/src/utils/misc/toBN.js.map +1 -0
  32. package/src/utils/sei/constants.js +8 -8
  33. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
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.40",
3
+ "version": "0.12.41",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
package/src/Cache.js CHANGED
@@ -44,6 +44,7 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
44
44
  const overlayDriver_1 = __importDefault(require("./overlayDriver"));
45
45
  const memoryDriver_1 = __importStar(require("./memoryDriver"));
46
46
  const runInBatch_1 = __importDefault(require("./utils/misc/runInBatch"));
47
+ const arrayToMap_1 = require("./utils/misc/arrayToMap");
47
48
  const tokenPriceSourcePrefix = 'tokenpricesource';
48
49
  class Cache {
49
50
  constructor(cacheConfig) {
@@ -139,13 +140,7 @@ class Cache {
139
140
  getTokenPricesAsMap(addresses, networkId) {
140
141
  return __awaiter(this, void 0, void 0, function* () {
141
142
  const tokenPrices = yield this.getTokenPrices(addresses, networkId);
142
- const tokenPricesMap = new Map();
143
- tokenPrices.forEach((tp) => {
144
- if (!tp)
145
- return;
146
- tokenPricesMap.set(tp.address, tp);
147
- });
148
- return tokenPricesMap;
143
+ return (0, arrayToMap_1.arrayToMap)(tokenPrices, 'address');
149
144
  });
150
145
  }
151
146
  getTokenPriceSources(address, networkId) {
package/src/Cache.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../../../packages/plugins/src/Cache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAyE;AACzE,8DAA4C;AAC5C,oEAAkD;AAClD,kEAAgD;AAChD,+DAUoC;AACpC,oEAA4C;AAC5C,+DAGwB;AACxB,yEAAiD;AAiBjD,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAgElD,MAAa,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8BAA8B,CAAC,IAAI,SAAS;iBAC/D;aACF,CAAC;QACJ,KAAK,OAAO;YACV,OAAO;gBACL,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE;oBACN,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,IAAI,gBAAgB;oBAC9D,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,KAAK,MAAM;oBACrD,EAAE,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,IAAI,GAAG,EAAE,EAAE,CAAC;oBAC7D,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC;wBACxC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,EAAE,EAAE,CAAC;wBACrD,CAAC,CAAC,SAAS;iBACd;aACF,CAAC;QACJ,KAAK,MAAM;YACT,OAAO;gBACL,IAAI,EAAE,MAAM;gBACZ,MAAM,EAAE;oBACN,IAAI,EACF,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC;wBACrC,6DAA6D;oBAC/D,OAAO,EAAE;wBACP,aAAa,EAAE,UACb,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,IAAI,kCAC7C,EAAE;qBACH;iBACF;aACF,CAAC;QACJ;YACE,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,EAAE;aACX,CAAC;IACN,CAAC;AACH,CAAC;AA/DD,wCA+DC;AAED,SAAgB,QAAQ;IACtB,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,OAAO,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC;AAHD,4BAGC"}
@@ -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;
@@ -9,7 +9,7 @@ exports.platform = {
9
9
  image: 'https://sonar.watch/img/platforms/bonk.png',
10
10
  twitter: 'https://twitter.com/bonk_inu',
11
11
  website: 'https://bonkrewards.com/',
12
- // defiLlamaId: 'nothing yet',
12
+ defiLlamaId: 'bonkswap',
13
13
  };
14
14
  exports.stakePid = new web3_js_1.PublicKey('STAKEkKzbdeKkqzKpLkNQD3SUuLgshDKCD7U8duxAbB');
15
15
  exports.stakePool = '9AdEE8AAm1XgJrPEs4zkTPozr3o4U5iGbgvPwkNdLDJ3';
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bonkrewards/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,aAAa,CAAC;AAC3B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,4CAA4C;IACnD,OAAO,EAAE,8BAA8B;IACvC,OAAO,EAAE,0BAA0B;IACnC,8BAA8B;CAC/B,CAAC;AACW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,6CAA6C,CAC9C,CAAC;AACW,QAAA,SAAS,GAAG,8CAA8C,CAAC;AAC3D,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAC1D,QAAA,YAAY,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bonkrewards/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,aAAa,CAAC;AAC3B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,4CAA4C;IACnD,OAAO,EAAE,8BAA8B;IACvC,OAAO,EAAE,0BAA0B;IACnC,WAAW,EAAE,UAAU;CACxB,CAAC;AACW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,6CAA6C,CAC9C,CAAC;AACW,QAAA,SAAS,GAAG,8CAA8C,CAAC;AAC3D,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAC1D,QAAA,YAAY,GAAG,CAAC,CAAC"}
@@ -9,7 +9,7 @@ exports.platform = {
9
9
  image: 'https://sonar.watch/img/platforms/cropper.webp',
10
10
  website: 'https://cropper.finance/',
11
11
  twitter: 'https://twitter.com/CropperFinance',
12
- defiLlamaId: 'cropper', // from https://defillama.com/docs/api
12
+ defiLlamaId: 'cropper-clmm', // from https://defillama.com/docs/api
13
13
  };
14
14
  exports.clmmPid = new web3_js_1.PublicKey('H8W3ctz92svYg6mkn1UtGfu2aQr2fnUFHM1RhScEtQDt');
15
15
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cropper/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,gDAAgD;IACvD,OAAO,EAAE,0BAA0B;IACnC,OAAO,EAAE,oCAAoC;IAC7C,WAAW,EAAE,SAAS,EAAE,sCAAsC;CAC/D,CAAC;AAEW,QAAA,OAAO,GAAG,IAAI,mBAAS,CAClC,8CAA8C,CAC/C,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cropper/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,gDAAgD;IACvD,OAAO,EAAE,0BAA0B;IACnC,OAAO,EAAE,oCAAoC;IAC7C,WAAW,EAAE,cAAc,EAAE,sCAAsC;CACpE,CAAC;AAEW,QAAA,OAAO,GAAG,IAAI,mBAAS,CAClC,8CAA8C,CAC/C,CAAC"}
@@ -6,7 +6,7 @@ exports.platform = {
6
6
  id: exports.platformId,
7
7
  name: 'FlowX Finance',
8
8
  image: 'https://sonar.watch/img/platforms/flowx.webp',
9
- defiLlamaId: 'flowx-finance',
9
+ defiLlamaId: 'flowx-v2',
10
10
  website: 'https://flowx.finance',
11
11
  twitter: 'https://twitter.com/FlowX_finance',
12
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flowx/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,eAAe;IAC5B,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,mCAAmC;CAC7C,CAAC;AAEW,QAAA,OAAO,GAClB,8EAA8E,CAAC;AACpE,QAAA,QAAQ,GACnB,gFAAgF,CAAC;AACtE,QAAA,WAAW,GAAG,CAAC,CAAC;AAEhB,QAAA,UAAU,GAAG,CAAC,CAAC;AAEf,QAAA,SAAS,GACpB,oEAAoE,CAAC;AAC1D,QAAA,OAAO,GAClB,oEAAoE,CAAC;AAC1D,QAAA,UAAU,GACrB,oEAAoE,CAAC;AAC1D,QAAA,UAAU,GACrB,oEAAoE,CAAC;AAC1D,QAAA,mBAAmB,GAC9B,oEAAoE,CAAC;AAC1D,QAAA,aAAa,GACxB,+FAA+F,CAAC;AAErF,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,QAAQ,GAAG,OAAO,CAAC;AAEnB,QAAA,WAAW,GACtB,oEAAoE,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flowx/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,UAAU;IACvB,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,mCAAmC;CAC7C,CAAC;AAEW,QAAA,OAAO,GAClB,8EAA8E,CAAC;AACpE,QAAA,QAAQ,GACnB,gFAAgF,CAAC;AACtE,QAAA,WAAW,GAAG,CAAC,CAAC;AAEhB,QAAA,UAAU,GAAG,CAAC,CAAC;AAEf,QAAA,SAAS,GACpB,oEAAoE,CAAC;AAC1D,QAAA,OAAO,GAClB,oEAAoE,CAAC;AAC1D,QAAA,UAAU,GACrB,oEAAoE,CAAC;AAC1D,QAAA,UAAU,GACrB,oEAAoE,CAAC;AAC1D,QAAA,mBAAmB,GAC9B,oEAAoE,CAAC;AAC1D,QAAA,aAAa,GACxB,+FAA+F,CAAC;AAErF,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,QAAQ,GAAG,OAAO,CAAC;AAEnB,QAAA,WAAW,GACtB,oEAAoE,CAAC"}
@@ -6,7 +6,7 @@ exports.platform = {
6
6
  id: exports.platformId,
7
7
  name: 'Kriya',
8
8
  image: 'https://sonar.watch/img/platforms/kriya.webp',
9
- defiLlamaId: 'kriya', // from https://defillama.com/docs/api
9
+ defiLlamaId: 'kriya-swap', // from https://defillama.com/docs/api
10
10
  website: 'https://www.app.kriya.finance/',
11
11
  twitter: 'https://twitter.com/KriyaDEX',
12
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/constants.ts"],"names":[],"mappings":";;;AAGa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,OAAO,EAAE,sCAAsC;IAC5D,OAAO,EAAE,gCAAgC;IACzC,OAAO,EAAE,8BAA8B;CACxC,CAAC;AAEW,QAAA,eAAe,GAC1B,oEAAoE,CAAC;AAC1D,QAAA,cAAc,GACzB,oEAAoE,CAAC;AAE1D,QAAA,aAAa,GAAG,aAAa,CAAC;AAC9B,QAAA,YAAY,GAAG,YAAY,CAAC;AAE5B,QAAA,SAAS,GACpB,4EAA4E,CAAC;AAClE,QAAA,QAAQ,GACnB,2EAA2E,CAAC;AAEjE,QAAA,iBAAiB,GAAG;IAC/B,wGAAwG;CACzG,CAAC;AAEW,QAAA,UAAU,GAAgB;IACrC;QACE,SAAS,EACP,wGAAwG;QAC1G,EAAE,EAAE,oEAAoE;QACxE,cAAc,EACZ,oEAAoE;KACvE;CACF,CAAC;AAEW,QAAA,wBAAwB,GACnC,+HAA+H,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/constants.ts"],"names":[],"mappings":";;;AAGa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,YAAY,EAAE,sCAAsC;IACjE,OAAO,EAAE,gCAAgC;IACzC,OAAO,EAAE,8BAA8B;CACxC,CAAC;AAEW,QAAA,eAAe,GAC1B,oEAAoE,CAAC;AAC1D,QAAA,cAAc,GACzB,oEAAoE,CAAC;AAE1D,QAAA,aAAa,GAAG,aAAa,CAAC;AAC9B,QAAA,YAAY,GAAG,YAAY,CAAC;AAE5B,QAAA,SAAS,GACpB,4EAA4E,CAAC;AAClE,QAAA,QAAQ,GACnB,2EAA2E,CAAC;AAEjE,QAAA,iBAAiB,GAAG;IAC/B,wGAAwG;CACzG,CAAC;AAEW,QAAA,UAAU,GAAgB;IACrC;QACE,SAAS,EACP,wGAAwG;QAC1G,EAAE,EAAE,oEAAoE;QACxE,cAAc,EACZ,oEAAoE;KACvE;CACF,CAAC;AAEW,QAAA,wBAAwB,GACnC,+HAA+H,CAAC"}
@@ -11,11 +11,12 @@ const decimal_js_1 = __importDefault(require("decimal.js"));
11
11
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
12
12
  const types_1 = require("./types");
13
13
  const constants_1 = require("./constants");
14
+ const toBN_1 = require("../../utils/misc/toBN");
14
15
  exports.MAX_BIN_ARRAY_SIZE = new bn_js_1.default(70);
15
16
  exports.SCALE_OFFSET = 64;
16
17
  exports.BASIS_POINT_MAX = 10000;
17
18
  function binIdToBinArrayIndex(binId) {
18
- const tempBinId = new bn_js_1.default(binId.toString());
19
+ const tempBinId = (0, toBN_1.toBN)(binId);
19
20
  const { div: idx, mod } = tempBinId.divmod(exports.MAX_BIN_ARRAY_SIZE);
20
21
  return tempBinId.isNeg() && !mod.isZero() ? idx.sub(new bn_js_1.default(1)) : idx;
21
22
  }
@@ -75,33 +76,18 @@ function processPosition(program, version, lbPair, position, baseTokenDecimal, q
75
76
  positionYAmount: positionYAmount.toString(),
76
77
  });
77
78
  });
78
- // Not getting the right results
79
- // const { feeX, feeY } = getClaimableSwapFee(
80
- // program,
81
- // version,
82
- // position,
83
- // lowerBinArray,
84
- // upperBinArray
85
- // );
86
- // const { rewardOne, rewardTwo } = getClaimableLMReward(
87
- // program,
88
- // version,
89
- // lbPair,
90
- // new Date(Date.now()).getTime(),
91
- // position,
92
- // lowerBinArray,
93
- // upperBinArray
94
- // );
79
+ const { feeX, feeY } = getClaimableSwapFee(program, version, position, lowerBinArray, upperBinArray);
80
+ const { rewardOne, rewardTwo } = getClaimableLMReward(program, version, lbPair, new Date(Date.now()).getTime(), position, lowerBinArray, upperBinArray);
95
81
  return {
96
82
  totalXAmount: new bignumber_js_1.default(totalXAmount.toString()),
97
83
  totalYAmount: new bignumber_js_1.default(totalYAmount.toString()),
98
84
  positionBinData: positionData,
99
85
  lowerBinId,
100
86
  upperBinId,
101
- feeX: new bignumber_js_1.default(0),
102
- feeY: new bignumber_js_1.default(0),
103
- rewardOne: new bignumber_js_1.default(0),
104
- rewardTwo: new bignumber_js_1.default(0),
87
+ feeX,
88
+ feeY,
89
+ rewardOne,
90
+ rewardTwo,
105
91
  };
106
92
  }
107
93
  exports.processPosition = processPosition;
@@ -170,8 +156,8 @@ function getClaimableLMReward(program, positionVersion, lbPair, onChainTimestamp
170
156
  const binIdxInPosition = i - position.lowerBinId;
171
157
  const positionRewardInfo = position.rewardInfos[binIdxInPosition];
172
158
  const liquidityShare = positionVersion === types_1.PositionVersion.V1
173
- ? new bn_js_1.default(position.liquidityShares[binIdxInPosition].toString())
174
- : new bn_js_1.default(position.liquidityShares[binIdxInPosition].toString()).shrn(64);
159
+ ? (0, toBN_1.toBN)(position.liquidityShares[binIdxInPosition])
160
+ : (0, toBN_1.toBN)(position.liquidityShares[binIdxInPosition]).shrn(64);
175
161
  for (let j = 0; j < 2; j++) {
176
162
  const pairRewardInfo = lbPair.rewardInfos[j];
177
163
  if (!pairRewardInfo.mint.equals(web3_js_1.PublicKey.default)) {
@@ -193,7 +179,7 @@ function getClaimableLMReward(program, positionVersion, lbPair, onChainTimestamp
193
179
  const delta = rewardPerTokenStored.minus(j === 0
194
180
  ? positionRewardInfo.rewardPerTokenCompletesX
195
181
  : positionRewardInfo.rewardPerTokenCompletesY);
196
- const newReward = mulShr(new bn_js_1.default(delta.toString()), liquidityShare, exports.SCALE_OFFSET, Rounding.Down);
182
+ const newReward = mulShr((0, toBN_1.toBN)(delta), liquidityShare, exports.SCALE_OFFSET, Rounding.Down);
197
183
  rewards[j] = rewards[j]
198
184
  .plus(newReward)
199
185
  .plus(j === 0
@@ -223,18 +209,18 @@ function getClaimableSwapFee(program, positionVersion, position, lowerBinArray,
223
209
  const binIdxInPosition = i - position.lowerBinId;
224
210
  const feeInfos = position.feeInfos[binIdxInPosition];
225
211
  const liquidityShare = positionVersion === types_1.PositionVersion.V1
226
- ? new bn_js_1.default(position.liquidityShares[binIdxInPosition].toString())
227
- : new bn_js_1.default(position.liquidityShares[binIdxInPosition].toString()).shrn(64);
212
+ ? (0, toBN_1.toBN)(position.liquidityShares[binIdxInPosition])
213
+ : (0, toBN_1.toBN)(position.liquidityShares[binIdxInPosition]).shrn(64);
228
214
  if (liquidityShare.isZero())
229
215
  continue;
230
216
  const feeXPerToken = binState.feeAmountXPerTokenStored.minus(feeInfos.feeXPerTokenComplete);
231
217
  if (!feeXPerToken.isZero()) {
232
- const newFeeX = mulShr(liquidityShare, new bn_js_1.default(feeXPerToken.toString()), exports.SCALE_OFFSET, Rounding.Down);
218
+ const newFeeX = mulShr(liquidityShare, (0, toBN_1.toBN)(feeXPerToken), exports.SCALE_OFFSET, Rounding.Down);
233
219
  feeX = feeX.plus(newFeeX).plus(feeInfos.feeXPending);
234
220
  }
235
- const feeYPerToken = binState.feeAmountXPerTokenStored.minus(feeInfos.feeXPerTokenComplete);
221
+ const feeYPerToken = binState.feeAmountYPerTokenStored.minus(feeInfos.feeYPerTokenComplete);
236
222
  if (!feeYPerToken.isZero()) {
237
- const newFeeY = mulShr(liquidityShare, new bn_js_1.default(feeYPerToken.toString()), exports.SCALE_OFFSET, Rounding.Down);
223
+ const newFeeY = mulShr(liquidityShare, (0, toBN_1.toBN)(feeYPerToken), exports.SCALE_OFFSET, Rounding.Down);
238
224
  feeY = feeY.plus(newFeeY).plus(feeInfos.feeYPending);
239
225
  }
240
226
  }
@@ -243,7 +229,7 @@ function getClaimableSwapFee(program, positionVersion, position, lowerBinArray,
243
229
  exports.getClaimableSwapFee = getClaimableSwapFee;
244
230
  function getBinFromBinArray(binId, binArray) {
245
231
  const [lowerBinId, upperBinId] = getBinArrayLowerUpperBinId(binArray.index);
246
- let index = 0;
232
+ let index;
247
233
  if (binId > 0) {
248
234
  index = binId - lowerBinId.toNumber();
249
235
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dlmmHelper.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/dlmmHelper.ts"],"names":[],"mappings":";;;;;;AAAA,2BAA2B;AAC3B,6CAA4C;AAC5C,kDAAuB;AACvB,4DAAiC;AACjC,gEAAqC;AACrC,mCAOiB;AAEjB,2CAA4C;AAE/B,QAAA,kBAAkB,GAAG,IAAI,eAAE,CAAC,EAAE,CAAC,CAAC;AAChC,QAAA,YAAY,GAAG,EAAE,CAAC;AAClB,QAAA,eAAe,GAAG,KAAK,CAAC;AAErC,SAAgB,oBAAoB,CAAC,KAAgB;IACnD,MAAM,SAAS,GAAG,IAAI,eAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3C,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC,MAAM,CAAC,0BAAkB,CAAC,CAAC;IAC/D,OAAO,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,eAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,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AC5C,CAAC;AAPD,wBAOC;AAED,SAAgB,oBAAoB,CAAC,OAAe,EAAE,KAAa;IACjE,MAAM,UAAU,GAAG,IAAI,oBAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,IAAI,oBAAO,CAAC,uBAAe,CAAC,CAAC,CAAC;IAC1E,OAAO,IAAI,oBAAO,CAAC,CAAC,CAAC;SAClB,GAAG,CAAC,IAAI,oBAAO,CAAC,UAAU,CAAC,CAAC;SAC5B,GAAG,CAAC,IAAI,oBAAO,CAAC,KAAK,CAAC,CAAC;SACvB,QAAQ,EAAE,CAAC;AAChB,CAAC;AAND,oDAMC;AAED,SAAgB,6BAA6B,CAC3C,QAAsB,EACtB,IAAY,EACZ,aAAuB,EACvB,aAAuB,EACvB,gBAAwB,EACxB,iBAAyB;IAEzB,MAAM,eAAe,GAAG,uBAAe,CAAC,EAAE,CAAC;IAE3C,MAAM,YAAY,GAAG,eAAe,CAClC,yBAAa,EACb,eAAe,EACf,IAAI,EACJ,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,aAAa,CACd,CAAC;IAEF,IAAI,CAAC,YAAY;QACf,OAAO,EAAE,YAAY,EAAE,IAAI,sBAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,sBAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IAE5E,OAAO;QACL,YAAY,EAAE,YAAY,CAAC,YAAY;QACvC,YAAY,EAAE,YAAY,CAAC,YAAY;KACxC,CAAC;AACJ,CAAC;AA5BD,sEA4BC"}
1
+ {"version":3,"file":"dlmmHelper.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/dlmmHelper.ts"],"names":[],"mappings":";;;;;;AAAA,2BAA2B;AAC3B,6CAA4C;AAC5C,kDAAuB;AACvB,4DAAiC;AACjC,gEAAqC;AACrC,mCAOiB;AAEjB,2CAA4C;AAC5C,gDAA6C;AAEhC,QAAA,kBAAkB,GAAG,IAAI,eAAE,CAAC,E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
@@ -66,6 +66,10 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
66
66
  const lbPairAcc = struct_1.lbPairStruct.deserialize(rawAccount.data)[0];
67
67
  mints.add(lbPairAcc.tokenXMint.toString());
68
68
  mints.add(lbPairAcc.tokenYMint.toString());
69
+ if (lbPairAcc.rewardInfos[0].mint)
70
+ mints.add(lbPairAcc.rewardInfos[0].mint.toString());
71
+ if (lbPairAcc.rewardInfos[1].mint)
72
+ mints.add(lbPairAcc.rewardInfos[1].mint.toString());
69
73
  lbPairById.set(lbPairKeys[i - binArrayKeys.length].toBase58(), lbPairAcc);
70
74
  }
71
75
  }
@@ -89,8 +93,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
89
93
  });
90
94
  const liquidities = [];
91
95
  for (let idx = 0; idx < positions.length; idx++) {
92
- const position = positions[idx];
93
- const account = position;
96
+ const account = positions[idx];
94
97
  const { upperBinId, lowerBinId, lbPair } = account;
95
98
  const lowerBinArrayIndex = (0, dlmmHelper_1.binIdToBinArrayIndex)(new bignumber_js_1.default(lowerBinId));
96
99
  const upperBinArrayIndex = (0, dlmmHelper_1.binIdToBinArrayIndex)(new bignumber_js_1.default(upperBinId));
@@ -103,6 +106,12 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
103
106
  continue;
104
107
  const tokenPriceX = tokenPriceById.get(lbPairAcc.tokenXMint.toString());
105
108
  const tokenPriceY = tokenPriceById.get(lbPairAcc.tokenYMint.toString());
109
+ const tokenPriceRewardX = lbPairAcc.rewardInfos[0].mint
110
+ ? tokenPriceById.get(lbPairAcc.rewardInfos[0].mint.toString())
111
+ : undefined;
112
+ const tokenPriceRewardY = lbPairAcc.rewardInfos[1].mint
113
+ ? tokenPriceById.get(lbPairAcc.rewardInfos[1].mint.toString())
114
+ : undefined;
106
115
  if (!tokenPriceX || !tokenPriceY)
107
116
  continue;
108
117
  const baseTokenDecimal = tokenPriceX.decimals;
@@ -110,6 +119,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
110
119
  const positionVersion = idx < positionsV1.length ? types_1.PositionVersion.V1 : types_1.PositionVersion.V2;
111
120
  const positionData = (0, dlmmHelper_1.processPosition)(constants_1.dlmmProgramId, positionVersion, lbPairAcc, account, baseTokenDecimal, quoteTokenDecimal, lowerBinArray, upperBinArray);
112
121
  const assets = [];
122
+ const rewardAssets = [];
113
123
  if (positionData &&
114
124
  (!positionData.totalXAmount.isZero() ||
115
125
  !positionData.totalYAmount.isZero())) {
@@ -119,12 +129,24 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
119
129
  assets.push((0, tokenPriceToAssetToken_1.default)(tokenPriceY.address, positionData.totalYAmount
120
130
  .dividedBy(Math.pow(10, tokenPriceY.decimals))
121
131
  .toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceY));
132
+ if (positionData.feeX.isGreaterThan(0))
133
+ rewardAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPriceX.address, positionData.feeX.dividedBy(Math.pow(10, tokenPriceX.decimals)).toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceX));
134
+ if (positionData.feeY.isGreaterThan(0))
135
+ rewardAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPriceY.address, positionData.feeY.dividedBy(Math.pow(10, tokenPriceY.decimals)).toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceY));
136
+ if (positionData.rewardOne.isGreaterThan(0) && tokenPriceRewardX)
137
+ rewardAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPriceRewardX.address, positionData.rewardOne
138
+ .dividedBy(Math.pow(10, tokenPriceRewardX.decimals))
139
+ .toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceRewardX));
140
+ if (positionData.rewardTwo.isGreaterThan(0) && tokenPriceRewardY)
141
+ rewardAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPriceRewardY.address, positionData.rewardTwo
142
+ .dividedBy(Math.pow(10, tokenPriceRewardY.decimals))
143
+ .toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceRewardY));
122
144
  liquidities.push({
123
145
  assets,
124
146
  assetsValue: (0, portfolio_core_1.getUsdValueSum)(assets.map((asset) => asset.value)),
125
- rewardAssets: [],
126
- rewardAssetsValue: null,
127
- value: (0, portfolio_core_1.getUsdValueSum)(assets.map((asset) => asset.value)),
147
+ rewardAssets,
148
+ rewardAssetsValue: (0, portfolio_core_1.getUsdValueSum)(rewardAssets.map((asset) => asset.value)),
149
+ value: (0, portfolio_core_1.getUsdValueSum)([...assets, ...rewardAssets].map((asset) => asset.value)),
128
150
  yields: [],
129
151
  });
130
152
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dlmmPositionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/dlmmPositionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,6CAA4C;AAC5C,gEAAqC;AAGrC,2CAAwD;AACxD,iDAAsD;AACtD,+CAI4B;AAC5B,qCAOkB;AAClB,uCAGmB;AACnB,6CAIsB;AACtB,mCAA0C;AAC1C,gGAA6F;AAC7F,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,UAAU,GAAG,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC;IAExC,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACnD,IAAA,iCAAwB,EACtB,MAAM,EACN,6BAAoB,EACpB,yBAAa,EACb,IAAA,mCAAyB,EAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CACjD;QACD,IAAA,iCAAwB,EACtB,MAAM,EACN,6BAAoB,EACpB,yBAAa,EACb,IAAA,qCAA2B,EAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CACnD;KACF,CAAC,CAAC;IACH,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AO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,SAAS;YACpC,KAAK,EAAE,eAAe;YACtB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACtD,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE;gBACJ,WAAW;aACZ;SACF;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,iBAAiB;IAClC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"dlmmPositionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/dlmmPositionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,6CAA4C;AAC5C,gEAAqC;AAGrC,2CAAwD;AACxD,iDAAsD;AACtD,+CAI4B;AAC5B,qCAOkB;AAClB,uCAGmB;AACnB,6CAIsB;AACtB,mCAA0C;AAC1C,gGAA6F;AAC7F,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,UAAU,GAAG,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC;IAExC,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACnD,IAAA,iCAAwB,EACtB,MAAM,EACN,6BAAoB,EACpB,yBAAa,EACb,IAAA,mCAAyB,EAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CACjD;QACD,IAAA,iCAAwB,EACtB,MAAM,EACN,6BAA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C,CAAC,KAAK,CAAC,CAAC;YACtD,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE;gBACJ,WAAW;aACZ;SACF;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,iBAAiB;IAClC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -31,13 +31,11 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
31
31
  ...constantPoolsAccounts,
32
32
  ];
33
33
  const poolsAccounts = poolsAcountsUnfiltered.filter((poolAccount) => {
34
- if (poolAccount.enabled === false)
34
+ if (!poolAccount.enabled)
35
35
  return false;
36
- if (poolAccount.tokenAMint.toString() ===
36
+ return !(poolAccount.tokenAMint.toString() ===
37
37
  '11111111111111111111111111111111' ||
38
- poolAccount.tokenBMint.toString() === '11111111111111111111111111111111')
39
- return false;
40
- return true;
38
+ poolAccount.tokenBMint.toString() === '11111111111111111111111111111111');
41
39
  });
42
40
  // Store all tokens, lpmint, lpVaults
43
41
  const vaultsLpAddresses = new Set();
@@ -1 +1 @@
1
- {"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAyE;AACzE,6CAA4C;AAC5C,2CAAyD;AACzD,iDAAsD;AACtD,+CAO4B;AAC5B,qCAAsD;AACtD,uCAAqE;AAGrE,qGAA6E;AAC7E,mHAA2F;AAE3F,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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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,6 +8,7 @@ const bn_js_1 = __importDefault(require("bn.js"));
8
8
  const web3_js_1 = require("@solana/web3.js");
9
9
  const misc_1 = require("../structs/misc");
10
10
  const marketHeader_1 = require("../structs/marketHeader");
11
+ const toBN_1 = require("../../../utils/misc/toBN");
11
12
  function getNodeIndices(data, keyDeserializer, valueDeserializer) {
12
13
  const indexMap = new Map();
13
14
  const treeNodes = deserializeRedBlackTreeNodes(data, keyDeserializer, valueDeserializer);
@@ -22,17 +23,11 @@ function getNodeIndices(data, keyDeserializer, valueDeserializer) {
22
23
  return indexMap;
23
24
  }
24
25
  function getUiOrderSequenceNumber(orderId) {
25
- const twosComplement = toBN(orderId.orderSequenceNumber).fromTwos(64);
26
+ const twosComplement = (0, toBN_1.toBN)(orderId.orderSequenceNumber).fromTwos(64);
26
27
  return twosComplement.isNeg()
27
28
  ? twosComplement.neg().sub(new bn_js_1.default(1))
28
29
  : twosComplement;
29
30
  }
30
- function toBN(n) {
31
- if (typeof n === 'number') {
32
- return new bn_js_1.default(n);
33
- }
34
- return new bn_js_1.default(n.toString());
35
- }
36
31
  function sign(n) {
37
32
  if (n.lt(new bn_js_1.default(0))) {
38
33
  return -1;
@@ -87,8 +82,7 @@ function deserializeRedBlackTreeNodes(data, keyDeserializer, valueDeserializer)
87
82
  // If there's an infinite loop here, that means that the state is corrupted
88
83
  while (freeListHead < bumpIndex) {
89
84
  // We need to subtract 1 because the node allocator is 1-indexed
90
- const next = freeListPointers[freeListHead - 1];
91
- [indexToRemove, freeListHead] = next;
85
+ [indexToRemove, freeListHead] = freeListPointers[freeListHead - 1];
92
86
  freeNodes.add(indexToRemove);
93
87
  counter += 1;
94
88
  if (counter > bumpIndex) {
@@ -156,7 +150,7 @@ function deserializeMarketData(data) {
156
150
  const asksUnsorted = deserializeRedBlackTree(askBuffer, misc_1.orderIdBeet, misc_1.restingOrderBeet);
157
151
  // Sort bids in descending order of price, and ascending order of sequence number
158
152
  const bids = [...bidsUnsorted].sort((a, b) => {
159
- const priceComparison = sign(toBN(b[0].priceInTicks).sub(toBN(a[0].priceInTicks)));
153
+ const priceComparison = sign((0, toBN_1.toBN)(b[0].priceInTicks).sub((0, toBN_1.toBN)(a[0].priceInTicks)));
160
154
  if (priceComparison !== 0) {
161
155
  return priceComparison;
162
156
  }
@@ -164,7 +158,7 @@ function deserializeMarketData(data) {
164
158
  });
165
159
  // Sort asks in ascending order of price, and ascending order of sequence number
166
160
  const asks = [...asksUnsorted].sort((a, b) => {
167
- const priceComparison = sign(toBN(a[0].priceInTicks).sub(toBN(b[0].priceInTicks)));
161
+ const priceComparison = sign((0, toBN_1.toBN)(a[0].priceInTicks).sub((0, toBN_1.toBN)(b[0].priceInTicks)));
168
162
  if (priceComparison !== 0) {
169
163
  return priceComparison;
170
164
  }