@sonarwatch/portfolio-plugins 0.14.5 → 0.14.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. package/CHANGELOG.md +1616 -1608
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/plugins/balancer/helpers/pools.js +21 -21
  5. package/src/plugins/debridge/dlmmVaultsFetcher.js.map +1 -1
  6. package/src/plugins/lulo/depositsFetcher.js +1 -17
  7. package/src/plugins/lulo/depositsFetcher.js.map +1 -1
  8. package/src/plugins/raydium/ammV2ApiJob.d.ts +3 -0
  9. package/src/plugins/raydium/ammV2ApiJob.js +122 -0
  10. package/src/plugins/raydium/ammV2ApiJob.js.map +1 -0
  11. package/src/plugins/raydium/constants.d.ts +1 -0
  12. package/src/plugins/raydium/constants.js +2 -1
  13. package/src/plugins/raydium/constants.js.map +1 -1
  14. package/src/plugins/raydium/index.js +2 -6
  15. package/src/plugins/raydium/index.js.map +1 -1
  16. package/src/plugins/raydium/lpTokensJob.js +35 -47
  17. package/src/plugins/raydium/lpTokensJob.js.map +1 -1
  18. package/src/plugins/raydium/types.d.ts +57 -0
  19. package/src/plugins/save/constants.d.ts +2 -0
  20. package/src/plugins/save/constants.js +9 -1
  21. package/src/plugins/save/constants.js.map +1 -1
  22. package/src/plugins/save/helpers.d.ts +3 -3
  23. package/src/plugins/save/helpers.js +122 -121
  24. package/src/plugins/save/helpers.js.map +1 -1
  25. package/src/plugins/save/index.js +1 -1
  26. package/src/plugins/save/index.js.map +1 -1
  27. package/src/plugins/save/obligationsFetcher.js +14 -34
  28. package/src/plugins/save/obligationsFetcher.js.map +1 -1
  29. package/src/plugins/sushiswap/helpers.js +24 -24
  30. package/src/plugins/uniswap-v2/helpers.js +22 -22
  31. package/src/plugins/zeta/airdropFetcher.js +14 -14
  32. package/src/utils/elementbuilder/ElementRegistry.js.map +1 -1
  33. package/src/utils/sei/constants.js +8 -8
  34. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -1,4 +1,13 @@
1
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
+ };
2
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
13
  };
@@ -6,10 +15,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
15
  exports.getElementsFromObligations = exports.parseDataflat = exports.getObligationSeed = exports.upperFirst = void 0;
7
16
  const beet_1 = require("@metaplex-foundation/beet");
8
17
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
18
+ const web3_js_1 = require("@solana/web3.js");
9
19
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
10
20
  const structs_1 = require("./structs");
11
21
  const constants_1 = require("./constants");
12
- const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
22
+ const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
13
23
  const upperFirst = (string) => string ? string.charAt(0).toUpperCase() + string.slice(1) : '';
14
24
  exports.upperFirst = upperFirst;
15
25
  function getObligationSeed(marketAddress, accountId) {
@@ -34,132 +44,123 @@ const parseDataflat = (dataFlat, depositsLen, borrowsLen) => {
34
44
  };
35
45
  };
36
46
  exports.parseDataflat = parseDataflat;
