@sonarwatch/portfolio-plugins 0.14.19 → 0.14.21
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +13 -5
- package/package.json +1 -1
- package/src/index.js +12 -0
- package/src/index.js.map +1 -1
- package/src/plugins/drift-market-maker-vault/constants.d.ts +5 -1
- package/src/plugins/drift-market-maker-vault/constants.js +25 -4
- package/src/plugins/drift-market-maker-vault/constants.js.map +1 -1
- package/src/plugins/drift-market-maker-vault/depositsFetcher.js +1 -1
- package/src/plugins/drift-market-maker-vault/depositsFetcher.js.map +1 -1
- package/src/plugins/drift-market-maker-vault/index.js +6 -1
- package/src/plugins/drift-market-maker-vault/index.js.map +1 -1
- package/src/plugins/drift-market-maker-vault/vaultsJob.js +1 -1
- package/src/plugins/drift-market-maker-vault/vaultsJob.js.map +1 -1
- package/src/plugins/grass/constants.d.ts +6 -0
- package/src/plugins/grass/constants.js +15 -0
- package/src/plugins/grass/constants.js.map +1 -0
- package/src/plugins/grass/helpers.d.ts +2 -0
- package/src/plugins/grass/helpers.js +10 -0
- package/src/plugins/grass/helpers.js.map +1 -0
- package/src/plugins/grass/index.d.ts +6 -0
- package/src/plugins/grass/index.js +12 -0
- package/src/plugins/grass/index.js.map +1 -0
- package/src/plugins/grass/stakingFetcher.js +52 -0
- package/src/plugins/grass/stakingFetcher.js.map +1 -0
- package/src/plugins/grass/structs.d.ts +28 -0
- package/src/plugins/grass/structs.js +28 -0
- package/src/plugins/grass/structs.js.map +1 -0
- package/src/plugins/hxro/constants.d.ts +6 -0
- package/src/plugins/hxro/constants.js +16 -0
- package/src/plugins/hxro/constants.js.map +1 -0
- package/src/plugins/hxro/index.d.ts +6 -0
- package/src/plugins/hxro/index.js +12 -0
- package/src/plugins/hxro/index.js.map +1 -0
- package/src/plugins/hxro/stakingFetcher.d.ts +3 -0
- package/src/plugins/hxro/stakingFetcher.js +57 -0
- package/src/plugins/hxro/stakingFetcher.js.map +1 -0
- package/src/plugins/hxro/structs.d.ts +37 -0
- package/src/plugins/hxro/structs.js +36 -0
- package/src/plugins/hxro/structs.js.map +1 -0
- package/src/plugins/hxro/types.d.ts +5 -0
- package/src/plugins/hxro/types.js +3 -0
- package/src/plugins/hxro/types.js.map +1 -0
- package/src/plugins/jupiter/helpers.js +22 -8
- package/src/plugins/jupiter/helpers.js.map +1 -1
- package/src/plugins/jupiter/pricingJob.js +0 -4
- package/src/plugins/jupiter/pricingJob.js.map +1 -1
- package/src/plugins/orca/getWhirlpoolPositions.js +9 -6
- package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
- package/src/plugins/spdr/constants.d.ts +7 -0
- package/src/plugins/spdr/constants.js +17 -0
- package/src/plugins/spdr/constants.js.map +1 -0
- package/src/plugins/spdr/index.d.ts +6 -0
- package/src/plugins/spdr/index.js +12 -0
- package/src/plugins/spdr/index.js.map +1 -0
- package/src/plugins/spdr/stakingFetcher.d.ts +3 -0
- package/src/plugins/spdr/stakingFetcher.js +78 -0
- package/src/plugins/spdr/stakingFetcher.js.map +1 -0
- package/src/plugins/spdr/structs.d.ts +26 -0
- package/src/plugins/spdr/structs.js +26 -0
- package/src/plugins/spdr/structs.js.map +1 -0
- package/src/plugins/spdr/types.d.ts +21 -0
- package/src/plugins/spdr/types.js +3 -0
- package/src/plugins/spdr/types.js.map +1 -0
- package/src/plugins/tensor/index.js +0 -2
- package/src/plugins/tensor/index.js.map +1 -1
- package/src/plugins/tensor/locksFetcher.js +0 -62
- package/src/plugins/tensor/locksFetcher.js.map +0 -1
- /package/src/plugins/{tensor/locksFetcher.d.ts → grass/stakingFetcher.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
@@ -2,14 +2,22 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
-
## [0.14.
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
## [0.14.18](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.17...plugins-0.14.18) (2024-10-30)
|
5
|
+
## [0.14.21](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.20...plugins-0.14.21) (2024-11-05)
|
10
6
|
|
11
7
|
|
12
8
|
|
9
|
+
## [0.14.20](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.19...plugins-0.14.20) (2024-11-04)
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
## [0.14.19](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.18...plugins-0.14.19) (2024-10-31)
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
## [0.14.18](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.17...plugins-0.14.18) (2024-10-30)
|
18
|
+
|
19
|
+
|
20
|
+
|
13
21
|
## [0.14.17](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.16...plugins-0.14.17) (2024-10-29)
|
14
22
|
|
15
23
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
@@ -150,6 +150,9 @@ const loopscale_1 = require("./plugins/loopscale");
|
|
150
150
|
const vaultka_1 = require("./plugins/vaultka");
|
151
151
|
const loverflow_1 = require("./plugins/loverflow");
|
152
152
|
const zelo_1 = require("./plugins/zelo");
|
153
|
+
const hxro_1 = require("./plugins/hxro");
|
154
|
+
const spdr_1 = require("./plugins/spdr");
|
155
|
+
const grass_1 = require("./plugins/grass");
|
153
156
|
var constants_1 = require("./plugins/tokens/constants");
|
154
157
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
155
158
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -293,6 +296,9 @@ exports.platforms = [
|
|
293
296
|
...vaultka_1.platforms,
|
294
297
|
...loverflow_1.platforms,
|
295
298
|
...zelo_1.platforms,
|
299
|
+
...hxro_1.platforms,
|
300
|
+
...spdr_1.platforms,
|
301
|
+
...grass_1.platforms,
|
296
302
|
];
|
297
303
|
// JOBS //
|
298
304
|
exports.jobs = [
|
@@ -420,6 +426,9 @@ exports.jobs = [
|
|
420
426
|
...vaultka_1.jobs,
|
421
427
|
...loverflow_1.jobs,
|
422
428
|
...zelo_1.jobs,
|
429
|
+
...hxro_1.jobs,
|
430
|
+
...spdr_1.jobs,
|
431
|
+
...grass_1.jobs,
|
423
432
|
];
|
424
433
|
// FETCHERS //
|
425
434
|
exports.fetchers = [
|
@@ -548,6 +557,9 @@ exports.fetchers = [
|
|
548
557
|
...vaultka_1.fetchers,
|
549
558
|
...loverflow_1.fetchers,
|
550
559
|
...zelo_1.fetchers,
|
560
|
+
...hxro_1.fetchers,
|
561
|
+
...spdr_1.fetchers,
|
562
|
+
...grass_1.fetchers,
|
551
563
|
];
|
552
564
|
exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
|
553
565
|
exports.airdropFetchers = [
|
package/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,wEAAgD;AAChD,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAI6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAK0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;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AG,oBAAiB;IACpB,GAAG,iBAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,oBAAiB;IACpB,GAAG,eAAY;IACf,GAAG,eAAY;IACf,GAAG,eAAY;IACf,GAAG,gBAAa;CACjB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,GAAG,yBAAsB;IACzB,GAAG,wBAAqB;IACxB,GAAG,yBAAsB;IACzB,sBAAmB;IACnB,sBAAmB;IACnB,yBAAsB;IACtB,sBAAmB;IACnB,GAAG,0BAAuB;CAC3B,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
|
@@ -4,6 +4,10 @@ export declare const circuitPlatformId = "circuit";
|
|
4
4
|
export declare const circuitPlatform: Platform;
|
5
5
|
export declare const moosePlatformId = "moose";
|
6
6
|
export declare const moosePlatform: Platform;
|
7
|
-
export declare const
|
7
|
+
export declare const neutralPlatformId = "neutral";
|
8
|
+
export declare const neutralPlatform: Platform;
|
9
|
+
export declare const gauntletPlatformId = "gauntlet";
|
10
|
+
export declare const gauntletPlatform: Platform;
|
11
|
+
export declare const vaultsPids: PublicKey[];
|
8
12
|
export declare const prefixVaults = "circuitVaults";
|
9
13
|
export declare const platformIdByVaultManager: Map<string, string>;
|
@@ -1,13 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.platformIdByVaultManager = exports.prefixVaults = exports.
|
3
|
+
exports.platformIdByVaultManager = exports.prefixVaults = exports.vaultsPids = exports.gauntletPlatform = exports.gauntletPlatformId = exports.neutralPlatform = exports.neutralPlatformId = exports.moosePlatform = exports.moosePlatformId = exports.circuitPlatform = exports.circuitPlatformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.circuitPlatformId = 'circuit';
|
6
6
|
exports.circuitPlatform = {
|
7
7
|
id: exports.circuitPlatformId,
|
8
8
|
name: 'Circuit',
|
9
9
|
image: 'https://sonar.watch/img/platforms/circuit.webp',
|
10
|
-
// defiLlamaId: 'foo-finance', // from https://defillama.com/docs/api
|
11
10
|
website: 'https://app.circuit.trade/',
|
12
11
|
twitter: 'https://twitter.com/CircuitTrading_',
|
13
12
|
};
|
@@ -16,14 +15,36 @@ exports.moosePlatform = {
|
|
16
15
|
id: exports.moosePlatformId,
|
17
16
|
name: 'Moose Market',
|
18
17
|
image: 'https://sonar.watch/img/platforms/moose.webp',
|
19
|
-
// defiLlamaId: 'foo-finance', // from https://defillama.com/docs/api
|
20
18
|
website: 'https://moose.market/',
|
21
19
|
twitter: 'https://twitter.com/moose_market',
|
22
20
|
};
|
23
|
-
exports.
|
21
|
+
exports.neutralPlatformId = 'neutral';
|
22
|
+
exports.neutralPlatform = {
|
23
|
+
id: exports.neutralPlatformId,
|
24
|
+
name: 'Neutral',
|
25
|
+
image: 'https://sonar.watch/img/platforms/neutral.webp',
|
26
|
+
website: 'https://www.app.neutral.trade/',
|
27
|
+
twitter: 'https://twitter.com/TradeNeutral',
|
28
|
+
};
|
29
|
+
exports.gauntletPlatformId = 'gauntlet';
|
30
|
+
exports.gauntletPlatform = {
|
31
|
+
id: exports.gauntletPlatformId,
|
32
|
+
name: 'Gauntlet',
|
33
|
+
image: 'https://sonar.watch/img/platforms/gauntlet.webp',
|
34
|
+
twitter: 'https://twitter.com/gauntlet_xyz',
|
35
|
+
};
|
36
|
+
exports.vaultsPids = [
|
37
|
+
new web3_js_1.PublicKey('vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR'), // from Drift
|
38
|
+
new web3_js_1.PublicKey('9Fcn3Fd4d5ocrb12xCUtEvezxcjFEAyHBPfrZDiPt9Qj'), // from Neutral
|
39
|
+
new web3_js_1.PublicKey('EuSLjg23BrtwYAk1t4TFe5ArYSXCVXLBqrHRBfWQiTeJ'), // from Neutral
|
40
|
+
new web3_js_1.PublicKey('BVddkVtFJLCihbVrtLo8e3iEd9NftuLunaznAxFFW8vf'), // from Neutral
|
41
|
+
];
|
24
42
|
exports.prefixVaults = 'circuitVaults';
|
25
43
|
exports.platformIdByVaultManager = new Map([
|
26
44
|
['GT3RSBy5nS2ACpT3LCkycHWm9CVJCSuqErAgf4sE33Qu', exports.circuitPlatformId],
|
27
45
|
['En8nqJqCE9D2Bsqetw4p89VgZTh8QK8SfCAn5sSyL4PM', exports.moosePlatformId],
|
46
|
+
['C77bxLHWjnAVeG9HdMxu1gunFnjRCcWUDZYfa7xbacHr', exports.neutralPlatformId],
|
47
|
+
['neutBqYtHqPiu89Yfuk3X3cebgBtyppzSbxJ9tt1eSB', exports.neutralPlatformId],
|
48
|
+
['G6L1NE8tLYYzvMHYHbkHZqPFvfEsiRAsHSvyNQ2hut3o', exports.gauntletPlatformId],
|
28
49
|
]);
|
29
50
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,iBAAiB,GAAG,SAAS,CAAC;AAC9B,QAAA,eAAe,GAAa;IACvC,EAAE,EAAE,yBAAiB;IACrB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,gDAAgD;IACvD,
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,iBAAiB,GAAG,SAAS,CAAC;AAC9B,QAAA,eAAe,GAAa;IACvC,EAAE,EAAE,yBAAiB;IACrB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,gDAAgD;IACvD,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,qC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
23
23
|
const stakingFetcher_1 = require("../goosefx/stakingFetcher");
|
24
24
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
25
25
|
const client = (0, clients_1.getClientSolana)();
|
26
|
-
const depositAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.vaultDepositorStruct,
|
26
|
+
const depositAccounts = (yield Promise.all(constants_2.vaultsPids.map((vaultsPid) => (0, solana_1.getParsedProgramAccounts)(client, structs_1.vaultDepositorStruct, vaultsPid, (0, filters_1.vaultDepositorFilter)(owner))))).flat();
|
27
27
|
if (depositAccounts.length === 0)
|
28
28
|
return [];
|
29
29
|
const vaultsInfo = yield cache.getItems(depositAccounts.map((deposit) => deposit.vault.toString()), { prefix: constants_2.prefixVaults, networkId: portfolio_core_1.NetworkId.solana });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AAGpC,kDAAmE;AACnE,
|
1
|
+
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AAGpC,kDAAmE;AACnE,2CAAuD;AACvD,iDAAsD;AACtD,+CAA8D;AAC9D,uCAAiD;AACjD,uCAAiD;AACjD,qGAA6E;AAC7E,8DAAsD;AAGtD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,eAAe,GAAG,CACtB,MAAM,OAAO,CAAC,GAAG,CACf,sBAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAC3B,IAAA,iCAAwB,EACtB,MAAM,EACN,8BAAoB,EACpB,SAAS,EACT,I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,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAElC,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU;YACV,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,IAAI;YACJ,IAAI,EAAE,EAAE,MAAM,EAAE;YAChB,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1D,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAe,qBAAqB;IAC3C,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -7,7 +7,12 @@ exports.fetchers = exports.jobs = exports.platforms = void 0;
|
|
7
7
|
const constants_1 = require("./constants");
|
8
8
|
const depositsFetcher_1 = __importDefault(require("./depositsFetcher"));
|
9
9
|
const vaultsJob_1 = __importDefault(require("./vaultsJob"));
|
10
|
-
exports.platforms = [
|
10
|
+
exports.platforms = [
|
11
|
+
constants_1.circuitPlatform,
|
12
|
+
constants_1.moosePlatform,
|
13
|
+
constants_1.neutralPlatform,
|
14
|
+
constants_1.gauntletPlatform,
|
15
|
+
];
|
11
16
|
exports.jobs = [vaultsJob_1.default];
|
12
17
|
exports.fetchers = [depositsFetcher_1.default];
|
13
18
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/index.ts"],"names":[],"mappings":";;;;;;AAGA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAKqB;AACrB,wEAAgD;AAChD,4DAAoC;AAEvB,QAAA,SAAS,GAAe;IACnC,2BAAe;IACf,yBAAa;IACb,2BAAe;IACf,4BAAgB;CACjB,CAAC;AACW,QAAA,IAAI,GAAU,CAAC,mBAAS,CAAC,CAAC;AAC1B,QAAA,QAAQ,GAAc,CAAC,yBAAe,CAAC,CAAC"}
|
@@ -19,7 +19,7 @@ const structs_1 = require("./structs");
|
|
19
19
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
20
|
const client = (0, clients_1.getClientSolana)();
|
21
21
|
const [vaults, spotMarkets] = yield Promise.all([
|
22
|
-
(0, solana_1.getParsedProgramAccounts)(client, structs_1.vaultStruct,
|
22
|
+
(yield Promise.all(constants_2.vaultsPids.map((vaultsPid) => (0, solana_1.getParsedProgramAccounts)(client, structs_1.vaultStruct, vaultsPid, filters_1.vaultFilter)))).flat(),
|
23
23
|
cache.getItem(constants_1.keySpotMarkets, {
|
24
24
|
prefix: constants_1.platformId,
|
25
25
|
networkId: portfolio_core_1.NetworkId.solana,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/vaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA+E;AAC/E,
|
1
|
+
{"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/vaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA+E;AAC/E,kDAAgE;AAChE,2CAIqB;AACrB,uCAAwC;AACxC,uCAAwC;AAIxC,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,C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AAE;SACrE,CAAC,CAAC;IACL,CAAC;IAED,MAAM,KAAK,CAAC,QAAQ,CAAY,WAAW,EAAE;QAC3C,MAAM,EAAE,wBAAY;QACpB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,sBAAsB;IACvC,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
2
|
+
import { PublicKey } from '@solana/web3.js';
|
3
|
+
export declare const platformId = "grass";
|
4
|
+
export declare const platform: Platform;
|
5
|
+
export declare const pid: PublicKey;
|
6
|
+
export declare const grassMint = "Grass7B4RdKfBCjTKgSqnXkqjwiGvQyFbuSCUJr3XXjs";
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.grassMint = exports.pid = exports.platform = exports.platformId = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
exports.platformId = 'grass';
|
6
|
+
exports.platform = {
|
7
|
+
id: exports.platformId,
|
8
|
+
name: 'Grass',
|
9
|
+
image: 'https://sonar.watch/img/platforms/grass.webp',
|
10
|
+
website: 'https://www.grassfoundation.io/stake',
|
11
|
+
twitter: 'https://twitter.com/getgrass_io',
|
12
|
+
};
|
13
|
+
exports.pid = new web3_js_1.PublicKey('EyxPPowqBRTpZpiDb2ixUR6XUU1VJwTCNgJdK8eyc6kc');
|
14
|
+
exports.grassMint = 'Grass7B4RdKfBCjTKgSqnXkqjwiGvQyFbuSCUJr3XXjs';
|
15
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/grass/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,OAAO,EAAE,sCAAsC;IAC/C,OAAO,EAAE,iCAAiC;CAC3C,CAAC;AAEW,QAAA,GAAG,GAAG,IAAI,mBAAS,CAC9B,8CAA8C,CAC/C,CAAC;AACW,QAAA,SAAS,GAAG,8CAA8C,CAAC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getStakePda = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
const constants_1 = require("./constants");
|
6
|
+
function getStakePda(owner) {
|
7
|
+
return web3_js_1.PublicKey.findProgramAddressSync([new web3_js_1.PublicKey(owner).toBytes(), Buffer.from('userStakeInfo', 'utf-8')], constants_1.pid)[0];
|
8
|
+
}
|
9
|
+
exports.getStakePda = getStakePda;
|
10
|
+
//# sourceMappingURL=helpers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/grass/helpers.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,2CAAkC;AAElC,SAAgB,WAAW,CAAC,KAAa;IACvC,OAAO,mBAAS,CAAC,sBAAsB,CACrC,CAAC,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,EACvE,eAAG,CACJ,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AALD,kCAKC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
|
+
const constants_1 = require("./constants");
|
8
|
+
const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
|
9
|
+
exports.platforms = [constants_1.platform];
|
10
|
+
exports.jobs = [];
|
11
|
+
exports.fetchers = [stakingFetcher_1.default];
|
12
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/grass/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,wBAAc,CAAC,CAAC"}
|
@@ -0,0 +1,52 @@
|
|
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 constants_1 = require("./constants");
|
14
|
+
const clients_1 = require("../../utils/clients");
|
15
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
16
|
+
const getParsedAccountInfo_1 = require("../../utils/solana/getParsedAccountInfo");
|
17
|
+
const structs_1 = require("./structs");
|
18
|
+
const helpers_1 = require("./helpers");
|
19
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
|
+
const connection = (0, clients_1.getClientSolana)();
|
21
|
+
const userStakeAccount = yield (0, getParsedAccountInfo_1.getParsedAccountInfo)(connection, structs_1.userStakeInfoStruct, (0, helpers_1.getStakePda)(owner));
|
22
|
+
if (!userStakeAccount)
|
23
|
+
return [];
|
24
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
25
|
+
const element = elementRegistry.addElementMultiple({
|
26
|
+
label: 'Staked',
|
27
|
+
});
|
28
|
+
userStakeAccount.unstake_requests.forEach((req) => {
|
29
|
+
if (req.staking_pool_key.toString() !== portfolio_core_1.solanaNativeAddress) {
|
30
|
+
const lockedUntil = req.cooldown_end_time.times(1000).toNumber();
|
31
|
+
element.addAsset({
|
32
|
+
address: constants_1.grassMint,
|
33
|
+
amount: req.withdrawal_amount,
|
34
|
+
attributes: {
|
35
|
+
lockedUntil,
|
36
|
+
},
|
37
|
+
});
|
38
|
+
}
|
39
|
+
});
|
40
|
+
element.addAsset({
|
41
|
+
address: constants_1.grassMint,
|
42
|
+
amount: userStakeAccount.amount_staked,
|
43
|
+
});
|
44
|
+
return elementRegistry.getElements(cache);
|
45
|
+
});
|
46
|
+
const fetcher = {
|
47
|
+
id: `${constants_1.platformId}-staking`,
|
48
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
49
|
+
executor,
|
50
|
+
};
|
51
|
+
exports.default = fetcher;
|
52
|
+
//# sourceMappingURL=stakingFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/grass/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAA4E;AAE5E,2CAAoD;AAEpD,iDAAsD;A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E,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
import { BeetStruct, FixableBeetStruct } from '@metaplex-foundation/beet';
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
4
|
+
import BigNumber from 'bignumber.js';
|
5
|
+
export type UnstakeRequest = {
|
6
|
+
staking_pool_key: PublicKey;
|
7
|
+
withdrawal_amount: BigNumber;
|
8
|
+
request_time: BigNumber;
|
9
|
+
cooldown_end_time: BigNumber;
|
10
|
+
_padding: number[];
|
11
|
+
};
|
12
|
+
export declare const unstakeRequestStruct: BeetStruct<UnstakeRequest, Partial<UnstakeRequest>>;
|
13
|
+
export type Deposit = {
|
14
|
+
staking_pool_key: PublicKey;
|
15
|
+
pool_multiplier: BigNumber;
|
16
|
+
amount_staked: BigNumber;
|
17
|
+
accrued_rewards: BigNumber;
|
18
|
+
};
|
19
|
+
export declare const depositStruct: BeetStruct<Deposit, Partial<Deposit>>;
|
20
|
+
export type UserStakeInfo = {
|
21
|
+
buffer: Buffer;
|
22
|
+
unstake_requests: UnstakeRequest[];
|
23
|
+
deposits: Deposit[];
|
24
|
+
amount_staked: BigNumber;
|
25
|
+
bump: number;
|
26
|
+
_padding: number[];
|
27
|
+
};
|
28
|
+
export declare const userStakeInfoStruct: FixableBeetStruct<UserStakeInfo, Partial<UserStakeInfo>>;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.userStakeInfoStruct = exports.depositStruct = exports.unstakeRequestStruct = 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.unstakeRequestStruct = new beet_1.BeetStruct([
|
8
|
+
['staking_pool_key', beet_solana_1.publicKey],
|
9
|
+
['withdrawal_amount', solana_1.u64],
|
10
|
+
['request_time', solana_1.u64],
|
11
|
+
['cooldown_end_time', solana_1.u64],
|
12
|
+
['_padding', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 8)],
|
13
|
+
], (args) => args);
|
14
|
+
exports.depositStruct = new beet_1.BeetStruct([
|
15
|
+
['staking_pool_key', beet_solana_1.publicKey],
|
16
|
+
['pool_multiplier', solana_1.u128],
|
17
|
+
['amount_staked', solana_1.u64],
|
18
|
+
['accrued_rewards', solana_1.u64],
|
19
|
+
], (args) => args);
|
20
|
+
exports.userStakeInfoStruct = new beet_1.FixableBeetStruct([
|
21
|
+
['buffer', (0, solana_1.blob)(8)],
|
22
|
+
['unstake_requests', (0, beet_1.uniformFixedSizeArray)(exports.unstakeRequestStruct, 20)],
|
23
|
+
['deposits', (0, beet_1.uniformFixedSizeArray)(exports.depositStruct, 20)],
|
24
|
+
['amount_staked', solana_1.u64],
|
25
|
+
['bump', beet_1.u8],
|
26
|
+
['_padding', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 7)],
|
27
|
+
], (args) => args);
|
28
|
+
//# sourceMappingURL=structs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/grass/structs.ts"],"names":[],"mappings":";;;AAAA,oDAKmC;AACnC,kEAA6D;AAG7D,+CAAqD;AAUxC,QAAA,oBAAoB,GAAG,IAAI,iBAAU,CAChD;IACE,CAAC,kBAAkB,EAAE,uBAAS,CAAC;IAC/B,CAAC,mBAAmB,EAAE,YAAG,CAAC;IAC1B,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,mBAAmB,EAAE,YAAG,CAAC;IAC1B,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;CAC3C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAsB,CACjC,CAAC;AASW,QAAA,aAAa,GAAG,IAAI,iBAAU,CACzC;IACE,CAAC,kBAAkB,EAAE,uBAAS,CAAC;IAC/B,CAAC,iBAAiB,EAAE,aAAI,CAAC;IACzB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,iBAAiB,EAAE,YAAG,CAAC;CACzB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAe,CAC1B,CAAC;AAWW,QAAA,mBAAmB,GAAG,IAAI,wBAAiB,CACtD;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,kBAAkB,EAAE,IAAA,4BAAqB,EAAC,4BAAoB,EAAE,EAAE,CAAC,CAAC;IACrE,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,qBAAa,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;CAC3C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAqB,CAChC,CAAC"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
2
|
+
import { PublicKey } from '@solana/web3.js';
|
3
|
+
export declare const platformId = "hxro";
|
4
|
+
export declare const platform: Platform;
|
5
|
+
export declare const pid: PublicKey;
|
6
|
+
export declare const hxroMint = "HxhWkVpk5NS4Ltg5nij2G671CKXFRKPK8vy271Ub4uEK";
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.hxroMint = exports.pid = exports.platform = exports.platformId = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
exports.platformId = 'hxro';
|
6
|
+
exports.platform = {
|
7
|
+
id: exports.platformId,
|
8
|
+
name: 'Hxro',
|
9
|
+
image: 'https://sonar.watch/img/platforms/hxro.webp',
|
10
|
+
website: 'https://app.hxro.finance/',
|
11
|
+
twitter: 'https://twitter.com/HxroNetwork',
|
12
|
+
defiLlamaId: 'hxro-network', // from https://defillama.com/docs/api
|
13
|
+
};
|
14
|
+
exports.pid = new web3_js_1.PublicKey('2jmux3fWV5zHirkEZCoSMEgTgdYZqkE9Qx2oQnxoHRgA');
|
15
|
+
exports.hxroMint = 'HxhWkVpk5NS4Ltg5nij2G671CKXFRKPK8vy271Ub4uEK';
|
16
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/hxro/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE/B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,6CAA6C;IACpD,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,iCAAiC;IAC1C,WAAW,EAAE,cAAc,EAAE,sCAAsC;CACpE,CAAC;AAEW,QAAA,GAAG,GAAG,IAAI,mBAAS,CAC9B,8CAA8C,CAC/C,CAAC;AACW,QAAA,QAAQ,GAAG,8CAA8C,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
|
+
const constants_1 = require("./constants");
|
8
|
+
const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
|
9
|
+
exports.platforms = [constants_1.platform];
|
10
|
+
exports.jobs = [];
|
11
|
+
exports.fetchers = [stakingFetcher_1.default];
|
12
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/hxro/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,sEAAsD;AAEzC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,wBAAsB,CAAC,CAAC"}
|
@@ -0,0 +1,57 @@
|
|
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 constants_1 = require("./constants");
|
14
|
+
const clients_1 = require("../../utils/clients");
|
15
|
+
const solana_1 = require("../../utils/solana");
|
16
|
+
const structs_1 = require("./structs");
|
17
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
18
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
19
|
+
const connection = (0, clients_1.getClientSolana)();
|
20
|
+
const accounts = yield (0, solana_1.getParsedProgramAccounts)(connection, structs_1.stakeRewardsStruct, constants_1.pid, [
|
21
|
+
{
|
22
|
+
dataSize: 384,
|
23
|
+
},
|
24
|
+
{
|
25
|
+
memcmp: {
|
26
|
+
bytes: owner,
|
27
|
+
offset: 8,
|
28
|
+
},
|
29
|
+
},
|
30
|
+
]);
|
31
|
+
if (accounts.length === 0)
|
32
|
+
return [];
|
33
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
34
|
+
const element = elementRegistry.addElementMultiple({
|
35
|
+
label: 'Staked',
|
36
|
+
});
|
37
|
+
accounts.forEach((acc) => {
|
38
|
+
element.addAsset({
|
39
|
+
address: constants_1.hxroMint,
|
40
|
+
amount: acc.stakeState.amountStaked,
|
41
|
+
attributes: {
|
42
|
+
lockedUntil: acc.depositTimestamp
|
43
|
+
.plus(acc.stakeDuration)
|
44
|
+
.times(1000)
|
45
|
+
.toNumber(),
|
46
|
+
},
|
47
|
+
});
|
48
|
+
});
|
49
|
+
return elementRegistry.getElements(cache);
|
50
|
+
});
|
51
|
+
const fetcher = {
|
52
|
+
id: `${constants_1.platformId}-staking`,
|
53
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
54
|
+
executor,
|
55
|
+
};
|
56
|
+
exports.default = fetcher;
|
57
|
+
//# sourceMappingURL=stakingFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/hxro/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAEvD,2CAAwD;AAExD,iDAAsD;AACtD,+CAA8D;AAC9D,uCAA+C;AAC/C,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,UAAU,EACV,4BAAkB,EAClB,eAAG,EACH;QACE;YACE,QAAQ,EAAE,GAAG;SACd;QACD;YACE,MAAM,EAAE;gBACN,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,CAA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