@sonarwatch/portfolio-plugins 0.11.89 → 0.11.91

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +2 -2
  3. package/src/Cache.d.ts +1 -0
  4. package/src/Cache.js +12 -0
  5. package/src/Cache.js.map +1 -1
  6. package/src/plugins/circuit/constants.d.ts +1 -3
  7. package/src/plugins/circuit/constants.js +2 -17
  8. package/src/plugins/circuit/constants.js.map +1 -1
  9. package/src/plugins/circuit/depositsFetcher.js +10 -4
  10. package/src/plugins/circuit/depositsFetcher.js.map +1 -1
  11. package/src/plugins/circuit/filters.d.ts +1 -0
  12. package/src/plugins/circuit/filters.js +4 -1
  13. package/src/plugins/circuit/filters.js.map +1 -1
  14. package/src/plugins/circuit/index.js +2 -1
  15. package/src/plugins/circuit/index.js.map +1 -1
  16. package/src/plugins/circuit/types.d.ts +1 -47
  17. package/src/plugins/circuit/vaultsJob.d.ts +3 -0
  18. package/src/plugins/circuit/vaultsJob.js +42 -0
  19. package/src/plugins/circuit/vaultsJob.js.map +1 -0
  20. package/src/plugins/drift/deposits.js +1 -1
  21. package/src/plugins/drift/deposits.js.map +1 -1
  22. package/src/plugins/drift/helpers.d.ts +0 -1
  23. package/src/plugins/drift/helpers.js +1 -6
  24. package/src/plugins/drift/helpers.js.map +1 -1
  25. package/src/plugins/flash/poolJob.js +1 -2
  26. package/src/plugins/flash/poolJob.js.map +1 -1
  27. package/src/plugins/mango/banksJob.js +1 -1
  28. package/src/plugins/mango/banksJob.js.map +1 -1
  29. package/src/plugins/mango/boostBanksJob.d.ts +3 -0
  30. package/src/plugins/mango/boostBanksJob.js +42 -0
  31. package/src/plugins/mango/boostBanksJob.js.map +1 -0
  32. package/src/plugins/mango/boostFetcher.d.ts +3 -0
  33. package/src/plugins/mango/boostFetcher.js +113 -0
  34. package/src/plugins/mango/boostFetcher.js.map +1 -0
  35. package/src/plugins/mango/collateralFetcher.js +2 -3
  36. package/src/plugins/mango/collateralFetcher.js.map +1 -1
  37. package/src/plugins/mango/constants.d.ts +3 -1
  38. package/src/plugins/mango/constants.js +4 -2
  39. package/src/plugins/mango/constants.js.map +1 -1
  40. package/src/plugins/mango/filters.d.ts +2 -0
  41. package/src/plugins/mango/filters.js +31 -1
  42. package/src/plugins/mango/filters.js.map +1 -1
  43. package/src/plugins/mango/helpers.d.ts +0 -1
  44. package/src/plugins/mango/helpers.js +1 -7
  45. package/src/plugins/mango/helpers.js.map +1 -1
  46. package/src/plugins/mango/index.js +4 -2
  47. package/src/plugins/mango/index.js.map +1 -1
  48. package/src/plugins/mango/struct.d.ts +32 -0
  49. package/src/plugins/mango/struct.js +59 -1
  50. package/src/plugins/mango/struct.js.map +1 -1
  51. package/src/plugins/mango/types.d.ts +6 -0
  52. package/src/plugins/navi/collateralFetcher.js +20 -24
  53. package/src/plugins/navi/collateralFetcher.js.map +1 -1
  54. package/src/plugins/navi/constants.d.ts +0 -1
  55. package/src/plugins/navi/constants.js +10 -2
  56. package/src/plugins/navi/constants.js.map +1 -1
  57. package/src/plugins/navi/reservesJob.js +12 -50
  58. package/src/plugins/navi/reservesJob.js.map +1 -1
  59. package/src/plugins/navi/types.d.ts +42 -44
  60. package/src/utils/solana/index.d.ts +1 -0
  61. package/src/utils/solana/index.js +1 -0
  62. package/src/utils/solana/index.js.map +1 -1
  63. package/src/utils/solana/u8ArrayToString.d.ts +1 -0
  64. package/src/utils/solana/u8ArrayToString.js +11 -0
  65. package/src/utils/solana/u8ArrayToString.js.map +1 -0
