@sonarwatch/portfolio-plugins 0.11.158 → 0.11.159
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1359 -1355
- package/README.md +3 -3
- package/package.json +2 -2
- package/src/plugins/abex/marketsJob.js +2 -2
- package/src/plugins/abex/marketsJob.js.map +1 -1
- package/src/plugins/aftermath/poolsJob.js +36 -102
- package/src/plugins/aftermath/poolsJob.js.map +1 -1
- package/src/plugins/atrix/poolsV1Job.js +2 -2
- package/src/plugins/atrix/poolsV1Job.js.map +1 -1
- package/src/plugins/auxexchange/aptosLpJob.js +6 -4
- package/src/plugins/auxexchange/aptosLpJob.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/fluxbeam/poolsJob.js +6 -4
- package/src/plugins/fluxbeam/poolsJob.js.map +1 -1
- package/src/plugins/kai/vaultsJob.js +2 -2
- package/src/plugins/kai/vaultsJob.js.map +1 -1
- package/src/plugins/liquiditypools-sei/job.js +6 -4
- package/src/plugins/liquiditypools-sei/job.js.map +1 -1
- package/src/plugins/liquidswap/aptosLpJob.js +2 -2
- package/src/plugins/liquidswap/aptosLpJob.js.map +1 -1
- package/src/plugins/marginfi/banksJob.d.ts +3 -0
- package/src/plugins/marginfi/{jobExecutor.js → banksJob.js} +8 -3
- package/src/plugins/marginfi/banksJob.js.map +1 -0
- package/src/plugins/marginfi/depositsFetcher.d.ts +3 -0
- package/src/plugins/marginfi/{fetcherExecutor.js → depositsFetcher.js} +8 -3
- package/src/plugins/marginfi/{fetcherExecutor.js.map → depositsFetcher.js.map} +1 -1
- package/src/plugins/marginfi/index.js +4 -17
- package/src/plugins/marginfi/index.js.map +1 -1
- package/src/plugins/meteora/multiTokenPoolsJob.js +2 -2
- package/src/plugins/meteora/multiTokenPoolsJob.js.map +1 -1
- package/src/plugins/meteora/poolsJob.js +6 -4
- package/src/plugins/meteora/poolsJob.js.map +1 -1
- package/src/plugins/orca/lpTokensJob.js +6 -4
- package/src/plugins/orca/lpTokensJob.js.map +1 -1
- package/src/plugins/pancakeswap/aptosLpJob.js +6 -4
- package/src/plugins/pancakeswap/aptosLpJob.js.map +1 -1
- package/src/plugins/raydium/lpTokensJob.js +6 -4
- package/src/plugins/raydium/lpTokensJob.js.map +1 -1
- package/src/plugins/sushiswap/aptos/poolsJob.js +2 -2
- package/src/plugins/sushiswap/aptos/poolsJob.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/symmetry/basketsJob.js +2 -2
- package/src/plugins/symmetry/basketsJob.js.map +1 -1
- package/src/plugins/tulip/lendingTokensJob.js +2 -2
- package/src/plugins/tulip/lendingTokensJob.js.map +1 -1
- package/src/plugins/tulip/strategyTokensJob.js +2 -2
- package/src/plugins/tulip/strategyTokensJob.js.map +1 -1
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/utils/clmm/tokenPricesFromSqrt.js +11 -4
- package/src/utils/clmm/tokenPricesFromSqrt.js.map +1 -1
- package/src/utils/misc/getLpTokenSource.d.ts +13 -9
- package/src/utils/misc/getLpTokenSource.js +29 -8
- package/src/utils/misc/getLpTokenSource.js.map +1 -1
- package/src/utils/misc/getLpTokenSourceOld.d.ts +18 -0
- package/src/utils/misc/getLpTokenSourceOld.js +32 -0
- package/src/utils/misc/getLpTokenSourceOld.js.map +1 -0
- package/src/utils/misc/getLpTokenSourceRaw.d.ts +16 -5
- package/src/utils/misc/getLpTokenSourceRaw.js +22 -6
- package/src/utils/misc/getLpTokenSourceRaw.js.map +1 -1
- package/src/utils/misc/getLpTokenSourceRawOld.d.ts +25 -0
- package/src/utils/misc/getLpTokenSourceRawOld.js +20 -0
- package/src/utils/misc/getLpTokenSourceRawOld.js.map +1 -0
- package/src/utils/misc/getLpUnderlyingTokenSource.d.ts +14 -18
- package/src/utils/misc/getLpUnderlyingTokenSource.js +101 -70
- package/src/utils/misc/getLpUnderlyingTokenSource.js.map +1 -1
- package/src/utils/misc/getLpUnderlyingTokenSourceOld.d.ts +26 -0
- package/src/utils/misc/getLpUnderlyingTokenSourceOld.js +73 -0
- package/src/utils/misc/getLpUnderlyingTokenSourceOld.js.map +1 -0
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/plugins/marginfi/fetcherExecutor.d.ts +0 -3
- package/src/plugins/marginfi/jobExecutor.d.ts +0 -3
- package/src/plugins/marginfi/jobExecutor.js.map +0 -1
@@ -16,7 +16,7 @@ const filters_1 = require("./filters");
|
|
16
16
|
const helpers_1 = require("./helpers");
|
17
17
|
const solana_1 = require("../../utils/solana");
|
18
18
|
const clients_1 = require("../../utils/clients");
|
19
|
-
const
|
19
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
20
|
const connection = (0, clients_1.getClientSolana)();
|
21
21
|
const banksRawData = yield (0, solana_1.getParsedProgramAccounts)(connection, Bank_1.bankStruct, constants_1.MarginfiProgram, (0, filters_1.banksFilters)());
|
22
22
|
for (let index = 0; index < banksRawData.length; index += 1) {
|
@@ -57,5 +57,10 @@ const jobExecutor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
57
|
});
|
58
58
|
}
|
59
59
|
});
|
60
|
-
|
61
|
-
|
60
|
+
const job = {
|
61
|
+
id: `${constants_1.platformId}-banks`,
|
62
|
+
executor,
|
63
|
+
label: 'normal',
|
64
|
+
};
|
65
|
+
exports.default = job;
|
66
|
+
//# sourceMappingURL=banksJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"banksJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/marginfi/banksJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAKoC;AACpC,2CAAkE;AAClE,yCAA4C;AAC5C,uCAAyC;AACzC,uCAAuE;AACvE,+CAA8D;AAC9D,iDAAsD;AAItD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,YAAY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CAAC,QAAQ,EAAE,CAAC;QAE1C,MAAM,QAAQ,GACZ,IAAI,CAAC,MAAM,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC;QAE/D,MAAM,IAAI,GAAmB;YAC3B,YAAY;YACZ,WAAW,EAAE;gBACX,GAAG,EAAE,IAAA,yBAAQ,EAAC,YAAY,CAAC;gBAC3B,GAAG,EAAE,YAAY;aAClB;YACD,cAAc;YACd,YAAY,EAAE;gBACZ,GAAG,EAAE,IAAA,yBAAQ,EAAC,UAAU,CAAC;gBACzB,GAAG,EAAE,UAAU;aAChB;YACD,eAAe;YACf,UAAU,EAAV,sBAAU;YACV,QAAQ;SACT,CAAC;QAEF,MAAM,KAAK,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,YAAY,EAAE,EAAE,IAAI,EAAE;YACrE,MAAM,EAAE,sCAAqB;YAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,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"}
|
@@ -24,7 +24,7 @@ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/token
|
|
24
24
|
const getTokensPricesMap_1 = __importDefault(require("../../utils/misc/getTokensPricesMap"));
|
25
25
|
const helpers_2 = require("../../utils/solana/pyth/helpers");
|
26
26
|
const Bank_1 = require("./structs/Bank");
|
27
|
-
const
|
27
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
28
28
|
const client = (0, clients_1.getClientSolana)();
|
29
29
|
const accounts = yield (0, solana_1.getParsedProgramAccounts)(client, MarginfiAccount_1.marginfiAccountStruct, constants_1.MarginfiProgram, (0, filters_1.accountsFilter)(owner));
|
30
30
|
if (accounts.length === 0)
|
@@ -133,5 +133,10 @@ const fetcherExecutor = (owner, cache) => __awaiter(void 0, void 0, void 0, func
|
|
133
133
|
}
|
134
134
|
return elements;
|
135
135
|
});
|
136
|
-
|
137
|
-
|
136
|
+
const fetcher = {
|
137
|
+
id: `${constants_1.platformId}-deposits`,
|
138
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
139
|
+
executor,
|
140
|
+
};
|
141
|
+
exports.default = fetcher;
|
142
|
+
//# sourceMappingURL=depositsFetcher.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"
|
1
|
+
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/marginfi/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,6CAA4C;AAC5C,2CAAkE;AAClE,+DAAkE;AAClE,uCAAuE;AACvE,uCAA2C;AAE3C,+CAA6E;AAC7E,iDAAsD;AACtD,qGAA6E;AAG7E,6FAAoE;AACpE,6DAAiE;AACjE,yCAA6C;AAE7C,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,uCAAqB,EACrB,2BAAe,EACf,IAAA,wBAAc,EAAC,KAAK,CAAC,CACtB,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,WAAW,CAA0B;QACjE,MAAM,EAAN,kBAAM;QACN,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEtC,MAAM,kBAAkB,GAA0B,IAAI,GA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E,KAAK,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EACrB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,CAChB,CAAC;QAEJ,MAAM,OAAO,GAAqB;YAChC,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,eAAe,EAAE,IAAI;gBACrB,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;SACF,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -4,23 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
|
-
const
|
8
|
-
const
|
9
|
-
const fetcherExecutor_1 = __importDefault(require("./fetcherExecutor"));
|
7
|
+
const banksJob_1 = __importDefault(require("./banksJob"));
|
8
|
+
const depositsFetcher_1 = __importDefault(require("./depositsFetcher"));
|
10
9
|
const constants_1 = require("./constants");
|
11
10
|
exports.platforms = [constants_1.marginfiPlatform];
|
12
|
-
exports.jobs = [
|
13
|
-
|
14
|
-
id: 'marginfi',
|
15
|
-
executor: jobExecutor_1.default,
|
16
|
-
label: 'normal',
|
17
|
-
},
|
18
|
-
];
|
19
|
-
exports.fetchers = [
|
20
|
-
{
|
21
|
-
id: 'marginfi',
|
22
|
-
networkId: portfolio_core_1.NetworkId.solana,
|
23
|
-
executor: fetcherExecutor_1.default,
|
24
|
-
},
|
25
|
-
];
|
11
|
+
exports.jobs = [banksJob_1.default];
|
12
|
+
exports.fetchers = [depositsFetcher_1.default];
|
26
13
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/marginfi/index.ts"],"names":[],"mappings":";;;;;;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/marginfi/index.ts"],"names":[],"mappings":";;;;;;AACA,0DAAkC;AAClC,wEAAgD;AAGhD,2CAA+C;AAElC,QAAA,SAAS,GAAe,CAAC,4BAAgB,CAAC,CAAC;AAC3C,QAAA,IAAI,GAAU,CAAC,kBAAQ,CAAC,CAAC;AACzB,QAAA,QAAQ,GAAc,CAAC,yBAAe,CAAC,CAAC"}
|
@@ -18,7 +18,7 @@ const constants_1 = require("./constants");
|
|
18
18
|
const multiTokenPools_json_1 = __importDefault(require("./multiTokenPools.json"));
|
19
19
|
const solana_1 = require("../../utils/solana");
|
20
20
|
const clients_1 = require("../../utils/clients");
|
21
|
-
const
|
21
|
+
const getLpTokenSourceRawOld_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRawOld"));
|
22
22
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
23
23
|
const connection = (0, clients_1.getClientSolana)();
|
24
24
|
const reserveAddresses = multiTokenPools_json_1.default
|
@@ -58,7 +58,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
58
58
|
});
|
59
59
|
if (poolUnderlyingsRaw.length !== pool.reserveAccounts.length)
|
60
60
|
continue;
|
61
|
-
const lpSource = (0,
|
61
|
+
const lpSource = (0, getLpTokenSourceRawOld_1.default)(portfolio_core_1.NetworkId.solana, pool.address, constants_1.platformId, {
|
62
62
|
address: pool.address,
|
63
63
|
decimals: lpMintAccount.decimals,
|
64
64
|
supplyRaw: lpMintAccount.supply,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"multiTokenPoolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/multiTokenPoolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAyE;AACzE,6CAA4C;AAG5C,2CAAyC;AACzC,kFAAqD;AACrD,+CAM4B;AAC5B,iDAAsD;AACtD
|
1
|
+
{"version":3,"file":"multiTokenPoolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/multiTokenPoolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAyE;AACzE,6CAA4C;AAG5C,2CAAyC;AACzC,kFAAqD;AACrD,+CAM4B;AAC5B,iDAAsD;AACtD,qGAEiD;AAEjD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IACrC,MAAM,gBAAgB,GAAG,8BAAe;SACrC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,mBAAS,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1D,IAAI,EAAE,CAAC;IACV,MAAM,eAAe,GAAG,MAAM,IAAA,sCAA6B,EACzD,UAAU,EACV,2BAAkB,EAClB,gBAAgB,CACjB,CAAC;IACF,MAAM,QAAQ,GAA6C,IAAI,GAAG,EAAE,CAAC;IACrE,MAAM,cAAc,GAAa,EAAE,CAAC;IACpC,eAAe,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC9B,IAAI,CAAC,GAAG;YAAE,OAAO;QACjB,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,EAA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,EAAE,cAAc,CAAC,MAAM;aACxC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,IAAI,kBAAkB,CAAC,MAAM,KAAK,IAAI,CAAC,eAAe,CAAC,MAAM;YAAE,SAAS;QAExE,MAAM,QAAQ,GAAG,IAAA,gCAAsB,EACrC,0BAAS,CAAC,MAAM,EAChB,IAAI,CAAC,OAAO,EACZ,sBAAU,EACV;YACE,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,QAAQ,EAAE,aAAa,CAAC,QAAQ;YAChC,SAAS,EAAE,aAAa,CAAC,MAAM;SAChC,EACD,kBAAkB,CACnB,CAAC;QACF,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;IACD,MAAM,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAC9C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,mBAAmB;IACpC,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -19,8 +19,8 @@ const clients_1 = require("../../utils/clients");
|
|
19
19
|
const solana_1 = require("../../utils/solana");
|
20
20
|
const struct_1 = require("./struct");
|
21
21
|
const filters_1 = require("./filters");
|
22
|
-
const
|
23
|
-
const
|
22
|
+
const getLpTokenSourceRawOld_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRawOld"));
|
23
|
+
const getLpUnderlyingTokenSourceOld_1 = __importDefault(require("../../utils/misc/getLpUnderlyingTokenSourceOld"));
|
24
24
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
25
25
|
const client = (0, clients_1.getClientSolana)();
|
26
26
|
// Get all 2-tokens pool (permissionless)
|
@@ -92,23 +92,25 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
92
92
|
if (!lpMintAccount)
|
93
93
|
continue;
|
94
94
|
if (aMintAccount && bMintAccount) {
|
95
|
-
const underlyingSource = (0,
|
95
|
+
const underlyingSource = (0, getLpUnderlyingTokenSourceOld_1.default)(lpMint.toString(), portfolio_core_1.NetworkId.solana, {
|
96
96
|
address: aTokenMint,
|
97
97
|
decimals: aMintAccount.decimals,
|
98
98
|
reserveAmountRaw: tAccountA.amount,
|
99
99
|
tokenPrice: aTokenPrice,
|
100
|
+
weight: 0.5,
|
100
101
|
}, {
|
101
102
|
address: bTokenMint,
|
102
103
|
decimals: bMintAccount.decimals,
|
103
104
|
reserveAmountRaw: tAccountB.amount,
|
104
105
|
tokenPrice: bTokenPrice,
|
106
|
+
weight: 0.5,
|
105
107
|
});
|
106
108
|
if (underlyingSource)
|
107
109
|
lpSources.push(underlyingSource);
|
108
110
|
}
|
109
111
|
if (!bTokenPrice || !aTokenPrice)
|
110
112
|
continue;
|
111
|
-
const lpSource = (0,
|
113
|
+
const lpSource = (0, getLpTokenSourceRawOld_1.default)(portfolio_core_1.NetworkId.solana, lpMint, constants_1.platformId, {
|
112
114
|
address: lpMint,
|
113
115
|
decimals: lpMintAccount.decimals,
|
114
116
|
supplyRaw: lpMintAccount.supply,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAyE;AACzE,6CAA4C;AAC5C,2CAAyD;AACzD,iDAAsD;AACtD,+CAO4B;AAC5B,qCAAsD;AACtD,uCAAqE;AAGrE
|
1
|
+
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAyE;AACzE,6CAA4C;AAC5C,2CAAyD;AACzD,iDAAsD;AACtD,+CAO4B;AAC5B,qCAAsD;AACtD,uCAAqE;AAGrE,qGAA6E;AAC7E,mHAA2F;AAE3F,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAA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EAAE,GAAG,sBAAU,QAAQ;IACzB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -23,9 +23,9 @@ const fetchTokenSupplyAndDecimals_1 = require("../../utils/solana/fetchTokenSupp
|
|
23
23
|
const runInBatch_1 = __importDefault(require("../../utils/misc/runInBatch"));
|
24
24
|
const computeAndStoreLpPrice_1 = require("../../utils/misc/computeAndStoreLpPrice");
|
25
25
|
const getTokensPricesMap_1 = __importDefault(require("../../utils/misc/getTokensPricesMap"));
|
26
|
-
const
|
26
|
+
const getLpUnderlyingTokenSourceOld_1 = __importDefault(require("../../utils/misc/getLpUnderlyingTokenSourceOld"));
|
27
27
|
const getDecimalsForToken_1 = require("../../utils/misc/getDecimalsForToken");
|
28
|
-
const
|
28
|
+
const getLpTokenSourceRawOld_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRawOld"));
|
29
29
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
30
30
|
const client = (0, clients_1.getClientSolana)();
|
31
31
|
const farmsAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, oldLiquidities_1.aquafarmStruct, constants_1.aquafarmsProgram, filters_1.aquafarmFilters);
|
@@ -87,22 +87,24 @@ 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,
|
90
|
+
const underlyingSource = (0, getLpUnderlyingTokenSourceOld_1.default)(lpMint.toString(), portfolio_core_1.NetworkId.solana, {
|
91
91
|
address: mintA,
|
92
92
|
decimals: decimalsA,
|
93
93
|
reserveAmountRaw: coinAmountWei,
|
94
94
|
tokenPrice: tokenPriceA,
|
95
|
+
weight: 0.5,
|
95
96
|
}, {
|
96
97
|
address: mintB,
|
97
98
|
decimals: decimalsB,
|
98
99
|
reserveAmountRaw: pcAmountWei,
|
99
100
|
tokenPrice: tokenPriceB,
|
101
|
+
weight: 0.5,
|
100
102
|
});
|
101
103
|
if (underlyingSource)
|
102
104
|
yield cache.setTokenPriceSource(underlyingSource);
|
103
105
|
if (!tokenPriceA || !tokenPriceB)
|
104
106
|
continue;
|
105
|
-
const lpSource = (0,
|
107
|
+
const lpSource = (0, getLpTokenSourceRawOld_1.default)(portfolio_core_1.NetworkId.solana, lpMint.toString(), constants_1.platformId, { address: lpMint.toString(), decimals: lpDecimals, supplyRaw: lpSupply }, [
|
106
108
|
{
|
107
109
|
address: tokenPriceA.address,
|
108
110
|
decimals: tokenPriceA.decimals,
|
@@ -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,
|
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,mHAA2F;AAC3F,8EAA2E;AAC3E,qGAA6E;AAE7E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,aAAa,GAAG,MAAM,IAAA,iCAAwB,EAClD,MAAM,E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AAE,SAAS;QAE9B,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,cAAc,CAAC;QACtE,MAAM,eAAe,GAAG,SAAS,CAAC,MAAM;aACrC,GAAG,CAAC,SAAA,EAAE,EAAI,SAAS,CAAC,QAAQ,CAAA,CAAC;aAC7B,QAAQ,EAAE,CAAC;QACd,MAAM,cAAc,GAAG,eAAe,GAAG,SAAS,CAAC,KAAK,CAAC;QAEzD,IAAI,cAAc,GAAG,yCAAgB,CAAC,QAAQ,EAAE;YAAE,SAAS;QAC3D,MAAM,KAAK,GAAG,cAAc,GAAG,UAAU,CAAC;QAE1C,MAAM,KAAK,CAAC,mBAAmB,CAAC;YAC9B,EAAE,EAAE,sBAAU;YACd,WAAW,EAAE,wBAAwB;YACrC,MAAM,EAAE,CAAC;YACT,OAAO,EAAE,QAAQ,CAAC,QAAQ,EAAE;YAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,QAAQ,EAAE,YAAY;YACtB,KAAK;YACL,WAAW,EAAE,SAAS,CAAC,WAAW;YAClC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;SACtB,CAAC,CAAC;IACL,CAAC;AACH,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"}
|
@@ -17,8 +17,8 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
|
17
17
|
const constants_1 = require("./constants");
|
18
18
|
const clients_1 = require("../../utils/clients");
|
19
19
|
const aptos_1 = require("../../utils/aptos");
|
20
|
-
const
|
21
|
-
const
|
20
|
+
const getLpUnderlyingTokenSourceOld_1 = __importDefault(require("../../utils/misc/getLpUnderlyingTokenSourceOld"));
|
21
|
+
const getLpTokenSourceRawOld_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRawOld"));
|
22
22
|
const getDecimals_1 = require("../../utils/aptos/getDecimals");
|
23
23
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
24
24
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
@@ -90,22 +90,24 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
90
90
|
];
|
91
91
|
if (!decimalsX || !decimalsY)
|
92
92
|
continue;
|
93
|
-
const underlyingSource = (0,
|
93
|
+
const underlyingSource = (0, getLpUnderlyingTokenSourceOld_1.default)(lpType, portfolio_core_1.NetworkId.aptos, {
|
94
94
|
address: typeX,
|
95
95
|
decimals: decimalsX,
|
96
96
|
reserveAmountRaw: reserveAmountRawX,
|
97
97
|
tokenPrice: tokenPriceX,
|
98
|
+
weight: 0.5,
|
98
99
|
}, {
|
99
100
|
address: typeY,
|
100
101
|
decimals: decimalsY,
|
101
102
|
reserveAmountRaw: reserveAmountRawY,
|
102
103
|
tokenPrice: tokenPriceY,
|
104
|
+
weight: 0.5,
|
103
105
|
});
|
104
106
|
if (underlyingSource)
|
105
107
|
lpSources.push(underlyingSource);
|
106
108
|
if (!tokenPriceX || !tokenPriceY)
|
107
109
|
continue;
|
108
|
-
const lpSource = (0,
|
110
|
+
const lpSource = (0, getLpTokenSourceRawOld_1.default)(portfolio_core_1.NetworkId.aptos, lpType, constants_1.platformId, {
|
109
111
|
address: lpType,
|
110
112
|
decimals: lpDecimals,
|
111
113
|
supplyRaw: lpSupply,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"aptosLpJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/pancakeswap/aptosLpJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,+DAIoC;AAGpC,2CAA+E;AAE/E,iDAAqD;AACrD,6CAK2B;AAC3B,
|
1
|
+
{"version":3,"file":"aptosLpJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/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AAC,SAAS,CAAC,CAAC;AAC9C,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -21,8 +21,8 @@ const filters_1 = require("./filters");
|
|
21
21
|
const types_1 = require("./types");
|
22
22
|
const runInBatch_1 = __importDefault(require("../../utils/misc/runInBatch"));
|
23
23
|
const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
|
24
|
-
const
|
25
|
-
const
|
24
|
+
const getLpUnderlyingTokenSourceOld_1 = __importDefault(require("../../utils/misc/getLpUnderlyingTokenSourceOld"));
|
25
|
+
const getLpTokenSourceRawOld_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRawOld"));
|
26
26
|
const constants_2 = require("../orders/clobs-solana/constants");
|
27
27
|
const ammsDetails = [
|
28
28
|
{
|
@@ -134,16 +134,18 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
134
134
|
tokenPrices.get(mintB),
|
135
135
|
];
|
136
136
|
const lpMint = amm.lpMintAddress;
|
137
|
-
const underlyingSource = (0,
|
137
|
+
const underlyingSource = (0, getLpUnderlyingTokenSourceOld_1.default)(lpMint.toString(), portfolio_core_1.NetworkId.solana, {
|
138
138
|
address: mintA,
|
139
139
|
decimals: decimalsA,
|
140
140
|
reserveAmountRaw: tokenAmountA,
|
141
141
|
tokenPrice: tokenPriceA,
|
142
|
+
weight: 0.5,
|
142
143
|
}, {
|
143
144
|
address: mintB,
|
144
145
|
decimals: decimalsB,
|
145
146
|
reserveAmountRaw: tokenAmountB,
|
146
147
|
tokenPrice: tokenPriceB,
|
148
|
+
weight: 0.5,
|
147
149
|
});
|
148
150
|
if (underlyingSource) {
|
149
151
|
yield cache.setTokenPriceSource(underlyingSource);
|
@@ -157,7 +159,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
157
159
|
const lpSupply = amm.lpAmount;
|
158
160
|
if (lpSupply.isZero())
|
159
161
|
continue;
|
160
|
-
tokenPriceSources.push((0,
|
162
|
+
tokenPriceSources.push((0, getLpTokenSourceRawOld_1.default)(portfolio_core_1.NetworkId.solana, lpMint.toString(), constants_1.platformId, {
|
161
163
|
address: lpMint.toString(),
|
162
164
|
decimals: lpDecimals,
|
163
165
|
supplyRaw: lpSupply,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lpTokensJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/lpTokensJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AAIvD,iDAAsD;AACtD,2CAA+E;AAC/E,yCAAkE;AAClE,+CAK4B;AAC5B,uCAAqD;AACrD,mCAA8C;AAC9C,6EAAqD;AACrD,gGAA6F;AAE7F,
|
1
|
+
{"version":3,"file":"lpTokensJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/lpTokensJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AAIvD,iDAAsD;AACtD,2CAA+E;AAC/E,yCAAkE;AAClE,+CAK4B;AAC5B,uCAAqD;AACrD,mCAA8C;AAC9C,6EAAqD;AACrD,gGAA6F;AAE7F,mHAA2F;AAC3F,qGAA6E;AAC7E,gEAA0E;AAE1E,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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1 = require("../../../utils/clients");
|
|
18
18
|
const constants_1 = require("./constants");
|
19
19
|
const aptos_1 = require("../../../utils/aptos");
|
20
20
|
const constants_2 = require("../constants");
|
21
|
-
const
|
21
|
+
const getLpTokenSourceRawOld_1 = __importDefault(require("../../../utils/misc/getLpTokenSourceRawOld"));
|
22
22
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
23
23
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
24
24
|
const client = (0, clients_1.getClientAptos)();
|
@@ -61,7 +61,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
61
61
|
const [tokenPriceX, tokenPriceY] = yield cache.getTokenPrices([typeX, typeY], portfolio_core_1.NetworkId.aptos);
|
62
62
|
if (!tokenPriceX || !tokenPriceY)
|
63
63
|
continue;
|
64
|
-
const source = (0,
|
64
|
+
const source = (0, getLpTokenSourceRawOld_1.default)(portfolio_core_1.NetworkId.aptos, constants_2.platformId, constants_2.platformId, {
|
65
65
|
address: lpType,
|
66
66
|
decimals: lpDecimals,
|
67
67
|
supplyRaw: lpSupply,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/sushiswap/aptos/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,+DAAuD;AACvD,oDAAwD;AAGxD,2CAAmE;AACnE,gDAK8B;AAC9B,4CAA0C;AAE1C,
|
1
|
+
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/sushiswap/aptos/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,+DAAuD;AACvD,oDAAwD;AAGxD,2CAAmE;AACnE,gDAK8B;AAC9B,4CAA0C;AAE1C,wGAAgF;AAEhF,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,I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AAO,EAAE,KAAK;gBACd,QAAQ,EAAE,aAAa,CAAC,eAAe,CAAC,QAAQ;gBAChD,KAAK,EAAE,WAAW,CAAC,KAAK;gBACxB,gBAAgB,EAAE,IAAI,sBAAS,CAAC,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC;aAC/D;SACF,EACD,SAAS,CACV,CAAC;QACF,MAAM,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,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;
|
@@ -21,7 +21,7 @@ const structs_1 = require("./structs");
|
|
21
21
|
const filters_1 = require("./filters");
|
22
22
|
const getParsedAccountInfo_1 = require("../../utils/solana/getParsedAccountInfo");
|
23
23
|
const helpers_1 = require("./helpers");
|
24
|
-
const
|
24
|
+
const getLpTokenSourceRawOld_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRawOld"));
|
25
25
|
const helpers_2 = require("../../utils/solana/pyth/helpers");
|
26
26
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
27
27
|
const connection = (0, clients_1.getClientSolana)();
|
@@ -62,7 +62,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
62
62
|
}
|
63
63
|
if (poolUnderlyingRaw.length === 0)
|
64
64
|
continue;
|
65
|
-
const lpSource = (0,
|
65
|
+
const lpSource = (0, getLpTokenSourceRawOld_1.default)(portfolio_core_1.NetworkId.solana, constants_1.platformId, constants_1.platformId, {
|
66
66
|
address: account.fundToken.toString(),
|
67
67
|
decimals: 6,
|
68
68
|
supplyRaw: account.supplyOutstanding,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"basketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/symmetry/basketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8BAA8B;AAC9B,+DAAyE;AAGzE,2CAA4E;AAC5E,+CAA8D;AAC9D,iDAAsD;AACtD,uCAAoE;AACpE,uCAAwC;AACxC,kFAA+E;AAC/E,uCAAsC;AACtC
|
1
|
+
{"version":3,"file":"basketsJob.js","sourceRoot":"","sources":["../../../../../../pack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,SAAS,EAAE,OAAO,CAAC,iBAAiB;SACrC,EACD,iBAAiB,EACjB,QAAQ,EACR,IAAA,mBAAS,EAAC,OAAO,CAAC,CACnB,CAAC;QACF,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;IACD,MAAM,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAC9C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -18,7 +18,7 @@ const solana_1 = require("../../utils/solana");
|
|
18
18
|
const constants_1 = require("./constants");
|
19
19
|
const structs_1 = require("./structs");
|
20
20
|
const constants_2 = require("../solend/constants");
|
21
|
-
const
|
21
|
+
const getLpTokenSourceOld_1 = __importDefault(require("../../utils/misc/getLpTokenSourceOld"));
|
22
22
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
23
23
|
const client = (0, clients_1.getClientSolana)();
|
24
24
|
const lendingReserves = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.lendingReserveStruct, constants_1.tulipLendingProgramId, [
|
@@ -70,7 +70,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
70
70
|
const { supply, decimals } = mintAccount;
|
71
71
|
if (supply.isZero())
|
72
72
|
continue;
|
73
|
-
const lpTokenSource = (0,
|
73
|
+
const lpTokenSource = (0, getLpTokenSourceOld_1.default)(portfolio_core_1.NetworkId.solana, lpMint, constants_1.platformId, {
|
74
74
|
address: lpMint.toString(),
|
75
75
|
decimals,
|
76
76
|
supply: supply.dividedBy(Math.pow(10, decimals)).toNumber(),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lendingTokensJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tulip/lendingTokensJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AAIvD,iDAAsD;AACtD,+CAK4B;AAC5B,2CAAgE;AAChE,uCAAiD;AACjD,mDAAkD;AAClD
|
1
|
+
{"version":3,"file":"lendingTokensJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tulip/lendingTokensJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AAIvD,iDAAsD;AACtD,+CAK4B;AAC5B,2CAAgE;AAChE,uCAAiD;AACjD,mDAAkD;AAClD,+FAAuE;AAEvE,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,eAAe,GAAG,MAAM,IAAA,iCAAwB,EACpD,MAAM,EACN,8BAAoB,EACpB,iCAAqB,EACrB;QACE;YACE,QAAQ,EAAE,GAAG;SACd;KACF,CACF,CAAC;IAEF,MAAM,KAAK,GAAgB,IAAI,GAAG,EAAE,CAAC;IACrC,MAAM,UAAU,GAAgB,EAAE,CAAC;IACnC,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAClC,IACE,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,QAAQ,EAAE;YACvC,kCAAkC,EAClC,CAAC;YACD,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;QACrD,CAAC;QACD,IACE,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE;YAC3C,kCAAkC,EAClC,CAAC;YACD,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QACpD,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACpD,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EACjB,0BAAS,CAAC,MAAM,CACjB,CAAC;IAEF,MAA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