@sonarwatch/portfolio-plugins 0.14.11 → 0.14.13
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1640 -1632
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/cetus/types.d.ts +109 -0
- package/src/plugins/debridge/airdropFetcher.js +31 -11
- package/src/plugins/debridge/airdropFetcher.js.map +1 -1
- package/src/plugins/debridge/constants.d.ts +4 -1
- package/src/plugins/debridge/constants.js +8 -3
- package/src/plugins/debridge/constants.js.map +1 -1
- package/src/plugins/jupiter/exchange/constants.js +1 -1
- package/src/plugins/kriya/clmmsFetcher.d.ts +3 -0
- package/src/plugins/kriya/clmmsFetcher.js +81 -0
- package/src/plugins/kriya/clmmsFetcher.js.map +1 -0
- package/src/plugins/kriya/constants.d.ts +9 -4
- package/src/plugins/kriya/constants.js +48 -5
- package/src/plugins/kriya/constants.js.map +1 -1
- package/src/plugins/kriya/farmsFetcher.js.map +1 -1
- package/src/plugins/kriya/index.js +4 -0
- package/src/plugins/kriya/index.js.map +1 -1
- package/src/plugins/kriya/lpFetcher.d.ts +3 -0
- package/src/plugins/kriya/lpFetcher.js +80 -0
- package/src/plugins/kriya/lpFetcher.js.map +1 -0
- package/src/plugins/kriya/types/common.d.ts +46 -0
- package/src/plugins/kriya/types/common.js +9 -0
- package/src/plugins/kriya/types/common.js.map +1 -0
- package/src/plugins/kriya/types/farms.d.ts +55 -0
- package/src/plugins/kriya/{types.js → types/farms.js} +2 -1
- package/src/plugins/kriya/types/farms.js.map +1 -0
- package/src/plugins/kriya/types/pools.d.ts +131 -0
- package/src/plugins/kriya/types/pools.js +3 -0
- package/src/plugins/kriya/types/pools.js.map +1 -0
- package/src/plugins/kriya/{types.d.ts → types/vaults.d.ts} +104 -86
- package/src/plugins/kriya/types/vaults.js +3 -0
- package/src/plugins/kriya/types/vaults.js.map +1 -0
- package/src/plugins/kriya/vaultsFetcher.js +67 -59
- package/src/plugins/kriya/vaultsFetcher.js.map +1 -1
- package/src/plugins/kriya/vaultsJob.js +52 -16
- package/src/plugins/kriya/vaultsJob.js.map +1 -1
- package/src/plugins/native-stake/solana/solanaValidatorsJob.js +4 -0
- package/src/plugins/native-stake/solana/solanaValidatorsJob.js.map +1 -1
- package/src/plugins/native-stake/solana/types.d.ts +8 -0
- package/src/plugins/parcl/stakingFetcher.js +10 -24
- package/src/plugins/parcl/stakingFetcher.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/zeta/airdropFetcher.js +14 -14
- package/src/utils/elementbuilder/LiquidityBuilder.js +1 -1
- package/src/utils/elementbuilder/LiquidityBuilder.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/plugins/kriya/types.js.map +0 -1
package/README.md
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
# @sonarwatch/portfolio-plugins
|
2
|
-
|
3
|
-
This library is @sonarwatch/portfolio-plugins
|
1
|
+
# @sonarwatch/portfolio-plugins
|
2
|
+
|
3
|
+
This library is @sonarwatch/portfolio-plugins
|
package/package.json
CHANGED
@@ -36,27 +36,27 @@ exports.getBalancerPoolsV2 = void 0;
|
|
36
36
|
const graphql_request_1 = __importStar(require("graphql-request"));
|
37
37
|
function getBalancerPoolsV2(url) {
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
39
|
-
const query = (0, graphql_request_1.gql) `
|
40
|
-
query pools {
|
41
|
-
pools(
|
42
|
-
first: 1000
|
43
|
-
orderBy: totalLiquidity
|
44
|
-
orderDirection: desc
|
45
|
-
where: { totalLiquidity_gt: "500" }
|
46
|
-
) {
|
47
|
-
id
|
48
|
-
address
|
49
|
-
symbol
|
50
|
-
totalLiquidity
|
51
|
-
totalShares
|
52
|
-
tokens {
|
53
|
-
balance
|
54
|
-
decimals
|
55
|
-
symbol
|
56
|
-
address
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
39
|
+
const query = (0, graphql_request_1.gql) `
|
40
|
+
query pools {
|
41
|
+
pools(
|
42
|
+
first: 1000
|
43
|
+
orderBy: totalLiquidity
|
44
|
+
orderDirection: desc
|
45
|
+
where: { totalLiquidity_gt: "500" }
|
46
|
+
) {
|
47
|
+
id
|
48
|
+
address
|
49
|
+
symbol
|
50
|
+
totalLiquidity
|
51
|
+
totalShares
|
52
|
+
tokens {
|
53
|
+
balance
|
54
|
+
decimals
|
55
|
+
symbol
|
56
|
+
address
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
60
|
`;
|
61
61
|
const res = yield (0, graphql_request_1.default)(url, query);
|
62
62
|
const pools = res.pools;
|
@@ -278,3 +278,112 @@ export type PosRewarderResult = {
|
|
278
278
|
positionId: string;
|
279
279
|
rewarderAmountOwed: RewarderAmountOwed[];
|
280
280
|
};
|
281
|
+
export type CetusPool = {
|
282
|
+
coin_a: string;
|
283
|
+
coin_b: string;
|
284
|
+
current_sqrt_price: string;
|
285
|
+
current_tick_index: CurrentTickIndex;
|
286
|
+
fee_growth_global_a: string;
|
287
|
+
fee_growth_global_b: string;
|
288
|
+
fee_protocol_coin_a: string;
|
289
|
+
fee_protocol_coin_b: string;
|
290
|
+
fee_rate: string;
|
291
|
+
id: ID;
|
292
|
+
index: string;
|
293
|
+
is_pause: boolean;
|
294
|
+
liquidity: string;
|
295
|
+
position_manager: PositionManager;
|
296
|
+
rewarder_manager: RewarderManager;
|
297
|
+
tick_manager: TickManager;
|
298
|
+
tick_spacing: number;
|
299
|
+
url: string;
|
300
|
+
};
|
301
|
+
export type CurrentTickIndex = {
|
302
|
+
fields: CurrentTickIndexFields;
|
303
|
+
type: string;
|
304
|
+
};
|
305
|
+
export type CurrentTickIndexFields = {
|
306
|
+
bits: number;
|
307
|
+
};
|
308
|
+
export type PositionManager = {
|
309
|
+
fields: PositionManagerFields;
|
310
|
+
type: string;
|
311
|
+
};
|
312
|
+
export type PositionManagerFields = {
|
313
|
+
position_index: string;
|
314
|
+
positions: Positions;
|
315
|
+
tick_spacing: number;
|
316
|
+
};
|
317
|
+
export type Positions = {
|
318
|
+
fields: PositionsFields;
|
319
|
+
type: string;
|
320
|
+
};
|
321
|
+
export type PositionsFields = {
|
322
|
+
head: string;
|
323
|
+
id: ID;
|
324
|
+
size: string;
|
325
|
+
tail: string;
|
326
|
+
};
|
327
|
+
export type RewarderManager = {
|
328
|
+
fields: RewarderManagerFields;
|
329
|
+
type: string;
|
330
|
+
};
|
331
|
+
export type RewarderManagerFields = {
|
332
|
+
last_updated_time: string;
|
333
|
+
points_growth_global: string;
|
334
|
+
points_released: string;
|
335
|
+
rewarders: RewarderInfo[];
|
336
|
+
};
|
337
|
+
export type RewarderInfo = {
|
338
|
+
fields: RewarderFields;
|
339
|
+
type: string;
|
340
|
+
};
|
341
|
+
export type RewarderFields = {
|
342
|
+
emissions_per_second: string;
|
343
|
+
growth_global: string;
|
344
|
+
reward_coin: RewardCoin;
|
345
|
+
};
|
346
|
+
export type RewardCoin = {
|
347
|
+
fields: RewardCoinFields;
|
348
|
+
type: string;
|
349
|
+
};
|
350
|
+
export type RewardCoinFields = {
|
351
|
+
name: string;
|
352
|
+
};
|
353
|
+
export type TickManager = {
|
354
|
+
fields: TickManagerFields;
|
355
|
+
type: string;
|
356
|
+
};
|
357
|
+
export type TickManagerFields = {
|
358
|
+
tick_spacing: number;
|
359
|
+
ticks: Ticks;
|
360
|
+
};
|
361
|
+
export type Ticks = {
|
362
|
+
fields: TicksFields;
|
363
|
+
type: string;
|
364
|
+
};
|
365
|
+
export type TicksFields = {
|
366
|
+
head: Tail[];
|
367
|
+
id: ID;
|
368
|
+
level: string;
|
369
|
+
list_p: string;
|
370
|
+
max_level: string;
|
371
|
+
random: Random;
|
372
|
+
size: string;
|
373
|
+
tail: Tail;
|
374
|
+
};
|
375
|
+
export type Tail = {
|
376
|
+
fields: TailFields;
|
377
|
+
type: string;
|
378
|
+
};
|
379
|
+
export type TailFields = {
|
380
|
+
is_none: boolean;
|
381
|
+
v: string;
|
382
|
+
};
|
383
|
+
export type Random = {
|
384
|
+
fields: RandomFields;
|
385
|
+
type: string;
|
386
|
+
};
|
387
|
+
export type RandomFields = {
|
388
|
+
seed: string;
|
389
|
+
};
|
@@ -16,17 +16,22 @@ exports.fetcher = exports.airdropFetcherSolana = exports.airdropFetcherEvm = voi
|
|
16
16
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
17
17
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
18
18
|
const axios_1 = __importDefault(require("axios"));
|
19
|
+
const web3_js_1 = require("@solana/web3.js");
|
19
20
|
const AirdropFetcher_1 = require("../../AirdropFetcher");
|
20
21
|
const constants_1 = require("./constants");
|
22
|
+
const clients_1 = require("../../utils/clients");
|
21
23
|
const dbrFactor = new bignumber_js_1.default(Math.pow(10, constants_1.dbrDecimals));
|
22
24
|
const realDistributions = [
|
23
|
-
'Claim 50% vested with bonus in 6 months after TGE',
|
24
25
|
'First distribution',
|
26
|
+
'Claim 50% vested with bonus in 6 months after TGE',
|
25
27
|
];
|
26
28
|
const executorSolana = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
27
|
-
const apiRes = yield
|
28
|
-
|
29
|
-
|
29
|
+
const [apiRes, receipt] = yield Promise.all([
|
30
|
+
axios_1.default.get(constants_1.apiUrl + owner, {
|
31
|
+
timeout: 3000,
|
32
|
+
}),
|
33
|
+
(0, clients_1.getClientSolana)().getAccountInfo(getSolPda(owner, 1)),
|
34
|
+
]);
|
30
35
|
if (!apiRes.data.distributions || apiRes.data.distributions.length === 0) {
|
31
36
|
return (0, AirdropFetcher_1.getAirdropRaw)({
|
32
37
|
statics: constants_1.firstDistribStatics,
|
@@ -45,11 +50,12 @@ const executorSolana = (owner) => __awaiter(void 0, void 0, void 0, function* ()
|
|
45
50
|
for (const distribution of apiRes.data.distributions) {
|
46
51
|
if (!realDistributions.includes(distribution.title))
|
47
52
|
continue;
|
53
|
+
const isFirstDis = distribution.title === realDistributions[0];
|
48
54
|
const tokens = new bignumber_js_1.default(distribution.tokens).div(dbrFactor);
|
49
55
|
items.push({
|
50
56
|
amount: tokens.toNumber(),
|
51
|
-
isClaimed: false,
|
52
|
-
label: 'DBR',
|
57
|
+
isClaimed: isFirstDis ? !!receipt : false,
|
58
|
+
label: isFirstDis ? 'DBR' : 'DBR Vested(50%)',
|
53
59
|
address: constants_1.dbrMint,
|
54
60
|
imageUri: constants_1.dbrMint ? undefined : constants_1.platform.image,
|
55
61
|
});
|
@@ -60,9 +66,12 @@ const executorSolana = (owner) => __awaiter(void 0, void 0, void 0, function* ()
|
|
60
66
|
});
|
61
67
|
});
|
62
68
|
const executorEvm = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
63
|
-
const apiRes = yield
|
64
|
-
|
65
|
-
|
69
|
+
const [apiRes, receipt] = yield Promise.all([
|
70
|
+
axios_1.default.get(constants_1.apiUrl + owner, {
|
71
|
+
timeout: 3000,
|
72
|
+
}),
|
73
|
+
(0, clients_1.getClientSolana)().getAccountInfo(getEvmPda(owner, 1)),
|
74
|
+
]);
|
66
75
|
if (!apiRes.data.distributions || apiRes.data.distributions.length === 0) {
|
67
76
|
return (0, AirdropFetcher_1.getAirdropRaw)({
|
68
77
|
statics: constants_1.firstDistribStatics,
|
@@ -81,11 +90,12 @@ const executorEvm = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
|
81
90
|
for (const distribution of apiRes.data.distributions) {
|
82
91
|
if (!realDistributions.includes(distribution.title))
|
83
92
|
continue;
|
93
|
+
const isFirstDis = distribution.title === realDistributions[0];
|
84
94
|
const tokens = new bignumber_js_1.default(distribution.tokens).div(dbrFactor);
|
85
95
|
items.push({
|
86
96
|
amount: tokens.toNumber(),
|
87
|
-
isClaimed: false,
|
88
|
-
label: 'DBR',
|
97
|
+
isClaimed: isFirstDis ? !!receipt : false,
|
98
|
+
label: isFirstDis ? 'DBR' : 'DBR Vested(50%)',
|
89
99
|
address: undefined,
|
90
100
|
imageUri: constants_1.dbrMint ? undefined : constants_1.platform.image,
|
91
101
|
});
|
@@ -106,4 +116,14 @@ exports.airdropFetcherSolana = {
|
|
106
116
|
executor: executorSolana,
|
107
117
|
};
|
108
118
|
exports.fetcher = (0, AirdropFetcher_1.airdropFetcherToFetcher)(exports.airdropFetcherSolana, constants_1.platform.id, 'debridge-airdrop', constants_1.firstDistribStatics.claimEnd);
|
119
|
+
function getEvmPda(owner, season) {
|
120
|
+
return web3_js_1.PublicKey.findProgramAddressSync([
|
121
|
+
constants_1.receiptBuffer,
|
122
|
+
Uint8Array.from([season]),
|
123
|
+
Buffer.from(owner.slice(2), 'hex'),
|
124
|
+
], constants_1.distributorPid)[0];
|
125
|
+
}
|
126
|
+
function getSolPda(owner, season) {
|
127
|
+
return web3_js_1.PublicKey.findProgramAddressSync([constants_1.receiptBuffer, Uint8Array.from([season]), new web3_js_1.PublicKey(owner).toBytes()], constants_1.distributorPid)[0];
|
128
|
+
}
|
109
129
|
//# sourceMappingURL=airdropFetcher.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AACrC,kDAA6C;AAC7C,yDAK8B;AAC9B,
|
1
|
+
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AACrC,kDAA6C;AAC7C,6CAAyD;AACzD,yDAK8B;AAC9B,2CASqB;AAErB,iDAAsD;AAEtD,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,uBAAW,CAAA,CAAC,CAAC;AACnD,MAAM,iBAAiB,GAAG;IACxB,oBAAoB;IACpB,mDAAmD;CACpD,CAAC;AACF,MAA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AAc;IAC9C,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,yBAAa;QACb,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;QACzB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC;KACnC,EACD,0BAAc,CACf,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,SAAS,CAAC,KAAa,EAAE,MAAc;IAC9C,OAAO,mBAAS,CAAC,sBAAsB,CACrC,CAAC,yBAAa,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,EAC1E,0BAAc,CACf,CAAC,CAAC,CAAC,CAAC;AACP,CAAC"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="node" />
|
1
2
|
import { Platform } from '@sonarwatch/portfolio-core';
|
2
3
|
import { PublicKey } from '@solana/web3.js';
|
3
4
|
import { AirdropStatics } from '../../AirdropFetcher';
|
@@ -10,9 +11,11 @@ export declare const commonStatics: {
|
|
10
11
|
image: string;
|
11
12
|
};
|
12
13
|
export declare const firstDistribStatics: AirdropStatics;
|
13
|
-
export declare const
|
14
|
+
export declare const vestedDistributionStatics: AirdropStatics;
|
14
15
|
export declare const staticsByTitle: Map<string, AirdropStatics>;
|
15
16
|
export declare const dbrMint = "DBRiDgJAMsM95moTzJs7M9LnkGErpbv9v6CUR1DXnUu5";
|
16
17
|
export declare const dbrDecimals = 6;
|
17
18
|
export declare const apiUrl = "https://points-api.debridge.foundation/api/TokenDistribution/";
|
18
19
|
export declare const dlmmVaultProgramId: PublicKey;
|
20
|
+
export declare const distributorPid: PublicKey;
|
21
|
+
export declare const receiptBuffer: Buffer;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.dlmmVaultProgramId = exports.apiUrl = exports.dbrDecimals = exports.dbrMint = exports.staticsByTitle = exports.
|
3
|
+
exports.receiptBuffer = exports.distributorPid = exports.dlmmVaultProgramId = exports.apiUrl = exports.dbrDecimals = exports.dbrMint = exports.staticsByTitle = exports.vestedDistributionStatics = exports.firstDistribStatics = exports.commonStatics = exports.platform = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.platformId = 'debridge';
|
6
6
|
exports.platform = {
|
@@ -18,13 +18,18 @@ exports.commonStatics = {
|
|
18
18
|
image: 'https://sonar.watch/img/platforms/debridge.webp',
|
19
19
|
};
|
20
20
|
exports.firstDistribStatics = Object.assign(Object.assign({}, exports.commonStatics), { id: `${exports.platformId}-dis1`, claimEnd: undefined, claimStart: 1724940000000 });
|
21
|
-
exports.
|
21
|
+
exports.vestedDistributionStatics = Object.assign(Object.assign({}, exports.commonStatics), { id: `${exports.platformId}-dis1-vested`, claimEnd: undefined, claimStart: 1740751200000 });
|
22
22
|
exports.staticsByTitle = new Map([
|
23
23
|
['First Distribution', exports.firstDistribStatics],
|
24
|
-
[
|
24
|
+
[
|
25
|
+
'Claim 50% vested with bonus in 6 months after TGE',
|
26
|
+
exports.vestedDistributionStatics,
|
27
|
+
],
|
25
28
|
]);
|
26
29
|
exports.dbrMint = 'DBRiDgJAMsM95moTzJs7M9LnkGErpbv9v6CUR1DXnUu5';
|
27
30
|
exports.dbrDecimals = 6;
|
28
31
|
exports.apiUrl = 'https://points-api.debridge.foundation/api/TokenDistribution/';
|
29
32
|
exports.dlmmVaultProgramId = new web3_js_1.PublicKey('DBrLFG4dco1xNC5Aarbt3KEaKaJ5rBYHwysqZoeqsSFE');
|
33
|
+
exports.distributorPid = new web3_js_1.PublicKey('DeDRoPXNyHRJSagxZBBqs4hLAAM1bGKgxh7cyfuNCBpo');
|
34
|
+
exports.receiptBuffer = Buffer.from('receipt', 'utf-8');
|
30
35
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,UAAU,CAAC;AACxB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,+BAA+B;IACxC,WAAW,EAAE,UAAU,EAAE,sCAAsC;CAChE,CAAC;AAEW,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,8BAA8B;IACzC,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,UAAU;IACvB,KAAK,EAAE,iDAAiD;CACzD,CAAC;AAEW,QAAA,mBAAmB,mCAC3B,qBAAa,KAChB,EAAE,EAAE,GAAG,kBAAU,OAAO,EACxB,QAAQ,EAAE,SAAS,EACnB,UAAU,EAAE,aAAa,IACzB;AAEW,QAAA,
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,UAAU,CAAC;AACxB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,+BAA+B;IACxC,WAAW,EAAE,UAAU,EAAE,sCAAsC;CAChE,CAAC;AAEW,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,8BAA8B;IACzC,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,UAAU;IACvB,KAAK,EAAE,iDAAiD;CACzD,CAAC;AAEW,QAAA,mBAAmB,mCAC3B,qBAAa,KAChB,EAAE,EAAE,GAAG,kBAAU,OAAO,EACxB,QAAQ,EAAE,SAAS,EACnB,UAAU,EAAE,aAAa,IACzB;AAEW,QAAA,yBAAyB,mCACjC,qBAAa,KAChB,EAAE,EAAE,GAAG,kBAAU,cAAc,EAC/B,QAAQ,EAAE,SAAS,EACnB,UAAU,EAAE,aAAa,IACzB;AAEW,QAAA,cAAc,GAAgC,IAAI,GAAG,CAAC;IACjE,CAAC,oBAAoB,EAAE,2BAAmB,CAAC;IAC3C;QACE,mDAAmD;QACnD,iCAAyB;KAC1B;CACF,CAAC,CAAC;AAEU,QAAA,OAAO,GAAG,8CAA8C,CAAC;AACzD,QAAA,WAAW,GAAG,CAAC,CAAC;AAChB,QAAA,MAAM,GACjB,+DAA+D,CAAC;AAErD,QAAA,kBAAkB,GAAG,IAAI,mBAAS,CAC7C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,8CAA8C,CAC/C,CAAC;AACW,QAAA,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC"}
|
@@ -12,7 +12,7 @@ exports.platform = {
|
|
12
12
|
twitter: 'https://twitter.com/JupiterExchange',
|
13
13
|
};
|
14
14
|
exports.perpsProgramId = new web3_js_1.PublicKey('PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu');
|
15
|
-
exports.valueAverageProgramId = new web3_js_1.PublicKey('
|
15
|
+
exports.valueAverageProgramId = new web3_js_1.PublicKey('VALaaymxQh2mNy2trH9jUqHT1mTow76wpTcGmSWSwJe');
|
16
16
|
exports.limitProgramId = new web3_js_1.PublicKey('jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu');
|
17
17
|
exports.limitV2ProgramId = new web3_js_1.PublicKey('j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X');
|
18
18
|
exports.dcaProgramId = new web3_js_1.PublicKey('DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M');
|
@@ -0,0 +1,81 @@
|
|
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 bignumber_js_1 = __importDefault(require("bignumber.js"));
|
17
|
+
const constants_1 = require("./constants");
|
18
|
+
const clients_1 = require("../../utils/clients");
|
19
|
+
const tokenAmountFromLiquidity_1 = require("../../utils/clmm/tokenAmountFromLiquidity");
|
20
|
+
const getOwnedObjects_1 = require("../../utils/sui/getOwnedObjects");
|
21
|
+
const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
|
22
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
23
|
+
const bitsToNumber_1 = require("../../utils/sui/bitsToNumber");
|
24
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
25
|
+
var _a, _b;
|
26
|
+
const client = (0, clients_1.getClientSui)();
|
27
|
+
const ownerRes = yield (0, getOwnedObjects_1.getOwnedObjects)(client, owner, {
|
28
|
+
filter: { StructType: constants_1.clmmType },
|
29
|
+
});
|
30
|
+
if (ownerRes.length === 0)
|
31
|
+
return [];
|
32
|
+
const clmmPositions = [];
|
33
|
+
for (let i = 0; i < ownerRes.length; i++) {
|
34
|
+
const position = (_b = (_a = ownerRes[i].data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields;
|
35
|
+
if (position)
|
36
|
+
clmmPositions.push(position);
|
37
|
+
}
|
38
|
+
if (clmmPositions.length === 0)
|
39
|
+
return [];
|
40
|
+
const poolsIds = clmmPositions.map((position) => position.pool_id);
|
41
|
+
const poolsById = new Map();
|
42
|
+
const poolsObjects = yield (0, multiGetObjects_1.multiGetObjects)(client, [
|
43
|
+
...new Set(poolsIds),
|
44
|
+
]);
|
45
|
+
poolsObjects.forEach((poolObj) => {
|
46
|
+
var _a, _b, _c, _d;
|
47
|
+
if ((_b = (_a = poolObj.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields) {
|
48
|
+
poolsById.set(poolObj.data.objectId, (_d = (_c = poolObj.data) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.fields);
|
49
|
+
}
|
50
|
+
});
|
51
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.sui, constants_1.platformId);
|
52
|
+
clmmPositions.forEach((clmmPosition) => {
|
53
|
+
const pool = poolsById.get(clmmPosition.pool_id);
|
54
|
+
if (!pool)
|
55
|
+
return;
|
56
|
+
const { tokenAmountA, tokenAmountB } = (0, tokenAmountFromLiquidity_1.getTokenAmountsFromLiquidity)(new bignumber_js_1.default(clmmPosition.liquidity), (0, bitsToNumber_1.bitsToNumber)(pool.tick_index.fields.bits), (0, bitsToNumber_1.bitsToNumber)(clmmPosition.tick_lower_index.fields.bits), (0, bitsToNumber_1.bitsToNumber)(clmmPosition.tick_upper_index.fields.bits), false);
|
57
|
+
const element = elementRegistry.addElementLiquidity({
|
58
|
+
label: 'LiquidityPool',
|
59
|
+
tags: ['Concentrated'],
|
60
|
+
});
|
61
|
+
const liquidity = element.addLiquidity();
|
62
|
+
liquidity.addAsset({
|
63
|
+
address: pool.type_x.fields.name,
|
64
|
+
amount: tokenAmountA,
|
65
|
+
});
|
66
|
+
liquidity.addAsset({
|
67
|
+
address: pool.type_y.fields.name,
|
68
|
+
amount: tokenAmountB,
|
69
|
+
});
|
70
|
+
if (tokenAmountA.isZero() || tokenAmountB.isZero())
|
71
|
+
element.addTag('Out Of Range');
|
72
|
+
});
|
73
|
+
return elementRegistry.getElements(cache);
|
74
|
+
});
|
75
|
+
const fetcher = {
|
76
|
+
id: `${constants_1.platformId}-clmms`,
|
77
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
78
|
+
executor,
|
79
|
+
};
|
80
|
+
exports.default = fetcher;
|
81
|
+
//# sourceMappingURL=clmmsFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"clmmsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/clmmsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,2CAAmD;AACnD,iDAAmD;AACnD,wFAAyF;AACzF,qEAAkE;AAClE,qEAAkE;AAClE,gFAA6E;AAC7E,+DAA4D;AAG5D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAe,EAAe,MAAM,EAAE,KAAK,EAAE;QAClE,MAAM,EAAE,EAAE,UAAU,EAAE,oBAAQ,EAAE;KACjC,CAAC,CAAC;IACH,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,aAAa,GAAmB,EAAE,CAAC;IACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,MAAM,QAAQ,GAAG,MAAA,MAAA,QAAQ,CAAC,CAAC,CAAC,CA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IAAA,2BAAY,EAAC,YAAY,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,EACvD,IAAA,2BAAY,EAAC,YAAY,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,EACvD,KAAK,CACN,CAAC;QAEF,MAAM,OAAO,GAAG,eAAe,CAAC,mBAAmB,CAAC;YAClD,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,CAAC,cAAc,CAAC;SACvB,CAAC,CAAC;QACH,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;QAEzC,SAAS,CAAC,QAAQ,CAAC;YACjB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI;YAChC,MAAM,EAAE,YAAY;SACrB,CAAC,CAAC;QAEH,SAAS,CAAC,QAAQ,CAAC;YACjB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI;YAChC,MAAM,EAAE,YAAY;SACrB,CAAC,CAAC;QAEH,IAAI,YAAY,CAAC,MAAM,EAAE,IAAI,YAAY,CAAC,MAAM,EAAE;YAChD,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACnC,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,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -1,15 +1,20 @@
|
|
1
1
|
import { Platform } from '@sonarwatch/portfolio-core';
|
2
|
-
import {
|
2
|
+
import { VaultConfig } from './types/common';
|
3
3
|
export declare const platformId = "kriya";
|
4
4
|
export declare const platform: Platform;
|
5
5
|
export declare const vaultsPackageId = "0xc4ee7b00ea981402a6285b14ffa5dcd1ee7f97eb2a91df3bcc04fa88c56ac7d7";
|
6
6
|
export declare const farmsPackageId = "0x88701243d0445aa38c0a13f02a9af49a58092dfadb93af9754edb41c52f40085";
|
7
|
+
export declare const poolsV2PackageId = "0xa0eba10b173538c8fecca1dff298e488402cc9ff374f8a12ca7758eebe830b66";
|
8
|
+
export declare const clmmPoolPackageId = "0xf6c05e2d9301e6e91dc6ab6c3ca918f7d55896e1f1edd64adc0e615cde27ebf1";
|
9
|
+
export declare const lpPositionTypeV2 = "0xa0eba10b173538c8fecca1dff298e488402cc9ff374f8a12ca7758eebe830b66::spot_dex::KriyaLPToken";
|
10
|
+
export declare const clmmType = "0xf6c05e2d9301e6e91dc6ab6c3ca918f7d55896e1f1edd64adc0e615cde27ebf1::position::Position";
|
11
|
+
export declare const vaultStakeReceipt = "0xba0dd78bdd5d1b5f02a689444522ea9a79e1bc4cd4d8e6a57b59f3fbcae5e978::farm::StakeReceipt";
|
7
12
|
export declare const vaultsInfoKey = "vaultsInfos";
|
8
13
|
export declare const leverageVaultsInfoKey = "leverageVaultsInfos";
|
9
14
|
export declare const farmsInfoKey = "farmsInfos";
|
10
15
|
export declare const vaultsUrl = "https://88ob93rfva.execute-api.ap-southeast-1.amazonaws.com/release/vaults";
|
11
16
|
export declare const poolsUrl = "https://xd0ljetd33.execute-api.ap-southeast-1.amazonaws.com/release/pools";
|
12
17
|
export declare const leverageVaultsUrl = "https://4sacq88271.execute-api.ap-southeast-1.amazonaws.com/release/vaults";
|
13
|
-
export declare const
|
14
|
-
export declare const
|
15
|
-
export declare const
|
18
|
+
export declare const vaultsInfo: VaultConfig[];
|
19
|
+
export declare const dynamicFieldPositionTypeCetus = "0x2::dynamic_field::Field<vector<u8>, 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::position::Position>";
|
20
|
+
export declare const dynamicFieldPositionTypeKriya = "0x2::dynamic_field::Field<vector<u8>, 0xf6c05e2d9301e6e91dc6ab6c3ca918f7d55896e1f1edd64adc0e615cde27ebf1::position::Position>";
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.dynamicFieldPositionTypeKriya = exports.dynamicFieldPositionTypeCetus = exports.vaultsInfo = exports.leverageVaultsUrl = exports.poolsUrl = exports.vaultsUrl = exports.farmsInfoKey = exports.leverageVaultsInfoKey = exports.vaultsInfoKey = exports.vaultStakeReceipt = exports.clmmType = exports.lpPositionTypeV2 = exports.clmmPoolPackageId = exports.poolsV2PackageId = exports.farmsPackageId = exports.vaultsPackageId = exports.platform = exports.platformId = void 0;
|
4
|
+
const common_1 = require("./types/common");
|
4
5
|
exports.platformId = 'kriya';
|
5
6
|
exports.platform = {
|
6
7
|
id: exports.platformId,
|
@@ -12,31 +13,73 @@ exports.platform = {
|
|
12
13
|
};
|
13
14
|
exports.vaultsPackageId = '0xc4ee7b00ea981402a6285b14ffa5dcd1ee7f97eb2a91df3bcc04fa88c56ac7d7';
|
14
15
|
exports.farmsPackageId = '0x88701243d0445aa38c0a13f02a9af49a58092dfadb93af9754edb41c52f40085';
|
16
|
+
exports.poolsV2PackageId = '0xa0eba10b173538c8fecca1dff298e488402cc9ff374f8a12ca7758eebe830b66';
|
17
|
+
exports.clmmPoolPackageId = '0xf6c05e2d9301e6e91dc6ab6c3ca918f7d55896e1f1edd64adc0e615cde27ebf1';
|
18
|
+
exports.lpPositionTypeV2 = `${exports.poolsV2PackageId}::spot_dex::KriyaLPToken`;
|
19
|
+
exports.clmmType = `${exports.clmmPoolPackageId}::position::Position`;
|
20
|
+
exports.vaultStakeReceipt = '0xba0dd78bdd5d1b5f02a689444522ea9a79e1bc4cd4d8e6a57b59f3fbcae5e978::farm::StakeReceipt';
|
15
21
|
exports.vaultsInfoKey = 'vaultsInfos';
|
16
22
|
exports.leverageVaultsInfoKey = 'leverageVaultsInfos';
|
17
23
|
exports.farmsInfoKey = 'farmsInfos';
|
18
24
|
exports.vaultsUrl = 'https://88ob93rfva.execute-api.ap-southeast-1.amazonaws.com/release/vaults';
|
19
25
|
exports.poolsUrl = 'https://xd0ljetd33.execute-api.ap-southeast-1.amazonaws.com/release/pools';
|
20
26
|
exports.leverageVaultsUrl = 'https://4sacq88271.execute-api.ap-southeast-1.amazonaws.com/release/vaults';
|
21
|
-
exports.vaultsCointsTypes = [
|
22
|
-
'0xc4ee7b00ea981402a6285b14ffa5dcd1ee7f97eb2a91df3bcc04fa88c56ac7d7::kc_allweather_vt::KC_ALLWEATHER_VT',
|
23
|
-
];
|
24
27
|
exports.vaultsInfo = [
|
25
28
|
{
|
26
29
|
tokenType: '0xc4ee7b00ea981402a6285b14ffa5dcd1ee7f97eb2a91df3bcc04fa88c56ac7d7::kc_allweather_vt::KC_ALLWEATHER_VT',
|
27
30
|
id: '0x5eb2f7e07e4fbe6ce47dd10dc040efd5c79228ed767d242c320571dcd7c5a976',
|
28
31
|
underlyingPool: '0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630',
|
32
|
+
underlyingDex: common_1.Dex.cetus,
|
29
33
|
},
|
30
34
|
{
|
31
35
|
tokenType: '0x1e06cc1e491b434cd1be9f24e1f8a82f6fcb016f6fb87f0586b0fe57ecca6cbb::kc_navx_chopper_vt::KC_NAVX_CHOPPER_VT',
|
32
36
|
id: '0xce23eccbba8e6fe0351a8d6e2f736929723ef0ada2ca9d3612557ac6bc423c87',
|
33
37
|
underlyingPool: '0x0254747f5ca059a1972cd7f6016485d51392a3fde608107b93bbaebea550f703',
|
38
|
+
underlyingDex: common_1.Dex.cetus,
|
34
39
|
},
|
35
40
|
{
|
36
41
|
tokenType: '0x6d8c1becd365aaa5474a0642247b15189e1625f32104945749f1e8802b768d6d::kc_degen_vt::KC_DEGEN_VT',
|
37
42
|
id: '0x264c3b7de2abf0df2871bc0486bfab001f88b76c865bbdda377cd583b633c17a',
|
38
43
|
underlyingPool: '0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630',
|
44
|
+
underlyingDex: common_1.Dex.cetus,
|
45
|
+
},
|
46
|
+
{
|
47
|
+
id: '0x2975727619f686f83222894f8610af086df2983a8e0f0df19903c2dec74ce9cb',
|
48
|
+
tokenType: '0xf6c818276fd751df676b650ef691f3f04d4dfed226604460fc5c32d4eaf54aea::kriya_compounder_vt::KRIYA_COMPOUNDER_VT',
|
49
|
+
underlyingPool: '0xc83d3c409375cb05fbe6a7f30a4f0da4aa75bda3352a08d2285216ef1a470267',
|
50
|
+
underlyingDex: common_1.Dex.kriya,
|
51
|
+
},
|
52
|
+
{
|
53
|
+
id: '0xc768f9ab7f01b7af94d481ee9286af57b0e05c9a060622c8ee731d404711a2e4',
|
54
|
+
tokenType: '0x13e03634125a490a285e31aecb1ce7545c08d741c1058a4b5793716e78cf6e27::kriya_lst_vt_1::KRIYA_LST_VT_1',
|
55
|
+
underlyingPool: '0xf1b6a7534027b83e9093bec35d66224daa75ea221d555c79b499f88c93ea58a9',
|
56
|
+
underlyingDex: common_1.Dex.kriya,
|
57
|
+
},
|
58
|
+
{
|
59
|
+
tokenType: '0x54b03bcb3dd5a009286aa22812826963177793b1dd83203a2731ea34a95bc730::kriya_lst_vt_2::KRIYA_LST_VT_2',
|
60
|
+
id: '0x34668043d3b4f80324c2d00478314e40befe8e72353794b5021de930bc8954d8',
|
61
|
+
underlyingPool: '0xf1b6a7534027b83e9093bec35d66224daa75ea221d555c79b499f88c93ea58a9',
|
62
|
+
underlyingDex: common_1.Dex.kriya,
|
63
|
+
},
|
64
|
+
{
|
65
|
+
tokenType: '0x2b87dd426a94bcc82d7a7177dfac06bebb3c7f4c4feb11c7045f749cf484bbbc::kriya_narrow_vt::KRIYA_NARROW_VT',
|
66
|
+
id: '0xc4ce815e5b53caf1fe96d0a8c17a9023b7afa1cc9fe3e0053dcfb35e223b5eb5',
|
67
|
+
underlyingPool: '0x367e02acb99632e18db69c3e93d89d21eb721e1d1fcebc0f6853667337450acc',
|
68
|
+
underlyingDex: common_1.Dex.kriya,
|
69
|
+
},
|
70
|
+
{
|
71
|
+
tokenType: '0xe28bb1819fb4ab201f7c7616615409c798872fb0b25e16153ccba2a7fdb7f625::kriya_allweather_vt::KRIYA_ALLWEATHER_VT',
|
72
|
+
id: '0xbdd32b071f0d6302cb5c19113d4f53e0c98ca1d7d0aef244c3a3da68e0391a52',
|
73
|
+
underlyingPool: '0x367e02acb99632e18db69c3e93d89d21eb721e1d1fcebc0f6853667337450acc',
|
74
|
+
underlyingDex: common_1.Dex.kriya,
|
75
|
+
},
|
76
|
+
{
|
77
|
+
tokenType: '0xcabe5d1a6d719d8c3c2217079a44441c5c1701394a6d3abd58ac674b054c08f4::kriya_deep_vt::KRIYA_DEEP_VT',
|
78
|
+
id: '0xa9c29c881fe0224b5600234891d6da06dd273d5698601c7caa74f15e814d2abc',
|
79
|
+
underlyingPool: '0xcf370321292e799d93ad4f1bb075636a3506d8bf8ae82f57f7748c966150aac4',
|
80
|
+
underlyingDex: common_1.Dex.kriya,
|
39
81
|
},
|
40
82
|
];
|
41
|
-
exports.
|
83
|
+
exports.dynamicFieldPositionTypeCetus = '0x2::dynamic_field::Field<vector<u8>, 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::position::Position>';
|
84
|
+
exports.dynamicFieldPositionTypeKriya = '0x2::dynamic_field::Field<vector<u8>, 0xf6c05e2d9301e6e91dc6ab6c3ca918f7d55896e1f1edd64adc0e615cde27ebf1::position::Position>';
|
42
85
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/constants.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/constants.ts"],"names":[],"mappings":";;;AACA,2CAAkD;AAErC,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IAC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;IACD;QACE,EAAE,EAAE,oEAAoE;QACxE,SAAS,EACP,oGAAoG;QACtG,cAAc,EACZ,oEAAoE;QACtE,aAAa,EAAE,YAAG,CAAC,KAAK;KACzB;IACD;QACE,SAAS,EACP,oGAAoG;QACtG,EAAE,EAAE,oEAAoE;QACxE,cAAc,EACZ,oEAAoE;QACtE,aAAa,EAAE,YAAG,CAAC,KAAK;KACzB;IACD;QACE,SAAS,EACP,sGAAsG;QACxG,EAAE,EAAE,oEAAoE;QACxE,cAAc,EACZ,oEAAoE;QACtE,aAAa,EAAE,YAAG,CAAC,KAAK;KACzB;IACD;QACE,SAAS,EACP,8GAA8G;QAChH,EAAE,EAAE,oEAAoE;QACxE,cAAc,EACZ,oEAAoE;QACtE,aAAa,EAAE,YAAG,CAAC,KAAK;KACzB;IACD;QACE,SAAS,EACP,kGAAkG;QACpG,EAAE,EAAE,oEAAoE;QACxE,cAAc,EACZ,oEAAoE;QACtE,aAAa,EAAE,YAAG,CAAC,KAAK;KACzB;CACF,CAAC;AAEW,QAAA,6BAA6B,GACxC,+HAA+H,CAAC;AACrH,QAAA,6BAA6B,GACxC,+HAA+H,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"farmsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/farmsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAiE;AACjE,gEAAqC;AAGrC,2CAAuE;AACvE,iDAAmD;AACnD,qEAAkE;
|
1
|
+
{"version":3,"file":"farmsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/farmsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAiE;AACjE,gEAAqC;AAGrC,2CAAuE;AACvE,iDAAmD;AACnD,qEAAkE;AAClE,gFAA6E;AAC7E,4DAAyD;AAGzD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,M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AQ,CAAC,aAAa,CAAC;aACvD,KAAK,CAAC,MAAM,CAAC;aACb,SAAS,CAAC,SAAA,EAAE,EAAI,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAA,CAAC,CAAC;QAE7C,MAAM,YAAY,GAAG,IAAI,sBAAS,CAAC,QAAQ,CAAC,aAAa,CAAC;aACvD,KAAK,CAAC,MAAM,CAAC;aACb,SAAS,CAAC,SAAA,EAAE,EAAI,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAA,CAAC,CAAC;QAE7C,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;QAEzC,SAAS,CAAC,QAAQ,CAAC;YACjB,OAAO,EAAE,QAAQ,CAAC,UAAU;YAC5B,MAAM,EAAE,YAAY;YACpB,cAAc,EAAE,IAAI;SACrB,CAAC,CAAC;QAEH,SAAS,CAAC,QAAQ,CAAC;YACjB,OAAO,EAAE,QAAQ,CAAC,UAAU;YAC5B,MAAM,EAAE,YAAY;YACpB,cAAc,EAAE,IAAI;SACrB,CAAC,CAAC;QAEH,SAAS,CAAC,QAAQ,CAAC;YACjB,GAAG,EAAE,QAAQ,CAAC,GAAG,GAAG,GAAG;YACvB,GAAG,EAAE,IAAA,yBAAQ,EAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC;SAClC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -11,11 +11,15 @@ const farmsJob_1 = __importDefault(require("./farmsJob"));
|
|
11
11
|
const farmsFetcher_1 = __importDefault(require("./farmsFetcher"));
|
12
12
|
const leverageVaultsFetcher_1 = __importDefault(require("./leverageVaultsFetcher"));
|
13
13
|
const leverageVaultsJob_1 = __importDefault(require("./leverageVaultsJob"));
|
14
|
+
const clmmsFetcher_1 = __importDefault(require("./clmmsFetcher"));
|
15
|
+
const lpFetcher_1 = __importDefault(require("./lpFetcher"));
|
14
16
|
exports.platforms = [constants_1.platform];
|
15
17
|
exports.jobs = [vaultsJob_1.default, leverageVaultsJob_1.default, farmsJob_1.default];
|
16
18
|
exports.fetchers = [
|
17
19
|
vaultsFetcher_1.default,
|
18
20
|
leverageVaultsFetcher_1.default,
|
19
21
|
farmsFetcher_1.default,
|
22
|
+
clmmsFetcher_1.default,
|
23
|
+
lpFetcher_1.default,
|
20
24
|
];
|
21
25
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,oEAA4C;AAC5C,4DAAoC;AACpC,0DAAkC;AAClC,kEAA0C;AAC1C,oFAA4D;AAC5D,4EAAoD;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,oEAA4C;AAC5C,4DAAoC;AACpC,0DAAkC;AAClC,kEAA0C;AAC1C,oFAA4D;AAC5D,4EAAoD;AACpD,kEAA0C;AAC1C,4DAAoC;AAEvB,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,mBAAS,EAAE,2BAAiB,EAAE,kBAAQ,CAAC,CAAC;AACvD,QAAA,QAAQ,GAAc;IACjC,uBAAa;IACb,+BAAqB;IACrB,sBAAY;IACZ,sBAAY;IACZ,mBAAS;CACV,CAAC"}
|