@@ -0,0 +1,113 @@
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 bignumber_js_1 = __importDefault(require("bignumber.js"));
17
+ const constants_1 = require("./constants");
18
+ const clients_1 = require("../../utils/clients");
19
+ const struct_1 = require("./struct");
20
+ const filters_1 = require("./filters");
21
+ const solana_1 = require("../../utils/solana");
22
+ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
23
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
24
+ const client = (0, clients_1.getClientSolana)();
25
+ const accounts = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.mangoAccountStruct, constants_1.boostProgramId, (0, filters_1.boostAccountsFilter)(owner));
26
+ if (accounts.length === 0)
27
+ return [];
28
+ const banksDetails = yield cache.getItem(constants_1.boostBanksKey, {
29
+ prefix: constants_1.platformId,
30
+ networkId: portfolio_core_1.NetworkId.solana,
31
+ });
32
+ if (!banksDetails)
33
+ return [];
34
+ const tokenPricesRes = yield cache.getTokenPrices(banksDetails.map((bd) => bd.mint), portfolio_core_1.NetworkId.solana);
35
+ const tokenPrices = new Map();
36
+ tokenPricesRes.forEach((tp) => {
37
+ if (!tp)
38
+ return;
39
+ tokenPrices.set(tp.address, tp);
40
+ });
41
+ const elements = [];
42
+ for (let i = 0; i < accounts.length; i++) {
43
+ const account = accounts[i];
44
+ const tokenPositions = account.tokens;
45
+ const borrowedAssets = [];
46
+ const borrowedYields = [];
47
+ const suppliedAssets = [];
48
+ const suppliedYields = [];
49
+ const rewardAssets = [];
50
+ for (let j = 0; j < tokenPositions.length; j++) {
51
+ const tokenPosition = tokenPositions[j];
52
+ if (tokenPosition.tokenIndex === 65535)
53
+ continue;
54
+ if (tokenPosition.indexedPosition.isZero())
55
+ continue;
56
+ const bankDetails = banksDetails.find((bd) => bd.tokenIndex === tokenPosition.tokenIndex);
57
+ if (!bankDetails)
58
+ continue;
59
+ const tokenPrice = tokenPrices.get(bankDetails.mint);
60
+ if (!tokenPrice)
61
+ continue;
62
+ // Deposit
63
+ if (tokenPosition.indexedPosition.isPositive()) {
64
+ const amount = new bignumber_js_1.default(tokenPosition.indexedPosition)
65
+ .times(bankDetails.depositIndex)
66
+ .div(Math.pow(10, tokenPrice.decimals))
67
+ .toNumber();
68
+ suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPrice.address, amount, portfolio_core_1.NetworkId.solana, tokenPrice));
69
+ suppliedYields.push([]);
70
+ }
71
+ // Borrow
72
+ if (tokenPosition.indexedPosition.isNegative()) {
73
+ const amount = new bignumber_js_1.default(tokenPosition.indexedPosition)
74
+ .abs()
75
+ .times(bankDetails.borrowIndex)
76
+ .div(Math.pow(10, tokenPrice.decimals))
77
+ .toNumber();
78
+ borrowedAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPrice.address, amount, portfolio_core_1.NetworkId.solana, tokenPrice));
79
+ borrowedYields.push([]);
80
+ }
81
+ }
82
+ const { borrowedValue, healthRatio, suppliedValue, value } = (0, portfolio_core_1.getElementLendingValues)(suppliedAssets, borrowedAssets, rewardAssets);
83
+ const element = {
84
+ type: portfolio_core_1.PortfolioElementType.borrowlend,
85
+ networkId: portfolio_core_1.NetworkId.solana,
86
+ platformId: constants_1.platformId,
87
+ label: 'Leverage',
88
+ name: 'Boost! v2',
89
+ value,
90
+ data: {
91
+ borrowedAssets,
92
+ borrowedValue,
93
+ borrowedYields,
94
+ suppliedAssets,
95
+ suppliedValue,
96
+ suppliedYields,
97
+ collateralRatio: null,
98
+ healthRatio,
99
+ rewardAssets,
100
+ value,
101
+ },
102
+ };
103
+ elements.push(element);
104
+ }
105
+ return elements;
106
+ });
107
+ const fetcher = {
108
+ id: `${constants_1.platformId}-boost`,
109
+ networkId: portfolio_core_1.NetworkId.solana,
110
+ executor,
111
+ };
112
+ exports.default = fetcher;
113
+ //# sourceMappingURL=boostFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boostFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/boostFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AAGrC,2CAAwE;AACxE,iDAAsD;AACtD,qCAA8C;AAC9C,uCAAgD;AAChD,+CAA8D;AAE9D,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,2BAAkB,EAClB,0BAAc,EACd,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,OAAO,CAAgB,yBAAa,EAAE;QACrE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,IAAI,CAAC,YAAY;QAAE,OAAO,EAAE,CAAC;IAE7B,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,cAAc,CAC/C,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,EACjC,0BAAS,CAAC,MAAM,CACjB,CAAC;IACF,MAAM,WAAW,GAA4B,IAAI,GAAG,EAAE,CAAC;IACvD,cAAc,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE;QAC5B,IAAI,CAAC,EAAE;YAAE,OAAO;QAChB,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,EA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BACX,YAAY;gBACZ,KAAK;aACN;SACF,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -20,11 +20,10 @@ const struct_1 = require("./struct");
20
20
  const filters_1 = require("./filters");
21
21
  const solana_1 = require("../../utils/solana");
22
22
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
23
- const helpers_1 = require("./helpers");
24
23
  const runInBatch_1 = __importDefault(require("../../utils/misc/runInBatch"));
25
24
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
26
25
  const client = (0, clients_1.getClientSolana)();
27
- const userAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.mangoAccountStruct, constants_1.MangoProgram, (0, filters_1.accountsFilter)(owner));
26
+ const userAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.mangoAccountStruct, constants_1.mangoV4Pid, (0, filters_1.accountsFilter)(owner));
28
27
  if (userAccounts.length === 0)