37
- function getElementsFromObligations(obligations, reserveByAddress, marketByAddress, tokenPriceByAddress, pythAccountByAddress) {
38
- const elements = [];
39
- for (let i = 0; i < obligations.length; i += 1) {
40
- const obligation = obligations[i];
41
- if (!obligation)
42
- continue;
43
- const market = marketByAddress.get(obligation.lendingMarket.toString());
44
- if (!market)
45
- continue;
46
- const { depositsMap, borrowsMap } = (0, exports.parseDataflat)(obligation.dataFlat, obligation.depositsLen, obligation.borrowsLen);
47
- if (depositsMap.size === 0 && borrowsMap.size === 0)
48
- continue;
49
- const borrowedAssets = [];
50
- const borrowedYields = [];
51
- const suppliedAssets = [];
52
- const suppliedYields = [];
53
- const rewardAssets = [];
54
- const suppliedLtvs = [];
55
- const borrowedWeights = [];
56
- for (let j = 0; j < market.reserves.length; j += 1) {
57
- const { address: reserveAddress } = market.reserves[j];
58
- const reserveInfo = reserveByAddress.get(reserveAddress);
59
- if (!reserveInfo)
47
+ function getElementsFromObligations(obligations, reserveByAddress, marketByAddress, owner, cache) {
48
+ return __awaiter(this, void 0, void 0, function* () {
49
+ const obligationAddressesRelatedToSavePlatform = yield getObligationAddressesRelatedToSavePlatform(owner, marketByAddress);
50
+ const elementRegistrySave = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
51
+ const elementRegistryDumpy = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformDumpyId);
52
+ for (let i = 0; i < obligations.length; i += 1) {
53
+ const obligation = obligations[i];
54
+ if (!obligation)
60
55
  continue;
61
- const { reserve } = reserveInfo;
62
- const { liquidity, collateral } = reserve;
63
- const lMint = liquidity.mintPubkey;
64
- const lTokenPrice = tokenPriceByAddress.get(lMint);
65
- let price;
66
- if (!lTokenPrice) {
56
+ const market = marketByAddress.get(obligation.lendingMarket.toString());
57
+ if (!market)
67
58
  continue;
68
- // const pythOracle = new PublicKey(reserve.liquidity.pythOracle);
69
- // const pythAccount = pythAccountByAddress.get(pythOracle.toString());
70
- // console.log('Account', pythAccount?.data.byteLength);
71
- // const pythPrice = pythAccount
72
- // ? parsePriceData(pythAccount.data)
73
- // : undefined;
74
- // if (pythPrice) price = pythPrice.price;
75
- }
76
- const decimals = liquidity.mintDecimals;
77
- const reserveBorrowAmount = new bignumber_js_1.default(liquidity.borrowedAmountWads)
78
- .dividedBy(Math.pow(10, (constants_1.wadsDecimal + decimals)))
79
- .toNumber();
80
- const reserveAvailableAmount = new bignumber_js_1.default(liquidity.availableAmount)
81
- .dividedBy(Math.pow(10, decimals))
82
- .toNumber();
83
- const collateralSupply = new bignumber_js_1.default(collateral.mintTotalSupply)
84
- .dividedBy(Math.pow(10, decimals))
85
- .toNumber();
86
- const reserveDepositAmount = reserveBorrowAmount + reserveAvailableAmount;
87
- // Deposit
88
- const deposit = depositsMap.get(reserveAddress);
89
- if (deposit) {
90
- if (!deposit.depositedAmount.isZero()) {
91
- const suppliedAmount = deposit.depositedAmount
92
- .div(Math.pow(10, decimals))
93
- .times(reserveDepositAmount / collateralSupply)
94
- .toNumber();
95
- suppliedLtvs.push(reserve.config.liquidationThreshold / 100);
96
- const apy = +reserveInfo.rates.supplyInterest / 100;
97
- const cSuppliedYields = [
98
- {
99
- apr: (0, portfolio_core_1.apyToApr)(apy),
100
- apy,
101
- },
102
- ];
103
- suppliedYields.push(cSuppliedYields);
104
- suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(lMint, suppliedAmount, portfolio_core_1.NetworkId.solana, lTokenPrice, price));
59
+ const { depositsMap, borrowsMap } = (0, exports.parseDataflat)(obligation.dataFlat, obligation.depositsLen, obligation.borrowsLen);
60
+ if (depositsMap.size === 0 && borrowsMap.size === 0)
61
+ continue;
62
+ const element = (obligationAddressesRelatedToSavePlatform === null || obligationAddressesRelatedToSavePlatform === void 0 ? void 0 : obligationAddressesRelatedToSavePlatform.includes(obligation.pubkey.toString()))
63
+ ? elementRegistrySave.addElementBorrowlend({
64
+ label: 'Lending',
65
+ })
66
+ : elementRegistryDumpy.addElementBorrowlend({
67
+ label: 'Lending',
68
+ });
69
+ for (let j = 0; j < market.reserves.length; j += 1) {
70
+ const { address: reserveAddress } = market.reserves[j];
71
+ const reserveInfo = reserveByAddress.get(reserveAddress);
72
+ if (!reserveInfo)
73
+ continue;
74
+ const { reserve } = reserveInfo;
75
+ const { liquidity, collateral } = reserve;
76
+ const lMint = liquidity.mintPubkey;
77
+ const decimals = liquidity.mintDecimals;
78
+ const reserveBorrowAmount = new bignumber_js_1.default(liquidity.borrowedAmountWads)
79
+ .dividedBy(Math.pow(10, (constants_1.wadsDecimal + decimals)))
80
+ .toNumber();
81
+ const reserveAvailableAmount = new bignumber_js_1.default(liquidity.availableAmount)
82
+ .dividedBy(Math.pow(10, decimals))
83
+ .toNumber();
84
+ const collateralSupply = new bignumber_js_1.default(collateral.mintTotalSupply)
85
+ .dividedBy(Math.pow(10, decimals))
86
+ .toNumber();
87
+ const reserveDepositAmount = reserveBorrowAmount + reserveAvailableAmount;
88
+ // Deposit
89
+ const deposit = depositsMap.get(reserveAddress);
90
+ if (deposit) {
91
+ if (!deposit.depositedAmount.isZero()) {
92
+ const suppliedAmount = deposit.depositedAmount
93
+ .div(Math.pow(10, decimals))
94
+ .times(reserveDepositAmount / collateralSupply)
95
+ .toNumber();
96
+ element.addSuppliedLtv(reserve.config.liquidationThreshold / 100);
97
+ const apy = +reserveInfo.rates.supplyInterest / 100;
98
+ const cSuppliedYields = [
99
+ {
100
+ apr: (0, portfolio_core_1.apyToApr)(apy),
101
+ apy,
102
+ },
103
+ ];
104
+ element.addSuppliedYield(cSuppliedYields);
105
+ element.addSuppliedAsset({
106
+ address: lMint,
107
+ amount: suppliedAmount,
108
+ alreadyShifted: true,
109
+ });
110
+ }
105
111
  }
106
- }
107
- // Borrow
108
- const borrow = borrowsMap.get(reserveAddress);
109
- if (borrow) {
110
- if (!borrow.borrowedAmountWads.isZero()) {
111
- const borrowedAmount = borrow.borrowedAmountWads
112
- .times(new bignumber_js_1.default(liquidity.cumulativeBorrowRateWads))
113
- .div(borrow.cumulativeBorrowRateWads)
114
- .dividedBy(new bignumber_js_1.default(Math.pow(10, (constants_1.wadsDecimal + decimals))))
115
- .toNumber();
116
- borrowedWeights.push(new bignumber_js_1.default(reserve.config.addedBorrowWeightBPS)
117
- .dividedBy(Math.pow(10, 4))
118
- .plus(1)
119
- .toNumber());
120
- const apy = +reserveInfo.rates.borrowInterest / 100;
121
- const cBorrowedYields = [
122
- {
123
- apr: -(0, portfolio_core_1.apyToApr)(apy),
124
- apy: -apy,
125
- },
126
- ];
127
- borrowedYields.push(cBorrowedYields);
128
- borrowedAssets.push((0, tokenPriceToAssetToken_1.default)(lMint, borrowedAmount, portfolio_core_1.NetworkId.solana, lTokenPrice, price));
112
+ // Borrow
113
+ const borrow = borrowsMap.get(reserveAddress);
114
+ if (borrow) {
115
+ if (!borrow.borrowedAmountWads.isZero()) {
116
+ const borrowedAmount = borrow.borrowedAmountWads
117
+ .times(new bignumber_js_1.default(liquidity.cumulativeBorrowRateWads))
118
+ .div(borrow.cumulativeBorrowRateWads)
119
+ .dividedBy(new bignumber_js_1.default(Math.pow(10, (constants_1.wadsDecimal + decimals))))
120
+ .toNumber();
121
+ element.addBorrowedWeight(new bignumber_js_1.default(reserve.config.addedBorrowWeightBPS)
122
+ .dividedBy(Math.pow(10, 4))
123
+ .plus(1)
124
+ .toNumber());
125
+ const apy = +reserveInfo.rates.borrowInterest / 100;
126
+ const cBorrowedYields = [
127
+ {
128
+ apr: -(0, portfolio_core_1.apyToApr)(apy),
129
+ apy: -apy,
130
+ },
131
+ ];
132
+ element.addBorrowedYield(cBorrowedYields);
133
+ element.addSuppliedAsset({
134
+ address: lMint,
135
+ amount: borrowedAmount,
136
+ alreadyShifted: true,
137
+ });
138
+ }
129
139
  }
130
140
  }
131
141
  }
132
- if (suppliedAssets.length === 0 && borrowedAssets.length === 0)
133
- continue;
134
- const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({
135
- suppliedAssets,
136
- borrowedAssets,
137
- rewardAssets,
138
- suppliedLtvs,
139
- borrowedWeights,
140
- });
141
- elements.push({
142
- type: portfolio_core_1.PortfolioElementType.borrowlend,
143
- networkId: portfolio_core_1.NetworkId.solana,
144
- platformId: constants_1.platformId,
145
- label: 'Lending',
146
- value,
147
- name: market.name,
148
- data: {
149
- borrowedAssets,
150
- borrowedValue,
151
- borrowedYields,
152
- suppliedAssets,
153
- suppliedValue,
154
- suppliedYields,
155
- healthRatio,
156
- rewardAssets,
157
- rewardValue,
158
- value,
159
- },
160
- });
161
- }
162
- return elements;
142
+ const dumpyElements = yield elementRegistryDumpy.getElements(cache);
143
+ const saveElements = yield elementRegistrySave.getElements(cache);
144
+ return [...dumpyElements, ...saveElements];
145
+ });
163
146
  }
164
147
  exports.getElementsFromObligations = getElementsFromObligations;
148
+ const getObligationAddressesRelatedToSavePlatform = (owner, marketsByAddress) => __awaiter(void 0, void 0, void 0, function* () {
149
+ const obligationAddressesRelatedToSavePlatform = [];
150
+ for (const marketInfo of marketsByAddress.values()) {
151
+ if (!marketInfo)
152
+ continue;
153
+ const seeds = [
154
+ getObligationSeed(marketInfo.address, 0),
155
+ getObligationSeed(marketInfo.address, 1),
156
+ getObligationSeed(marketInfo.address, 2),
157
+ ];
158
+ for (let i = 0; i < seeds.length; i += 1) {
159
+ const seed = seeds[i];
160
+ const obligationAddress = yield web3_js_1.PublicKey.createWithSeed(new web3_js_1.PublicKey(owner), seed, constants_1.pid);
161
+ obligationAddressesRelatedToSavePlatform.push(obligationAddress.toString());
162
+ }
163
+ }
164
+ return obligationAddressesRelatedToSavePlatform;
165
+ });
165
166
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/save/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAkE;AAClE,+DASoC;AAEpC,gEAAqC;AACrC,uCAImB;AAGnB,2CAAsD;AACtD,qGAA6E;AAGtE,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,EAAE,CAC3C,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC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AAC,CAAC;IAC7C,CAAC;CAAA;AAhID,gEAgIC;AAED,MAAM,2CAA2C,GAAG,CAClD,KAAa,EACb,gBAAyC,EACzC,EAAE;IACF,MAAM,wCAAwC,GAAa,EAAE,CAAC;IAC9D,KAAK,MAAM,UAAU,IAAI,gBAAgB,CAAC,MAAM,EAAE,EAAE,CAAC;QACnD,IAAI,CAAC,UAAU;YAAE,SAAS;QAC1B,MAAM,KAAK,GAAG;YACZ,iBAAiB,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;YACxC,iBAAiB,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;YACxC,iBAAiB,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;SACzC,CAAC;QACF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACtB,MAAM,iBAAiB,GAAG,MAAM,mBAAS,CAAC,cAAc,CACtD,IAAI,mBAAS,CAAC,KAAK,CAAC,EACpB,IAAI,EACJ,eAAG,CACJ,CAAC;YACF,wCAAwC,CAAC,IAAI,CAC3C,iBAAiB,CAAC,QAAQ,EAAE,CAC7B,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,wCAAwC,CAAC;AAClD,CAAC,CAAA,CAAC"}
@@ -11,7 +11,7 @@ const constants_1 = require("./constants");
11
11
  const rewardsFetcher_1 = __importDefault(require("./rewardsFetcher"));
12
12
  const rewardStatsJob_1 = __importDefault(require("./rewardStatsJob"));
13
13
  const token2022wrapperJob_1 = __importDefault(require("./token2022wrapperJob"));
14
- exports.platforms = [constants_1.platform];
14
+ exports.platforms = [constants_1.platform, constants_1.platformDumpy];
15
15
  exports.jobs = [
16
16
  marketsJob_1.default,
17
17
  reservesJob_1.default,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/save/index.ts"],"names":[],"mappings":";;;;;;AAGA,gEAAwC;AACxC,8DAAsC;AACtC,8EAAqD;AACrD,2CAAuC;AACvC,sEAA8C;AAC9C,sEAA8C;AAC9C,gFAAwD;AAE3C,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU;IACzB,oBAAU;IACV,qBAAW;IACX,wBAAc;IACd,6BAAmB;CACpB,CAAC;AACW,QAAA,QAAQ,GAAc,CAAC,4BAAiB,EAAE,wBAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/save/index.ts"],"names":[],"mappings":";;;;;;AAGA,gEAAwC;AACxC,8DAAsC;AACtC,8EAAqD;AACrD,2CAAsD;AACtD,sEAA8C;AAC9C,sEAA8C;AAC9C,gFAAwD;AAE3C,QAAA,SAAS,GAAe,CAAC,oBAAQ,EAAE,yBAAa,CAAC,CAAC;AAClD,QAAA,IAAI,GAAU;IACzB,oBAAU;IACV,qBAAW;IACX,wBAAc;IACd,6BAAmB;CACpB,CAAC;AACW,QAAA,QAAQ,GAAc,CAAC,4BAAiB,EAAE,wBAAc,CAAC,CAAC"}
@@ -10,16 +10,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
- const web3_js_1 = require("@solana/web3.js");
14
13
  const constants_1 = require("./constants");
15
14
  const helpers_1 = require("./helpers");
16
15
  const solana_1 = require("../../utils/solana");
17
16
  const clients_1 = require("../../utils/clients");
18
17
  const structs_1 = require("./structs");
19
- const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
20
18
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
21
19
  const client = (0, clients_1.getClientSolana)();
22
- const obligationAddresses = [];
20
+ const obligationsRaw = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.obligationStruct, constants_1.pid, [
21
+ {
22
+ dataSize: 1300,
23
+ },
24
+ {
25
+ memcmp: {
26
+ offset: 42,
27
+ bytes: owner,
28
+ },
29
+ },
30
+ ]);
31
+ if (!obligationsRaw.length)
32
+ return [];
23
33
  const markets = yield cache.getItem(constants_1.marketsKey, {
24
34
  prefix: constants_1.platformId,
25
35
  networkId: portfolio_core_1.NetworkId.solana,
@@ -31,23 +41,6 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
31
41
  if (market)
32
42
  marketsByAddress.set(market.address.toString(), market);
33
43
  });
34
- for (const marketInfo of marketsByAddress.values()) {
35
- if (!marketInfo)
36
- continue;
37
- const seeds = [
38
- (0, helpers_1.getObligationSeed)(marketInfo.address, 0),
39
- (0, helpers_1.getObligationSeed)(marketInfo.address, 1),
40
- (0, helpers_1.getObligationSeed)(marketInfo.address, 2),
41
- ];
42
- for (let i = 0; i < seeds.length; i += 1) {
43
- const seed = seeds[i];
44
- const obligationAddress = yield web3_js_1.PublicKey.createWithSeed(new web3_js_1.PublicKey(owner), seed, constants_1.pid);
45
- obligationAddresses.push(obligationAddress);
46
- }
47
- }
48
- const obligationsRaw = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, structs_1.obligationStruct, obligationAddresses);
49
- if (obligationsRaw.length === 0)
50
- return [];
51
44
  const obligations = [];
52
45
  const reserveAddresses = new Set();
53
46
  obligationsRaw.forEach((obligation) => {
@@ -70,25 +63,12 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
70
63
  if (!reservesInfos)
71
64
  return [];
72
65
  const reserveByAddress = new Map();
73
- const mints = new Set();
74
- const pythAddresses = [];
75
66
  reservesInfos.forEach((reserveInfo) => {
76
67
  if (!reserveInfo)
77
68
  return;
78
- mints.add(reserveInfo.reserve.liquidity.mintPubkey);
79
69
  reserveByAddress.set(reserveInfo.pubkey, reserveInfo);
80
- pythAddresses.push(new web3_js_1.PublicKey(reserveInfo.reserve.liquidity.pythOracle));
81
70
  });
82
- const tokenPriceByAddress = yield cache.getTokenPricesAsMap(Array.from(mints), portfolio_core_1.NetworkId.solana);
83
- const pythAccounts = yield (0, getMultipleAccountsInfoSafe_1.getMultipleAccountsInfoSafe)(client, pythAddresses);
84
- const pythAccByAddress = new Map();
85
- for (let i = 0; i < pythAddresses.length; i++) {
86
- const account = pythAccounts[i];
87
- if (account === null)
88
- continue;
89
- pythAccByAddress.set(pythAddresses[i].toString(), account);
90
- }
91
- return (0, helpers_1.getElementsFromObligations)(obligations, reserveByAddress, marketsByAddress, tokenPriceByAddress, pythAccByAddress);
71
+ return (0, helpers_1.getElementsFromObligations)(obligations, reserveByAddress, marketsByAddress, owner, cache);
92
72
  });
93
73
  const fetcher = {
94
74
  id: `${constants_1.platformId}-obligations`,
@@ -1 +1 @@
1
- {"version":3,"file":"obligationsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/save/obligationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAAyD;AAGzD,2CAA0E;AAC1E,uCAA0E;AAE1E,+CAG4B;AAC5B,iDAAsD;AACtD,uCAAyD;AACzD,gGAA6F;AAE7F,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,mBAAmB,GAAgB,EAAE,CAAC;IAE5C,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,CAAe,sBAAU,EAAE;QAC5D,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IAExB,MAAM,gBAAgB,GAA4B,IAAI,GAAG,EAAE,CAAC;IAC5D,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE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,CAAC,MAAM,CACjB,CAAC;IAEF,MAAM,YAAY,GAAG,MAAM,IAAA,yDAA2B,EAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC9E,MAAM,gBAAgB,GAAqC,IAAI,GAAG,EAAE,CAAC;IACrE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9C,MAAM,OAAO,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QAChC,IAAI,OAAO,KAAK,IAAI;YAAE,SAAS;QAE/B,gBAAgB,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,IAAA,oCAA0B,EAC/B,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,CACjB,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"obligationsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/save/obligationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAA0E;AAC1E,uCAAuD;AAEvD,+CAA6E;AAC7E,iDAAsD;AACtD,uCAAyD;AAEzD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,cAAc,GAAG,MAAM,IAAA,iCAAwB,EACnD,MAAM,EACN,0BAAgB,EAChB,eAAG,EACH;QACE;YACE,QAAQ,EAAE,IAAI;SACf;QACD;YACE,MAAM,EAAE;gBACN,MAAM,EAA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C,IAAI,CAAC,gBAAgB,CAAC,EAC5B;QACE,MAAM,EAAE,0BAAc;QACtB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CACF,CAAC;IACF,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,CAAC;IAE9B,MAAM,gBAAgB,GAA6B,IAAI,GAAG,EAAE,CAAC;IAC7D,aAAa,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;QACpC,IAAI,CAAC,WAAW;YAAE,OAAO;QAEzB,gBAAgB,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,OAAO,IAAA,oCAA0B,EAC/B,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,EACL,KAAK,CACN,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -54,30 +54,30 @@ function sushiV3PairToUniV2(pair) {
54
54
  }
55
55
  function getV3PairsAddresses(url, length = 300) {
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
- const query = (0, graphql_request_1.gql) `
58
- {
59
- pools(
60
- orderBy: totalValueLockedUSD
61
- first: ${length}
62
- orderDirection: desc
63
- where: { volumeUSD_not: "0", liquidity_not: "0" }
64
- ) {
65
- id
66
- token0Price
67
- token1Price
68
- liquidity
69
- token0 {
70
- id
71
- totalSupply
72
- decimals
73
- }
74
- token1 {
75
- id
76
- totalSupply
77
- decimals
78
- }
79
- }
80
- }
57
+ const query = (0, graphql_request_1.gql) `
58
+ {
59
+ pools(
60
+ orderBy: totalValueLockedUSD
61
+ first: ${length}
62
+ orderDirection: desc
63
+ where: { volumeUSD_not: "0", liquidity_not: "0" }
64
+ ) {
65
+ id
66
+ token0Price
67
+ token1Price
68
+ liquidity
69
+ token0 {
70
+ id
71
+ totalSupply
72
+ decimals
73
+ }
74
+ token1 {
75
+ id
76
+ totalSupply
77
+ decimals
78
+ }
79
+ }
80
+ }
81
81
  `;
82
82
  const res = yield (0, graphql_request_1.default)(url, query);
83
83
  const pools = res.pools;
@@ -40,28 +40,28 @@ function getPairKey(version) {
40
40
  exports.getPairKey = getPairKey;
41
41
  function getPairsV2FromTheGraph(url, length = 300) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
43
- const query = (0, graphql_request_1.gql) `
44
- {
45
- pairs(
46
- orderBy: reserveUSD
47
- first: ${length}
48
- orderDirection: desc
49
- where: { trackedReserveETH_not: "0" }
50
- ) {
51
- id
52
- reserve0
53
- reserve1
54
- totalSupply
55
- token0 {
56
- id
57
- decimals
58
- }
59
- token1 {
60
- id
61
- decimals
62
- }
63
- }
64
- }
43
+ const query = (0, graphql_request_1.gql) `
44
+ {
45
+ pairs(
46
+ orderBy: reserveUSD
47
+ first: ${length}
48
+ orderDirection: desc
49
+ where: { trackedReserveETH_not: "0" }
50
+ ) {
51
+ id
52
+ reserve0
53
+ reserve1
54
+ totalSupply
55
+ token0 {
56
+ id
57
+ decimals
58
+ }
59
+ token1 {
60
+ id
61
+ decimals
62
+ }
63
+ }
64
+ }
65
65
  `;
66
66
  const res = yield (0, graphql_request_1.default)(url, query);
67
67
  const pairs = res.pairs;
@@ -42,20 +42,20 @@ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/token
42
42
  const clients_1 = require("../../utils/clients");
43
43
  const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
44
44
  const helpers_1 = require("./helpers");
45
- const query = (0, graphql_request_1.gql) `
46
- query GetAirdropFinalFrontend($authority: String!) {
47
- getAirdropFinalFrontend(authority: $authority) {
48
- authority
49
- community_allocation
50
- eligibility
51
- main_allocation
52
- og_allocation
53
- s1_allocation
54
- s2_allocation
55
- total_allocation
56
- __typename
57
- }
58
- }
45
+ const query = (0, graphql_request_1.gql) `
46
+ query GetAirdropFinalFrontend($authority: String!) {
47
+ getAirdropFinalFrontend(authority: $authority) {
48
+ authority
49
+ community_allocation
50
+ eligibility
51
+ main_allocation
52
+ og_allocation
53
+ s1_allocation
54
+ s2_allocation
55
+ total_allocation
56
+ __typename
57
+ }
58
+ }
59
59
  `;
60
60
  const networkId = portfolio_core_1.NetworkId.solana;
61
61
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -1 +1 @@
1
- {"version":3,"file":"ElementRegistry.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementRegistry.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAMoC;AAIpC,qEAAkE;AAClE,uEAAoE;AACpE,yEAAsE;AACtE,qEAAkE;AAElE,MAAa,eAAe;IAK1B,YAAY,SAAwB,EAAE,UAAkB;QACtD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACrB,CAAC;IACD,kBAAkB,CAChB,MAAmC;QAEnC,MAAM,cAAc,GAAG,IAAI,+CAAsB,iBAC/C,IAAI,EAAE,qCAAoB,CAAC,QAAQ,IAChC,MAAM,EACT,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACnC,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,mBAAmB,CACjB,MAAmC;QAEnC,MAAM,cAAc,GAAG,IAAI,iDAAuB,iBAChD,IAAI,EAAE,qCAAoB,CAAC,SAAS,IACjC,MAAM,EACT,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACnC,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,oBAAoB,CAClB,MAAmC;QAEnC,MAAM,cAAc,GAAG,IAAI,mDAAwB,iBACjD,IAAI,EAAE,qCAAoB,CAAC,UAAU,IAClC,MAAM,EACT,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACnC,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,kBAAkB,CAChB,MAAmC;QAEnC,MAAM,cAAc,GAAG,IAAI,+CAAsB,iBAC/C,IAAI,EAAE,qCAAoB,CAAC,QAAQ,IAChC,MAAM,EACT,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACnC,OAAO,cAAc,CAAC;IACxB,CAAC;IAEK,WAAW,CAAC,KAAY;;YAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;YACzD,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAE3E,OAAO,IAAI,CAAC,QAAQ;iBACjB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;iBAC/D,MAAM,CACL,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CACtB,CAAC;QAC5B,CAAC;KAAA;CACF;AAhED,0CAgEC"}
1
+ {"version":3,"file":"ElementRegistry.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementRegistry.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAIoC;AAIpC,qEAAkE;AAClE,uEAAoE;AACpE,yEAAsE;AACtE,qEAAkE;AAElE,MAAa,eAAe;IAK1B,YAAY,SAAwB,EAAE,UAAkB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WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAE3E,OAAO,IAAI,CAAC,QAAQ;iBACjB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;iBAC/D,MAAM,CACL,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CACtB,CAAC;QAC5B,CAAC;KAAA;CACF;AAhED,0CAgEC"}
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.poolQueryMsg = exports.minterQueryMsg = exports.tokenInfoQueryMsg = exports.infoQueryMsg = void 0;
4
- exports.infoQueryMsg = JSON.parse(`{
5
- "info": {}
4
+ exports.infoQueryMsg = JSON.parse(`{
5
+ "info": {}
6
6
  }`);
7
- exports.tokenInfoQueryMsg = JSON.parse(`{
8
- "token_info": {}
7
+ exports.tokenInfoQueryMsg = JSON.parse(`{
8
+ "token_info": {}
9
9
  }`);
10
- exports.minterQueryMsg = JSON.parse(`{
11
- "minter": {}
10
+ exports.minterQueryMsg = JSON.parse(`{
11
+ "minter": {}
12
12
  }`);
13
- exports.poolQueryMsg = JSON.parse(`{
14
- "pool": {}
13
+ exports.poolQueryMsg = JSON.parse(`{
14
+ "pool": {}
15
15
  }`);
16
16
  //# sourceMappingURL=constants.js.map
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  function getQueryBalanceByOwner(owner) {
4
- return JSON.parse(`{
5
- "balance": {
6
- "address": "${owner}"
7
- }
4
+ return JSON.parse(`{
5
+ "balance": {
6
+ "address": "${owner}"
7
+ }
8
8
  }`);
9
9
  }
10
10
  exports.default = getQueryBalanceByOwner;