@sonarwatch/portfolio-plugins 0.11.111 → 0.11.113
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1170 -1158
- package/README.md +3 -3
- package/package.json +2 -2
- package/src/index.js +5 -4
- package/src/index.js.map +1 -1
- package/src/plugins/aurory/stakingFetcher.js +2 -3
- package/src/plugins/aurory/stakingFetcher.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/flash/poolJob.js +14 -68
- package/src/plugins/flash/poolJob.js.map +1 -1
- package/src/plugins/flexlend/helpers.js +1 -3
- package/src/plugins/flexlend/helpers.js.map +1 -1
- package/src/plugins/hawksight/positionsFetcher.js +10 -8
- package/src/plugins/hawksight/positionsFetcher.js.map +1 -1
- package/src/plugins/jupiter/constants.d.ts +2 -0
- package/src/plugins/jupiter/constants.js +8 -1
- package/src/plugins/jupiter/constants.js.map +1 -1
- package/src/plugins/jupiter/index.d.ts +2 -0
- package/src/plugins/jupiter/index.js +3 -1
- package/src/plugins/jupiter/index.js.map +1 -1
- package/src/plugins/jupiter/poolJob.js +3 -5
- package/src/plugins/jupiter/poolJob.js.map +1 -1
- package/src/plugins/liquiditypools-sei/fetcher.js +4 -1
- package/src/plugins/liquiditypools-sei/fetcher.js.map +1 -1
- package/src/plugins/orders/index.js +2 -7
- package/src/plugins/orders/index.js.map +1 -1
- package/src/plugins/orders/jupiter/constants.d.ts +0 -2
- package/src/plugins/orders/jupiter/constants.js +1 -8
- package/src/plugins/orders/jupiter/constants.js.map +1 -1
- package/src/plugins/orders/jupiter/dcaFetcher.js +2 -1
- package/src/plugins/orders/jupiter/dcaFetcher.js.map +1 -1
- package/src/plugins/orders/jupiter/limitFetcher.js +2 -1
- package/src/plugins/orders/jupiter/limitFetcher.js.map +1 -1
- package/src/plugins/solend/obligationsFetcher.js +3 -2
- package/src/plugins/solend/obligationsFetcher.js.map +1 -1
- package/src/plugins/spl-staking/constants.d.ts +15 -0
- package/src/plugins/spl-staking/constants.js +51 -0
- package/src/plugins/spl-staking/constants.js.map +1 -0
- package/src/plugins/spl-staking/filters.js.map +1 -0
- package/src/plugins/{flowmatic → spl-staking}/index.js +3 -2
- package/src/plugins/spl-staking/index.js.map +1 -0
- package/src/plugins/spl-staking/poolsJob.d.ts +3 -0
- package/src/plugins/spl-staking/poolsJob.js +39 -0
- package/src/plugins/spl-staking/poolsJob.js.map +1 -0
- package/src/plugins/spl-staking/stakingFetcher.js +83 -0
- package/src/plugins/spl-staking/stakingFetcher.js.map +1 -0
- package/src/plugins/spl-staking/structs.d.ts +42 -0
- package/src/plugins/spl-staking/structs.js +42 -0
- package/src/plugins/spl-staking/structs.js.map +1 -0
- package/src/plugins/spl-staking/types.d.ts +4 -0
- package/src/plugins/spl-staking/types.js +3 -0
- package/src/plugins/spl-staking/types.js.map +1 -0
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/tensor/bidsFetcher.js +2 -0
- package/src/plugins/tensor/bidsFetcher.js.map +1 -1
- package/src/plugins/tensor/singleListingFetcher.js +0 -79
- package/src/plugins/tensor/singleListingFetcher.js.map +1 -1
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/x-staking-solana/constants.js +9 -0
- package/src/plugins/x-staking-solana/constants.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/plugins/flowmatic/constants.d.ts +0 -6
- package/src/plugins/flowmatic/constants.js +0 -16
- package/src/plugins/flowmatic/constants.js.map +0 -1
- package/src/plugins/flowmatic/filters.js.map +0 -1
- package/src/plugins/flowmatic/index.js.map +0 -1
- package/src/plugins/flowmatic/stakingFetcher.js +0 -59
- package/src/plugins/flowmatic/stakingFetcher.js.map +0 -1
- package/src/plugins/flowmatic/structs.d.ts +0 -16
- package/src/plugins/flowmatic/structs.js +0 -18
- package/src/plugins/flowmatic/structs.js.map +0 -1
- /package/src/plugins/{flowmatic → spl-staking}/filters.d.ts +0 -0
- /package/src/plugins/{flowmatic → spl-staking}/filters.js +0 -0
- /package/src/plugins/{flowmatic → spl-staking}/index.d.ts +0 -0
- /package/src/plugins/{flowmatic → spl-staking}/stakingFetcher.d.ts +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dcaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/orders/jupiter/dcaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AAIpC,4CAA0C;AAC1C,oDAAyD;AACzD,kDAAiE;AACjE,qCAAqC;AACrC,
|
1
|
+
{"version":3,"file":"dcaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/orders/jupiter/dcaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AAIpC,4CAA0C;AAC1C,oDAAyD;AACzD,kDAAiE;AACjE,qCAAqC;AACrC,2CAA2C;AAC3C,uCAA6C;AAC7C,gGAAuE;AACvE,wGAAgF;AAChF,uDAA0D;AAE1D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,kBAAS,EACT,wBAAY,EACZ,IAAA,0BAAgB,EAAC,KAAK,CAAC,CACxB,CAAC;IAEF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,aAAa,GAA2B,IAAI,GAAG,EAAE,CAAC;IAExD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QAC/C,MAAM,UAAU,GAAG,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAChD,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,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AK,CAAC,KAAK,CAAC,CAAC;YACzD,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,eAAe,QAAQ,CAAC,MAAM,GAAG;YACvC,IAAI,EAAE,EAAE,MAAM,EAAE;SACjB;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -20,6 +20,7 @@ const solana_1 = require("../../../utils/solana");
|
|
20
20
|
const filters_1 = require("./filters");
|
21
21
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../../utils/misc/tokenPriceToAssetToken"));
|
22
22
|
const constants_2 = require("./constants");
|
23
|
+
const constants_3 = require("../../jupiter/constants");
|
23
24
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
24
25
|
const client = (0, clients_1.getClientSolana)();
|
25
26
|
const limitOrdersAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.limitOrderStruct, constants_2.limitProgramId, (0, filters_1.jupiterLimitsFilter)(owner));
|
@@ -62,7 +63,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
62
63
|
const element = {
|
63
64
|
type: 'multiple',
|
64
65
|
networkId: portfolio_core_1.NetworkId.solana,
|
65
|
-
platformId:
|
66
|
+
platformId: constants_3.jupiterPlatform.id,
|
66
67
|
value,
|
67
68
|
label: 'Deposit',
|
68
69
|
name: 'Limit Orders',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"limitFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/orders/jupiter/limitFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAIpC,4CAA0C;AAC1C,oDAAyD;AACzD,qCAA4C;AAC5C,kDAAiE;AACjE,uCAAgD;AAChD,wGAAgF;AAChF,
|
1
|
+
{"version":3,"file":"limitFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/orders/jupiter/limitFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAIpC,4CAA0C;AAC1C,oDAAyD;AACzD,qCAA4C;AAC5C,kDAAiE;AACjE,uCAAgD;AAChD,wGAAgF;AAChF,2CAA6C;AAC7C,uDAA0D;AAE1D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,mBAAmB,GAAG,MAAM,IAAA,iCAAwB,EACxD,MAAM,EACN,yBAAgB,EAChB,0BAAc,EACd,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;IACF,IAAI,mBAAmB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEhD,MAAM,WAAW,GAAgB,IAAI,GAAG,EAAE,CAAC;IAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,mBAAmB,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACvD,WAAW,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,iBAAiB,GAAG,MAAM,KAAK,CAAC,cAAc,CAClD,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EACvB,0BAAS,CAAC,MAAM,CACjB,CAAC;IAEF,MAAM,cAAc,GAA4B,IAAI,GAAG,EAAE,CAAC;IAC1D,iBAAiB,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE;QAC/B,IAAI,CAAC,EAAE;YAAE,OAAO;QAChB,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,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MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,OAAO,GAA6B;QACxC,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE,0BAAS,CAAC,MAAM;QAC3B,UAAU,EAAE,2BAAe,CAAC,EAAE;QAC9B,KAAK;QACL,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,EAAE,MAAM,EAAE;KACjB,CAAC;IAEF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,gBAAgB;IACjC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -53,8 +53,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
53
53
|
const marketSeed = constants_1.mainMarket.slice(0, 16);
|
54
54
|
const ownerSeed = owner.slice(0, 16);
|
55
55
|
const obligationSeed = ownerSeed + marketSeed;
|
56
|
-
const
|
57
|
-
|
56
|
+
const oldFlexlendObligAddress = yield web3_js_1.PublicKey.createWithSeed(constants_2.AUTOMATION_PUBLIC_KEY, obligationSeed, constants_1.pid);
|
57
|
+
const newFlexlendObligAddress = yield web3_js_1.PublicKey.createWithSeed(new web3_js_1.PublicKey(owner), obligationSeed, constants_1.pid);
|
58
|
+
obligationAddresses.push(...[oldFlexlendObligAddress, newFlexlendObligAddress]);
|
58
59
|
const obligations = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, structs_1.obligationStruct, obligationAddresses);
|
59
60
|
if (obligations.length === 0)
|
60
61
|
return [];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"obligationsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/solend/obligationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AACrC,6CAA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AK,CAAC,EACpB,IAAI,EACJ,eAAG,CACJ,CAAC;YACF,mBAAmB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IACD,iDAAiD;IACjD,MAAM,UAAU,GAAG,sBAAU,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3C,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACrC,MAAM,cAAc,GAAG,SAAS,GAAG,UAAU,CAAC;IAC9C,MAAM,
|
1
|
+
{"version":3,"file":"obligationsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/solend/obligationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,2CAOqB;AACrB,uCAA6D;AAE7D,+CAAmE;AACnE,iDAAsD;AACtD,uCAA6C;AAC7C,qGAA6E;AAC7E,6EAAqD;AACrD,qDAA8D;AAC9D,6DAA+D;AAE/D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,mBAAmB,GAAG,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,WAAW,CAAa;QAClD,MAAM,EAAE,yBAAa;QACrB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,MAAM,gBAAgB,GAA4B,IAAI,GAAG,EAAE,CAAC;IAC5D,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACzB,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC,CAAC,CA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QACD,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAEzE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EACrB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,CAChB,CAAC;QAEJ,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,eAAe,EAAE,IAAI;gBAErB,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { PublicKey } from '@solana/web3.js';
|
2
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
3
|
+
export declare const platformId = "spl-staking";
|
4
|
+
export declare const splStakingPlatform: Platform;
|
5
|
+
export declare const stakePid: PublicKey;
|
6
|
+
export declare const poolsKey = "pools";
|
7
|
+
export declare const flowmaticPlatformId = "flowmatic";
|
8
|
+
export declare const flowmaticPlatform: Platform;
|
9
|
+
export declare const kishuPlatformId = "kishu";
|
10
|
+
export declare const kishuPlatform: Platform;
|
11
|
+
export declare const yakuPlatformId = "yaku";
|
12
|
+
export declare const yakuPlatform: Platform;
|
13
|
+
export declare const madbearsPlatformId = "madbears";
|
14
|
+
export declare const madbearsPlatform: Platform;
|
15
|
+
export declare const platformByMint: Map<string, string>;
|
@@ -0,0 +1,51 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.platformByMint = exports.madbearsPlatform = exports.madbearsPlatformId = exports.yakuPlatform = exports.yakuPlatformId = exports.kishuPlatform = exports.kishuPlatformId = exports.flowmaticPlatform = exports.flowmaticPlatformId = exports.poolsKey = exports.stakePid = exports.splStakingPlatform = exports.platformId = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
exports.platformId = 'spl-staking';
|
6
|
+
exports.splStakingPlatform = {
|
7
|
+
id: exports.platformId,
|
8
|
+
name: 'SPL Staking',
|
9
|
+
image: 'https://sonar.watch/img/platforms/splStaking.png',
|
10
|
+
};
|
11
|
+
exports.stakePid = new web3_js_1.PublicKey('STAKEGztX7S1MUHxcQHieZhELCntb9Ys9BgUbeEtMu1');
|
12
|
+
exports.poolsKey = 'pools';
|
13
|
+
exports.flowmaticPlatformId = 'flowmatic';
|
14
|
+
exports.flowmaticPlatform = {
|
15
|
+
id: exports.platformId,
|
16
|
+
name: 'Flowmatic',
|
17
|
+
image: 'https://sonar.watch/img/platforms/flowmatic.png',
|
18
|
+
website: 'https://www.flowmatic.xyz/',
|
19
|
+
twitter: 'https://twitter.com/FlowmaticXYZ',
|
20
|
+
};
|
21
|
+
exports.kishuPlatformId = 'kishu';
|
22
|
+
exports.kishuPlatform = {
|
23
|
+
id: exports.platformId,
|
24
|
+
name: 'Kishu',
|
25
|
+
image: 'https://sonar.watch/img/platforms/kishu.png',
|
26
|
+
website: 'https://staking.kishuthedog.com/',
|
27
|
+
twitter: 'https://twitter.com/FlowmaticXYZ',
|
28
|
+
};
|
29
|
+
exports.yakuPlatformId = 'yaku';
|
30
|
+
exports.yakuPlatform = {
|
31
|
+
id: exports.platformId,
|
32
|
+
name: 'Yaku',
|
33
|
+
image: 'https://sonar.watch/img/platforms/yaku.png',
|
34
|
+
website: 'https://staking.yaku.gg/',
|
35
|
+
twitter: 'https://twitter.com/FlowmaticXYZ',
|
36
|
+
};
|
37
|
+
exports.madbearsPlatformId = 'madbears';
|
38
|
+
exports.madbearsPlatform = {
|
39
|
+
id: exports.platformId,
|
40
|
+
name: 'MadBears',
|
41
|
+
image: 'https://sonar.watch/img/platforms/madbears.png',
|
42
|
+
website: 'https://staking.madbears.club/',
|
43
|
+
twitter: 'https://twitter.com/FlowmaticXYZ',
|
44
|
+
};
|
45
|
+
exports.platformByMint = new Map([
|
46
|
+
['BDssJun8XSPmWq7VkoahyozsvJwKEZBkWE6YBrFHjbii', exports.kishuPlatformId],
|
47
|
+
['AqEHVh8J2nXH9saV2ciZyYwPpqWFRfD2ffcq5Z8xxqm5', exports.yakuPlatformId],
|
48
|
+
['Eh1fXbAipe4k7CYR9UMb2bbWmBcpU3HcyX3LWuRVFBLz', exports.flowmaticPlatformId],
|
49
|
+
['Ee1pKgTQmP5xjYQs76HmRM2c2YkqEdc9tk5mQbiGFigT', exports.madbearsPlatformId],
|
50
|
+
]);
|
51
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spl-staking/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,aAAa,CAAC;AAC3B,QAAA,kBAAkB,GAAa;IAC1C,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,kDAAkD;CAC1D,CAAC;AACW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,6CAA6C,CAC9C,CAAC;AACW,QAAA,QAAQ,GAAG,OAAO,CAAC;AAEnB,QAAA,mBAAmB,GAAG,WAAW,CAAC;AAClC,QAAA,iBAAiB,GAAa;IACzC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,eAAe,GAAG,OAAO,CAAC;AAC1B,QAAA,aAAa,GAAa;IACrC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,6CAA6C;IACpD,OAAO,EAAE,kCAAkC;IAC3C,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,cAAc,GAAG,MAAM,CAAC;AACxB,QAAA,YAAY,GAAa;IACpC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,4CAA4C;IACnD,OAAO,EAAE,0BAA0B;IACnC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,kBAAkB,GAAG,UAAU,CAAC;AAChC,QAAA,gBAAgB,GAAa;IACxC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,gDAAgD;IACvD,OAAO,EAAE,gCAAgC;IACzC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,GAAG,CAAC;IACpC,CAAC,8CAA8C,EAAE,uBAAe,CAAC;IACjE,CAAC,8CAA8C,EAAE,sBAAc,CAAC;IAChE,CAAC,8CAA8C,EAAE,2BAAmB,CAAC;IACrE,CAAC,8CAA8C,EAAE,0BAAkB,CAAC;CACrE,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spl-staking/filters.ts"],"names":[],"mappings":";;;AAEO,MAAM,YAAY,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACzE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AARW,QAAA,YAAY,gBAQvB"}
|
@@ -5,8 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
7
|
const constants_1 = require("./constants");
|
8
|
+
const poolsJob_1 = __importDefault(require("./poolsJob"));
|
8
9
|
const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
|
9
|
-
exports.platforms = [constants_1.
|
10
|
-
exports.jobs = [];
|
10
|
+
exports.platforms = [constants_1.flowmaticPlatform];
|
11
|
+
exports.jobs = [poolsJob_1.default];
|
11
12
|
exports.fetchers = [stakingFetcher_1.default];
|
12
13
|
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spl-staking/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAgD;AAChD,0DAAkC;AAClC,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,6BAAiB,CAAC,CAAC;AAC5C,QAAA,IAAI,GAAU,CAAC,kBAAQ,CAAC,CAAC;AACzB,QAAA,QAAQ,GAAc,CAAC,wBAAc,CAAC,CAAC"}
|
@@ -0,0 +1,39 @@
|
|
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 clients_1 = require("../../utils/clients");
|
14
|
+
const solana_1 = require("../../utils/solana");
|
15
|
+
const filters_1 = require("../../utils/solana/filters");
|
16
|
+
const constants_1 = require("./constants");
|
17
|
+
const structs_1 = require("./structs");
|
18
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
19
|
+
const client = (0, clients_1.getClientSolana)();
|
20
|
+
const pools = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.stakePoolStruct, constants_1.stakePid, (0, filters_1.dataSizeFilter)(structs_1.stakePoolStruct.byteSize));
|
21
|
+
const poolsInfo = [];
|
22
|
+
for (const pool of pools) {
|
23
|
+
poolsInfo.push({
|
24
|
+
pubkey: pool.pubkey.toString(),
|
25
|
+
mint: pool.mint.toString(),
|
26
|
+
});
|
27
|
+
}
|
28
|
+
yield cache.setItem(constants_1.poolsKey, poolsInfo, {
|
29
|
+
prefix: constants_1.platformId,
|
30
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
31
|
+
});
|
32
|
+
});
|
33
|
+
const job = {
|
34
|
+
id: `${constants_1.platformId}-pools`,
|
35
|
+
executor,
|
36
|
+
label: 'normal',
|
37
|
+
};
|
38
|
+
exports.default = job;
|
39
|
+
//# sourceMappingURL=poolsJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spl-staking/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA8D;AAC9D,wDAA4D;AAC5D,2CAA6D;AAC7D,uCAA4C;AAG5C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,KAAK,GAAG,MAAM,IAAA,iCAAwB,EAC1C,MAAM,EACN,yBAAe,EACf,oBAAQ,EACR,IAAA,wBAAc,EAAC,yBAAe,CAAC,QAAQ,CAAC,CACzC,CAAC;IAEF,MAAM,SAAS,GAAe,EAAE,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,SAAS,CAAC,IAAI,CAAC;YACb,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YAC9B,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;SAC3B,CAAC,CAAC;IACL,CAAC;IAED,MAAM,KAAK,CAAC,OAAO,CAAC,oBAAQ,EAAE,SAAS,EAAE;QACvC,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,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"}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
|
+
const constants_1 = require("./constants");
|
17
|
+
const solana_1 = require("../../utils/solana");
|
18
|
+
const structs_1 = require("./structs");
|
19
|
+
const filters_1 = require("./filters");
|
20
|
+
const clients_1 = require("../../utils/clients");
|
21
|
+
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
22
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
23
|
+
const client = (0, clients_1.getClientSolana)();
|
24
|
+
const pools = yield cache.getItem(constants_1.poolsKey, {
|
25
|
+
prefix: constants_1.platformId,
|
26
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
27
|
+
});
|
28
|
+
if (!pools)
|
29
|
+
return [];
|
30
|
+
const mintByPool = new Map();
|
31
|
+
pools.forEach((pool) => mintByPool.set(pool.pubkey, pool.mint));
|
32
|
+
const mints = Array.from(mintByPool.values());
|
33
|
+
const tokenPricesById = yield cache.getTokenPricesAsMap(mints, portfolio_core_1.NetworkId.solana);
|
34
|
+
const stakeAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.StakeDepositReceiptStruct, constants_1.stakePid, (0, filters_1.stakeFilters)(owner));
|
35
|
+
if (stakeAccounts.length === 0)
|
36
|
+
return [];
|
37
|
+
const assetsByPlatform = new Map();
|
38
|
+
for (const stakeAccount of stakeAccounts) {
|
39
|
+
if (stakeAccount.depositAmount.isZero())
|
40
|
+
continue;
|
41
|
+
const mint = mintByPool.get(stakeAccount.stakePool.toString());
|
42
|
+
if (!mint)
|
43
|
+
continue;
|
44
|
+
const tokenPrice = tokenPricesById.get(mint);
|
45
|
+
if (!tokenPrice)
|
46
|
+
continue;
|
47
|
+
const platform = constants_1.platformByMint.get(mint) || constants_1.platformId;
|
48
|
+
const lockedUntil = new Date(stakeAccount.depositTimestamp
|
49
|
+
.plus(stakeAccount.lockupDuration)
|
50
|
+
.times(1000)
|
51
|
+
.toNumber()).getTime();
|
52
|
+
const asset = Object.assign(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(mint, stakeAccount.depositAmount
|
53
|
+
.dividedBy(Math.pow(10, tokenPrice.decimals))
|
54
|
+
.toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice)), { attributes: {
|
55
|
+
lockedUntil,
|
56
|
+
} });
|
57
|
+
const assetsOfPlatform = assetsByPlatform.get(platform);
|
58
|
+
if (assetsOfPlatform) {
|
59
|
+
assetsOfPlatform.push(asset);
|
60
|
+
assetsByPlatform.set(platform, assetsOfPlatform);
|
61
|
+
}
|
62
|
+
else {
|
63
|
+
assetsByPlatform.set(platform, [asset]);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
const elements = [];
|
67
|
+
assetsByPlatform.forEach((assets, platform) => elements.push({
|
68
|
+
type: portfolio_core_1.PortfolioElementType.multiple,
|
69
|
+
label: 'Staked',
|
70
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
71
|
+
platformId: platform,
|
72
|
+
data: { assets },
|
73
|
+
value: (0, portfolio_core_1.getUsdValueSum)(assets.map((asset) => asset.value)),
|
74
|
+
}));
|
75
|
+
return elements;
|
76
|
+
});
|
77
|
+
const fetcher = {
|
78
|
+
id: `${constants_1.platformId}`,
|
79
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
80
|
+
executor,
|
81
|
+
};
|
82
|
+
exports.default = fetcher;
|
83
|
+
//# sourceMappingURL=stakingFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spl-staking/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AAGpC,2CAA6E;AAC7E,+CAA8D;AAC9D,uCAAsD;AACtD,uCAAyC;AACzC,iDAAsD;AACtD,qGAA6E;AAG7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;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EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KAC1D,CAAC,CACH,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,EAAE;IACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
import { BeetStruct } from '@metaplex-foundation/beet';
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
4
|
+
import BigNumber from 'bignumber.js';
|
5
|
+
export type StakeDepositReceipt = {
|
6
|
+
buffer: Buffer;
|
7
|
+
owner: PublicKey;
|
8
|
+
payer: PublicKey;
|
9
|
+
stakePool: PublicKey;
|
10
|
+
lockupDuration: BigNumber;
|
11
|
+
depositTimestamp: BigNumber;
|
12
|
+
depositAmount: BigNumber;
|
13
|
+
effectiveStake: BigNumber;
|
14
|
+
claimedAmounts: BigNumber[];
|
15
|
+
};
|
16
|
+
export declare const StakeDepositReceiptStruct: BeetStruct<StakeDepositReceipt, Partial<StakeDepositReceipt>>;
|
17
|
+
export type RewardPool = {
|
18
|
+
rewardVault: PublicKey;
|
19
|
+
rewardsPerEffectiveStake: BigNumber;
|
20
|
+
lastAmount: BigNumber;
|
21
|
+
padding0: number[];
|
22
|
+
};
|
23
|
+
export declare const rewardPoolStruct: BeetStruct<RewardPool, Partial<RewardPool>>;
|
24
|
+
export type StakePool = {
|
25
|
+
buffer: Buffer;
|
26
|
+
creator: PublicKey;
|
27
|
+
authority: PublicKey;
|
28
|
+
totalWeightedStake: BigNumber;
|
29
|
+
vault: PublicKey;
|
30
|
+
mint: PublicKey;
|
31
|
+
stakeMint: PublicKey;
|
32
|
+
rewardPools: RewardPool[];
|
33
|
+
baseWeight: BigNumber;
|
34
|
+
maxWeight: BigNumber;
|
35
|
+
minDuration: BigNumber;
|
36
|
+
maxDuration: BigNumber;
|
37
|
+
nonce: number;
|
38
|
+
bumpSeed: number;
|
39
|
+
padding0: number[];
|
40
|
+
reserved0: number[];
|
41
|
+
};
|
42
|
+
export declare const stakePoolStruct: BeetStruct<StakePool, Partial<StakePool>>;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.stakePoolStruct = exports.rewardPoolStruct = exports.StakeDepositReceiptStruct = void 0;
|
4
|
+
const beet_1 = require("@metaplex-foundation/beet");
|
5
|
+
const beet_solana_1 = require("@metaplex-foundation/beet-solana");
|
6
|
+
const solana_1 = require("../../utils/solana");
|
7
|
+
exports.StakeDepositReceiptStruct = new beet_1.BeetStruct([
|
8
|
+
['buffer', (0, solana_1.blob)(8)],
|
9
|
+
['owner', beet_solana_1.publicKey],
|
10
|
+
['payer', beet_solana_1.publicKey],
|
11
|
+
['stakePool', beet_solana_1.publicKey],
|
12
|
+
['lockupDuration', solana_1.u64],
|
13
|
+
['depositTimestamp', solana_1.i64],
|
14
|
+
['depositAmount', solana_1.u64],
|
15
|
+
['effectiveStake', solana_1.u128],
|
16
|
+
['claimedAmounts', (0, beet_1.uniformFixedSizeArray)(solana_1.u128, 10)],
|
17
|
+
], (args) => args);
|
18
|
+
exports.rewardPoolStruct = new beet_1.BeetStruct([
|
19
|
+
['rewardVault', beet_solana_1.publicKey],
|
20
|
+
['rewardsPerEffectiveStake', solana_1.u128],
|
21
|
+
['lastAmount', solana_1.u64],
|
22
|
+
['padding0', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 8)],
|
23
|
+
], (args) => args);
|
24
|
+
exports.stakePoolStruct = new beet_1.BeetStruct([
|
25
|
+
['buffer', (0, solana_1.blob)(8)],
|
26
|
+
['creator', beet_solana_1.publicKey],
|
27
|
+
['authority', beet_solana_1.publicKey],
|
28
|
+
['totalWeightedStake', solana_1.u128],
|
29
|
+
['vault', beet_solana_1.publicKey],
|
30
|
+
['mint', beet_solana_1.publicKey],
|
31
|
+
['stakeMint', beet_solana_1.publicKey],
|
32
|
+
['rewardPools', (0, beet_1.uniformFixedSizeArray)(exports.rewardPoolStruct, 10)],
|
33
|
+
['baseWeight', solana_1.u64],
|
34
|
+
['maxWeight', solana_1.u64],
|
35
|
+
['minDuration', solana_1.u64],
|
36
|
+
['maxDuration', solana_1.u64],
|
37
|
+
['nonce', beet_1.u8],
|
38
|
+
['bumpSeed', beet_1.u8],
|
39
|
+
['padding0', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 6)],
|
40
|
+
['reserved0', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 256)],
|
41
|
+
], (args) => args);
|
42
|
+
//# sourceMappingURL=structs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spl-staking/structs.ts"],"names":[],"mappings":";;;AAAA,oDAImC;AACnC,kEAA6D;AAG7D,+CAA0D;AAc7C,QAAA,yBAAyB,GAAG,IAAI,iBAAU,CACrD;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,kBAAkB,EAAE,YAAG,CAAC;IACzB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,gBAAgB,EAAE,aAAI,CAAC;IACxB,CAAC,gBAAgB,EAAE,IAAA,4BAAqB,EAAC,aAAI,EAAE,EAAE,CAAC,CAAC;CACpD,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAA2B,CACtC,CAAC;AASW,QAAA,gBAAgB,GAAG,IAAI,iBAAU,CAC5C;IACE,CAAC,aAAa,EAAE,uBAAS,CAAC;IAC1B,CAAC,0BAA0B,EAAE,aAAI,CAAC;IAClC,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;CAC3C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAkB,CAC7B,CAAC;AAqBW,QAAA,eAAe,GAAG,IAAI,iBAAU,CAC3C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,SAAS,EAAE,uBAAS,CAAC;IACtB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,oBAAoB,EAAE,aAAI,CAAC;IAC5B,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,MAAM,EAAE,uBAAS,CAAC;IACnB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,aAAa,EAAE,IAAA,4BAAqB,EAAC,wBAAgB,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,OAAO,EAAE,SAAE,CAAC;IACb,CAAC,UAAU,EAAE,SAAE,CAAC;IAChB,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;IAC1C,CAAC,WAAW,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,GAAG,CAAC,CAAC;CAC9C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAiB,CAC5B,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spl-staking/types.ts"],"names":[],"mappings":""}
|
@@ -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;
|
@@ -31,6 +31,8 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
31
31
|
return [];
|
32
32
|
const rent = yield client.getMinimumBalanceForRentExemption(8);
|
33
33
|
const solRawBalance = escrowAccountsInfo.reduce((accu, escrow) => (escrow ? accu + escrow.lamports - rent : accu + 0), 0);
|
34
|
+
if (solRawBalance === 0)
|
35
|
+
return [];
|
34
36
|
const solTokenPrice = yield cache.getTokenPrice(portfolio_core_1.solanaNativeAddress, portfolio_core_1.NetworkId.solana);
|
35
37
|
const amount = new bignumber_js_1.default(solRawBalance)
|
36
38
|
.dividedBy(Math.pow(10, portfolio_core_1.solanaNetwork.native.decimals))
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"bidsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/bidsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AAGrC,2CAAoD;AACpD,iDAAsD;AACtD,+CAA8D;AAC9D,uCAAuC;AACvC,gGAA6F;AAC7F,qCAAsC;AACtC,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,YAAY,GAAG,MAAM,IAAA,iCAAwB,EACjD,MAAM,EACN,mBAAU,EACV,qBAAS,EACT,IAAA,oBAAU,EAAC,KAAK,CAAC,CAClB,CAAC;IAEF,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEzC,MAAM,kBAAkB,GAAG,MAAM,IAAA,yDAA2B,EAC1D,MAAM,EACN,YAAY,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CACjD,CAAC;IACF,IAAI,kBAAkB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE/C,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,iCAAiC,CAAC,CAAC,CAAC,CAAC;IAC/D,MAAM,aAAa,GAAG,kBAAkB,CAAC,MAAM,CAC7C,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,GAAG,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,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B,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE;SAC1B;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -32,83 +32,4 @@ function getTensorSingleListings(owner) {
|
|
32
32
|
});
|
33
33
|
}
|
34
34
|
exports.default = getTensorSingleListings;
|
35
|
-
// const executor: FetcherExecutor = async (owner: string, cache: Cache) => {
|
36
|
-
// const connection = getClientSolana();
|
37
|
-
// const metaplex = new Metaplex(connection);
|
38
|
-
// const singleListings = await getParsedProgramAccounts(
|
39
|
-
// connection,
|
40
|
-
// singleListingStruct,
|
41
|
-
// tensorProgram,
|
42
|
-
// singleListingFilter(owner)
|
43
|
-
// );
|
44
|
-
// if (singleListings.length === 0) return [];
|
45
|
-
// const mints = singleListings.map((listing) => listing.nftMint);
|
46
|
-
// const nftsMetadata = await metaplex.nfts().findAllByMintList({
|
47
|
-
// mints,
|
48
|
-
// });
|
49
|
-
// if (!nftsMetadata) return [];
|
50
|
-
// const promises = nftsMetadata.map((nftMetadata) => {
|
51
|
-
// if (!nftMetadata?.uri) return undefined;
|
52
|
-
// return getImagefromUri(nftMetadata?.uri, NetworkId.solana, cache);
|
53
|
-
// });
|
54
|
-
// const imageResults = await Promise.allSettled(promises);
|
55
|
-
// const assets: PortfolioAsset[] = [];
|
56
|
-
// nftsMetadata.forEach((nftMetadata, i) => {
|
57
|
-
// if (!nftMetadata) return;
|
58
|
-
// const imageResult = imageResults[i];
|
59
|
-
// const image =
|
60
|
-
// imageResult.status === 'fulfilled' ? imageResult.value : undefined;
|
61
|
-
// const address =
|
62
|
-
// nftMetadata.model === 'metadata'
|
63
|
-
// ? nftMetadata.mintAddress.toString()
|
64
|
-
// : nftMetadata.mint.address.toString();
|
65
|
-
// const token: Token | null =
|
66
|
-
// isNftWithToken(nftMetadata) || isSftWithToken(nftMetadata)
|
67
|
-
// ? nftMetadata.token
|
68
|
-
// : null;
|
69
|
-
// const amount = token?.amount
|
70
|
-
// ? new BigNumber(token.amount.basisPoints.toString())
|
71
|
-
// .div(10 ** token.amount.currency.decimals)
|
72
|
-
// .toNumber()
|
73
|
-
// : 1;
|
74
|
-
// const collection = nftMetadata.collection
|
75
|
-
// ? {
|
76
|
-
// floorPrice: null,
|
77
|
-
// id: nftMetadata.collection.address.toString(),
|
78
|
-
// }
|
79
|
-
// : undefined;
|
80
|
-
// const asset: PortfolioAsset = {
|
81
|
-
// type: PortfolioAssetType.collectible,
|
82
|
-
// networkId: NetworkId.solana,
|
83
|
-
// value: null,
|
84
|
-
// data: {
|
85
|
-
// address,
|
86
|
-
// amount,
|
87
|
-
// price: null,
|
88
|
-
// name: nftMetadata.name,
|
89
|
-
// dataUri: nftMetadata.uri,
|
90
|
-
// imageUri: image,
|
91
|
-
// collection,
|
92
|
-
// },
|
93
|
-
// };
|
94
|
-
// assets.push(asset);
|
95
|
-
// });
|
96
|
-
// if (assets.length === 0) return [];
|
97
|
-
// const element: PortfolioElementMultiple = {
|
98
|
-
// type: PortfolioElementType.multiple,
|
99
|
-
// networkId: NetworkId.solana,
|
100
|
-
// platformId,
|
101
|
-
// label: 'Wallet',
|
102
|
-
// value: null,
|
103
|
-
// data: {
|
104
|
-
// assets,
|
105
|
-
// },
|
106
|
-
// };
|
107
|
-
// return [element];
|
108
|
-
// };
|
109
|
-
// const fetcher: Fetcher = {
|
110
|
-
// id: `${platformId}-linsting`,
|
111
|
-
// networkId: NetworkId.solana,
|
112
|
-
// executor,
|
113
|
-
// };
|
114
35
|
//# sourceMappingURL=singleListingFetcher.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"singleListingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/singleListingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gDAAuE;AACvE,2CAAwC;AACxC,+CAA8D;AAC9D,iDAAsD;AACtD,qCAA+C;AAC/C,uCAAgD;AAEhD,SAA8B,uBAAuB,CACnD,KAAa;;QAEb,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;QACrC,MAAM,QAAQ,GAAG,IAAI,aAAQ,CAAC,UAAU,CAAC,CAAC;QAC1C,MAAM,cAAc,GAAG,MAAM,IAAA,iCAAwB,EACnD,UAAU,EACV,4BAAmB,EACnB,qBAAS,EACT,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;QACF,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAE3C,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE/D,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,iBAAiB,CAAC;YAC3D,KAAK;SACN,CAAC,CAAC;QACH,IAAI,CAAC,YAAY;YAAE,OAAO,EAAE,CAAC;QAC7B,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACrD,CAAC;CAAA;AApBD,0CAoBC
|
1
|
+
{"version":3,"file":"singleListingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/singleListingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gDAAuE;AACvE,2CAAwC;AACxC,+CAA8D;AAC9D,iDAAsD;AACtD,qCAA+C;AAC/C,uCAAgD;AAEhD,SAA8B,uBAAuB,CACnD,KAAa;;QAEb,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;QACrC,MAAM,QAAQ,GAAG,IAAI,aAAQ,CAAC,UAAU,CAAC,CAAC;QAC1C,MAAM,cAAc,GAAG,MAAM,IAAA,iCAAwB,EACnD,UAAU,EACV,4BAAmB,EACnB,qBAAS,EACT,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;QACF,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAE3C,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE/D,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,iBAAiB,CAAC;YAC3D,KAAK;SACN,CAAC,CAAC;QACH,IAAI,CAAC,YAAY;YAAE,OAAO,EAAE,CAAC;QAC7B,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACrD,CAAC;CAAA;AApBD,0CAoBC"}
|