@sonarwatch/portfolio-plugins 0.14.33 → 0.14.34
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/plugins/alphafi/positionsFetcher.js +1 -1
- package/src/plugins/alphafi/positionsFetcher.js.map +1 -1
- package/src/plugins/cetus/vaultsJob.js +1 -0
- package/src/plugins/cetus/vaultsJob.js.map +1 -1
- package/src/plugins/flash/helpers.d.ts +1 -1
- package/src/plugins/flash/helpers.js +2 -2
- package/src/plugins/flash/helpers.js.map +1 -1
- package/src/plugins/flash/poolJob.js +25 -5
- package/src/plugins/flash/poolJob.js.map +1 -1
- package/src/plugins/flash/structs.d.ts +4 -0
- package/src/plugins/flash/structs.js +4 -0
- package/src/plugins/flash/structs.js.map +1 -1
- package/src/plugins/flash/types.d.ts +1 -0
- package/src/plugins/haedal/vaultFetcher.js +1 -2
- package/src/plugins/haedal/vaultFetcher.js.map +1 -1
- package/src/plugins/kai/vaultsJob.js +1 -2
- package/src/plugins/kai/vaultsJob.js.map +1 -1
- package/src/plugins/kriya/vaultsFetcher.js +1 -2
- package/src/plugins/kriya/vaultsFetcher.js.map +1 -1
- package/src/plugins/mole/depositsFetcher.js +1 -1
- package/src/plugins/mole/depositsFetcher.js.map +1 -1
- package/src/plugins/thala/farmingPoolsFetcher.js +14 -50
- package/src/plugins/thala/farmingPoolsFetcher.js.map +1 -1
- package/src/plugins/tokens/fetchers/sui.js +3 -3
- package/src/plugins/tokens/fetchers/sui.js.map +1 -1
- package/src/plugins/tokens/helpers.d.ts +3 -2
- package/src/plugins/tokens/helpers.js +5 -4
- package/src/plugins/tokens/helpers.js.map +1 -1
- package/src/plugins/turbos/clmmVaultFetcher.js +1 -2
- package/src/plugins/turbos/clmmVaultFetcher.js.map +1 -1
- package/src/plugins/typus/safuFetcher.js +2 -2
- package/src/plugins/typus/safuFetcher.js.map +1 -1
- package/src/plugins/typus/vaultsFetcher.js +1 -1
- package/src/plugins/typus/vaultsFetcher.js.map +1 -1
- package/src/plugins/whalesmarket/depositFetcher.js +0 -1
- package/src/plugins/whalesmarket/depositFetcher.js.map +1 -1
- package/src/utils/elementbuilder/AssetBuilder.d.ts +2 -1
- package/src/utils/elementbuilder/AssetBuilder.js +14 -2
- package/src/utils/elementbuilder/AssetBuilder.js.map +1 -1
- package/src/utils/elementbuilder/LiquidityBuilder.js +2 -1
- package/src/utils/elementbuilder/LiquidityBuilder.js.map +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.14.34](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.33...plugins-0.14.34) (2024-11-19)
|
6
|
+
|
7
|
+
|
8
|
+
|
5
9
|
## [0.14.33](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.32...plugins-0.14.33) (2024-11-15)
|
6
10
|
|
7
11
|
|
package/package.json
CHANGED
@@ -125,7 +125,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
125
125
|
platformId: constants_1.platformId,
|
126
126
|
name: 'Alpha Vault',
|
127
127
|
value: (0, portfolio_core_1.getUsdValueSum)(alphaAssets.map((a) => a.value)),
|
128
|
-
label: '
|
128
|
+
label: 'Vault',
|
129
129
|
data: { assets: alphaAssets },
|
130
130
|
});
|
131
131
|
if (naviAssets.length !== 0)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/alphafi/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AAErC,2CAKqB;AAErB,qEAAkE;AAClE,iDAAmD;AAEnD,qGAA6E;AAE7E,MAAM,aAAa,GAAG,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC;AAE9B,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;I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AAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YAC3D,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE;SACxC,CAAC,CAAC;IAEL,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAC1B,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACtD,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/alphafi/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AAErC,2CAKqB;AAErB,qEAAkE;AAClE,iDAAmD;AAEnD,qGAA6E;AAE7E,MAAM,aAAa,GAAG,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC;AAE9B,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACnD,IAAA,iCAAe,EAAU,MAAM,EAAE,KAAK,EAAE;YACtC,MAAM,EAAE;gBACN,QAAQ,EAAE,wBAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;oBACjC,UAAU,EAAE,CAAC;iBACd,CAAC,CAAC;aACJ;SACF,CAAC;QACF,KAAK,CAAC,OAAO,CAAkB,6BAAiB,EAAE;YAChD,MAAM,EAAE,sBAAU;YAClB,SAAS,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AE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACtD,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;SAC9B,CAAC,CAAC;IAEL,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QACzB,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,yBAAyB;YAC/B,KAAK,EAAE,IAAA,+BAAc,EAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACrD,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE;SAC7B,CAAC,CAAC;IAEL,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -88,6 +88,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
88
88
|
price: underlyings.reduce((acc, u) => u.price * u.amountPerLp + acc, 0),
|
89
89
|
underlyings,
|
90
90
|
timestamp: Date.now(),
|
91
|
+
label: 'Vault',
|
91
92
|
});
|
92
93
|
}
|
93
94
|
yield cache.setTokenPriceSources(tokenPriceSources);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/vaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/vaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;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
import { FLPool } from './structs';
|
4
4
|
import { ParsedAccount } from '../../utils/solana';
|
5
5
|
export declare function getPdas(owner: string): PublicKey[];
|
6
|
-
export declare function getLpTokenPrice(connection: SolanaClient, pool: ParsedAccount<FLPool>, oracles: string[]): Promise<number | null>;
|
6
|
+
export declare function getLpTokenPrice(connection: SolanaClient, pool: ParsedAccount<FLPool>, oracles: string[], method: 'getCompoundingTokenPrice' | 'getLpTokenPrice'): Promise<number | null>;
|
@@ -26,7 +26,7 @@ function getPdas(owner) {
|
|
26
26
|
], constants_1.flashPid)[0]);
|
27
27
|
}
|
28
28
|
exports.getPdas = getPdas;
|
29
|
-
function getLpTokenPrice(connection, pool, oracles) {
|
29
|
+
function getLpTokenPrice(connection, pool, oracles, method) {
|
30
30
|
var _a;
|
31
31
|
return __awaiter(this, void 0, void 0, function* () {
|
32
32
|
const keys = [
|
@@ -66,7 +66,7 @@ function getLpTokenPrice(connection, pool, oracles) {
|
|
66
66
|
isWritable: false,
|
67
67
|
})),
|
68
68
|
];
|
69
|
-
const data = Buffer.concat([(0, anchorSighash_1.anchorSighash)('global',
|
69
|
+
const data = Buffer.concat([(0, anchorSighash_1.anchorSighash)('global', method)]);
|
70
70
|
const recentBlockhash = (yield connection.getLatestBlockhash()).blockhash;
|
71
71
|
const prefixResponse = yield axios_1.default.get(`https://api.prod.flash.trade/backup-oracle/prices?poolAddress=${pool.pubkey.toString()}`);
|
72
72
|
if (!prefixResponse.data)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAOyB;AACzB,kDAA6C;AAC7C,2CAAoE;AAEpE,oEAAiE;AAEjE,+CAK4B;AAG5B,SAAgB,OAAO,CAAC,KAAa;IACnC,OAAO,sBAAU,CAAC,GAAG,CACnB,CAAC,GAAG,EAAE,EAAE,CACN,mBAAS,CAAC,sBAAsB,CAC9B;QACE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC;QAC5B,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;QAC/B,GAAG,CAAC,QAAQ,EAAE;KACf,EACD,oBAAQ,CACT,CAAC,CAAC,CAAC,CACP,CAAC;AACJ,CAAC;AAZD,0BAYC;AAED,SAAsB,eAAe,CACnC,UAAwB,EACxB,IAA2B,EAC3B,OAAiB;;;
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAOyB;AACzB,kDAA6C;AAC7C,2CAAoE;AAEpE,oEAAiE;AAEjE,+CAK4B;AAG5B,SAAgB,OAAO,CAAC,KAAa;IACnC,OAAO,sBAAU,CAAC,GAAG,CACnB,CAAC,GAAG,EAAE,EAAE,CACN,mBAAS,CAAC,sBAAsB,CAC9B;QACE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC;QAC5B,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;QAC/B,GAAG,CAAC,QAAQ,EAAE;KACf,EACD,oBAAQ,CACT,CAAC,CAAC,CAAC,CACP,CAAC;AACJ,CAAC;AAZD,0BAYC;AAED,SAAsB,eAAe,CACnC,UAAwB,EACxB,IAA2B,EAC3B,OAAiB,EACjB,MAAsD;;;QAEtD,MAAM,IAAI,GAAkB;YAC1B;gBACE,MAAM,EAAE,2BAAe;gBACvB,QAAQ,EAAE,KAAK;gBACf,UAAU,EAAE,KAAK;aAClB;YACD;gBACE,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,QAAQ,EAAE,KAAK;gBACf,UAAU,EAAE,KAAK;aAClB;YACD;gBACE,MAAM,EAAE,IAAI,CAAC,OAAO;gBACpB,QAAQ,EAAE,KAAK;gBACf,UAAU,EAAE,KAAK;aAClB;YACD;gBACE,MAAM,EAAE,oCAA0B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Q,EAAE,IAAI,mBAAS,CAAC,qBAAY,CAAC;YACrC,eAAe;YACf,YAAY,EAAE;gBACZ,IAAI,gCAAsB,CAAC;oBACzB,IAAI,EAAE,cAAc,CAAC,IAAI,CAAC,IAAI;oBAC9B,SAAS,EAAE,IAAI,mBAAS,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC;oBACvD,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC;iBAC5C,CAAC;gBACF,IAAI,gCAAsB,CAAC;oBACzB,IAAI;oBACJ,SAAS,EAAE,oBAAQ;oBACnB,IAAI;iBACL,CAAC;aACH;SACF,CAAC,CAAC,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC5C,MAAM,oBAAoB,GAAG,IAAI,8BAAoB,CAAC,SAAS,CAAC,CAAC;QACjE,MAAM,4BAA4B,GAAG,MAAM,UAAU,CAAC,mBAAmB,CACvE,oBAAoB,CACrB,CAAC;QAEF,MAAM,YAAY,GAAG,MAAA,4BAA4B,CAAC,KAAK,CAAC,UAAU,0CAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5E,IAAI,YAAY;YACd,OAAO,YAAG;iBACP,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;iBAC5C,GAAG,CAAC,SAAA,EAAE,EAAI,2BAAkB,CAAA,CAAC;iBAC7B,QAAQ,EAAE,CAAC;QAEhB,OAAO,IAAI,CAAC;;CACb;AAxFD,0CAwFC"}
|
@@ -33,16 +33,35 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
33
33
|
const pool = poolsAccounts[i];
|
34
34
|
if (!pool)
|
35
35
|
continue;
|
36
|
-
const
|
37
|
-
|
38
|
-
|
36
|
+
const [stakedLpPrice, compoundingLpPrice] = yield Promise.all([
|
37
|
+
(0, helpers_1.getLpTokenPrice)(client, pool, pool.custodies.map((c) => { var _a; return ((_a = custodyAccounts.get(c.toString())) === null || _a === void 0 ? void 0 : _a.oracle.customOracleAccount) || ''; }), 'getLpTokenPrice'),
|
38
|
+
(0, helpers_1.getLpTokenPrice)(client, pool, pool.custodies.map((c) => { var _a; return ((_a = custodyAccounts.get(c.toString())) === null || _a === void 0 ? void 0 : _a.oracle.customOracleAccount) || ''; }), 'getCompoundingTokenPrice'),
|
39
|
+
]);
|
40
|
+
const [stakedDecimals, compoundingDecimals] = yield Promise.all([
|
41
|
+
(0, getDecimals_1.getDecimals)(client, pool.flpMint),
|
42
|
+
(0, getDecimals_1.getDecimals)(client, pool.compoundingMint),
|
43
|
+
]);
|
44
|
+
if (stakedDecimals && stakedLpPrice) {
|
39
45
|
yield cache.setTokenPriceSource({
|
40
46
|
address: pool.flpMint.toString(),
|
41
|
-
decimals,
|
47
|
+
decimals: stakedDecimals,
|
42
48
|
id: constants_1.poolsPkeys[i].toString(),
|
43
49
|
networkId: portfolio_core_1.NetworkId.solana,
|
44
50
|
platformId: constants_2.walletTokensPlatform.id,
|
45
|
-
price:
|
51
|
+
price: stakedLpPrice,
|
52
|
+
timestamp: Date.now(),
|
53
|
+
weight: 1,
|
54
|
+
elementName: (0, solana_1.u8ArrayToString)(pool.name),
|
55
|
+
});
|
56
|
+
}
|
57
|
+
if (compoundingDecimals && compoundingLpPrice) {
|
58
|
+
yield cache.setTokenPriceSource({
|
59
|
+
address: pool.compoundingMint.toString(),
|
60
|
+
decimals: compoundingDecimals,
|
61
|
+
id: constants_1.poolsPkeys[i].toString(),
|
62
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
63
|
+
platformId: constants_2.walletTokensPlatform.id,
|
64
|
+
price: compoundingLpPrice,
|
46
65
|
timestamp: Date.now(),
|
47
66
|
weight: 1,
|
48
67
|
elementName: (0, solana_1.u8ArrayToString)(pool.name),
|
@@ -58,6 +77,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
58
77
|
continue;
|
59
78
|
poolsInfo.push({
|
60
79
|
flpMint: pool.flpMint.toString(),
|
80
|
+
compoundingMint: pool.compoundingMint.toString(),
|
61
81
|
pkey: constants_1.poolsPkeys[i].toString(),
|
62
82
|
rewardPerLp,
|
63
83
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"poolJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/poolJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,2CAA6E;AAC7E,uCAAyC;AACzC,+CAI4B;AAC5B,mDAA2D;AAE3D,uCAA4C;AAC5C,gEAA6D;AAE7D,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,aAAa,GAAG,MAAM,IAAA,sCAA6B,EACvD,MAAM,EACN,sBAAY,EACZ,sBAAU,CACX,CAAC;IACF,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,OAAO,CAAgB,wBAAY,EAAE;QACrE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,IAAI,CAAC,aAAa;QAAE,OAAO;IAE3B,MAAM,eAAe,GAA6B,IAAI,GAAG,EAAE,CAAC;IAC5D,aAAa,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAChC,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAC7C,CAAC;IAEF,MAAM,SAAS,GAAe,EAAE,CAAC;IACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9C,MAAM,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI;YAAE,SAAS;QAEpB,MAAM,OAAO,GAAG,MAAM,IAAA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AG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,QAAQ;IACR,KAAK,EAAE,UAAU;CAClB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -231,5 +231,9 @@ export type FLPool = {
|
|
231
231
|
flpMintBump: number;
|
232
232
|
flpTokenAccountBump: number;
|
233
233
|
vpVolumeFactor: number;
|
234
|
+
padding: number[];
|
235
|
+
stakingFeeBoostBps: BigNumber[];
|
236
|
+
compoundingMint: PublicKey;
|
237
|
+
compoundingLpVault: PublicKey;
|
234
238
|
};
|
235
239
|
export declare const flPoolStruct: FixableBeetStruct<FLPool, Partial<FLPool>>;
|
@@ -215,5 +215,9 @@ exports.flPoolStruct = new beet_1.FixableBeetStruct([
|
|
215
215
|
['flpMintBump', beet_1.u8],
|
216
216
|
['flpTokenAccountBump', beet_1.u8],
|
217
217
|
['vpVolumeFactor', beet_1.u8],
|
218
|
+
['padding', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 4)],
|
219
|
+
['stakingFeeBoostBps', (0, beet_1.uniformFixedSizeArray)(solana_1.u64, 6)],
|
220
|
+
['compoundingMint', beet_solana_1.publicKey],
|
221
|
+
['compoundingLpVault', beet_solana_1.publicKey],
|
218
222
|
], (args) => args);
|
219
223
|
//# sourceMappingURL=structs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/structs.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/structs.ts"],"names":[],"mappings":";;;AAAA,oDAQmC;AAGnC,kEAA6D;AAC7D,+CAA0D;AAY7C,QAAA,kBAAkB,GAAG,IAAI,iBAAU,CAC9C;IACE,CAAC,eAAe,EAAE,uBAAS,CAAC;IAC5B,CAAC,qBAAqB,EAAE,uBAAS,CAAC;IAClC,CAAC,YAAY,EAAE,SAAE,CAAC;I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AAC,oBAAoB,EAAE,IAAA,4BAAqB,EAAC,YAAG,EAAE,CAAC,CAAC,CAAC;IACrD,CAAC,iBAAiB,EAAE,uBAAS,CAAC;IAC9B,CAAC,oBAAoB,EAAE,uBAAS,CAAC;CAClC,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAc,CACzB,CAAC"}
|
@@ -38,14 +38,13 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
38
38
|
return [
|
39
39
|
{
|
40
40
|
type: 'multiple',
|
41
|
-
label: '
|
41
|
+
label: 'Vault',
|
42
42
|
platformId: constants_1.platformId,
|
43
43
|
networkId: portfolio_core_1.NetworkId.sui,
|
44
44
|
data: {
|
45
45
|
assets: [asset],
|
46
46
|
},
|
47
47
|
value: asset.value,
|
48
|
-
name: 'Random Vault',
|
49
48
|
},
|
50
49
|
];
|
51
50
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vaultFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/haedal/vaultFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,gEAAqC;AAGrC,2CAA0D;AAC1D,iDAAmD;AACnD,2FAAwF;AAExF,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,IAAI,GAAG,MAAM,IAAA,uDAA0B,EAC3C,MAAM,EACN,2BAAe,CAChB,CAAC;IACF,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAC3B,CAAC,MAAM,EAAE,EAAE,eAAC,OAAA,CAAA,MAAA,MAAA,MAAM,CAAC,IAAI,0CAAE,OAAO,0CAAE,MAAM,CAAC,IAAI,MAAK,KAAK,CAAA,EAAA,CACxD,CAAC;IACF,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;I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Ae,OAAO,CAAC"}
|
@@ -53,9 +53,8 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
53
53
|
tokenPrice,
|
54
54
|
},
|
55
55
|
],
|
56
|
-
elementName: 'Vaults',
|
57
56
|
});
|
58
|
-
yield cache.setTokenPriceSources(lpSource);
|
57
|
+
yield cache.setTokenPriceSources(lpSource.map((source) => (Object.assign(Object.assign({}, source), { label: 'Vault' }))));
|
59
58
|
}
|
60
59
|
});
|
61
60
|
const job = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kai/vaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,+DAA2E;AAG3E,2CAAqD;AACrD,iDAAmD;AACnD,qEAAkE;AAElE,8EAA2E;AAE3E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,OAAO,GAAG,MAAM,IAAA,iCAAe,EACnC,MAAM,EACN,sBAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAC5B,CAAC;IAEF,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACjD,sBAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAC9B,0BAAS,CAAC,GAAG,CACd,CAAC;IAEF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACxC,MAAM,SAAS,GAAG,sBAAU,CAAC,CAAC,CAAC,CAAC;QAChC,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,CAChC,IAAA,mCAAkB,EAAC,SAAS,CAAC,KAAK,EAAE,0BAAS,CAAC,GAAG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,CAAC,CAAC,CAAC,EAAE,EAAE;YACpE,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,IAAA,yCAAmB,EAAC;YACnC,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,QAAQ,EAAE,sBAAU;YACpB,UAAU,EAAV,sBAAU;YACV,SAAS,EAAE;gBACT,OAAO,EAAE,SAAS,CAAC,MAAM;gBACzB,QAAQ,EAAE,SAAS,CAAC,QAAQ;gBAC5B,SAAS,EAAE,IAAI,sBAAS,CACtB,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CACnD;aACF;YACD,kBAAkB,EAAE;gBAClB;oBACE,OAAO,EAAE,SAAS,CAAC,KAAK;oBACxB,QAAQ,EAAE,SAAS,CAAC,QAAQ;oBAC5B,gBAAgB,EAAE,MAAM;oBACxB,UAAU;iBACX;aACF;SACF,CAAC,CAAC;QACH,MAAM,KAAK,CAAC,oBAAoB,CAC9B,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,iCAAM,MAAM,KAAE,KAAK,EAAE,OAAO,IAAG,CAAC,CAC1D,CAAC;IACJ,CAAC;AACH,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"}
|
@@ -43,8 +43,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
43
43
|
vaultsPositionInfo.forEach((vault) => vaultsByFarmId.set(vault.farmId, vault));
|
44
44
|
const registry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.sui, constants_1.platformId);
|
45
45
|
const liquidities = registry.addElementLiquidity({
|
46
|
-
|
47
|
-
label: 'LiquidityPool',
|
46
|
+
label: 'Vault',
|
48
47
|
});
|
49
48
|
for (let i = 0; i < vaultsOldBalances.length; i++) {
|
50
49
|
const liquidity = liquidities.addLiquidity();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/vaultsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,2CAKqB;AACrB,iDAAmD;AACnD,6EAA0E;AAE1E,wFAAyF;AACzF,gFAA6E;AAC7E,qEAAkE;AAClE,kEAA+D;AAG/D,MAAM,sBAAsB,GAAG,IAAI,6BAAa,CAC9C,yBAAa,EACb;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;CACzB,CACF,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,CAAC,iBAAiB,EAAE,aAAa,EAAE,kBAAkB,CAAC,GAC1D,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,IAAA,yCAAmB,EACjB,MAAM,EACN,KAAK,EACL,sBAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAC3C;QACD,IAAA,iCAAe,EAAe,MAAM,EAAE,KAAK,EAAE;YAC3C,MAAM,EAAE,EAAE,UAAU,EAAE,6BAAiB,EAAE;SAC1C,CAAC;QACF,sBAAsB,CAAC,OAAO,CAAC,KAAK,CAAC;KACtC,CAAC,CAAC;IAEL,IAAI,CAAC,kBAAkB;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,gBAAgB,GAAmC,IAAI,GAAG,EAAE,CAAC;IACnE,kBAAkB,CAAC,OAAO,CAAC,CAAC,KAAK,EAA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122
122
|
type: 'liquidity',
|
123
123
|
data: { liquidities: depositedLiquidities },
|
124
|
-
label: '
|
124
|
+
label: 'Vault',
|
125
125
|
networkId: portfolio_core_1.NetworkId.sui,
|
126
126
|
platformId: constants_1.platformId,
|
127
127
|
value: (0, portfolio_core_1.getUsdValueSum)(depositedLiquidities.map((l) => l.value)),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mole/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AAGpC,2CAOqB;AACrB,iDAAmD;AACnD,uGAA+E;AAE/E,iFAA8E;AAE9E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,cAAc,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC9D,KAAK,CAAC,OAAO,CAAsB,mBAAO,EAAE;YAC1C,MAAM,EAAE,wBAAY;YACpB,SAAS,EAAE,0BAAS,CAAC,GAAG;SACzB,CAAC;QACF,MAAM,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,CAAC;QAChC,OAAO,CAAC,GAAG,CACT,mCAAuB,CAAC,GAAG,CAAC,CAAC,sBAAsB,EAAE,EAAE,CACrD,IAAA,6CAAqB,EAAW,MAAM,EAAE;YACtC,QAAQ,EAAE,sBAAsB;YAChC,IAAI,EAAE;gBACJ,IAAI,EAAE,gCAAoB;gBAC1B,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE;aAC5C;SACF,CAAC,CACH,CACF;KACF,CAAC,CAAC;IAEH,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,S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E,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;;YACvD,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,QAAQ,GAAuB,EAAE,CAAC;IAExC,IAAI,oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,EAAE,WAAW,EAAE,oBAAoB,EAAE;YAC3C,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mole/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AAGpC,2CAOqB;AACrB,iDAAmD;AACnD,uGAA+E;AAE/E,iFAA8E;AAE9E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,cAAc,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC9D,KAAK,CAAC,OAAO,CAAsB,mBAAO,EAAE;YAC1C,MAAM,EAAE,wBAAY;YACpB,SAAS,EAAE,0BAAS,CAAC,GAAG;SACzB,CAAC;QACF,MAAM,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,CAAC;QAChC,OAAO,CAAC,GAAG,CACT,mCAAuB,CAAC,GAAG,CAAC,CAAC,sBAAsB,EAAE,EAAE,CACrD,IAAA,6CAAqB,EAAW,MAAM,EAAE;YACtC,QAAQ,EAAE,sBAAsB;YAChC,IAAI,EAAE;gBACJ,IAAI,EAAE,gCAAoB;gBAC1B,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE;aAC5C;SACF,CAAC,CACH,CACF;KACF,CAAC,CAAC;IAEH,IAAI,CA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AAe,OAAO,CAAC"}
|
@@ -8,16 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
9
|
});
|
10
10
|
};
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
-
};
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
12
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
|
-
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
17
13
|
const constants_1 = require("./constants");
|
18
14
|
const aptos_1 = require("../../utils/aptos");
|
19
15
|
const clients_1 = require("../../utils/clients");
|
20
|
-
const
|
16
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
21
17
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
22
18
|
const client = (0, clients_1.getClientAptos)();
|
23
19
|
const [farmingPools, resources] = yield Promise.all([
|
@@ -92,56 +88,24 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
92
88
|
})));
|
93
89
|
if (!stakedTokens || stakedTokens.length === 0)
|
94
90
|
return [];
|
95
|
-
const
|
96
|
-
|
97
|
-
|
98
|
-
st.rewards.forEach((r) => tokenMints.add(r.coinType));
|
91
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.aptos, constants_1.platformId);
|
92
|
+
const element = elementRegistry.addElementLiquidity({
|
93
|
+
label: 'Farming',
|
99
94
|
});
|
100
|
-
const tokenPrices = yield cache.getTokenPricesAsMap([...tokenMints], portfolio_core_1.NetworkId.aptos);
|
101
|
-
const liquidities = [];
|
102
95
|
stakedTokens.forEach((stakedToken) => {
|
103
|
-
const
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
const asset = (0, tokenPriceToAssetToken_1.default)(stakedToken.coinType, new bignumber_js_1.default(stakedToken.amount)
|
108
|
-
.dividedBy(Math.pow(10, tokenPrice.decimals))
|
109
|
-
.toNumber(), portfolio_core_1.NetworkId.aptos, tokenPrice);
|
110
|
-
stakedToken.rewards.forEach((r) => {
|
111
|
-
if (r.amount === '0')
|
112
|
-
return;
|
113
|
-
const rewardTokenPrice = tokenPrices.get((0, portfolio_core_1.formatMoveTokenAddress)(r.coinType));
|
114
|
-
if (!rewardTokenPrice)
|
115
|
-
return;
|
116
|
-
rewardAssets.push((0, tokenPriceToAssetToken_1.default)(r.coinType, new bignumber_js_1.default(r.amount)
|
117
|
-
.dividedBy(Math.pow(10, rewardTokenPrice.decimals))
|
118
|
-
.toNumber(), portfolio_core_1.NetworkId.aptos, rewardTokenPrice));
|
96
|
+
const liquidity = element.addLiquidity();
|
97
|
+
liquidity.addAsset({
|
98
|
+
address: stakedToken.coinType,
|
99
|
+
amount: stakedToken.amount,
|
119
100
|
});
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
rewardAssets,
|
126
|
-
rewardAssetsValue,
|
127
|
-
value,
|
128
|
-
yields: [],
|
101
|
+
stakedToken.rewards.forEach((r) => {
|
102
|
+
liquidity.addRewardAsset({
|
103
|
+
address: r.coinType,
|
104
|
+
amount: r.amount,
|
105
|
+
});
|
129
106
|
});
|
130
107
|
});
|
131
|
-
|
132
|
-
return [];
|
133
|
-
return [
|
134
|
-
{
|
135
|
-
networkId: portfolio_core_1.NetworkId.aptos,
|
136
|
-
label: 'Farming',
|
137
|
-
platformId: constants_1.platformId,
|
138
|
-
type: portfolio_core_1.PortfolioElementType.liquidity,
|
139
|
-
value: (0, portfolio_core_1.getUsdValueSum)(liquidities.map((a) => a.value)),
|
140
|
-
data: {
|
141
|
-
liquidities,
|
142
|
-
},
|
143
|
-
},
|
144
|
-
];
|
108
|
+
return elementRegistry.getElements(cache);
|
145
109
|
});
|
146
110
|
const fetcher = {
|
147
111
|
id: `${constants_1.platformId}-farming-pools`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"farmingPoolsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/thala/farmingPoolsFetcher.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"farmingPoolsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/thala/farmingPoolsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAwE;AAGxE,2CAKqB;AACrB,6CAK2B;AAC3B,iDAAqD;AAErD,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,wBAAc,GAAE,CAAC;IAEhC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAClD,KAAK,CAAC,OAAO,CAAa,2BAAe,EAAE;YACzC,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,KAAK;SAC3B,CAAC;QACF,IAAA,2BAAmB,EAAC,MAAM,EAAE,KAAK,CAAC;KACnC,CAAC,CAAC;IAEH,IAAI,CAAC,YAAY;QAAE,OAAO,EAAE,CAAC;IAC7B,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAC;IAE1B,MAAM,eAAe,GAAG,SAAS;SAC9B,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;;QAChB,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC;QACnC,IAAI,CAAC,IAAA,gCAAwB,EAAC,YAAY,CAAC;YAAE,OAAO,IAAI,CAAC;QACzD,MAAM,aAAa,GAAG,IAAA,gCAAe,EAAC,YAAY,CAAC,CAAC;QACpD,IAAI,aAAa,CAAC,IAAI,KAAK,iBAAS;YAAE,OAAO,IAAI,CAAC;QAClD,IAAI,CAAC,aAAa,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QACrC,MAAM,QAAQ,GAAG,MAAA,aAAa,CAAC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OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;QACnC,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;QAEzC,SAAS,CAAC,QAAQ,CAAC;YACjB,OAAO,EAAE,WAAW,CAAC,QAAQ;YAC7B,MAAM,EAAE,WAAW,CAAC,MAAM;SAC3B,CAAC,CAAC;QAEH,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAChC,SAAS,CAAC,cAAc,CAAC;gBACvB,OAAO,EAAE,CAAC,CAAC,QAAQ;gBACnB,MAAM,EAAE,CAAC,CAAC,MAAM;aACjB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,gBAAgB;IACjC,SAAS,EAAE,0BAAS,CAAC,KAAK;IAC1B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -45,7 +45,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
45
45
|
yields: [],
|
46
46
|
name: tokenPrice.liquidityName,
|
47
47
|
};
|
48
|
-
const tag = (0, helpers_1.getLpTag)(tokenPrice.platformId, tokenPrice.elementName);
|
48
|
+
const tag = (0, helpers_1.getLpTag)(tokenPrice.platformId, tokenPrice.elementName, tokenPrice.label);
|
49
49
|
if (!liquiditiesByTag[tag]) {
|
50
50
|
liquiditiesByTag[tag] = [];
|
51
51
|
}
|
@@ -70,13 +70,13 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
70
70
|
elements.push(walletTokensElement);
|
71
71
|
}
|
72
72
|
for (const [tag, liquidities] of Object.entries(liquiditiesByTag)) {
|
73
|
-
const { platformId, elementName } = (0, helpers_1.parseLpTag)(tag);
|
73
|
+
const { platformId, elementName, label } = (0, helpers_1.parseLpTag)(tag);
|
74
74
|
elements.push({
|
75
75
|
type: portfolio_core_1.PortfolioElementType.liquidity,
|
76
76
|
networkId: portfolio_core_1.NetworkId.sui,
|
77
77
|
platformId,
|
78
78
|
name: elementName,
|
79
|
-
label: 'LiquidityPool',
|
79
|
+
label: label !== null && label !== void 0 ? label : 'LiquidityPool',
|
80
80
|
value: (0, portfolio_core_1.getUsdValueSum)(liquidities.map((a) => a.value)),
|
81
81
|
data: {
|
82
82
|
liquidities,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sui.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/sui.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AAIpC,oDAAsD;AACtD,wGAAgF;AAChF,4CAAoD;AACpD,0GAAkF;AAClF,wCAAkD;AAElD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAE7D,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACpD,CAAC,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,EACpD,0BAAS,CAAC,GAAG,CACd,CAAC;IAEF,MAAM,kBAAkB,GAA0B,EAAE,CAAC;IACrD,MAAM,gBAAgB,GAAyC,EAAE,CAAC;IAClE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9C,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;QACrC,MAAM,SAAS,GAAG,MAAM,CAAC,WA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;SACF,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACrC,CAAC;IACD,KAAK,MAAM,CAAC,GAAG,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAClE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAA,oBAAU,EAAC,GAAG,CAAC,CAAC;QAC3D,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,SAAS;YACpC,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU;YACV,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,eAAe;YAC/B,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACtD,IAAI,EAAE;gBACJ,WAAW;aACZ;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,gCAAoB,CAAC,EAAE,MAAM;IACpC,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -1,12 +1,13 @@
|
|
1
|
-
import { NetworkIdType, TokenPriceSource, UniTokenList, UniTokenListVersion } from '@sonarwatch/portfolio-core';
|
1
|
+
import { NetworkIdType, PortfolioElementLabel, TokenPriceSource, UniTokenList, UniTokenListVersion } from '@sonarwatch/portfolio-core';
|
2
2
|
import { TokenData } from './types';
|
3
3
|
export declare function compareVersion(versionA: UniTokenListVersion, versionB: UniTokenListVersion): 1 | -1 | 0;
|
4
4
|
export declare function isLatestVersion(newVersion: UniTokenListVersion, oldVersion: UniTokenListVersion): boolean;
|
5
5
|
export declare function getCoingeckoSources(networkId: NetworkIdType, tokensData: TokenData[]): Promise<TokenPriceSource[]>;
|
6
6
|
export declare function getTokensData(tokenList: UniTokenList): TokenData[];
|
7
7
|
export declare const lpTagSeparator = "<|>";
|
8
|
-
export declare function getLpTag(platformId: string, elementName?: string): string;
|
8
|
+
export declare function getLpTag(platformId: string, elementName?: string, label?: PortfolioElementLabel): string;
|
9
9
|
export declare function parseLpTag(tag: string): {
|
10
10
|
platformId: string;
|
11
11
|
elementName?: string;
|
12
|
+
label?: PortfolioElementLabel;
|
12
13
|
};
|
@@ -124,17 +124,18 @@ function getTokensData(tokenList) {
|
|
124
124
|
}
|
125
125
|
exports.getTokensData = getTokensData;
|
126
126
|
exports.lpTagSeparator = '<|>';
|
127
|
-
function getLpTag(platformId, elementName) {
|
128
|
-
return `${platformId}${elementName ? `${exports.lpTagSeparator}${elementName}` :
|
127
|
+
function getLpTag(platformId, elementName, label) {
|
128
|
+
return `${platformId}${label ? `${exports.lpTagSeparator}${label}` : `${exports.lpTagSeparator}`}${elementName ? `${exports.lpTagSeparator}${elementName}` : `${exports.lpTagSeparator}`}`;
|
129
129
|
}
|
130
130
|
exports.getLpTag = getLpTag;
|
131
131
|
function parseLpTag(tag) {
|
132
|
-
const split = tag.split(exports.lpTagSeparator,
|
132
|
+
const split = tag.split(exports.lpTagSeparator, 3);
|
133
133
|
if (split.length < 1)
|
134
134
|
throw new Error(`Tag is not valid: ${tag}`);
|
135
135
|
return {
|
136
136
|
platformId: split[0],
|
137
|
-
|
137
|
+
label: split.at(1) === '' ? undefined : split.at(1),
|
138
|
+
elementName: split.at(2) === '' ? undefined : split.at(2),
|
138
139
|
};
|
139
140
|
}
|
140
141
|
exports.parseLpTag = parseLpTag;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tokens/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA6C;
|
1
|
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ACJ,CAAC;AAbD,gCAaC"}
|
@@ -169,8 +169,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
169
169
|
type: portfolio_core_1.PortfolioElementType.liquidity,
|
170
170
|
networkId: portfolio_core_1.NetworkId.sui,
|
171
171
|
platformId: constants_1.platformId,
|
172
|
-
label: '
|
173
|
-
name: 'Vault',
|
172
|
+
label: 'Vault',
|
174
173
|
value: totalLiquidityValue,
|
175
174
|
data: {
|
176
175
|
liquidities: assets,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"clmmVaultFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/turbos/clmmVaultFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AAGrC,2CAA0E;AAC1E,qEAAkE;AAClE,iDAAmD;AAQnD,qEAAkE;AAClE,wFAAyF;AACzF,qGAA6E;AAC7E,uFAAoF;AACpF,+DAA4D;AAE5D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,uBAAuB,GAAG,MAAM,IAAA,iCAAe,EACnD,MAAM,EACN,KAAK,EACL;QACE,MAAM,EAAE;YACN,OAAO,EAAE,0BAAc;SACxB;QACD,OAAO,EAAE;YACP,WAAW,EAAE,IAAI;YACjB,QAAQ,EAAE,IAAI;SACf;KACF,CACF,CAAC;IAEF,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEpD,MAAM,WAAW,GAAgB,IAAI,GAAG,EAAE,CAAC;IAC3C,MAAM,iBAAiB,GAA0B,IAAI,GAAG,EAAE,CAAC;IAC3D,uBAAuB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;;QACtC,IAAI,MAAA,GAAG,CAAC,IAAI,0CAAE,OAAO,EAAE,CAAC;YACtB,WAAW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;QACX,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;QACpD,MAAM,CAAC,IAAI,CAAC;YACV,MAAM,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;YAClC,WAAW,EAAE,KAAK;YAClB,YAAY,EAAE,EAAE;YAChB,iBAAiB,EAAE,CAAC;YACpB,KAAK;YACL,MAAM,EAAE,EAAE;SACX,CAAC,CAAC;QACH,mBAAmB,IAAI,KAAK,CAAC;IAC/B,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,SAAS;YACpC,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"clmmVaultFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/turbos/clmmVaultFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AAGrC,2CAA0E;AAC1E,qEAAkE;AAClE,iDAAmD;AAQnD,qEAAkE;AAClE,wFAAyF;AACzF,qGAA6E;AAC7E,uFAAoF;AACpF,+DAA4D;AAE5D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,uBAAuB,GAAG,MAAM,IAAA,iCAAe,EACnD,MAAM,EACN,KAAK,EACL;QACE,MAAM,EAAE;YACN,OAAO,EAAE,0BAAc;SACxB;QACD,OAAO,EAAE;YACP,WAAW,EAAE,IAAI;YACjB,QAAQ,EAAE,IAAI;SACf;KACF,CACF,CAAC;IAEF,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEpD,MAAM,WAAW,GAAgB,IAAI,GAAG,EAAE,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C,QAAQ,EAAE,EAC7D,0BAAS,CAAC,GAAG,EACb,WAAW,CACZ,CAAC;QACF,IACE,CAAC,WAAW;YACZ,CAAC,WAAW;YACZ,WAAW,CAAC,KAAK,KAAK,IAAI;YAC1B,WAAW,CAAC,KAAK,KAAK,IAAI;YAE1B,SAAS;QACX,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;QACpD,MAAM,CAAC,IAAI,CAAC;YACV,MAAM,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;YAClC,WAAW,EAAE,KAAK;YAClB,YAAY,EAAE,EAAE;YAChB,iBAAiB,EAAE,CAAC;YACpB,KAAK;YACL,MAAM,EAAE,EAAE;SACX,CAAC,CAAC;QACH,mBAAmB,IAAI,KAAK,CAAC;IAC/B,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,SAAS;YACpC,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,OAAO;YACd,KAAK,EAAE,mBAAmB;YAC1B,IAAI,EAAE;gBACJ,WAAW,EAAE,MAAM;aACpB;SACF;KACF,CAAC;AACJ,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"}
|
@@ -13,12 +13,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
15
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
16
17
|
const constants_1 = require("./constants");
|
17
18
|
const clients_1 = require("../../utils/clients");
|
18
19
|
const safu_helpers_1 = require("./safu_helpers");
|
19
20
|
const MemoizedCache_1 = require("../../utils/misc/MemoizedCache");
|
20
21
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
21
|
-
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
22
22
|
const vaultsMemo = new MemoizedCache_1.MemoizedCache(constants_1.safuVaultsKey, {
|
23
23
|
prefix: constants_1.platformId,
|
24
24
|
networkId: portfolio_core_1.NetworkId.sui,
|
@@ -45,7 +45,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
45
45
|
const vaultIndex = constants_1.vaultsIndexes[i];
|
46
46
|
const share = shareDatas[vaultIndex];
|
47
47
|
if (share.length > 0) {
|
48
|
-
const [vault
|
48
|
+
const [vault] = vaults[vaultIndex];
|
49
49
|
if (!vault)
|
50
50
|
continue;
|
51
51
|
const amount = new bignumber_js_1.default(share[0].share.active_share)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"safuFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/safuFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;
|
1
|
+
{"version":3,"file":"safuFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/safuFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AAGrC,2CAKqB;AACrB,iDAAmD;AACnD,iDAA8C;AAC9C,kEAA+D;AAE/D,qGAA6E;AAE7E,MAAM,UAAU,GAAG,IAAI,6BAAa,CAEjC,yBAAa,EAAE;IAChB,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;CACzB,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B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KAAK,CAAC,CACjD,CAAC;YAEF,MAAM,WAAW,GAAG;gBAClB;oBACE,MAAM;oBACN,WAAW;oBACX,YAAY;oBACZ,iBAAiB;oBACjB,KAAK;oBACL,MAAM,EAAE,EAAE;iBACX;aACF,CAAC;YAEF,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,qCAAoB,CAAC,SAAS;gBACpC,SAAS,EAAE,0BAAS,CAAC,GAAG;gBACxB,UAAU,EAAV,sBAAU;gBACV,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,QAAQ,2BAAe,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE;gBACjD,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACtD,IAAI,EAAE;oBACJ,WAAW;iBACZ;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -97,7 +97,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
97
97
|
if (assets.length > 0)
|
98
98
|
elements.push({
|
99
99
|
networkId: portfolio_core_1.NetworkId.sui,
|
100
|
-
label: '
|
100
|
+
label: 'Vault',
|
101
101
|
platformId: constants_1.platformId,
|
102
102
|
name: vault.metadata,
|
103
103
|
type: portfolio_core_1.PortfolioElementType.multiple,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/vaultsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AAGrC,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B,EACjB,SAAS,EACT;oBACE,IAAI,EAAE,CAAC,YAAY,CAAC;iBACrB,CACF,CACF,CAAC;QACN,CAAC;QAED,IAAI,gBAAgB,IAAI,wBAAwB,KAAK,GAAG,EAAE,CAAC;YACzD,MAAM,CAAC,IAAI,CACT,IAAA,gCAAsB,EACpB,WAAW,EACX,IAAI,sBAAS,CAAC,wBAAwB,CAAC;iBACpC,SAAS,CAAC,SAAA,EAAE,EAAI,gBAAgB,CAAC,QAAQ,CAAA,CAAC;iBAC1C,QAAQ,EAAE,EACb,0BAAS,CAAC,GAAG,EACb,gBAAgB,EAChB,SAAS,EACT,EAAE,WAAW,EAAE,IAAI,EAAE,CACtB,CACF,CAAC;QACJ,CAAC;QAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;YACnB,QAAQ,CAAC,IAAI,CAAC;gBACZ,SAAS,EAAE,0BAAS,CAAC,GAAG;gBACxB,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"vaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/vaultsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AAGrC,2CAA6D;AAC7D,iDAAmD;AACnD,qEAAkE;AAElE,uCAA6C;AAC7C,qEAAkE;AAClE,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,gBAAgB,GAAG,MAAM,IAAA,iCAAe,EAC5C,MAAM,EACN,KAAK,EACL;QACE,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAkB,EAAE;KAC3C,CACF,CAAC;IACF,IAAI,CAAC,gBAAgB;QAAE,OAAO,EAAE,CAAC;IAEjC,MAAM,WAAW,GAAa,EAAE,CAAC;IACjC,MAAM,SAAS,GAAgB,IAAI,GAAG,EAAE,CAAC;IACzC,gBAAgB,CAAC,O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Q,CAAC,IAAI,CAAC;gBACZ,SAAS,EAAE,0BAAS,CAAC,GAAG;gBACxB,KAAK,EAAE,OAAO;gBACd,UAAU,EAAV,sBAAU;gBACV,IAAI,EAAE,KAAK,CAAC,QAAQ;gBACpB,IAAI,EAAE,qCAAoB,CAAC,QAAQ;gBACnC,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACzD,IAAI,EAAE;oBACJ,MAAM;iBACP;aACF,CAAC,CAAC;IACP,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -131,7 +131,6 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
131
131
|
const amountToCollatAmount = collateral.dividedBy(offer.totalAmount);
|
132
132
|
const amount = order.amount.times(amountToCollatAmount).toNumber();
|
133
133
|
const side = offer.offerType === structs_1.OfferType.Buy ? 'Sell Order' : 'Buy Order';
|
134
|
-
console.log(offer);
|
135
134
|
const collatAsset = (0, tokenPriceToAssetToken_1.default)(mint, amount, portfolio_core_1.NetworkId.solana, tokenPrice, undefined, {
|
136
135
|
tags: [side],
|
137
136
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"depositFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/depositFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,6CAA4C;AAG5C,2CAAyD;AACzD,iDAAsD;AACtD,+CAG4B;AAC5B,uCAQmB;AACnB,uCAAyE;AACzE,qGAA6E;AAC7E,mCAA0C;AAE1C,MAAM,QAAQ,GAAoB,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OAAO,CAAC"}
|
@@ -8,5 +8,6 @@ export declare class AssetBuilder {
|
|
8
8
|
attributes: PortfolioAssetAttributes;
|
9
9
|
alreadyShifted: boolean;
|
10
10
|
constructor(params: PortfolioAssetParams);
|
11
|
-
|
11
|
+
getUnderlyings(networkId: NetworkIdType, tokenPrices: TokenPriceMap): PortfolioAsset[];
|
12
|
+
get(networkId: NetworkIdType, tokenPrices: TokenPriceMap): PortfolioAsset | null;
|
12
13
|
}
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.AssetBuilder = void 0;
|
7
7
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
8
8
|
const tokenPriceToAssetToken_1 = __importDefault(require("../misc/tokenPriceToAssetToken"));
|
9
|
+
const tokenPriceToAssetTokens_1 = __importDefault(require("../misc/tokenPriceToAssetTokens"));
|
9
10
|
class AssetBuilder {
|
10
11
|
constructor(params) {
|
11
12
|
this.address = params.address.toString();
|
@@ -13,9 +14,20 @@ class AssetBuilder {
|
|
13
14
|
this.attributes = params.attributes || {};
|
14
15
|
this.alreadyShifted = params.alreadyShifted || false;
|
15
16
|
}
|
16
|
-
|
17
|
+
getUnderlyings(networkId, tokenPrices) {
|
17
18
|
let amount = new bignumber_js_1.default(this.amount);
|
18
|
-
if (
|
19
|
+
if (amount.isZero())
|
20
|
+
return [];
|
21
|
+
const tokenPrice = tokenPrices.get(this.address);
|
22
|
+
if (!tokenPrice)
|
23
|
+
return [];
|
24
|
+
if (!this.alreadyShifted)
|
25
|
+
amount = amount.dividedBy(Math.pow(10, tokenPrice.decimals));
|
26
|
+
return (0, tokenPriceToAssetTokens_1.default)(tokenPrice.address, amount.toNumber(), networkId, tokenPrice, undefined, this.attributes);
|
27
|
+
}
|
28
|
+
get(networkId, tokenPrices) {
|
29
|
+
let amount = new bignumber_js_1.default(this.amount);
|
30
|
+
if (amount.isZero())
|
19
31
|
return null;
|
20
32
|
const tokenPrice = tokenPrices.get(this.address);
|
21
33
|
if (!tokenPrice)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AssetBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/AssetBuilder.ts"],"names":[],"mappings":";;;;;;AAKA,gEAAqC;AAErC,4FAAoE;
|
1
|
+
{"version":3,"file":"AssetBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/AssetBuilder.ts"],"names":[],"mappings":";;;;;;AAKA,gEAAqC;AAErC,4FAAoE;AAEpE,8FAAsE;AAEtE,MAAa,YAAY;IAMvB,YAAY,MAA4B;QACtC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;QAC1C,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,IAAI,KAAK,CAAC;IACvD,CAAC;IAED,cAAc,CACZ,SAAwB,EACxB,WAA0B;QAE1B,IAAI,MAAM,GAAG,IAAI,sBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,MAAM,CAAC,MAAM,EAAE;YAAE,OAAO,EAAE,CAAC;QAC/B,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjD,IAAI,CAAC,UAAU;YAAE,OAAO,EAAE,CAAC;QAE3B,IAAI,CAAC,IAAI,CAAC,cAAc;YACtB,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,SAAA,EAAE,EAAI,UAAU,CAAC,QAAQ,CAAA,CAAC,CAAC;QAEvD,OAAO,IAAA,iCAAuB,EAC5B,UAAU,CAAC,OAAO,EAClB,MAAM,CAAC,QAAQ,EAAE,EACjB,SAAS,EACT,UAAU,EACV,SAAS,EACT,IAAI,CAAC,UAAU,CAChB,CAAC;IACJ,CAAC;IAED,GAAG,CACD,SAAwB,EACxB,WAA0B;QAE1B,IAAI,MAAM,GAAG,IAAI,sBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,MAAM,CAAC,MAAM,EAAE;YAAE,OAAO,IAAI,CAAC;QACjC,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjD,IAAI,CAAC,UAAU;YAAE,OAAO,IAAI,CAAC;QAE7B,IAAI,CAAC,IAAI,CAAC,cAAc;YACtB,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,SAAA,EAAE,EAAI,UAAU,CAAC,QAAQ,CAAA,CAAC,CAAC;QAEvD,OAAO,IAAA,gCAAsB,EAC3B,UAAU,CAAC,OAAO,EAClB,MAAM,CAAC,QAAQ,EAAE,EACjB,SAAS,EACT,UAAU,EACV,SAAS,EACT,IAAI,CAAC,UAAU,CAChB,CAAC;IACJ,CAAC;CACF;AAxDD,oCAwDC"}
|
@@ -27,7 +27,8 @@ class LiquidityBuilder {
|
|
27
27
|
}
|
28
28
|
get(networkId, tokenPrices) {
|
29
29
|
const assets = this.assets
|
30
|
-
.map((a) => a.
|
30
|
+
.map((a) => a.getUnderlyings(networkId, tokenPrices))
|
31
|
+
.flat()
|
31
32
|
.filter((a) => a !== null);
|
32
33
|
const rewardAssets = this.rewardAssets
|
33
34
|
.map((a) => a.get(networkId, tokenPrices))
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LiquidityBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/LiquidityBuilder.ts"],"names":[],"mappings":";;;AAAA,+DAMoC;AAEpC,iDAA8C;AAI9C,MAAa,gBAAgB;IAM3B,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,QAAQ,CAAC,MAA4B;QACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,2BAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,cAAc,CAAC,MAA4B;QACzC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,2BAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IACnD,CAAC;IAED,QAAQ,CAAC,MAAa;QACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK;QACH,OAAO;YACL,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;YACpC,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;SAC3C,CAAC;IACJ,CAAC;IAED,GAAG,CACD,SAAwB,EACxB,WAA0B;QAE1B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM;aACvB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,
|
1
|
+
{"version":3,"file":"LiquidityBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/LiquidityBuilder.ts"],"names":[],"mappings":";;;AAAA,+DAMoC;AAEpC,iDAA8C;AAI9C,MAAa,gBAAgB;IAM3B,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,QAAQ,CAAC,MAA4B;QACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CA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