@sonarwatch/portfolio-plugins 0.12.117 → 0.12.119
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +2193 -2180
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/flash/helpers.js +2 -1
- package/src/plugins/flash/helpers.js.map +1 -1
- package/src/plugins/flash/poolJob.js +4 -11
- package/src/plugins/flash/poolJob.js.map +1 -1
- package/src/plugins/mango/banksJob.js +3 -8
- package/src/plugins/mango/banksJob.js.map +1 -1
- package/src/plugins/mango/boostFetcher.js +13 -3
- package/src/plugins/mango/boostFetcher.js.map +1 -1
- package/src/plugins/mango/collateralFetcher.js +21 -4
- package/src/plugins/mango/collateralFetcher.js.map +1 -1
- package/src/plugins/mango/constants.d.ts +2 -0
- package/src/plugins/mango/constants.js +8 -1
- package/src/plugins/mango/constants.js.map +1 -1
- package/src/plugins/picasso/helpers.js +1 -0
- package/src/plugins/picasso/helpers.js.map +1 -1
- package/src/plugins/picasso/unstakingPositionsFetcher.js +1 -0
- package/src/plugins/picasso/unstakingPositionsFetcher.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/x-staking-solana/constants.d.ts +2 -0
- package/src/plugins/x-staking-solana/constants.js +17 -1
- package/src/plugins/x-staking-solana/constants.js.map +1 -1
- package/src/plugins/x-staking-solana/index.js +5 -1
- package/src/plugins/x-staking-solana/index.js.map +1 -1
- 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;
|
@@ -63,9 +63,10 @@ function getLpTokenPrice(connection, pool, oracles) {
|
|
63
63
|
})),
|
64
64
|
];
|
65
65
|
const data = Buffer.concat([(0, anchorSighash_1.anchorSighash)('global', 'getLpTokenPrice')]);
|
66
|
+
const recentBlockhash = (yield connection.getLatestBlockhash()).blockhash;
|
66
67
|
const messageV0 = new web3_js_1.TransactionMessage({
|
67
68
|
payerKey: new web3_js_1.PublicKey(solana_1.emptyWithSol),
|
68
|
-
recentBlockhash
|
69
|
+
recentBlockhash,
|
69
70
|
instructions: [
|
70
71
|
new web3_js_1.TransactionInstruction({
|
71
72
|
keys,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAOyB;AACzB,2CAAoE;AAEpE,oEAAiE;AAEjE,+CAK4B;AAE5B,SAAgB,OAAO,CAAC,KAAa;IACnC,OAAO,sBAAU,CAAC,GAAG,CACnB,CAAC,GAAG,EAAE,EAAE,CACN,mBAAS,CAAC,sBAAsB,CAC9B;QACE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC;QAC5B,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;QAC/B,GAAG,CAAC,QAAQ,EAAE;KACf,EACD,oBAAQ,CACT,CAAC,CAAC,CAAC,CACP,CAAC;AACJ,CAAC;AAZD,0BAYC;AAED,SAAsB,eAAe,CACnC,UAAwB,EACxB,IAA2B,EAC3B,OAAiB;;;QAEjB,MAAM,IAAI,GAAkB;YAC1B;gBACE,MAAM,EAAE,2BAAe;gBACvB,QAAQ,EAAE,KAAK;gBACf,UAAU,EAAE,KAAK;aAClB;YACD;gBACE,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,QAAQ,EAAE,KAAK;gBACf,UAAU,EAAE,KAAK;aAClB;YACD;gBACE,MAAM,EAAE,IAAI,CAAC,OAAO;gBACpB,QAAQ,EAAE,KAAK;gBACf,UAAU,EAAE,KAAK;aAClB;YACD;gBACE,MAAM,EAAE,oCAA0B;gBAClC,QAAQ,EAAE,KAAK;gBACf,UAAU,EAAE,KAAK;aAClB;YACD,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC5B,MAAM,EAAE,CAAC;gBACT,QAAQ,EAAE,KAAK;gBACf,UAAU,EAAE,KAAK;aAClB,CAAC,CAAC;YACH,GAAG,OAAO,CAAC,GAAG,C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,EAAE,CAAC;QACxB,MAAM,oBAAoB,GAAG,IAAI,8BAAoB,CAAC,SAAS,CAAC,CAAC;QACjE,MAAM,4BAA4B,GAAG,MAAM,UAAU,CAAC,mBAAmB,CACvE,oBAAoB,CACrB,CAAC;QAEF,MAAM,YAAY,GAAG,MAAA,4BAA4B,CAAC,KAAK,CAAC,UAAU,0CAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5E,IAAI,YAAY;YACd,OAAO,YAAG;iBACP,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;iBAC5C,GAAG,CAAC,SAAA,EAAE,EAAI,2BAAkB,CAAA,CAAC;iBAC7B,QAAQ,EAAE,CAAC;QAEhB,OAAO,IAAI,CAAC;;CACb;AApED,0CAoEC"}
|
@@ -16,9 +16,8 @@ const structs_1 = require("./structs");
|
|
16
16
|
const solana_1 = require("../../utils/solana");
|
17
17
|
const constants_2 = require("../tokens/constants");
|
18
18
|
const helpers_1 = require("./helpers");
|
19
|
-
const
|
19
|
+
const getDecimals_1 = require("../../utils/solana/getDecimals");
|
20
20
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
21
|
-
var _a;
|
22
21
|
const client = (0, clients_1.getClientSolana)();
|
23
22
|
const poolsAccounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, structs_1.flPoolStruct, constants_1.poolsPkeys);
|
24
23
|
const custodiesInfo = yield cache.getItem(constants_1.custodiesKey, {
|
@@ -34,14 +33,8 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
33
|
const pool = poolsAccounts[i];
|
35
34
|
if (!pool)
|
36
35
|
continue;
|
37
|
-
const
|
38
|
-
|
39
|
-
continue;
|
40
|
-
const { supply, decimals } = res;
|
41
|
-
const lpPrice = (_a = (yield (0, helpers_1.getLpTokenPrice)(client, pool, pool.custodies.map((c) => { var _a; return ((_a = custodyAccounts.get(c.toString())) === null || _a === void 0 ? void 0 : _a.oracle.oracleAccount) || ''; })))) !== null && _a !== void 0 ? _a : pool.aumUsd
|
42
|
-
.dividedBy(Math.pow(10, decimals))
|
43
|
-
.dividedBy(supply)
|
44
|
-
.toNumber();
|
36
|
+
const lpPrice = yield (0, helpers_1.getLpTokenPrice)(client, pool, pool.custodies.map((c) => { var _a; return ((_a = custodyAccounts.get(c.toString())) === null || _a === void 0 ? void 0 : _a.oracle.customOracleAccount) || ''; }));
|
37
|
+
const decimals = yield (0, getDecimals_1.getDecimals)(client, pool.flpMint);
|
45
38
|
if (decimals && lpPrice) {
|
46
39
|
yield cache.setTokenPriceSource({
|
47
40
|
address: pool.flpMint.toString(),
|
@@ -77,7 +70,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
77
70
|
const job = {
|
78
71
|
id: `${constants_1.platformId}-pools`,
|
79
72
|
executor,
|
80
|
-
label: '
|
73
|
+
label: 'realtime',
|
81
74
|
};
|
82
75
|
exports.default = job;
|
83
76
|
//# sourceMappingURL=poolJob.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"poolJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/poolJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,2CAA6E;AAC7E,uCAAyC;AACzC,+CAI4B;AAC5B,mDAA2D;AAE3D,uCAA4C;AAC5C,
|
1
|
+
{"version":3,"file":"poolJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/poolJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,2CAA6E;AAC7E,uCAAyC;AACzC,+CAI4B;AAC5B,mDAA2D;AAE3D,uCAA4C;AAC5C,gEAA6D;AAE7D,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,a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
const filters_1 = require("./filters");
|
17
17
|
const helpers_1 = require("./helpers");
|
18
18
|
const clients_1 = require("../../utils/clients");
|
19
|
-
const fetchTokenSupplyAndDecimals_1 = require("../../utils/solana/fetchTokenSupplyAndDecimals");
|
20
19
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
21
20
|
const client = (0, clients_1.getClientSolana)();
|
22
21
|
const banksAccount = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.bankStruct, constants_1.mangoV4Pid, filters_1.banksFilter);
|
@@ -32,11 +31,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
31
|
const borrowApr = (0, helpers_1.getBorrowRate)(bank);
|
33
32
|
banks.push(Object.assign(Object.assign({}, bank), { depositApr,
|
34
33
|
borrowApr }));
|
35
|
-
const
|
36
|
-
const res = yield (0, fetchTokenSupplyAndDecimals_1.fetchTokenSupplyAndDecimals)(bank.mint, client);
|
37
|
-
if (!res)
|
38
|
-
continue;
|
39
|
-
const { decimals } = res;
|
34
|
+
const decimals = bank.mintDecimals;
|
40
35
|
const borrowedAmount = bank.depositIndex
|
41
36
|
.multipliedBy(bank.indexedDeposits)
|
42
37
|
.dividedBy(Math.pow(10, decimals))
|
@@ -48,7 +43,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
48
43
|
if (borrowedAmount <= 10 && depositedAmount <= 10)
|
49
44
|
continue;
|
50
45
|
const rate = {
|
51
|
-
tokenAddress,
|
46
|
+
tokenAddress: bank.mint.toString(),
|
52
47
|
borrowYield: {
|
53
48
|
apy: (0, portfolio_core_1.aprToApy)(borrowApr),
|
54
49
|
apr: borrowApr,
|
@@ -63,7 +58,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
63
58
|
poolName: 'Main',
|
64
59
|
};
|
65
60
|
rateItems.push({
|
66
|
-
key: `${bank.vault.toString()}-${
|
61
|
+
key: `${bank.vault.toString()}-${bank.mint.toString()}`,
|
67
62
|
value: rate,
|
68
63
|
});
|
69
64
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"banksJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/banksJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAKoC;AAIpC,2CAA+D;AAC/D,+CAA8D;AAC9D,qCAAsC;AACtC,uCAAwC;AACxC,uCAA0D;AAC1D,iDAAsD;
|
1
|
+
{"version":3,"file":"banksJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/banksJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAKoC;AAIpC,2CAA+D;AAC/D,+CAA8D;AAC9D,qCAAsC;AACtC,uCAAwC;AACxC,uCAA0D;AAC1D,iDAAsD;AAEtD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,YAAY,GAAG,MAAM,IAAA,iCAAwB,EACjD,MAAM,EACN,mBAAU,EACV,sBAAU,EACV,qBAAW,CACZ,CAAC;IACF,IAAI,CAAC,YAAY;QAAE,OAAO;IAE1B,MAAM,KAAK,GAAmB,EAAE,CAAC;IACjC,MAAM,SAAS,GAAG,EAAE,CAAC;IACrB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;QACzD,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;QACjC,IAAI,CAAC,IAAI;YAAE,SAAS;QAEpB,MAAM,UAAU,GAAG,IAAA,wBAAc,EAAC,IAAI,CAAC,CAAC;QACxC,MAAM,SAAS,GAAG,IAAA,uBAAa,EAAC,IAAI,CAAC,CAAC;QACtC,KAAK,CAAC,IAAI,iCACL,IAAI,KACP,UAAU;YACV,SAAS,IACT,CAAC;QACH,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC;QACnC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CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -80,12 +80,22 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
80
80
|
}
|
81
81
|
}
|
82
82
|
const { borrowedValue, healthRatio, suppliedValue, value, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({ suppliedAssets, borrowedAssets, rewardAssets });
|
83
|
+
let leverage;
|
84
|
+
if (suppliedAssets[0].data.price &&
|
85
|
+
suppliedAssets[0].data.amount &&
|
86
|
+
value) {
|
87
|
+
const depositAmount = new bignumber_js_1.default(value).dividedBy(suppliedAssets[0].data.price);
|
88
|
+
leverage = `${new bignumber_js_1.default(suppliedAssets[0].data.amount)
|
89
|
+
.dividedBy(depositAmount)
|
90
|
+
.decimalPlaces(2)
|
91
|
+
.toString()}x`;
|
92
|
+
}
|
83
93
|
const element = {
|
84
94
|
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
85
95
|
networkId: portfolio_core_1.NetworkId.solana,
|
86
|
-
platformId: constants_1.
|
96
|
+
platformId: constants_1.yieldFanPlatformId,
|
87
97
|
label: 'Leverage',
|
88
|
-
name:
|
98
|
+
name: leverage,
|
89
99
|
value,
|
90
100
|
data: {
|
91
101
|
borrowedAssets,
|
@@ -105,7 +115,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
105
115
|
return elements;
|
106
116
|
});
|
107
117
|
const fetcher = {
|
108
|
-
id: `${constants_1.
|
118
|
+
id: `${constants_1.yieldFanPlatformId}-boost`,
|
109
119
|
networkId: portfolio_core_1.NetworkId.solana,
|
110
120
|
executor,
|
111
121
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"boostFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/boostFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AAGrC,
|
1
|
+
{"version":3,"file":"boostFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/boostFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AAGrC,2CAKqB;AACrB,iDAAsD;AACtD,qCAA8C;AAC9C,uCAAgD;AAChD,+CAA8D;AAE9D,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,2BAAkB,EAClB,0BAAc,EACd,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,OAAO,CAAgB,yBAAa,EAAE;QACrE,MAAM,EAAE,sBAAe;QACvB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,IAAI,CAAC,YAAY;QAAE,OAAO,EAAE,CAAC;IAE7B,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,cAAc,CAC/C,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,EACjC,0BAAS,CAAC,MAAM,CACjB,CAAC;IACF,MAAM,WAAW,GAA4B,IAAI,GAAG,EAAE,CAAC;IACvD,cAAc,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE;QAC5B,IAAI,CAAC,EAAE;YAAE,OAAO;QAChB,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,MAAM,QA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,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;iBACvD,SAAS,CAAC,aAAa,CAAC;iBACxB,aAAa,CAAC,CAAC,CAAC;iBAChB,QAAQ,EAAE,GAAG,CAAC;QACnB,CAAC;QAED,MAAM,OAAO,GAAqB;YAChC,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,8BAAU;YACV,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,KAAK;YACL,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;SACF,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,8BAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -117,12 +117,29 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
117
117
|
}
|
118
118
|
if (suppliedAssets.length === 0 && borrowedAssets.length === 0)
|
119
119
|
continue;
|
120
|
-
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({
|
120
|
+
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({
|
121
|
+
suppliedAssets,
|
122
|
+
borrowedAssets,
|
123
|
+
rewardAssets,
|
124
|
+
});
|
125
|
+
const name = (0, solana_1.u8ArrayToString)(userAccount.name);
|
126
|
+
const isYieldFan = name.includes('Leverage Stake');
|
127
|
+
let leverage;
|
128
|
+
if (isYieldFan &&
|
129
|
+
suppliedAssets[0].data.price &&
|
130
|
+
suppliedAssets[0].data.amount &&
|
131
|
+
value) {
|
132
|
+
const depositAmount = new bignumber_js_1.default(value).dividedBy(suppliedAssets[0].data.price);
|
133
|
+
leverage = `${new bignumber_js_1.default(suppliedAssets[0].data.amount)
|
134
|
+
.dividedBy(depositAmount)
|
135
|
+
.decimalPlaces(2)
|
136
|
+
.toString()}x`;
|
137
|
+
}
|
121
138
|
elements.push({
|
122
139
|
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
123
140
|
networkId: portfolio_core_1.NetworkId.solana,
|
124
|
-
platformId: constants_1.platformId,
|
125
|
-
label: 'Lending',
|
141
|
+
platformId: isYieldFan ? constants_1.yieldFanPlatformId : constants_1.platformId,
|
142
|
+
label: isYieldFan ? 'Leverage' : 'Lending',
|
126
143
|
value,
|
127
144
|
data: {
|
128
145
|
borrowedAssets,
|
@@ -136,7 +153,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
136
153
|
rewardValue,
|
137
154
|
value,
|
138
155
|
},
|
139
|
-
name:
|
156
|
+
name: isYieldFan ? leverage : name,
|
140
157
|
});
|
141
158
|
}
|
142
159
|
return elements;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"collateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/collateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AAGrC,
|
1
|
+
{"version":3,"file":"collateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/collateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AAGrC,2CAKqB;AACrB,iDAAsD;AACtD,qCAA8C;AAC9C,uCAA2C;AAC3C,+CAA+E;AAC/E,qGAA6E;AAC7E,6EAAqD;AAGrD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EA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C;iBAChB,QAAQ,EAAE,GAAG,CAAC;QACnB,CAAC;QAED,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,8BAAkB,CAAC,CAAC,CAAC,sBAAU;YACxD,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;YAC1C,KAAK;YACL,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;YACD,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI;SACnC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,aAAa;IAC9B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -2,6 +2,8 @@ import { PublicKey } from '@solana/web3.js';
|
|
2
2
|
import { Platform } from '@sonarwatch/portfolio-core';
|
3
3
|
export declare const platformId = "mango";
|
4
4
|
export declare const platform: Platform;
|
5
|
+
export declare const yieldFanPlatformId = "yieldfan";
|
6
|
+
export declare const yieldFanPlatform: Platform;
|
5
7
|
export declare const banksKey = "banks";
|
6
8
|
export declare const rootBankPrefix = "mango-rootBank";
|
7
9
|
export declare const groupPrefix = "mango-group";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.boostProgramId = exports.redeemProgramId = exports.mangoV4Pid = exports.boostBanksKey = exports.groupPrefix = exports.rootBankPrefix = exports.banksKey = exports.platform = exports.platformId = void 0;
|
3
|
+
exports.boostProgramId = exports.redeemProgramId = exports.mangoV4Pid = exports.boostBanksKey = exports.groupPrefix = exports.rootBankPrefix = exports.banksKey = exports.yieldFanPlatform = exports.yieldFanPlatformId = exports.platform = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.platformId = 'mango';
|
6
6
|
exports.platform = {
|
@@ -10,6 +10,13 @@ exports.platform = {
|
|
10
10
|
defiLlamaId: 'parent#mango-markets',
|
11
11
|
website: 'https://mango.markets/',
|
12
12
|
};
|
13
|
+
exports.yieldFanPlatformId = 'yieldfan';
|
14
|
+
exports.yieldFanPlatform = {
|
15
|
+
id: exports.yieldFanPlatformId,
|
16
|
+
name: 'Yieldfan',
|
17
|
+
image: 'https://sonar.watch/img/platforms/yieldfan.webp',
|
18
|
+
website: 'https://yield.fan/',
|
19
|
+
};
|
13
20
|
exports.banksKey = `banks`;
|
14
21
|
exports.rootBankPrefix = `${exports.platformId}-rootBank`;
|
15
22
|
exports.groupPrefix = `${exports.platformId}-group`;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,sBAAsB;IACnC,OAAO,EAAE,wBAAwB;CAClC,CAAC;AACW,QAAA,QAAQ,GAAG,OAAO,CAAC;AACnB,QAAA,cAAc,GAAG,GAAG,kBAAU,WAAW,CAAC;AAC1C,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,aAAa,GAAG,aAAa,CAAC;AAE9B,QAAA,UAAU,GAAG,IAAI,mBAAS,CACrC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,eAAe,GAAG,IAAI,mBAAS,CAC1C,6CAA6C,CAC9C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC"}
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,sBAAsB;IACnC,OAAO,EAAE,wBAAwB;CAClC,CAAC;AAEW,QAAA,kBAAkB,GAAG,UAAU,CAAC;AAChC,QAAA,gBAAgB,GAAa;IACxC,EAAE,EAAE,0BAAkB;IACtB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,oBAAoB;CAC9B,CAAC;AACW,QAAA,QAAQ,GAAG,OAAO,CAAC;AACnB,QAAA,cAAc,GAAG,GAAG,kBAAU,WAAW,CAAC;AAC1C,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,aAAa,GAAG,aAAa,CAAC;AAE9B,QAAA,UAAU,GAAG,IAAI,mBAAS,CACrC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,eAAe,GAAG,IAAI,mBAAS,CAC1C,6CAA6C,CAC9C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA4C;AAC5C,+DAQoC;AACpC,gEAAqC;AAErC,2CAA+E;AAC/E,qGAA6E;AAC7E,+CAAu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I,EAAE,GAAG,sBAAU,YAAY;SAChC,CAAC;QACF,OAAO,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;CAAA;AA7DD,gEA6DC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"unstakingPositionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/unstakingPositionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AAErC,2CAIqB;AAErB,qGAA6E;AAE7E,kEAA+D;AAE/D,MAAM,aAAa,GAAG,IAAI,6BAAa,CAAU,iCAAqB,EAAE;IACtE,MAAM,EAAE,oCAAwB;IAChC,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,0CAA0C;IAC1C,8DAA8D;IAE9D,MAAM,SAAS,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAErD,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEpD,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAC/B,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,CAAA,MAAA,CAAC,CAAC,iBAAiB,0CAAE,KAAK,MAAK,KAAK,CAAA,EAAA,CAC5C,CAAC;IAEF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,UAAU,GAAG;QACjB,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC;KAC5D,CAAC;IAEF,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACjD,UAAU,EACV,0BAAS,CAAC,MAAM,CACjB,CA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C,CAAC;YACjD,IAAI,EAAE;gBACJ,MAAM;aACP;
|
1
|
+
{"version":3,"file":"unstakingPositionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/unstakingPositionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AAErC,2CAIqB;AAErB,qGAA6E;AAE7E,kEAA+D;AAE/D,MAAM,aAAa,GAAG,IAAI,6BAAa,CAAU,iCAAqB,EAAE;IACtE,MAAM,EAAE,oCAAwB;IAChC,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,0CAA0C;IAC1C,8DAA8D;IAE9D,MAAM,SAAS,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAErD,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEpD,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAC/B,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,CAAA,MAAA,CAAC,CAAC,iBAAiB,0CAAE,KAAK,MAAK,KAAK,CAAA,EAAA,CAC5C,CAAC;IAEF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,UAAU,GAAG;QACjB,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC;KAC5D,CAAC;IAEF,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACjD,UAAU,EACV,0BAAS,CAAC,MAAM,CACjB,CAAC;IAEF,MAAM,MAAM,GAA0B,EAAE,CAAC;IAEzC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK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C;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,sBAAsB;IACvC,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;
|
@@ -3,6 +3,8 @@ export declare const stepFinancePlatformId = "stepfinance";
|
|
3
3
|
export declare const stepFinancePlatform: Platform;
|
4
4
|
export declare const allbridgePlatformId = "allbridge";
|
5
5
|
export declare const allbridgePlatform: Platform;
|
6
|
+
export declare const ligmaPlatformId = "ligma";
|
7
|
+
export declare const ligmaPlatform: Platform;
|
6
8
|
export declare const xStakingConfigs: StakingConfig[];
|
7
9
|
export type StakingConfig = {
|
8
10
|
mint: string;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.xStakingConfigs = exports.allbridgePlatform = exports.allbridgePlatformId = exports.stepFinancePlatform = exports.stepFinancePlatformId = void 0;
|
3
|
+
exports.xStakingConfigs = exports.ligmaPlatform = exports.ligmaPlatformId = exports.allbridgePlatform = exports.allbridgePlatformId = exports.stepFinancePlatform = exports.stepFinancePlatformId = void 0;
|
4
4
|
const constants_1 = require("../aurory/constants");
|
5
5
|
const constants_2 = require("../hawksight/constants");
|
6
6
|
const constants_3 = require("../whalesmarket/constants");
|
@@ -20,6 +20,14 @@ exports.allbridgePlatform = {
|
|
20
20
|
website: 'https://stake.allbridge.io/?chain=SOL',
|
21
21
|
twitter: 'https://twitter.com/Allbridge_io',
|
22
22
|
};
|
23
|
+
exports.ligmaPlatformId = 'ligma';
|
24
|
+
exports.ligmaPlatform = {
|
25
|
+
id: exports.allbridgePlatformId,
|
26
|
+
name: 'Ligma',
|
27
|
+
image: 'https://sonar.watch/img/platforms/ligma.webp',
|
28
|
+
website: 'https://stake.ligmanode.com/',
|
29
|
+
twitter: 'https://twitter.com/ligmanode',
|
30
|
+
};
|
23
31
|
exports.xStakingConfigs = [
|
24
32
|
{
|
25
33
|
mint: constants_1.auryMint,
|
@@ -61,5 +69,13 @@ exports.xStakingConfigs = [
|
|
61
69
|
xDecimals: 6,
|
62
70
|
platformId: constants_2.platformId,
|
63
71
|
},
|
72
|
+
{
|
73
|
+
mint: 'node3SHFNF7h6N9jbztfVcXrZcvAJdns1xAV8CbYFLG',
|
74
|
+
decimals: 6,
|
75
|
+
vault: 'ENz6c4ZVYedrcK5V4fh7vwDA1SvZDNDQb1j3KKQbbo8Q',
|
76
|
+
xMint: 'xNodeyB1u8WNrKQJqfucbKDMq7LYcAQfYXmqVdDj9M5',
|
77
|
+
xDecimals: 6,
|
78
|
+
platformId: exports.ligmaPlatformId,
|
79
|
+
},
|
64
80
|
];
|
65
81
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/x-staking-solana/constants.ts"],"names":[],"mappings":";;;AACA,mDAM6B;AAC7B,sDAA2E;AAC3E,yDAAiF;AAEpE,QAAA,qBAAqB,GAAG,aAAa,CAAC;AACtC,QAAA,mBAAmB,GAAa;IAC3C,EAAE,EAAE,6BAAqB;IACzB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,oDAAoD;IAC3D,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,mBAAmB,GAAG,WAAW,CAAC;AAClC,QAAA,iBAAiB,GAAa;IACzC,EAAE,EAAE,2BAAmB;IACvB,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,uCAAuC;IAChD,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,eAAe,GAAoB;IAC9C;QACE,IAAI,EAAE,oBAAQ;QACd,QAAQ,EAAR,oBAAQ;QACR,KAAK,EAAE,uBAAW;QAClB,KAAK,EAAE,qBAAS;QAChB,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,sBAAgB;KAC7B;IACD;QACE,IAAI,EAAE,8CAA8C;QACpD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,8CAA8C;QACrD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,sBAAsB;KACnC;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,6BAAqB;KAClC;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,2BAAmB;KAChC;IACD;QACE,IAAI,EAAE,8CAA8C;QACpD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,sBAAmB;KAChC;CACF,CAAC"}
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/x-staking-solana/constants.ts"],"names":[],"mappings":";;;AACA,mDAM6B;AAC7B,sDAA2E;AAC3E,yDAAiF;AAEpE,QAAA,qBAAqB,GAAG,aAAa,CAAC;AACtC,QAAA,mBAAmB,GAAa;IAC3C,EAAE,EAAE,6BAAqB;IACzB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,oDAAoD;IAC3D,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,mBAAmB,GAAG,WAAW,CAAC;AAClC,QAAA,iBAAiB,GAAa;IACzC,EAAE,EAAE,2BAAmB;IACvB,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,uCAAuC;IAChD,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,eAAe,GAAG,OAAO,CAAC;AAC1B,QAAA,aAAa,GAAa;IACrC,EAAE,EAAE,2BAAmB;IACvB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,OAAO,EAAE,8BAA8B;IACvC,OAAO,EAAE,+BAA+B;CACzC,CAAC;AACW,QAAA,eAAe,GAAoB;IAC9C;QACE,IAAI,EAAE,oBAAQ;QACd,QAAQ,EAAR,oBAAQ;QACR,KAAK,EAAE,uBAAW;QAClB,KAAK,EAAE,qBAAS;QAChB,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,sBAAgB;KAC7B;IACD;QACE,IAAI,EAAE,8CAA8C;QACpD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,8CAA8C;QACrD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,sBAAsB;KACnC;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,6BAAqB;KAClC;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,2BAAmB;KAChC;IACD;QACE,IAAI,EAAE,8CAA8C;QACpD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,sBAAmB;KAChC;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,uBAAe;KAC5B;CACF,CAAC"}
|
@@ -6,7 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
7
|
const constants_1 = require("./constants");
|
8
8
|
const stakingJob_1 = __importDefault(require("./stakingJob"));
|
9
|
-
exports.platforms = [
|
9
|
+
exports.platforms = [
|
10
|
+
constants_1.stepFinancePlatform,
|
11
|
+
constants_1.allbridgePlatform,
|
12
|
+
constants_1.ligmaPlatform,
|
13
|
+
];
|
10
14
|
exports.jobs = [stakingJob_1.default];
|
11
15
|
exports.fetchers = [];
|
12
16
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/x-staking-solana/index.ts"],"names":[],"mappings":";;;;;;AAGA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/x-staking-solana/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAIqB;AACrB,8DAAuC;AAE1B,QAAA,SAAS,GAAe;IACnC,+BAAmB;IACnB,6BAAiB;IACjB,yBAAa;CACd,CAAC;AACW,QAAA,IAAI,GAAU,CAAC,oBAAW,CAAC,CAAC;AAC5B,QAAA,QAAQ,GAAc,EAAE,CAAC"}
|
@@ -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
|