@sonarwatch/portfolio-plugins 0.11.121 → 0.11.122
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1211 -1207
- package/README.md +3 -3
- package/package.json +2 -2
- package/src/plugins/aftermath/poolsJob.js +1 -1
- package/src/plugins/aftermath/poolsJob.js.map +1 -1
- package/src/plugins/aries/constants.d.ts +1 -0
- package/src/plugins/aries/constants.js +2 -1
- package/src/plugins/aries/constants.js.map +1 -1
- package/src/plugins/aries/depositsFetcher.js +16 -0
- package/src/plugins/aries/depositsFetcher.js.map +1 -1
- package/src/plugins/aries/helpers.d.ts +4 -0
- package/src/plugins/aries/helpers.js +39 -1
- package/src/plugins/aries/helpers.js.map +1 -1
- package/src/plugins/aries/index.js +2 -1
- package/src/plugins/aries/index.js.map +1 -1
- package/src/plugins/aries/reservesJob.d.ts +3 -0
- package/src/plugins/aries/reservesJob.js +64 -0
- package/src/plugins/aries/reservesJob.js.map +1 -0
- package/src/plugins/aries/types.d.ts +53 -0
- package/src/plugins/auxexchange/aptosLpJob.js +1 -1
- package/src/plugins/auxexchange/aptosLpJob.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/fluxbeam/poolsJob.js +1 -1
- package/src/plugins/fluxbeam/poolsJob.js.map +1 -1
- package/src/plugins/jupiter/helpers.d.ts +1 -0
- package/src/plugins/jupiter/helpers.js +30 -1
- package/src/plugins/jupiter/helpers.js.map +1 -1
- package/src/plugins/jupiter/types.d.ts +10 -0
- package/src/plugins/lifinity/constants.d.ts +2 -0
- package/src/plugins/lifinity/constants.js +3 -1
- package/src/plugins/lifinity/constants.js.map +1 -1
- package/src/plugins/lifinity/index.js +2 -1
- package/src/plugins/lifinity/index.js.map +1 -1
- package/src/plugins/lifinity/xLfntyJob.d.ts +3 -0
- package/src/plugins/lifinity/xLfntyJob.js +43 -0
- package/src/plugins/lifinity/xLfntyJob.js.map +1 -0
- package/src/plugins/liquiditypools-sei/job.js +1 -1
- package/src/plugins/liquiditypools-sei/job.js.map +1 -1
- package/src/plugins/meteora/poolsJob.js +33 -46
- package/src/plugins/meteora/poolsJob.js.map +1 -1
- package/src/plugins/orca/lpTokensJob.js +1 -1
- package/src/plugins/orca/lpTokensJob.js.map +1 -1
- package/src/plugins/pancakeswap/aptosLpJob.js +1 -1
- package/src/plugins/pancakeswap/aptosLpJob.js.map +1 -1
- package/src/plugins/raydium/lpTokensJob.js +1 -1
- package/src/plugins/raydium/lpTokensJob.js.map +1 -1
- package/src/plugins/suilend/marketsJob.js +1 -1
- package/src/plugins/suilend/marketsJob.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/utils/misc/getLpUnderlyingTokenSource.d.ts +1 -1
- package/src/utils/misc/getLpUnderlyingTokenSource.js +1 -1
- package/src/utils/misc/getLpUnderlyingTokenSource.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -0,0 +1,43 @@
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
|
+
const web3_js_1 = require("@solana/web3.js");
|
14
|
+
const constants_1 = require("./constants");
|
15
|
+
const helpers_1 = require("../jupiter/helpers");
|
16
|
+
const constants_2 = require("../tokens/constants");
|
17
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
18
|
+
const prices = yield (0, helpers_1.getPrices)([new web3_js_1.PublicKey(constants_1.xLfntyMint)], new web3_js_1.PublicKey(constants_1.lfntyMint));
|
19
|
+
const price = prices.get(constants_1.xLfntyMint);
|
20
|
+
if (!price)
|
21
|
+
return;
|
22
|
+
const lfntyTokenPrice = yield cache.getTokenPrice(constants_1.lfntyMint, portfolio_core_1.NetworkId.solana);
|
23
|
+
if (!lfntyTokenPrice)
|
24
|
+
return;
|
25
|
+
const source = {
|
26
|
+
address: constants_1.xLfntyMint,
|
27
|
+
decimals: constants_1.xLfntyDecimals,
|
28
|
+
id: 'jupiter-api',
|
29
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
30
|
+
timestamp: Date.now(),
|
31
|
+
price: price * lfntyTokenPrice.price,
|
32
|
+
platformId: constants_2.walletTokensPlatform.id,
|
33
|
+
weight: 0.5,
|
34
|
+
};
|
35
|
+
yield cache.setTokenPriceSource(source);
|
36
|
+
});
|
37
|
+
const job = {
|
38
|
+
id: `${constants_1.platformId}-xlfnty`,
|
39
|
+
executor,
|
40
|
+
label: 'normal',
|
41
|
+
};
|
42
|
+
exports.default = job;
|
43
|
+
//# sourceMappingURL=xLfntyJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"xLfntyJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/lifinity/xLfntyJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAyE;AACzE,6CAA4C;AAG5C,2CAAgF;AAChF,gDAA+C;AAC/C,mDAA2D;AAE3D,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,MAAM,IAAA,mBAAS,EAC5B,CAAC,IAAI,mBAAS,CAAC,sBAAU,CAAC,CAAC,EAC3B,IAAI,mBAAS,CAAC,qBAAS,CAAC,CACzB,CAAC;IACF,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,sBAAU,CAAC,CAAC;IACrC,IAAI,CAAC,KAAK;QAAE,OAAO;IACnB,MAAM,eAAe,GAAG,MAAM,KAAK,CAAC,aAAa,CAC/C,qBAAS,EACT,0BAAS,CAAC,MAAM,CACjB,CAAC;IACF,IAAI,CAAC,eAAe;QAAE,OAAO;IAE7B,MAAM,MAAM,GAAqB;QAC/B,OAAO,EAAE,sBAAU;QACnB,QAAQ,EAAE,0BAAc;QACxB,EAAE,EAAE,aAAa;QACjB,SAAS,EAAE,0BAAS,CAAC,MAAM;QAC3B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;QACrB,KAAK,EAAE,KAAK,GAAG,eAAe,CAAC,KAAK;QACpC,UAAU,EAAE,gCAAoB,CAAC,EAAE;QACnC,MAAM,EAAE,GAAG;KACZ,CAAC;IACF,MAAM,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAC1C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -64,7 +64,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
64
64
|
];
|
65
65
|
if (!decimalsX || !decimalsY)
|
66
66
|
continue;
|
67
|
-
const underlyingSource = (0, getLpUnderlyingTokenSource_1.default)(lpContract,
|
67
|
+
const underlyingSource = (0, getLpUnderlyingTokenSource_1.default)(lpContract, portfolio_core_1.NetworkId.sei, {
|
68
68
|
address: poolInfo.mintX,
|
69
69
|
decimals: decimalsX,
|
70
70
|
reserveAmountRaw: reserveAmountRawX,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"job.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/liquiditypools-sei/job.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,uCAAiD;AACjD,+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CAAC,UAAU,EAAE;oBACxC,GAAG,eAAe;oBAClB,UAAU;iBACX,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,yBAAyB,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;YAC1D,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK,MAAM,QAAQ,IAAI,yBAAyB,CAAC,IAAI,EAAE,EAAE,CAAC;QACxD,MAAM,SAAS,GAAG,yBAAyB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC1D,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QACnD,MAAM,KAAK,CAAC,OAAO,CACjB,QAAQ,EACR,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,EAC3B;YACE,MAAM,EAAE,oBAAQ;YAChB,SAAS,EAAE,0BAAS,CAAC,GAAG;SACzB,CACF,CAAC;IACJ,CAAC;AACH,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,oBAAQ;IACZ,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -23,6 +23,7 @@ const fetchTokenSupplyAndDecimals_1 = require("../../utils/solana/fetchTokenSupp
|
|
23
23
|
const struct_1 = require("./struct");
|
24
24
|
const filters_1 = require("./filters");
|
25
25
|
const getTokensPricesMap_1 = __importDefault(require("../../utils/misc/getTokensPricesMap"));
|
26
|
+
const getLpTokenSourceRaw_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRaw"));
|
26
27
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
27
28
|
const client = (0, clients_1.getClientSolana)();
|
28
29
|
// Get all 2-tokens pool (permissionless)
|
@@ -78,11 +79,11 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
78
79
|
const tokensAccounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.tokenAccountStruct, Array.from(vaultsLpAddresses));
|
79
80
|
if (!tokensAccounts)
|
80
81
|
return;
|
81
|
-
const
|
82
|
+
const tokenAccountsMap = new Map();
|
82
83
|
tokensAccounts.forEach((tokenAccount) => {
|
83
84
|
if (!tokenAccount)
|
84
85
|
return;
|
85
|
-
|
86
|
+
tokenAccountsMap.set(tokenAccount.pubkey.toString(), tokenAccount);
|
86
87
|
});
|
87
88
|
// Get all mints account
|
88
89
|
const mintsAccounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.mintAccountStruct, Array.from(lpMints));
|
@@ -90,59 +91,45 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
90
91
|
mintsAccounts.forEach((mintAccount) => {
|
91
92
|
if (!mintAccount)
|
92
93
|
return;
|
93
|
-
mintsAccountByAddress.set(mintAccount.pubkey, mintAccount);
|
94
|
+
mintsAccountByAddress.set(mintAccount.pubkey.toString(), mintAccount);
|
94
95
|
});
|
95
96
|
for (let id = 0; id < poolsAccounts.length; id++) {
|
96
97
|
const poolAccount = poolsAccounts[id];
|
97
|
-
const
|
98
|
-
const
|
99
|
-
|
98
|
+
const aTokenMint = poolAccount.tokenAMint.toString();
|
99
|
+
const bTokenMint = poolAccount.tokenBMint.toString();
|
100
|
+
const aTokenPrice = tokenPriceById.get(aTokenMint);
|
101
|
+
const bTokenPrice = tokenPriceById.get(bTokenMint);
|
102
|
+
if (!bTokenPrice || !aTokenPrice)
|
100
103
|
continue;
|
101
|
-
const
|
102
|
-
const
|
103
|
-
if (!
|
104
|
+
const tAccountA = tokenAccountsMap.get(poolAccount.aVaultLp.toString());
|
105
|
+
const tAccountB = tokenAccountsMap.get(poolAccount.bVaultLp.toString());
|
106
|
+
if (!tAccountA || !tAccountB)
|
104
107
|
continue;
|
105
|
-
if (
|
106
|
-
tokenAccountB.amount.isLessThanOrEqualTo(0))
|
108
|
+
if (tAccountA.amount.isZero() || tAccountB.amount.isZero())
|
107
109
|
continue;
|
108
|
-
const
|
109
|
-
const tokenAmountB = tokenAccountB.amount.dividedBy(Math.pow(10, BTokenPrice.decimals));
|
110
|
-
const totalValueTokenA = tokenAmountA.multipliedBy(ATokenPrice.price);
|
111
|
-
const totalValueTokenB = tokenAmountB.multipliedBy(BTokenPrice.price);
|
112
|
-
const { lpMint } = poolAccount;
|
110
|
+
const lpMint = poolAccount.lpMint.toString();
|
113
111
|
const lpMintAccount = mintsAccountByAddress.get(lpMint);
|
114
112
|
if (!lpMintAccount)
|
115
113
|
continue;
|
116
|
-
const
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
yield cache.setTokenPriceSource({
|
136
|
-
id: constants_1.platformId,
|
137
|
-
weight: 1,
|
138
|
-
address: lpMint.toString(),
|
139
|
-
networkId: portfolio_core_1.NetworkId.solana,
|
140
|
-
platformId: constants_1.platformId,
|
141
|
-
decimals: lpDecimals,
|
142
|
-
price,
|
143
|
-
underlyings,
|
144
|
-
timestamp: Date.now(),
|
145
|
-
});
|
114
|
+
const lpSource = (0, getLpTokenSourceRaw_1.default)(portfolio_core_1.NetworkId.solana, lpMint, constants_1.platformId, undefined, {
|
115
|
+
address: lpMint,
|
116
|
+
decimals: lpMintAccount.decimals,
|
117
|
+
supplyRaw: lpMintAccount.supply,
|
118
|
+
}, [
|
119
|
+
{
|
120
|
+
address: aTokenPrice.address,
|
121
|
+
decimals: aTokenPrice.decimals,
|
122
|
+
price: aTokenPrice.price,
|
123
|
+
reserveAmountRaw: tAccountA.amount,
|
124
|
+
},
|
125
|
+
{
|
126
|
+
address: bTokenPrice.address,
|
127
|
+
decimals: bTokenPrice.decimals,
|
128
|
+
price: bTokenPrice.price,
|
129
|
+
reserveAmountRaw: tAccountB.amount,
|
130
|
+
},
|
131
|
+
]);
|
132
|
+
yield cache.setTokenPriceSource(lpSource);
|
146
133
|
}
|
147
134
|
// 4 pools
|
148
135
|
for (let id = 0; id < meteoraPools.length; id++) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAC5C,gEAAqC;AACrC,2CAAyD;AACzD,iDAAsD;AACtD,+CAO4B;AAC5B,mCAAgC;AAChC,gGAA6F;AAC7F,qCAAsD;AACtD,uCAAqE;AAGrE,6FAAoE;AACpE,+FAAuE;AAEvE,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,yCAAyC;IACzC,MAAM,qBAAqB,GAAG,MAAM,IAAA,iCAAwB,EAC1D,MAAM,EACN,wBAAe,EACf,0BAAc,EACd,8BAAoB,CACrB,CAAC;IACF,MAAM,mBAAmB,GAAG,MAAM,IAAA,iCAAwB,EACxD,MAAM,EACN,wBAAe,EACf,0BAAc,EACd,4BAAkB,CACnB,CAAC;IAEF,SAAS;IACT,MAAM,YAAY,GAAG,aAAK,CAAC;IAC3B,6BAA6B;IAC7B,MAAM,iBAAiB,GAAmB,IAAI,GAAG,EAAE,CAAC;IACpD,YAAY,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC5B,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACvC,iBAAiB,CAAC,GAAG,CAAC,IAAI,mBAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAA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,CAAC;YACT,OAAO;YACP,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,QAAQ;YACR,KAAK;YACL,WAAW;YACX,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;SACtB,CAAC,CAAC;IACL,CAAC;AACH,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"}
|
@@ -87,7 +87,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
87
87
|
continue;
|
88
88
|
const coinAmountWei = new bignumber_js_1.default(poolCoinTokenAccount.amount.toString());
|
89
89
|
const pcAmountWei = new bignumber_js_1.default(poolPcTokenAccount.amount.toString());
|
90
|
-
const underlyingSource = (0, getLpUnderlyingTokenSource_1.default)(lpMint.toString(),
|
90
|
+
const underlyingSource = (0, getLpUnderlyingTokenSource_1.default)(lpMint.toString(), portfolio_core_1.NetworkId.solana, {
|
91
91
|
address: mintA,
|
92
92
|
decimals: decimalsA,
|
93
93
|
reserveAmountRaw: coinAmountWei,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lpTokensJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/lpTokensJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAErC,2CAAyE;AACzE,uCAA0D;AAC1D,iDAAsD;AACtD,6DAA0E;AAC1E,+CAK4B;AAC5B,gGAA6F;AAG7F,6EAAqD;AACrD,oFAA2E;AAC3E,6FAAoE;AACpE,6GAAqF;AACrF,8EAA2E;AAC3E,+FAAuE;AAEvE,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,aAAa,GAAG,MAAM,IA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AU,YAAY;IAC7B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -86,7 +86,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
86
86
|
];
|
87
87
|
if (!decimalsX || !decimalsY)
|
88
88
|
continue;
|
89
|
-
const underlyingSource = (0, getLpUnderlyingTokenSource_1.default)(lpType,
|
89
|
+
const underlyingSource = (0, getLpUnderlyingTokenSource_1.default)(lpType, portfolio_core_1.NetworkId.aptos, {
|
90
90
|
address: typeX,
|
91
91
|
decimals: decimalsX,
|
92
92
|
reserveAmountRaw: reserveAmountRawX,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"aptosLpJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/pancakeswap/aptosLpJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,+DAAuD;AAGvD,2CAA+E;AAE/E,iDAAqD;AACrD,6CAM2B;AAC3B,6FAAoE;AACpE,6GAAqF;AACrF,8EAA2E;AAC3E,+FAAuE;AAEvE,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,wBAAc,GAAE,CAAC;IAChC,MAAM,SAAS,GAAG,MAAM,IAAA,2BAAmB,EAAC,MAAM,EAAE,0BAAc,CAAC,CAAC;IACpE,IAAI,CAAC,SAAS;QAAE,OAAO;IAEvB,MAAM,eAAe,GAAuC,IAAI,GAAG,EAAE,CAAC;IACtE,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC7B,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,MAAM,IAAA,4BAAiB,EAC5C,SAAS;SACN,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE;QACjB,MAAM,EAAE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,sBAAU,WAAW;IAC5B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -136,7 +136,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
136
136
|
tokenPrices.get(mintB),
|
137
137
|
];
|
138
138
|
const lpMint = amm.lpMintAddress;
|
139
|
-
const underlyingSource = (0, getLpUnderlyingTokenSource_1.default)(lpMint.toString(),
|
139
|
+
const underlyingSource = (0, getLpUnderlyingTokenSource_1.default)(lpMint.toString(), portfolio_core_1.NetworkId.solana, {
|
140
140
|
address: mintA,
|
141
141
|
decimals: decimalsA,
|
142
142
|
reserveAmountRaw: tokenAmountA,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lpTokensJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/lpTokensJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AAEvD,gEAAqC;AAGrC,iDAAsD;AACtD,2CAA+E;AAC/E,yCAAkE;AAClE,+CAK4B;AAC5B,uCAAqD;AACrD,mCAA8C;AAC9C,6EAAqD;AACrD,gGAA6F;AAE7F,6GAAqF;AACrF,+FAAuE;AACvE,gEAA0E;AAC1E,6FAAoE;AAEpE,MAAM,WAAW,GAAG;IAClB;QACE,SAAS,EAAE,CAAC;QACZ,MAAM,EAAE,sBAAe;QACvB,SAAS,EAAE,6BAAiB;QAC5B,OAAO,EAAE,qBAAW;QACpB,IAAI,EAAE,UAAU;KACjB;IACD;QACE,SAAS,EAAE,CAAC;QACZ,MAAM,EAAE,sBAAe;QACvB,SAAS,EAAE,6BAAiB;QAC5B,OAAO,EAAE,qBAAW;QACpB,IAAI,EAAE,UAAU;KACjB;CACF,CAAC;AAEF,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,iBAAiB,GAAG,EAAE,CA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AK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CACxE,CACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -50,7 +50,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
50
50
|
rates.push(rate);
|
51
51
|
promises.push(cache.setItem(`${reserve.fields.id.id}-${reserve.fields.coin_type.fields.name}`, rate, {
|
52
52
|
prefix: portfolio_core_1.borrowLendRatesPrefix,
|
53
|
-
networkId: portfolio_core_1.NetworkId.
|
53
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
54
54
|
}));
|
55
55
|
}
|
56
56
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"marketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/suilend/marketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AAGrC,iDAAmD;AACnD,qEAAkE;AAClE,2CAAiE;AAEjE,uCAAwD;AACxD,mDAAkD;AAElD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,cAAc,GAAG,MAAM,IAAA,iCAAe,EAAgB,MAAM,EAAE;QAClE,sBAAU;KACX,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,EAAE,CAAC;IACpB,MAAM,KAAK,GAAqB,EAAE,CAAC;IACnC,MAAM,cAAc,GAAoB,EAAE,CAAC;IAE3C,KAAK,MAAM,MAAM,IAAI,cAAc,EAAE,CAAC;QACpC,IAAI,MAAA,MAAA,MAAM,CAAC,IAAI,0CAAE,OAAO,0CAAE,MAAM,EAAE,CAAC;YACjC,cAAc,CAAC,IAAI,CAAC,MAAM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C,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,EACjE,IAAI,EACJ;oBACE,MAAM,EAAE,sCAAqB;oBAC7B,SAAS,EAAE,0BAAS,CAAC,GAAG;iBACzB,CACF,CACF,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,QAAQ,CAAC,IAAI,CACX,KAAK,CAAC,OAAO,CACX,sBAAU,EACV;QACE,cAAc;QACd,KAAK;KACN,EACD;QACE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CACF,CACF,CAAC;IAEF,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,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;
|
@@ -18,5 +18,5 @@ type PoolUnderlyingRaw = {
|
|
18
18
|
tokenPrice: TokenPrice | undefined;
|
19
19
|
};
|
20
20
|
export declare const defaultAcceptedPairs: string[];
|
21
|
-
export default function getLpUnderlyingTokenSource(sourceId: string,
|
21
|
+
export default function getLpUnderlyingTokenSource(sourceId: string, networkId: NetworkIdType, poolUnderlyingsA: PoolUnderlyingRaw, poolUnderlyingsB: PoolUnderlyingRaw, minTvl?: number, acceptedPairs?: string[]): TokenPriceSource | null;
|
22
22
|
export {};
|
@@ -27,7 +27,7 @@ exports.defaultAcceptedPairs = [
|
|
27
27
|
'0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN', // USDCet
|
28
28
|
'0x6864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b::cetus::CETUS', // CETUS
|
29
29
|
];
|
30
|
-
function getLpUnderlyingTokenSource(sourceId,
|
30
|
+
function getLpUnderlyingTokenSource(sourceId, networkId, poolUnderlyingsA, poolUnderlyingsB, minTvl = 5000, acceptedPairs = exports.defaultAcceptedPairs) {
|
31
31
|
var _a, _b;
|
32
32
|
if (!poolUnderlyingsA.tokenPrice && !poolUnderlyingsB.tokenPrice)
|
33
33
|
return null;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAUoC;AAEpC,wEAAgD;AAChD,8DAAsE;AAyBzD,QAAA,oBAAoB,GAAG;IAClC,gBAAgB;IAChB,iCAAgB;IAChB,sEAAsE,EAAE,OAAO;IAC/E,qHAAqH,EAAE,SAAS;IAChI,mBAAmB;IACnB,oCAAmB;IACnB,2CAA0B;IAC1B,8CAA8C,EAAE,OAAO;IACvD,8CAA8C,EAAE,OAAO;IACvD,kBAAkB;IAClB,mCAAkB;IAClB,6EAA6E,EAAE,SAAS;IACxF,mFAAmF,EAAE,oBAAoB;IACzG,gBAAgB;IAChB,iCAAgB;IAChB,eAAe;IACf,gFAAgF,EAAE,SAAS;IAC3F,iFAAiF,EAAE,QAAQ;CAC5F,CAAC;AAEF,SAAwB,0BAA0B,CAChD,QAAgB,EAChB,
|
1
|
+
{"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAUoC;AAEpC,wEAAgD;AAChD,8DAAsE;AAyBzD,QAAA,oBAAoB,GAAG;IAClC,gBAAgB;IAChB,iCAAgB;IAChB,sEAAsE,EAAE,OAAO;IAC/E,qHAAqH,EAAE,SAAS;IAChI,mBAAmB;IACnB,oCAAmB;IACnB,2CAA0B;IAC1B,8CAA8C,EAAE,OAAO;IACvD,8CAA8C,EAAE,OAAO;IACvD,kBAAkB;IAClB,mCAAkB;IAClB,6EAA6E,EAAE,SAAS;IACxF,mFAAmF,EAAE,oBAAoB;IACzG,gBAAgB;IAChB,iCAAgB;IAChB,eAAe;IACf,gFAAgF,EAAE,SAAS;IAC3F,iFAAiF,EAAE,QAAQ;CAC5F,CAAC;AAEF,SAAwB,0BAA0B,CAChD,QAAgB,EAChB,SAAwB,EACxB,gBAAmC,EACnC,gBAAmC,EACnC,MAAM,GAAG,IAAI,EACb,aAAa,GAAG,4BAAoB;;IAEpC,IAAI,CAAC,gBAAgB,CAAC,UAAU,IAAI,CAAC,gBAAgB,CAAC,UAAU;QAAE,OAAO,IAAI,CAAC;IAC9E,IAAI,CAAA,MAAA,gBAAgB,CAAC,UAAU,0CAAE,KAAK,MAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1D,IAAI,CAAA,MAAA,gBAAgB,CAAC,UAAU,0CAAE,KAAK,MAAK,CAAC;QAAE,OAAO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;SAC7D,GAAG,CAAC,SAAA,EAAE,EAAI,kBAAkB,CAAC,QAAQ,CAAA,CAAC;SACtC,QAAQ,EAAE,CAAC;IACd,MAAM,KAAK,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;IAEvD,MAAM,MAAM,GAAqB;QAC/B,EAAE,EAAE,QAAQ;QACZ,SAAS;QACT,UAAU,EAAE,gCAAoB,CAAC,EAAE;QACnC,OAAO,EAAE,kBAAkB,CAAC,OAAO;QACnC,QAAQ,EAAE,kBAAkB,CAAC,QAAQ;QACrC,KAAK;QACL,MAAM,EAAE,IAAA,yBAAe,EAAC,OAAO,CAAC;QAChC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;KACtB,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC;AA3DD,6CA2DC"}
|
@@ -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;
|