@sonarwatch/portfolio-plugins 0.14.17 → 0.14.19
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1664 -1656
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/elixir/positionsFetcher.js +1 -1
- package/src/plugins/elixir/positionsFetcher.js.map +1 -1
- package/src/plugins/staratlas/stakingFetcher.js +5 -6
- package/src/plugins/staratlas/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/vaultka/constants.d.ts +2 -1
- package/src/plugins/vaultka/constants.js +36 -7
- package/src/plugins/vaultka/constants.js.map +1 -1
- package/src/plugins/vaultka/strategyFetcher.js +14 -4
- package/src/plugins/vaultka/strategyFetcher.js.map +1 -1
- package/src/plugins/vaultka/strategyJob.js +1 -2
- package/src/plugins/vaultka/strategyJob.js.map +1 -1
- package/src/plugins/vaultka/structs.d.ts +48 -3
- package/src/plugins/vaultka/structs.js +46 -3
- package/src/plugins/vaultka/structs.js.map +1 -1
- package/src/plugins/vaultka/types.d.ts +7 -0
- package/src/plugins/vaultka/types.js +3 -0
- package/src/plugins/vaultka/types.js.map +1 -0
- package/src/plugins/zeta/airdropFetcher.js +14 -14
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
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;
|
@@ -108,7 +108,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
108
108
|
? Number(a.pending) / Math.pow(10, tokenPrice.decimals)
|
109
109
|
: undefined;
|
110
110
|
if (pendingAmount) {
|
111
|
-
assets.push((0, tokenPriceToAssetToken_1.default)(a.coinType, pendingAmount, portfolio_core_1.NetworkId.sui, tokenPrice, undefined, {}));
|
111
|
+
assets.push((0, tokenPriceToAssetToken_1.default)(a.coinType, pendingAmount, portfolio_core_1.NetworkId.sui, tokenPrice, undefined, { isClaimable: true }));
|
112
112
|
yields.push({
|
113
113
|
apr: 0,
|
114
114
|
apy: 0,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources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M,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;oBAC5B,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,EACxB,EAAE,CACH,CAAC;gBAEF,IAAI,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;oBAClC,MAAM,CAAC,IAAI,CACT,IAAA,gCAAsB,EACpB,CAAC,CAAC,QAAQ,EACV,MAAM,CAAC,iBAAiB,CAAC,GAAG,SAAA,EAAE,EAAI,UAAU,CAAC,QAAQ,CAAA,EACrD,0BAAS,CAAC,GAAG,EACb,UAAU,CACX,CACF,CAAC;oBACF,MAAM,CAAC,IAAI,CAAC,IAAA,6BAAY,EAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;gBACxD,CAAC;YACH,CAAC;QACH,CAAC;QAED,MAAM,aAAa,GAAG,CAAC,CAAC,OAAO;YAC7B,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,SAAA,EAAE,EAAI,UAAU,CAAC,QAAQ,CAAA;YAC/C,CAAC,CAAC,SAAS,CAAC;QACd,IAAI,aAAa,EAAE,CAAC;YAClB,MAAM,CAAC,IAAI,CACT,IAAA,gCAAsB,EACpB,CAAC,CAAC,QAAQ,EACV,aAAa,EACb,0BAAS,CAAC,GAAG,EACb,UAAU,EACV,SAAS,EACT,EAAE,
|
1
|
+
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/elixir/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAWoC;AAGpC,2CAMqB;AAErB,iDAAmD;AACnD,iFAA8E;AAE9E,qGAA6E;AAC7E,uCAGmB;AAEnB,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,CAAC,YAAY,EAAE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;YAEF,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,EAAE,WAAW,EAAE;gBACrB,KAAK,EAAE,eAAe;gBACtB,SAAS,EAAE,0BAAS,CAAC,GAAG;gBACxB,UAAU,EAAV,sBAAU;gBACV,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;aAC3D,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -31,14 +31,13 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
31
31
|
const atlasTokenPrice = yield cache.getTokenPrice(constants_1.atlasMint, portfolio_core_1.NetworkId.solana);
|
32
32
|
const assets = [];
|
33
33
|
accounts.forEach((account) => {
|
34
|
-
if (
|
35
|
-
|
36
|
-
|
34
|
+
if (account.totalStake.isZero())
|
35
|
+
return;
|
36
|
+
const asset = (0, tokenPriceToAssetToken_1.default)(constants_1.atlasMint, account.totalStake.div(Math.pow(10, constants_1.atlasDecimals)).toNumber(), portfolio_core_1.NetworkId.solana, atlasTokenPrice);
|
37
37
|
if (!account.pendingRewards.isZero()) {
|
38
|
-
|
39
|
-
isClaimable: true,
|
40
|
-
}));
|
38
|
+
asset.attributes = { isClaimable: true };
|
41
39
|
}
|
40
|
+
assets.push(asset);
|
42
41
|
});
|
43
42
|
if (assets.length === 0)
|
44
43
|
return [];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/staratlas/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAEpC,2CAA+E;AAE/E,iDAAsD;AACtD,qGAA6E;AAC7E,+CAA8D;AAC9D,uCAA0C;AAE1C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,UAAU,EACV,uBAAa,EACb,sBAAU,EACV;QACE,EAAE,QAAQ,EAAE,uBAAa,CAAC,QAAQ,EAAE;QACpC;YACE,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE;SACpC;KACF,CACF,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,eAAe,GAAG,MAAM,KAAK,CAAC,aAAa,CAC/C,qBAAS,EACT,0BAAS,CAAC,MAAM,CACjB,CAAC;IACF,MAAM,MAAM,GAA0B,EAAE,CAAC;IACzC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,IAAI,
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/staratlas/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAEpC,2CAA+E;AAE/E,iDAAsD;AACtD,qGAA6E;AAC7E,+CAA8D;AAC9D,uCAA0C;AAE1C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,UAAU,EACV,uBAAa,EACb,sBAAU,EACV;QACE,EAAE,QAAQ,EAAE,uBAAa,CAAC,QAAQ,EAAE;QACpC;YACE,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AAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -54,30 +54,30 @@ function sushiV3PairToUniV2(pair) {
|
|
54
54
|
}
|
55
55
|
function getV3PairsAddresses(url, length = 300) {
|
56
56
|
return __awaiter(this, void 0, void 0, function* () {
|
57
|
-
const query = (0, graphql_request_1.gql) `
|
58
|
-
{
|
59
|
-
pools(
|
60
|
-
orderBy: totalValueLockedUSD
|
61
|
-
first: ${length}
|
62
|
-
orderDirection: desc
|
63
|
-
where: { volumeUSD_not: "0", liquidity_not: "0" }
|
64
|
-
) {
|
65
|
-
id
|
66
|
-
token0Price
|
67
|
-
token1Price
|
68
|
-
liquidity
|
69
|
-
token0 {
|
70
|
-
id
|
71
|
-
totalSupply
|
72
|
-
decimals
|
73
|
-
}
|
74
|
-
token1 {
|
75
|
-
id
|
76
|
-
totalSupply
|
77
|
-
decimals
|
78
|
-
}
|
79
|
-
}
|
80
|
-
}
|
57
|
+
const query = (0, graphql_request_1.gql) `
|
58
|
+
{
|
59
|
+
pools(
|
60
|
+
orderBy: totalValueLockedUSD
|
61
|
+
first: ${length}
|
62
|
+
orderDirection: desc
|
63
|
+
where: { volumeUSD_not: "0", liquidity_not: "0" }
|
64
|
+
) {
|
65
|
+
id
|
66
|
+
token0Price
|
67
|
+
token1Price
|
68
|
+
liquidity
|
69
|
+
token0 {
|
70
|
+
id
|
71
|
+
totalSupply
|
72
|
+
decimals
|
73
|
+
}
|
74
|
+
token1 {
|
75
|
+
id
|
76
|
+
totalSupply
|
77
|
+
decimals
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
81
|
`;
|
82
82
|
const res = yield (0, graphql_request_1.default)(url, query);
|
83
83
|
const pools = res.pools;
|
@@ -40,28 +40,28 @@ function getPairKey(version) {
|
|
40
40
|
exports.getPairKey = getPairKey;
|
41
41
|
function getPairsV2FromTheGraph(url, length = 300) {
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
43
|
-
const query = (0, graphql_request_1.gql) `
|
44
|
-
{
|
45
|
-
pairs(
|
46
|
-
orderBy: reserveUSD
|
47
|
-
first: ${length}
|
48
|
-
orderDirection: desc
|
49
|
-
where: { trackedReserveETH_not: "0" }
|
50
|
-
) {
|
51
|
-
id
|
52
|
-
reserve0
|
53
|
-
reserve1
|
54
|
-
totalSupply
|
55
|
-
token0 {
|
56
|
-
id
|
57
|
-
decimals
|
58
|
-
}
|
59
|
-
token1 {
|
60
|
-
id
|
61
|
-
decimals
|
62
|
-
}
|
63
|
-
}
|
64
|
-
}
|
43
|
+
const query = (0, graphql_request_1.gql) `
|
44
|
+
{
|
45
|
+
pairs(
|
46
|
+
orderBy: reserveUSD
|
47
|
+
first: ${length}
|
48
|
+
orderDirection: desc
|
49
|
+
where: { trackedReserveETH_not: "0" }
|
50
|
+
) {
|
51
|
+
id
|
52
|
+
reserve0
|
53
|
+
reserve1
|
54
|
+
totalSupply
|
55
|
+
token0 {
|
56
|
+
id
|
57
|
+
decimals
|
58
|
+
}
|
59
|
+
token1 {
|
60
|
+
id
|
61
|
+
decimals
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
65
|
`;
|
66
66
|
const res = yield (0, graphql_request_1.default)(url, query);
|
67
67
|
const pairs = res.pairs;
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { Platform } from '@sonarwatch/portfolio-core';
|
2
2
|
import { PublicKey } from '@solana/web3.js';
|
3
|
+
import { StrategyInfo } from './types';
|
3
4
|
export declare const platformId = "vaultka";
|
4
5
|
export declare const platform: Platform;
|
5
6
|
export declare const lendingsCacheKey = "lendings";
|
6
7
|
export declare const lendingProgramIds: PublicKey[];
|
7
8
|
export declare const strategiesCacheKey = "strategies";
|
8
|
-
export declare const strategies:
|
9
|
+
export declare const strategies: StrategyInfo[];
|
@@ -2,6 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.strategies = exports.strategiesCacheKey = exports.lendingProgramIds = exports.lendingsCacheKey = exports.platform = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
const structs_1 = require("./structs");
|
5
6
|
exports.platformId = 'vaultka';
|
6
7
|
exports.platform = {
|
7
8
|
id: exports.platformId,
|
@@ -20,12 +21,40 @@ exports.lendingProgramIds = [
|
|
20
21
|
];
|
21
22
|
exports.strategiesCacheKey = `strategies`;
|
22
23
|
exports.strategies = [
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
24
|
+
{
|
25
|
+
pubkey: '6UBsNdYq3MEao1m9NXQD1VEmXvptUXhfMwdHANGAo4bs',
|
26
|
+
strategyStruct: structs_1.strategyStruct,
|
27
|
+
positionInfoStruct: structs_1.positionInfoStruct,
|
28
|
+
},
|
29
|
+
{
|
30
|
+
pubkey: 'B3FS1X2PZPBrtBZiyAN9oqABnu3o5YWwdY5ioqoVh64P',
|
31
|
+
strategyStruct: structs_1.strategyStruct,
|
32
|
+
positionInfoStruct: structs_1.positionInfoStruct,
|
33
|
+
},
|
34
|
+
{
|
35
|
+
pubkey: 'SkFLfp7eSRsan13dEUZSVzMBj3vdyZnhaasFKQTzuiE',
|
36
|
+
strategyStruct: structs_1.strategyStruct,
|
37
|
+
positionInfoStruct: structs_1.positionInfoStruct,
|
38
|
+
},
|
39
|
+
{
|
40
|
+
pubkey: '6VwarrrqWVWAmZtNdgGafeyoXD3SsspKxuxkZVarZqTA',
|
41
|
+
strategyStruct: structs_1.strategyStruct,
|
42
|
+
positionInfoStruct: structs_1.positionInfoStruct,
|
43
|
+
},
|
44
|
+
{
|
45
|
+
pubkey: '9p5Sc5SvR8QpJCQV3U4q6zVUTupr4Tr9Jmf48sbcSjtX',
|
46
|
+
strategyStruct: structs_1.lstStrategyStruct,
|
47
|
+
positionInfoStruct: structs_1.lstPositionInfoStruct,
|
48
|
+
},
|
49
|
+
{
|
50
|
+
pubkey: 'FRyGij76xTvAg1nPPTaXHfa3QxUfZuKARuAyAaMyoLPo',
|
51
|
+
strategyStruct: structs_1.lstStrategyStruct,
|
52
|
+
positionInfoStruct: structs_1.lstPositionInfoStruct,
|
53
|
+
},
|
54
|
+
{
|
55
|
+
pubkey: 'A7PDwCJ3qcdVoZLqq7wHAwMq9yEKZU2vFx7Y9qbZ1dKJ',
|
56
|
+
strategyStruct: structs_1.lstStrategyStruct,
|
57
|
+
positionInfoStruct: structs_1.lstPositionInfoStruct,
|
58
|
+
},
|
30
59
|
];
|
31
60
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE5C,uCAKmB;AAEN,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,gDAAgD;IACvD,OAAO,EAAE,6BAA6B;IACtC,OAAO,EAAE,+BAA+B;IACxC,WAAW,EAAE,SAAS,EAAE,sCAAsC;CAC/D,CAAC;AAEW,QAAA,gBAAgB,GAAG,UAAU,CAAC;AAE9B,QAAA,iBAAiB,GAAG;IAC/B,IAAI,mBAAS,CAAC,8CAA8C,CAAC;IAC7D,IAAI,mBAAS,CAAC,8CAA8C,CAAC;IAC7D,IAAI,mBAAS,CAAC,6CAA6C,CAAC;IAC5D,IAAI,mBAAS,CAAC,8CAA8C,CAAC;CAC9D,CAAC;AAEW,QAAA,kBAAkB,GAAG,YAAY,CAAC;AAElC,QAAA,UAAU,GAAmB;IACxC;QACE,MAAM,EAAE,8CAA8C;QACtD,cAAc,EAAd,wBAAc;QACd,kBAAkB,EAAlB,4BAAkB;KACnB;IACD;QACE,MAAM,EAAE,8CAA8C;QACtD,cAAc,EAAd,wBAAc;QACd,kBAAkB,EAAlB,4BAAkB;KACnB;IACD;QACE,MAAM,EAAE,6CAA6C;QACrD,cAAc,EAAd,wBAAc;QACd,kBAAkB,EAAlB,4BAAkB;KACnB;IACD;QACE,MAAM,EAAE,8CAA8C;QACtD,cAAc,EAAd,wBAAc;QACd,kBAAkB,EAAlB,4BAAkB;KACnB;IACD;QACE,MAAM,EAAE,8CAA8C;QACtD,cAAc,EAAE,2BAAiB;QACjC,kBAAkB,EAAE,+BAAqB;KAC1C;IACD;QACE,MAAM,EAAE,8CAA8C;QACtD,cAAc,EAAE,2BAAiB;QACjC,kBAAkB,EAAE,+BAAqB;KAC1C;IACD;QACE,MAAM,EAAE,8CAA8C;QACtD,cAAc,EAAE,2BAAiB;QACjC,kBAAkB,EAAE,+BAAqB;KAC1C;CACF,CAAC"}
|
@@ -15,10 +15,9 @@ const constants_1 = require("./constants");
|
|
15
15
|
const clients_1 = require("../../utils/clients");
|
16
16
|
const solana_1 = require("../../utils/solana");
|
17
17
|
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
18
|
-
const structs_1 = require("./structs");
|
19
18
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
19
|
const connection = (0, clients_1.getClientSolana)();
|
21
|
-
const positionInfos = yield Promise.all(constants_1.strategies.map((strategy) => (0, solana_1.getParsedProgramAccounts)(connection,
|
20
|
+
const positionInfos = yield Promise.all(constants_1.strategies.map((strategy) => (0, solana_1.getParsedProgramAccounts)(connection, strategy.positionInfoStruct, new web3_js_1.PublicKey(strategy.pubkey), [
|
22
21
|
{
|
23
22
|
memcmp: {
|
24
23
|
offset: 24,
|
@@ -39,21 +38,32 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
39
38
|
if (positionInfo[0] &&
|
40
39
|
!positionInfo[0].liquidated &&
|
41
40
|
!positionInfo[0].closed) {
|
41
|
+
const strategy = strategiesInfo[i];
|
42
42
|
const element = elementRegistry.addElementBorrowlend({
|
43
43
|
label: 'Leverage',
|
44
44
|
});
|
45
|
+
let borrowMint;
|
46
|
+
if (isLstStrategy(strategy)) {
|
47
|
+
borrowMint = strategy.collateral_mint;
|
48
|
+
}
|
49
|
+
else {
|
50
|
+
borrowMint = strategy.borrow_mint;
|
51
|
+
}
|
45
52
|
element.addSuppliedAsset({
|
46
|
-
address:
|
53
|
+
address: strategy.collateral_mint,
|
47
54
|
amount: positionInfo[0].position_amount,
|
48
55
|
});
|
49
56
|
element.addBorrowedAsset({
|
50
|
-
address:
|
57
|
+
address: borrowMint,
|
51
58
|
amount: positionInfo[0].leverage_amount,
|
52
59
|
});
|
53
60
|
}
|
54
61
|
});
|
55
62
|
return elementRegistry.getElements(cache);
|
56
63
|
});
|
64
|
+
function isLstStrategy(strategy) {
|
65
|
+
return !('borrow_mint' in strategy);
|
66
|
+
}
|
57
67
|
const fetcher = {
|
58
68
|
id: `${constants_1.platformId}-strategy`,
|
59
69
|
networkId: portfolio_core_1.NetworkId.solana,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"strategyFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/strategyFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAE5C,2CAAyE;AAEzE,iDAAsD;AACtD,+CAA8D;AAC9D,gFAA6E;
|
1
|
+
{"version":3,"file":"strategyFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/strategyFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAE5C,2CAAyE;AAEzE,iDAAsD;AACtD,+CAA8D;AAC9D,gFAA6E;AAQ7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,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,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC5B,UAAU,GAAG,QAAQ,CAAC,eAAe,CAAC;YACxC,CAAC;iBAAM,CAAC;gBACN,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC;YACpC,CAAC;YAED,OAAO,CAAC,gBAAgB,CAAC;gBACvB,OAAO,EAAE,QAAQ,CAAC,eAAe;gBACjC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,eAAe;aACxC,CAAC,CAAC;YACH,OAAO,CAAC,gBAAgB,CAAC;gBACvB,OAAO,EAAE,UAAU;gBACnB,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,eAAe;aACxC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,SAAS,aAAa,CACpB,QAAgC;IAEhC,OAAO,CAAC,CAAC,aAAa,IAAI,QAAQ,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -12,12 +12,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
13
|
const web3_js_1 = require("@solana/web3.js");
|
14
14
|
const constants_1 = require("./constants");
|
15
|
-
const structs_1 = require("./structs");
|
16
15
|
const clients_1 = require("../../utils/clients");
|
17
16
|
const getParsedAccountInfo_1 = require("../../utils/solana/getParsedAccountInfo");
|
18
17
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
19
18
|
const connection = (0, clients_1.getClientSolana)();
|
20
|
-
const strategys = yield Promise.all(constants_1.strategies.map((strategy) => (0, getParsedAccountInfo_1.getParsedAccountInfo)(connection,
|
19
|
+
const strategys = yield Promise.all(constants_1.strategies.map((strategy) => (0, getParsedAccountInfo_1.getParsedAccountInfo)(connection, strategy.strategyStruct, web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('STRATEGY')], new web3_js_1.PublicKey(strategy.pubkey))[0])));
|
21
20
|
yield cache.setItem(constants_1.strategiesCacheKey, strategys, {
|
22
21
|
prefix: constants_1.platformId,
|
23
22
|
networkId: portfolio_core_1.NetworkId.solana,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"strategyJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/strategyJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAG5C,2CAAyE;AACzE,
|
1
|
+
{"version":3,"file":"strategyJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/strategyJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAG5C,2CAAyE;AACzE,iDAAsD;AACtD,kFAA+E;AAE/E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,GAAG,CACjC,sBAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAC1B,IAAA,2CAAoB,EAClB,UAAU,EACV,QAAQ,CAAC,cAAc,EACvB,mBAAS,CAAC,sBAAsB,CAC9B,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EACzB,IAAI,mBAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAC/B,CAAC,CAAC,CAAC,CACL,CACF,CACF,CAAC;IAEF,MAAM,KAAK,CAAC,OAAO,CAAC,8BAAkB,EAAE,SAAS,EAAE;QACjD,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,WAAW;IAC5B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -25,7 +25,7 @@ export type PositionInfo = {
|
|
25
25
|
amount: BigNumber;
|
26
26
|
pos_id: BigNumber;
|
27
27
|
user: PublicKey;
|
28
|
-
|
28
|
+
leverageNum: number;
|
29
29
|
closed: boolean;
|
30
30
|
liquidated: boolean;
|
31
31
|
leverage_amount: BigNumber;
|
@@ -52,8 +52,53 @@ export type Strategy = {
|
|
52
52
|
mfee_percent: BigNumber;
|
53
53
|
usdt_usd_feed: number[];
|
54
54
|
jlp_sol_feed: number[];
|
55
|
-
token_mint: PublicKey;
|
56
|
-
keeper_fees: BigNumber;
|
57
55
|
collateral_mint: PublicKey;
|
56
|
+
keeper_fees: BigNumber;
|
57
|
+
borrow_mint: PublicKey;
|
58
58
|
};
|
59
59
|
export declare const strategyStruct: BeetStruct<Strategy, Partial<Strategy>>;
|
60
|
+
export type LstPositionInfo = {
|
61
|
+
buffer: Buffer;
|
62
|
+
amount: BigNumber;
|
63
|
+
pos_id: BigNumber;
|
64
|
+
user: PublicKey;
|
65
|
+
leverage: BigNumber;
|
66
|
+
closed: boolean;
|
67
|
+
liquidated: boolean;
|
68
|
+
leverage_amount: BigNumber;
|
69
|
+
is_in_deposit_request: boolean;
|
70
|
+
is_in_withdraw_request: boolean;
|
71
|
+
position_amount: BigNumber;
|
72
|
+
to_be_liquidated: boolean;
|
73
|
+
deposit_keeper_fee_paid: BigNumber;
|
74
|
+
withdraw_keeper_fee_paid: BigNumber;
|
75
|
+
open_timestamp: BigNumber;
|
76
|
+
close_timestamp: BigNumber;
|
77
|
+
sol_price_open: BigNumber;
|
78
|
+
sol_price_close: BigNumber;
|
79
|
+
close_received_sol_amount: BigNumber;
|
80
|
+
expected_amount_out_lst: BigNumber;
|
81
|
+
expected_amount_out_sol: BigNumber;
|
82
|
+
};
|
83
|
+
export declare const lstPositionInfoStruct: BeetStruct<LstPositionInfo, Partial<LstPositionInfo>>;
|
84
|
+
export type LstStrategy = {
|
85
|
+
buffer: Buffer;
|
86
|
+
keeper: PublicKey;
|
87
|
+
keeper_ata: PublicKey;
|
88
|
+
next_position_id: BigNumber;
|
89
|
+
dtv_limit: BigNumber;
|
90
|
+
leverage_limit: BigNumber;
|
91
|
+
fixed_fee_split: BigNumber;
|
92
|
+
mfee_percent: BigNumber;
|
93
|
+
sol_usd_feed: number[];
|
94
|
+
lst_feed: number[];
|
95
|
+
collateral_mint: PublicKey;
|
96
|
+
keeper_fees: BigNumber;
|
97
|
+
lst_price: BigNumber;
|
98
|
+
is_manual_price_update: boolean;
|
99
|
+
slippage_control: BigNumber;
|
100
|
+
lst_price_control_slippage: BigNumber;
|
101
|
+
admin: PublicKey;
|
102
|
+
maturity_time: BigNumber;
|
103
|
+
};
|
104
|
+
export declare const lstStrategyStruct: BeetStruct<LstStrategy, Partial<LstStrategy>>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.strategyStruct = exports.positionInfoStruct = exports.lendingStruct = exports.userInfoStruct = void 0;
|
3
|
+
exports.lstStrategyStruct = exports.lstPositionInfoStruct = exports.strategyStruct = exports.positionInfoStruct = exports.lendingStruct = exports.userInfoStruct = void 0;
|
4
4
|
const beet_1 = require("@metaplex-foundation/beet");
|
5
5
|
const beet_solana_1 = require("@metaplex-foundation/beet-solana");
|
6
6
|
const solana_1 = require("../../utils/solana");
|
@@ -25,7 +25,7 @@ exports.positionInfoStruct = new beet_1.BeetStruct([
|
|
25
25
|
['amount', solana_1.u64],
|
26
26
|
['pos_id', solana_1.u64],
|
27
27
|
['user', beet_solana_1.publicKey],
|
28
|
-
['
|
28
|
+
['leverageNum', beet_1.u8],
|
29
29
|
['closed', beet_1.bool],
|
30
30
|
['liquidated', beet_1.bool],
|
31
31
|
['leverage_amount', solana_1.u64],
|
@@ -51,8 +51,51 @@ exports.strategyStruct = new beet_1.BeetStruct([
|
|
51
51
|
['mfee_percent', solana_1.u64],
|
52
52
|
['usdt_usd_feed', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 32)],
|
53
53
|
['jlp_sol_feed', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 32)],
|
54
|
-
['
|
54
|
+
['collateral_mint', beet_solana_1.publicKey],
|
55
55
|
['keeper_fees', solana_1.u64],
|
56
|
+
['borrow_mint', beet_solana_1.publicKey],
|
57
|
+
], (args) => args);
|
58
|
+
exports.lstPositionInfoStruct = new beet_1.BeetStruct([
|
59
|
+
['buffer', (0, solana_1.blob)(8)],
|
60
|
+
['amount', solana_1.u64],
|
61
|
+
['pos_id', solana_1.u64],
|
62
|
+
['user', beet_solana_1.publicKey],
|
63
|
+
['leverage', solana_1.u64],
|
64
|
+
['closed', beet_1.bool],
|
65
|
+
['liquidated', beet_1.bool],
|
66
|
+
['leverage_amount', solana_1.u64],
|
67
|
+
['is_in_deposit_request', beet_1.bool],
|
68
|
+
['is_in_withdraw_request', beet_1.bool],
|
69
|
+
['position_amount', solana_1.u64],
|
70
|
+
['to_be_liquidated', beet_1.bool],
|
71
|
+
['deposit_keeper_fee_paid', solana_1.u64],
|
72
|
+
['withdraw_keeper_fee_paid', solana_1.u64],
|
73
|
+
['open_timestamp', solana_1.i64],
|
74
|
+
['close_timestamp', solana_1.i64],
|
75
|
+
['sol_price_open', solana_1.u128],
|
76
|
+
['sol_price_close', solana_1.u128],
|
77
|
+
['close_received_sol_amount', solana_1.u64],
|
78
|
+
['expected_amount_out_lst', solana_1.u64],
|
79
|
+
['expected_amount_out_sol', solana_1.u64],
|
80
|
+
], (args) => args);
|
81
|
+
exports.lstStrategyStruct = new beet_1.BeetStruct([
|
82
|
+
['buffer', (0, solana_1.blob)(8)],
|
83
|
+
['keeper', beet_solana_1.publicKey],
|
84
|
+
['keeper_ata', beet_solana_1.publicKey],
|
85
|
+
['next_position_id', solana_1.u64],
|
86
|
+
['dtv_limit', solana_1.u64],
|
87
|
+
['leverage_limit', solana_1.u64],
|
88
|
+
['fixed_fee_split', solana_1.u64],
|
89
|
+
['mfee_percent', solana_1.u64],
|
90
|
+
['sol_usd_feed', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 32)],
|
91
|
+
['lst_feed', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 32)],
|
56
92
|
['collateral_mint', beet_solana_1.publicKey],
|
93
|
+
['keeper_fees', solana_1.u64],
|
94
|
+
['lst_price', solana_1.u64],
|
95
|
+
['is_manual_price_update', beet_1.bool],
|
96
|
+
['slippage_control', solana_1.u64],
|
97
|
+
['lst_price_control_slippage', solana_1.u64],
|
98
|
+
['admin', beet_solana_1.publicKey],
|
99
|
+
['maturity_time', solana_1.i64],
|
57
100
|
], (args) => args);
|
58
101
|
//# sourceMappingURL=structs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/structs.ts"],"names":[],"mappings":";;;AAAA,oDAKmC;AAGnC,kEAA6D;AAC7D,+CAA0D;AAO7C,QAAA,cAAc,GAAG,IAAI,iBAAU,CAC1C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,QAAQ,EAAE,aAAI,CAAC;CACjB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAgB,CAC3B,CAAC;AAeW,QAAA,aAAa,GAAG,IAAI,iBAAU,CACzC;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,eAAe,EAAE,aAAI,CAAC;IACvB,CAAC,iBAAiB,EAAE,aAAI,CAAC;IACzB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,cAAc,EAAE,aAAI,CA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AyB,EAAE,YAAG,CAAC;CACjC,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAuB,CAClC,CAAC;AAuBW,QAAA,iBAAiB,GAAG,IAAI,iBAAU,CAC7C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,QAAQ,EAAE,uBAAS,CAAC;IACrB,CAAC,YAAY,EAAE,uBAAS,CAAC;IACzB,CAAC,kBAAkB,EAAE,YAAG,CAAC;IACzB,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,cAAc,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;IAC3C,CAAC,iBAAiB,EAAE,uBAAS,CAAC;IAC9B,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,wBAAwB,EAAE,WAAI,CAAC;IAChC,CAAC,kBAAkB,EAAE,YAAG,CAAC;IACzB,CAAC,4BAA4B,EAAE,YAAG,CAAC;IACnC,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,eAAe,EAAE,YAAG,CAAC;CACvB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAmB,CAC9B,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { BeetStruct } from '@metaplex-foundation/beet';
|
2
|
+
import { LstPositionInfo, LstStrategy, PositionInfo, Strategy } from './structs';
|
3
|
+
export type StrategyInfo = {
|
4
|
+
pubkey: string;
|
5
|
+
strategyStruct: BeetStruct<Strategy | LstStrategy>;
|
6
|
+
positionInfoStruct: BeetStruct<PositionInfo | LstPositionInfo>;
|
7
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/types.ts"],"names":[],"mappings":""}
|
@@ -42,20 +42,20 @@ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/token
|
|
42
42
|
const clients_1 = require("../../utils/clients");
|
43
43
|
const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
|
44
44
|
const helpers_1 = require("./helpers");
|
45
|
-
const query = (0, graphql_request_1.gql) `
|
46
|
-
query GetAirdropFinalFrontend($authority: String!) {
|
47
|
-
getAirdropFinalFrontend(authority: $authority) {
|
48
|
-
authority
|
49
|
-
community_allocation
|
50
|
-
eligibility
|
51
|
-
main_allocation
|
52
|
-
og_allocation
|
53
|
-
s1_allocation
|
54
|
-
s2_allocation
|
55
|
-
total_allocation
|
56
|
-
__typename
|
57
|
-
}
|
58
|
-
}
|
45
|
+
const query = (0, graphql_request_1.gql) `
|
46
|
+
query GetAirdropFinalFrontend($authority: String!) {
|
47
|
+
getAirdropFinalFrontend(authority: $authority) {
|
48
|
+
authority
|
49
|
+
community_allocation
|
50
|
+
eligibility
|
51
|
+
main_allocation
|
52
|
+
og_allocation
|
53
|
+
s1_allocation
|
54
|
+
s2_allocation
|
55
|
+
total_allocation
|
56
|
+
__typename
|
57
|
+
}
|
58
|
+
}
|
59
59
|
`;
|
60
60
|
const networkId = portfolio_core_1.NetworkId.solana;
|
61
61
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
@@ -1,16 +1,16 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.poolQueryMsg = exports.minterQueryMsg = exports.tokenInfoQueryMsg = exports.infoQueryMsg = void 0;
|
4
|
-
exports.infoQueryMsg = JSON.parse(`{
|
5
|
-
"info": {}
|
4
|
+
exports.infoQueryMsg = JSON.parse(`{
|
5
|
+
"info": {}
|
6
6
|
}`);
|
7
|
-
exports.tokenInfoQueryMsg = JSON.parse(`{
|
8
|
-
"token_info": {}
|
7
|
+
exports.tokenInfoQueryMsg = JSON.parse(`{
|
8
|
+
"token_info": {}
|
9
9
|
}`);
|
10
|
-
exports.minterQueryMsg = JSON.parse(`{
|
11
|
-
"minter": {}
|
10
|
+
exports.minterQueryMsg = JSON.parse(`{
|
11
|
+
"minter": {}
|
12
12
|
}`);
|
13
|
-
exports.poolQueryMsg = JSON.parse(`{
|
14
|
-
"pool": {}
|
13
|
+
exports.poolQueryMsg = JSON.parse(`{
|
14
|
+
"pool": {}
|
15
15
|
}`);
|
16
16
|
//# sourceMappingURL=constants.js.map
|