29
28
  return [];
30
29
  const banks = yield cache.getAllItems({
@@ -137,7 +136,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
137
136
  rewardAssets,
138
137
  value,
139
138
  },
140
- name: (0, helpers_1.decodeName)(userAccount.name),
139
+ name: (0, solana_1.u8ArrayToString)(userAccount.name),
141
140
  });
142
141
  }
143
142
  return elements;
@@ -1 +1 @@
1
- {"version":3,"file":"collateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/collateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AAGrC,2CAAoE;AACpE,i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GAAG,sBAAU,aAAa;IAC9B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"collateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/collateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AAGrC,2CAAkE;AAClE,iDAAsD;AACtD,qCAA8C;AAC9C,uCAA2C;AAC3C,+CAA+E;AAC/E,qGAA6E;AAC7E,6EAAqD;AAGrD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,YAAY,GAAG,MAAM,IAAA,iCAAwB,EACjD,MAAM,EACN,2BAAkB,EAClB,sBAAU,EACV,IAAA,wBAAc,EAAC,KAAK,CAAC,CACtB,CAAC;IACF,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEzC,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,WAAW,CAAe;QAClD,MAAM,EAAE,uBAAW;QACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,MAAM,WAAW,GAAgB,IAAI,GAAG,EAAE,CAAC;IAC3C,MAAM,WAAW,GAA8B,IAAI,GAAG,EAAE,CAAC;IACzD,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrB,IAAI,CAAC,IAAI;YAAE,OAAO;QAClB,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACvC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAG,MAAM,IAAA,oBAAU,EACxC,CAAC,GAA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;gBACb,cAAc;gBACd,eAAe,EAAE,IAAI;gBAErB,WAAW;gBACX,YAAY;gBACZ,KAAK;aACN;YACD,IAAI,EAAE,IAAA,wBAAe,EAAC,WAAW,CAAC,IAAI,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,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"}
@@ -5,5 +5,7 @@ export declare const mangoPlatform: Platform;
5
5
  export declare const banksPrefix = "mango-banks";
6
6
  export declare const rootBankPrefix = "mango-rootBank";
7
7
  export declare const groupPrefix = "mango-group";
8
- export declare const MangoProgram: PublicKey;
8
+ export declare const boostBanksKey = "boost-banks";
9
+ export declare const mangoV4Pid: PublicKey;
9
10
  export declare const redeemProgramId: PublicKey;
11
+ export declare const boostProgramId: PublicKey;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.redeemProgramId = exports.MangoProgram = exports.groupPrefix = exports.rootBankPrefix = exports.banksPrefix = exports.mangoPlatform = exports.platformId = void 0;
3
+ exports.boostProgramId = exports.redeemProgramId = exports.mangoV4Pid = exports.boostBanksKey = exports.groupPrefix = exports.rootBankPrefix = exports.banksPrefix = exports.mangoPlatform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  exports.platformId = 'mango';
6
6
  exports.mangoPlatform = {
@@ -13,6 +13,8 @@ exports.mangoPlatform = {
13
13
  exports.banksPrefix = `${exports.platformId}-banks`;
14
14
  exports.rootBankPrefix = `${exports.platformId}-rootBank`;
15
15
  exports.groupPrefix = `${exports.platformId}-group`;
16
- exports.MangoProgram = new web3_js_1.PublicKey('4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg');
16
+ exports.boostBanksKey = 'boost-banks';
17
+ exports.mangoV4Pid = new web3_js_1.PublicKey('4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg');
17
18
  exports.redeemProgramId = new web3_js_1.PublicKey('mv3ekLzLbnVPNxjSKvqBpU3ZeZXPQdEC3bp5MDEBG68');
19
+ exports.boostProgramId = new web3_js_1.PublicKey('zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25');
18
20
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,aAAa,GAAa;IACrC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,sBAAsB;IACnC,OAAO,EAAE,wBAAwB;CAClC,CAAC;AACW,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,cAAc,GAAG,GAAG,kBAAU,WAAW,CAAC;AAC1C,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AAEpC,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,eAAe,GAAG,IAAI,mBAAS,CAC1C,6CAA6C,CAC9C,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,aAAa,GAAa;IACrC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,sBAAsB;IACnC,OAAO,EAAE,wBAAwB;CAClC,CAAC;AACW,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,cAAc,GAAG,GAAG,kBAAU,WAAW,CAAC;AAC1C,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,aAAa,GAAG,aAAa,CAAC;AAE9B,QAAA,UAAU,GAAG,IAAI,mBAAS,CACrC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,eAAe,GAAG,IAAI,mBAAS,CAC1C,6CAA6C,CAC9C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import { GetProgramAccountsFilter } from '@solana/web3.js';
2
2
  export declare const accountsFilter: (owner: string) => GetProgramAccountsFilter[];
3
+ export declare const boostAccountsFilter: (owner: string) => GetProgramAccountsFilter[];
4
+ export declare const boostBanksFilters: GetProgramAccountsFilter[];
3
5
  export declare const banksFilter: GetProgramAccountsFilter[];
4
6
  export declare const groupFilter: GetProgramAccountsFilter[];
5
7
  export declare const rootBankFilter: GetProgramAccountsFilter[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.redeemFilter = exports.rootBankFilter = exports.groupFilter = exports.banksFilter = exports.accountsFilter = void 0;
3
+ exports.redeemFilter = exports.rootBankFilter = exports.groupFilter = exports.banksFilter = exports.boostBanksFilters = exports.boostAccountsFilter = exports.accountsFilter = void 0;
4
4
  const accountsFilter = (owner) => [
5
5
  {
6
6
  memcmp: {
@@ -22,6 +22,36 @@ const accountsFilter = (owner) => [
22
22
  },
23
23
  ];
24
24
  exports.accountsFilter = accountsFilter;
25
+ const boostAccountsFilter = (owner) => [
26
+ {
27
+ memcmp: {
28
+ offset: 0,
29
+ bytes: 'ho5hwwEoHot',
30
+ },
31
+ },
32
+ {
33
+ memcmp: {
34
+ offset: 8,
35
+ bytes: 'AKeMSYiJekyKfwCc3CUfVNDVAiqk9FfbQVMY3G7RUZUf',
36
+ },
37
+ },
38
+ {
39
+ memcmp: {
40
+ offset: 40,
41
+ bytes: owner,
42
+ },
43
+ },
44
+ ];
45
+ exports.boostAccountsFilter = boostAccountsFilter;
46
+ exports.boostBanksFilters = [
47
+ {
48
+ memcmp: {
49
+ offset: 0,
50
+ bytes: 'QnTef4UXSzF',
51
+ },
52
+ },
53
+ { dataSize: 3072 },
54
+ ];
25
55
  exports.banksFilter = [
26
56
  {
27
57
  memcmp: {
@@ -1 +1 @@
1
- {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/filters.ts"],"names":[],"mappings":";;;AAEO,MAAM,cAAc,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IAC3E;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,aAAa;SACrB;KACF;IACD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,8CAA8C;SACtD;KACF;IACD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;CACF,CAAC;AAnBW,QAAA,cAAc,kBAmBzB;AAEW,QAAA,WAAW,GAA+B;IACrD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,aAAa;SACrB;KACF;IACD;QACE,MAAM,EAAE;YACN,KAAK,EAAE,8CAA8C;YACrD,MAAM,EAAE,CAAC;SACV;KACF;CACF,CAAC;AAEW,QAAA,WAAW,GAA+B;IACrD;QACE,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAEW,QAAA,cAAc,GAA+B;IACxD;QACE,QAAQ,EAAE,GAAG;KACd;CACF,CAAC;AAEK,MAAM,YAAY,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACzE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,8CAA8C;SACtD;KACF;IACD;QACE,QAAQ,EAAE,IAAI;KACf;IACD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;CACF,CAAC;AAhBW,QAAA,YAAY,gBAgBvB"}
1
+ {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/filters.ts"],"names":[],"mappings":";;;AAEO,MAAM,cAAc,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IAC3E;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,aAAa;SACrB;KACF;IACD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,8CAA8C;SACtD;KACF;IACD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;CACF,CAAC;AAnBW,QAAA,cAAc,kBAmBzB;AAEK,MAAM,mBAAmB,GAAG,CACjC,KAAa,EACe,EAAE,CAAC;IAC/B;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,aAAa;SACrB;KACF;IACD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,8CAA8C;SACtD;KACF;IACD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;CACF,CAAC;AArBW,QAAA,mBAAmB,uBAqB9B;AAEW,QAAA,iBAAiB,GAA+B;IAC3D;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,aAAa;SACrB;KACF;IACD,EAAE,QAAQ,EAAE,IAAI,EAAE;CACnB,CAAC;AAEW,QAAA,WAAW,GAA+B;IACrD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,aAAa;SACrB;KACF;IACD;QACE,MAAM,EAAE;YACN,KAAK,EAAE,8CAA8C;YACrD,MAAM,EAAE,CAAC;SACV;KACF;CACF,CAAC;AAEW,QAAA,WAAW,GAA+B;IACrD;QACE,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAEW,QAAA,cAAc,GAA+B;IACxD;QACE,QAAQ,EAAE,GAAG;KACd;CACF,CAAC;AAEK,MAAM,YAAY,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACzE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,8CAA8C;SACtD;KACF;IACD;QACE,QAAQ,EAAE,IAAI;KACf;IACD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;CACF,CAAC;AAhBW,QAAA,YAAY,gBAgBvB"}
@@ -1,6 +1,5 @@
1
1
  import BigNumber from 'bignumber.js';
2
2
  import { Bank } from './struct';
3
- export declare function decodeName(bytes: number[]): string;
4
3
  export declare function getBorrowRateWithoutUpkeepRate(bank: Bank): BigNumber;
5
4
  export declare function zeroI80F48(): BigNumber;
6
5
  /**
@@ -3,16 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getDepositRate = exports.getBorrowRate = exports.zeroI80F48 = exports.getBorrowRateWithoutUpkeepRate = exports.decodeName = void 0;
6
+ exports.getDepositRate = exports.getBorrowRate = exports.zeroI80F48 = exports.getBorrowRateWithoutUpkeepRate = void 0;
7
7
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
8
8
  const FRACTIONS = 48;
9
9
  const MULTIPLIER_NUMBER = Math.pow(2, FRACTIONS);
10
- function decodeName(bytes) {
11
- return new TextDecoder('utf-8')
12
- .decode(new Uint8Array(bytes))
13
- .split('\x00')[0];
14
- }
15
- exports.decodeName = decodeName;
16
10
  function getBorrowRateWithoutUpkeepRate(bank) {
17
11
  const totalBorrows = bank.indexedBorrows.multipliedBy(bank.borrowIndex);
18
12
  const totalDeposits = bank.indexedDeposits.multipliedBy(bank.depositIndex);
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AAGrC,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,iBAAiB,GAAG,SAAA,CAAC,EAAI,SAAS,CAAA,CAAC;AAEzC,SAAgB,UAAU,CAAC,KAAe;IACxC,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC;SAC5B,MAAM,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;SAC7B,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC;AAJD,gCAIC;AAED,SAAgB,8BAA8B,CAAC,IAAU;IACvD,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACxE,MAAM,aAAa,GAAG,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAE3E,IAAI,aAAa,CAAC,MAAM,EAAE,IAAI,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC;QACpD,OAAO,UAAU,EAAE,CAAC;IACtB,CAAC;IAED,MAAM,WAAW,GAAG,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IACpD,IAAI,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzC,OAAO,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC;IACD,IAAI,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/B,MAAM,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CA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"__esModule", { value: true });
6
6
  exports.fetchers = exports.jobs = exports.platforms = void 0;
7
7
  const banksJob_1 = __importDefault(require("./banksJob"));
8
+ const boostBanksJob_1 = __importDefault(require("./boostBanksJob"));
8
9
  const groupsJob_1 = __importDefault(require("./groupsJob"));
9
10
  const collateralFetcher_1 = __importDefault(require("./collateralFetcher"));
11
+ const boostFetcher_1 = __importDefault(require("./boostFetcher"));
10
12
  const constants_1 = require("./constants");
11
13
  exports.platforms = [constants_1.mangoPlatform];
12
- exports.jobs = [banksJob_1.default, groupsJob_1.default];
13
- exports.fetchers = [collateralFetcher_1.default];
14
+ exports.jobs = [banksJob_1.default, groupsJob_1.default, boostBanksJob_1.default];
15
+ exports.fetchers = [collateralFetcher_1.default, boostFetcher_1.default];
14
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/index.ts"],"names":[],"mappings":";;;;;;AAGA,0DAAkC;AAClC,4DAAoC;AACpC,4EAAoD;AACpD,2CAA4C;AAE/B,QAAA,SAAS,GAAe,CAAC,yBAAa,CAAC,CAAC;AACxC,QAAA,IAAI,GAAU,CAAC,kBAAQ,EAAE,mBAAS,CAAC,CAAC;AACpC,QAAA,QAAQ,GAAc,CAAC,2BAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/index.ts"],"names":[],"mappings":";;;;;;AAGA,0DAAkC;AAClC,oEAA4C;AAC5C,4DAAoC;AACpC,4EAAoD;AACpD,kEAA0C;AAC1C,2CAA4C;AAE/B,QAAA,SAAS,GAAe,CAAC,yBAAa,CAAC,CAAC;AACxC,QAAA,IAAI,GAAU,CAAC,kBAAQ,EAAE,mBAAS,EAAE,uBAAa,CAAC,CAAC;AACnD,QAAA,QAAQ,GAAc,CAAC,2BAAiB,EAAE,sBAAY,CAAC,CAAC"}
@@ -161,6 +161,38 @@ export type MangoAccount = {
161
161
  perpOpenOrders: PerpOpenOrder[];
162
162
  };
163
163
  export declare const mangoAccountStruct: FixableBeetStruct<MangoAccount, Partial<MangoAccount>>;
164
+ export type TokenConditionalSwap = {
165
+ id: BigNumber;
166
+ maxBuy: BigNumber;
167
+ maxSell: BigNumber;
168
+ bought: BigNumber;
169
+ sold: BigNumber;
170
+ expiryTimestamp: BigNumber;
171
+ priceLowerLimit: BigNumber;
172
+ priceUpperLimit: BigNumber;
173
+ pricePremiumRate: BigNumber;
174
+ takerFeeRate: BigNumber;
175
+ makerFeeRate: BigNumber;
176
+ buyTokenIndex: number;
177
+ sellTokenIndex: number;
178
+ isConfigured: number;
179
+ allowCreatingDeposits: number;
180
+ allowCreatingBorrows: number;
181
+ displayPriceStyle: number;
182
+ intention: number;
183
+ tcsType: number;
184
+ padding: number[];
185
+ startTimestamp: BigNumber;
186
+ durationSeconds: BigNumber;
187
+ reserved: number[];
188
+ };
189
+ export declare const tokenConditionalSwap: FixableBeetStruct<TokenConditionalSwap, Partial<TokenConditionalSwap>>;
190
+ export type BoostAccount = MangoAccount & {
191
+ padding8: number;
192
+ tokenConditionalSwaps: TokenConditionalSwap[];
193
+ reservedDynamic: number[];
194
+ };
195
+ export declare const boostAccountStruct: FixableBeetStruct<BoostAccount, Partial<BoostAccount>>;
164
196
  export type PerpAccount = {
165
197
  basePosition: BigNumber;
166
198
  quotePosition: BigNumber;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.rootBankStruct = exports.mangoGroupV3Struct = exports.tokenInfoStruct = exports.perpMarketInfoStruct = exports.spotMarketInfoStruct = exports.mangoAccountV3Struct = exports.Side = exports.metaDataStruct = exports.perpAccountStruct = exports.mangoAccountStruct = exports.perpOpenOrderStruct = exports.perpPositionStruct = exports.serum3OrdersStruct = exports.tokenPositionStruct = exports.bankStruct = exports.oracleConfigStruct = exports.stablePriceModelStruct = void 0;
3
+ exports.rootBankStruct = exports.mangoGroupV3Struct = exports.tokenInfoStruct = exports.perpMarketInfoStruct = exports.spotMarketInfoStruct = exports.mangoAccountV3Struct = exports.Side = exports.metaDataStruct = exports.perpAccountStruct = exports.boostAccountStruct = exports.tokenConditionalSwap = exports.mangoAccountStruct = exports.perpOpenOrderStruct = exports.perpPositionStruct = exports.serum3OrdersStruct = exports.tokenPositionStruct = exports.bankStruct = exports.oracleConfigStruct = exports.stablePriceModelStruct = void 0;
4
4
  const beet_1 = require("@metaplex-foundation/beet");
5
5
  const beet_solana_1 = require("@metaplex-foundation/beet-solana");
6
6
  const solana_1 = require("../../utils/solana");
@@ -159,6 +159,64 @@ exports.mangoAccountStruct = new beet_1.FixableBeetStruct([
159
159
  ['padding7', beet_1.u32],
160
160
  ['perpOpenOrders', (0, beet_1.array)(exports.perpOpenOrderStruct)],
161
161
  ], (args) => args);
162
+ exports.tokenConditionalSwap = new beet_1.FixableBeetStruct([
163
+ ['id', solana_1.u64],
164
+ ['maxBuy', solana_1.u64],
165
+ ['maxSell', solana_1.u64],
166
+ ['bought', solana_1.u64],
167
+ ['sold', solana_1.u64],
168
+ ['expiryTimestamp', solana_1.u64],
169
+ ['priceLowerLimit', solana_1.f64],
170
+ ['priceUpperLimit', solana_1.f64],
171
+ ['pricePremiumRate', solana_1.f64],
172
+ ['takerFeeRate', solana_1.f32],
173
+ ['makerFeeRate', solana_1.f32],
174
+ ['buyTokenIndex', beet_1.u16],
175
+ ['sellTokenIndex', beet_1.u16],
176
+ ['isConfigured', beet_1.u8],
177
+ ['allowCreatingDeposits', beet_1.u8],
178
+ ['allowCreatingBorrows', beet_1.u8],
179
+ ['displayPriceStyle', beet_1.u8],
180
+ ['intention', beet_1.u8],
181
+ ['tcsType', beet_1.u8],
182
+ ['padding', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 6)],
183
+ ['startTimestamp', solana_1.u64],
184
+ ['durationSeconds', solana_1.u64],
185
+ ['reserved', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 88)],
186
+ ], (args) => args);
187
+ exports.boostAccountStruct = new beet_1.FixableBeetStruct([
188
+ ['buffer', (0, solana_1.blob)(8)],
189
+ ['group', beet_solana_1.publicKey],
190
+ ['owner', beet_solana_1.publicKey],
191
+ ['name', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 32)],
192
+ ['delegate', beet_solana_1.publicKey],
193
+ ['accountNum', beet_1.u32],
194
+ ['beingLiquidated', beet_1.u8],
195
+ ['inHealthRegion', beet_1.u8],
196
+ ['bump', beet_1.u8],
197
+ ['padding', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 1)],
198
+ ['netDeposits', solana_1.i64],
199
+ ['perpSpotTransfers', solana_1.i64],
200
+ ['healthRegionBeginInitHealth', solana_1.i64],
201
+ ['frozenUntil', solana_1.u64],
202
+ ['buybackFeesAccruedCurrent', solana_1.u64],
203
+ ['buybackFeesAccruedPrevious', solana_1.u64],
204
+ ['buybackFeesExpiryTimestamp', solana_1.u64],
205
+ ['reserved', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 208)],
206
+ ['headerVersion', beet_1.u8],
207
+ ['padding3', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 7)],
208
+ ['padding4', beet_1.u32],
209
+ ['tokens', (0, beet_1.array)(exports.tokenPositionStruct)],
210
+ ['padding5', beet_1.u32],
211
+ ['serum3', (0, beet_1.array)(exports.serum3OrdersStruct)],
212
+ ['padding6', beet_1.u32],
213
+ ['perps', (0, beet_1.array)(exports.perpPositionStruct)],
214
+ ['padding7', beet_1.u32],
215
+ ['perpOpenOrders', (0, beet_1.array)(exports.perpOpenOrderStruct)],
216
+ ['padding8', beet_1.u32],
217
+ ['tokenConditionalSwaps', (0, beet_1.array)(exports.tokenConditionalSwap)],
218
+ ['reservedDynamic', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 64)],
219
+ ], (args) => args);
162
220
  exports.perpAccountStruct = new beet_1.BeetStruct([
163
221
  ['basePosition', solana_1.i64], // i64
164
222
  ['quotePosition', solana_1.i80f48],
@@ -1 +1 @@
1
- {"version":3,"file":"struct.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/struct.ts"],"names":[],"mappings":";;;AAAA,oDASmC;AACnC,kEAA6D;AAG7D,+CAS4B;AAE5B,gHAAgH;AAEhH,MAAM,UAAU,GAAG,EAAE,CAAC;AACtB,MAAM,SAAS,GAAG,UAAU,GAAG,CAAC,CAAC;AACjC,MAAM,cAAc,GAAG,CAAC,CAAC;AAgBZ,QAAA,sBAAsB,GAAG,IAAI,wBAAiB,CACzD;IACE,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,qBAAqB,EAAE,YAAG,CAAC;IAC5B,CAAC,aAAa,EAAE,IAAA,4BAAqB,EAAC,YAAG,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC,uBAAuB,EAAE,YAAG,CAAC;IAC9B,CAAC,sBAAsB,EAAE,UAAG,CAAC;IAC7B,CAAC,sBAAsB,EAAE,UAAG,CAAC;IAC7B,CAAC,kBAAkB,EAAE,YAAG,CAAC;IACzB,CAAC,mBAAmB,EAAE,YAAG,CAAC;IAC1B,CAAC,wBAAwB,EAAE,SAAE,CAAC;IAC9B,CAAC,SAAS,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;IACzC,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;CAC5C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAwB,CACnC,CAAC;AAQW,QAAA,kBAAkB,GAAG,IAAI,iBAAU,CAC9C;IACE,CAAC,YAAY,EAAE,eAAM,CAAC;IACtB,CAAC,mBAAmB,EAAE,YAAG,CAAC;IAC1B,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;CAC5C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAoB,CAC/B,CAAC;AAmDW,QAAA,UAAU,GAAG,IAA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,WAAW,EAAE,IAAA,4BAAqB,EAAC,uBAAS,EAAE,cAAc,CAAC,CAAC;IAC/D,CAAC,cAAc,EAAE,eAAM,CAAC;IACxB,CAAC,aAAa,EAAE,eAAM,CAAC;IACvB,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,SAAS,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;CAC3C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAgB,CAC3B,CAAC"}
@@ -3,3 +3,9 @@ export type BankEnhanced = Bank & {
3
3
  depositApr?: number;
4
4
  borrowApr?: number;
5
5
  };
6
+ export type BankDetails = {
7
+ mint: string;
8
+ tokenIndex: number;
9
+ depositIndex: string;
10
+ borrowIndex: string;
11
+ };
@@ -18,6 +18,7 @@ const bignumber_js_1 = __importDefault(require("bignumber.js"));
18
18
  const constants_1 = require("./constants");
19
19
  const clients_1 = require("../../utils/clients");
20
20
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
21
+ const amountFactor = new bignumber_js_1.default(Math.pow(10, 36));
21
22
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
22
23
  const client = (0, clients_1.getClientSui)();
23
24
  const borrowedAssets = [];
@@ -31,34 +32,29 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
31
32
  });
32
33
  if (!reservesData)
33
34
  return [];
34
- const reserveById = new Map();
35
- for (const reserve of reservesData) {
36
- reserveById.set(reserve.id.id, reserve);
37
- }
38
- for (const pool of constants_1.poolsInfos) {
39
- const reserve = reserveById.get(pool.reserveData);
40
- if (!reserve)
41
- continue;
42
- const reserveData = reserve.value.fields;
43
- const borrowBalance = yield client.getDynamicFieldObject({
44
- parentId: pool.borrowBalanceParentId,
35
+ const tokenPrices = yield cache.getTokenPricesAsMap(reservesData.map((r) => r.value.fields.coin_type), portfolio_core_1.NetworkId.sui);
36
+ for (const rData of reservesData) {
37
+ const borrowBalancePromise = client.getDynamicFieldObject({
38
+ parentId: rData.value.fields.borrow_balance.fields.user_state.fields.id.id,
45
39
  name: { type: 'address', value: owner },
46
40
  });
47
- const supplyBalance = yield client.getDynamicFieldObject({
48
- parentId: pool.supplyBalanceParentId,
41
+ const supplyBalancePromise = client.getDynamicFieldObject({
42
+ parentId: rData.value.fields.supply_balance.fields.user_state.fields.id.id,
49
43
  name: { type: 'address', value: owner },
50
44
  });
51
- const tokenPrice = yield cache.getTokenPrice(pool.type, portfolio_core_1.NetworkId.sui);
52
- if (!tokenPrice)
53
- continue;
45
+ const [borrowBalance, supplyBalance] = yield Promise.all([
46
+ borrowBalancePromise,
47
+ supplyBalancePromise,
48
+ ]);
49
+ const tokenPrice = tokenPrices.get((0, portfolio_core_1.formatTokenAddress)(rData.value.fields.coin_type, portfolio_core_1.NetworkId.sui));
54
50
  if (!borrowBalance.error && borrowBalance.data) {
55
51
  const borrowInfo = (0, sui_js_1.getObjectFields)(borrowBalance.data);
56
52
  if (borrowInfo.value) {
57
- borrowedAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPrice.address, new bignumber_js_1.default(borrowInfo.value)
58
- .dividedBy(reserveData.current_borrow_index)
59
- .multipliedBy(Math.pow(10, constants_1.indexFactor))
53
+ borrowedAssets.push((0, tokenPriceToAssetToken_1.default)(rData.value.fields.coin_type, new bignumber_js_1.default(borrowInfo.value)
54
+ .times(rData.value.fields.current_borrow_index)
55
+ .dividedBy(amountFactor)
60
56
  .toNumber(), portfolio_core_1.NetworkId.sui, tokenPrice));
61
- const apy = new bignumber_js_1.default(reserveData.current_borrow_rate)
57
+ const apy = new bignumber_js_1.default(rData.value.fields.current_borrow_rate)
62
58
  .dividedBy(Math.pow(10, constants_1.rateFactor))
63
59
  .toNumber();
64
60
  borrowedYields.push([
@@ -72,11 +68,11 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
72
68
  if (!supplyBalance.error && supplyBalance.data) {
73
69
  const supplyInfo = (0, sui_js_1.getObjectFields)(supplyBalance.data);
74
70
  if (supplyInfo.value) {
75
- suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPrice.address, new bignumber_js_1.default(supplyInfo.value)
76
- .dividedBy(reserveData.current_supply_index)
77
- .multipliedBy(Math.pow(10, constants_1.indexFactor))
71
+ suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(rData.value.fields.coin_type, new bignumber_js_1.default(supplyInfo.value)
72
+ .times(rData.value.fields.current_supply_index)
73
+ .dividedBy(amountFactor)
78
74
  .toNumber(), portfolio_core_1.NetworkId.sui, tokenPrice));
79
- const apy = new bignumber_js_1.default(reserveData.current_supply_rate)
75
+ const apy = new bignumber_js_1.default(rData.value.fields.current_supply_rate)
80
76
  .dividedBy(Math.pow(10, constants_1.rateFactor))
81
77
  .toNumber();
82
78
  suppliedYields.push([
@@ -1 +1 @@
1
- {"version":3,"file":"collateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/navi/collateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,2CAAiD;AACjD,gEAAqC;AAGrC,2CAOqB;AACrB,iDAAmD;AACnD,qGAA6E;AAG7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,cAAc,GAAqB,EAAE,CAAC;IAC5C,MAAM,cAAc,GAAc,EAAE,CAAC;IACrC,MAAM,cAAc,GAAqB,EAAE,CAAC;IAC5C,MAAM,cAAc,GAAc,EAAE,CAAC;IACrC,MAAM,YAAY,GAAqB,EAAE,CAAC;IAE1C,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,OAAO,CAAgB,uBAAW,EAAE;QACnE,MAAM,EAAE,0BAAc;QACtB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;IACH,IAAI,CAAC,YAAY;QAAE,OAAO,EAAE,CAAC;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GAAG,CAAC;wBAClB,GAAG;qBACJ;iBACF,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE1E,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,GACxD,IAAA,wCAAuB,EAAC,cAAc,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;IACxE,MAAM,OAAO,GAAqB;QAChC,IAAI,EAAE,qCAAoB,CAAC,UAAU;QACrC,SAAS,EAAE,0BAAS,CAAC,GAAG;QACxB,UAAU,EAAV,sBAAU;QACV,KAAK,EAAE,SAAS;QAChB,KAAK;QACL,IAAI,EAAE;YACJ,cAAc;YACd,aAAa;YACb,cAAc;YACd,cAAc;YACd,aAAa;YACb,cAAc;YACd,eAAe,EAAE,IAAI;YAErB,WAAW;YACX,YAAY;YACZ,KAAK;SACN;KACF,CAAC;IACF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,aAAa;IAC9B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"collateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/navi/collateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,2CAAiD;AACjD,gEAAqC;AAGrC,2CAKqB;AACrB,iDAAmD;AACnD,qGAA6E;AAG7E,MAAM,YAAY,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,EAAE,CAAA,CAAC,CAAC;AAE7C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sB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N;KACF,CAAC;IACF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,aAAa;IAC9B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -4,7 +4,6 @@ export declare const naviPlatform: Platform;
4
4
  export declare const reservesPrefix = "navi";
5
5
  export declare const reservesKey = "reserves";
6
6
  export declare const reserveParentId = "0xe6d4c6610b86ce7735ea754596d71d72d10c7980b5052fc3c8cdf8d09fea9b4b";
7
- export declare const indexFactor = 18;
8
7
  export declare const rateFactor = 27;
9
8
  export declare const poolsInfos: {
10
9
  id: number;