@sonarwatch/portfolio-plugins 0.14.40 → 0.14.42
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1752 -1744
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/index.js +4 -0
- package/src/index.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/coinmarketcap/constants.d.ts +11 -0
- package/src/plugins/coinmarketcap/constants.js +88 -0
- package/src/plugins/coinmarketcap/constants.js.map +1 -0
- package/src/plugins/coinmarketcap/index.d.ts +6 -0
- package/src/plugins/coinmarketcap/index.js +12 -0
- package/src/plugins/coinmarketcap/index.js.map +1 -0
- package/src/plugins/coinmarketcap/pricingJob.d.ts +3 -0
- package/src/plugins/coinmarketcap/pricingJob.js +49 -0
- package/src/plugins/coinmarketcap/pricingJob.js.map +1 -0
- package/src/plugins/jupiter/helpers.js +2 -1
- package/src/plugins/jupiter/helpers.js.map +1 -1
- package/src/plugins/jupiter/pricingJob.js +8 -4
- package/src/plugins/jupiter/pricingJob.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/zeta/airdropFetcher.js +14 -14
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/utils/solana/pyth/helpers.js +1 -1
- package/src/utils/solana/pyth/helpers.js.map +1 -1
package/README.md
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
# @sonarwatch/portfolio-plugins
|
2
|
-
|
3
|
-
This library is @sonarwatch/portfolio-plugins
|
1
|
+
# @sonarwatch/portfolio-plugins
|
2
|
+
|
3
|
+
This library is @sonarwatch/portfolio-plugins
|
package/package.json
CHANGED
package/src/index.js
CHANGED
@@ -155,6 +155,7 @@ const grass_1 = require("./plugins/grass");
|
|
155
155
|
const cyberfrogs_1 = require("./plugins/cyberfrogs");
|
156
156
|
const metaplex_1 = require("./plugins/metaplex");
|
157
157
|
const ensofi_1 = require("./plugins/ensofi");
|
158
|
+
const coinmarketcap_1 = require("./plugins/coinmarketcap");
|
158
159
|
var constants_1 = require("./plugins/tokens/constants");
|
159
160
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
160
161
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -303,6 +304,7 @@ exports.platforms = [
|
|
303
304
|
...cyberfrogs_1.platforms,
|
304
305
|
...metaplex_1.platforms,
|
305
306
|
...ensofi_1.platforms,
|
307
|
+
...coinmarketcap_1.platforms,
|
306
308
|
];
|
307
309
|
// JOBS //
|
308
310
|
exports.jobs = [
|
@@ -435,6 +437,7 @@ exports.jobs = [
|
|
435
437
|
...cyberfrogs_1.jobs,
|
436
438
|
...metaplex_1.jobs,
|
437
439
|
...ensofi_1.jobs,
|
440
|
+
...coinmarketcap_1.jobs,
|
438
441
|
];
|
439
442
|
// FETCHERS //
|
440
443
|
exports.fetchers = [
|
@@ -568,6 +571,7 @@ exports.fetchers = [
|
|
568
571
|
...cyberfrogs_1.fetchers,
|
569
572
|
...metaplex_1.fetchers,
|
570
573
|
...ensofi_1.fetchers,
|
574
|
+
...coinmarketcap_1.fetchers,
|
571
575
|
];
|
572
576
|
exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
|
573
577
|
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,6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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;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { NetworkIdType, Platform } from '@sonarwatch/portfolio-core';
|
2
|
+
export declare const platformId = "coinmarketcap";
|
3
|
+
export declare const platform: Platform;
|
4
|
+
export declare const cmcTokens: {
|
5
|
+
slug: string;
|
6
|
+
tokens: {
|
7
|
+
mint: string;
|
8
|
+
decimals: number;
|
9
|
+
networkId: NetworkIdType;
|
10
|
+
}[];
|
11
|
+
}[];
|
@@ -0,0 +1,88 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.cmcTokens = exports.platform = exports.platformId = void 0;
|
4
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
5
|
+
const constants_1 = require("../../utils/sui/constants");
|
6
|
+
const solana_1 = require("../../utils/solana");
|
7
|
+
exports.platformId = 'coinmarketcap';
|
8
|
+
exports.platform = {
|
9
|
+
id: exports.platformId,
|
10
|
+
name: 'CoinMarketCap',
|
11
|
+
image: 'https://sonar.watch/img/platforms/coinmarketcap.webp',
|
12
|
+
// defiLlamaId: 'pyth-network', // from https://defillama.com/docs/api
|
13
|
+
website: 'https://coinmarketcap.com/',
|
14
|
+
// twitter: 'https://twitter.com/PythNetwork',
|
15
|
+
};
|
16
|
+
exports.cmcTokens = [
|
17
|
+
{
|
18
|
+
slug: 'solana',
|
19
|
+
tokens: [
|
20
|
+
{
|
21
|
+
mint: portfolio_core_1.solanaNativeAddress,
|
22
|
+
decimals: portfolio_core_1.solanaNativeDecimals,
|
23
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
24
|
+
},
|
25
|
+
{
|
26
|
+
mint: portfolio_core_1.solanaNativeWrappedAddress,
|
27
|
+
decimals: portfolio_core_1.solanaNativeDecimals,
|
28
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
29
|
+
},
|
30
|
+
],
|
31
|
+
},
|
32
|
+
{
|
33
|
+
slug: 'sui',
|
34
|
+
tokens: [
|
35
|
+
{
|
36
|
+
mint: portfolio_core_1.suiNativeAddress,
|
37
|
+
decimals: portfolio_core_1.suiNativeDecimals,
|
38
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
39
|
+
},
|
40
|
+
{
|
41
|
+
mint: '0x2::sui::SUI',
|
42
|
+
decimals: portfolio_core_1.suiNativeDecimals,
|
43
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
44
|
+
},
|
45
|
+
],
|
46
|
+
},
|
47
|
+
{
|
48
|
+
slug: 'aptos',
|
49
|
+
tokens: [
|
50
|
+
{
|
51
|
+
mint: portfolio_core_1.aptosNativeAddress,
|
52
|
+
decimals: portfolio_core_1.aptosNativeDecimals,
|
53
|
+
networkId: portfolio_core_1.NetworkId.aptos,
|
54
|
+
},
|
55
|
+
],
|
56
|
+
},
|
57
|
+
{
|
58
|
+
slug: 'usd-coin',
|
59
|
+
tokens: [
|
60
|
+
{
|
61
|
+
mint: constants_1.wUsdcSuiType,
|
62
|
+
decimals: constants_1.wusdcSuiDecimals,
|
63
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
64
|
+
},
|
65
|
+
{
|
66
|
+
mint: constants_1.usdcSuiType,
|
67
|
+
decimals: constants_1.usdcSuiDecimals,
|
68
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
69
|
+
},
|
70
|
+
{
|
71
|
+
mint: solana_1.usdcSolanaMint,
|
72
|
+
decimals: solana_1.usdcSolanaDecimals,
|
73
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
74
|
+
},
|
75
|
+
],
|
76
|
+
},
|
77
|
+
{
|
78
|
+
slug: 'tether',
|
79
|
+
tokens: [
|
80
|
+
{
|
81
|
+
mint: 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
|
82
|
+
decimals: 6,
|
83
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
84
|
+
},
|
85
|
+
],
|
86
|
+
},
|
87
|
+
];
|
88
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/coinmarketcap/constants.ts"],"names":[],"mappings":";;;AAAA,+DAWoC;AACpC,yDAKmC;AACnC,+CAAwE;AAE3D,QAAA,UAAU,GAAG,eAAe,CAAC;AAC7B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,sDAAsD;IAC7D,sEAAsE;IACtE,OAAO,EAAE,4BAA4B;IACrC,8CAA8C;CAC/C,CAAC;AAEW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SACF;KACF;CACF,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 pricingJob_1 = __importDefault(require("./pricingJob"));
|
9
|
+
exports.platforms = [constants_1.platform];
|
10
|
+
exports.jobs = [pricingJob_1.default];
|
11
|
+
exports.fetchers = [];
|
12
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/coinmarketcap/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,8DAAsC;AAEzB,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,oBAAU,CAAC,CAAC;AAC3B,QAAA,QAAQ,GAAc,EAAE,CAAC"}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
const axios_1 = __importDefault(require("axios"));
|
16
|
+
const constants_1 = require("../tokens/constants");
|
17
|
+
const constants_2 = require("./constants");
|
18
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
19
|
+
const url = `https://pro-api.coinmarketcap.com/v2/cryptocurrency/quotes/latest?slug=${constants_2.cmcTokens
|
20
|
+
.map((t) => t.slug)
|
21
|
+
.join(',')}&CMC_PRO_API_KEY=${'86388059-e077-420d-8512-74496d323918'}`;
|
22
|
+
const quotesRes = yield axios_1.default.get(url).catch(() => null);
|
23
|
+
const sources = [];
|
24
|
+
Object.values((quotesRes === null || quotesRes === void 0 ? void 0 : quotesRes.data.data) || {}).forEach((coin) => {
|
25
|
+
const tokenConf = constants_2.cmcTokens.find((t) => t.slug === coin.slug);
|
26
|
+
if (!tokenConf)
|
27
|
+
return;
|
28
|
+
tokenConf.tokens.forEach((token) => {
|
29
|
+
sources.push({
|
30
|
+
address: token.mint,
|
31
|
+
id: `coinmarketcap-${coin.slug}`,
|
32
|
+
decimals: token.decimals,
|
33
|
+
networkId: token.networkId,
|
34
|
+
platformId: constants_1.walletTokensPlatform.id,
|
35
|
+
price: coin.quote.USD.price,
|
36
|
+
timestamp: Date.now(),
|
37
|
+
weight: 1,
|
38
|
+
});
|
39
|
+
});
|
40
|
+
});
|
41
|
+
yield cache.setTokenPriceSources(sources);
|
42
|
+
});
|
43
|
+
const job = {
|
44
|
+
id: `${constants_2.platformId}-pricing`,
|
45
|
+
executor,
|
46
|
+
label: 'realtime',
|
47
|
+
};
|
48
|
+
exports.default = job;
|
49
|
+
//# sourceMappingURL=pricingJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/coinmarketcap/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,kDAA6C;AAC7C,mDAA2D;AAG3D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CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,UAAU;CAClB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -48,7 +48,8 @@ function getJupiterPrices(mints, vsMint) {
|
|
48
48
|
const prices = new Map();
|
49
49
|
for (const priceData of pricesData) {
|
50
50
|
for (const [, value] of Object.entries(priceData)) {
|
51
|
-
|
51
|
+
if (value)
|
52
|
+
prices.set(value.id, value.price);
|
52
53
|
}
|
53
54
|
}
|
54
55
|
return prices;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA4C;AAC5C,kDAA6C;AAC7C,+DAGoC;AAEpC,qDAAoE;AAEpE,SAAgB,UAAU,CAAC,KAAa;IACtC,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;QACrB,wBAAY,CAAC,OAAO,EAAE;QACtB,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE;KAC/B,EACD,yBAAa,CACd,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AATD,gCASC;AAED,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,SAAsB,gBAAgB,CAAC,KAAkB,EAAE,MAAiB;;QAC1E,IAAI,GAAG,CAAC;QACR,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,IAAI,QAAQ,CAAC;QACb,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,GAAG,GAAG,gBAAgB,GAAG,CAAC,CAAC;QAC/B,GAAG,CAAC;YACF,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAA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D,MAAM,WAAW,GAAqC,IAAI,GAAG,EAAE,CAAC;IAChE,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO;YAAE,SAAS;QAErC,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC;QAC/B,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;QACtC,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC;QAC/B,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC/C,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAClC,CAAC;aAAM,CAAC;YACN,aAAa,CAAC,IAAI,CAAC,MAAM,IAAI,WAAW,CAAC;YACzC,aAAa,CAAC,KAAK,GAAG,IAAA,+BAAc,EAAC,CAAC,UAAU,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;YACxE,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;AAC1C,CAAC;AAnBD,0CAmBC"}
|
@@ -17,6 +17,7 @@ const constants_2 = require("../tokens/constants");
|
|
17
17
|
const getMultipleDecimalsAsMap_1 = require("../../utils/solana/getMultipleDecimalsAsMap");
|
18
18
|
const clients_1 = require("../../utils/clients");
|
19
19
|
const constants_3 = require("../sanctum/constants");
|
20
|
+
const solana_1 = require("../../utils/solana");
|
20
21
|
const mints = [
|
21
22
|
'xLfNTYy76B8Tiix3hA51Jyvc1kMSFV4sPdR7szTZsRu', // xLifinity
|
22
23
|
'DdFPRnccQqLD4zCHrBqdY95D6hvw6PLWp9DEXj1fLCL9', // Wrapped USDC (Allbridge from Ethereum)
|
@@ -43,9 +44,12 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
43
44
|
networkId: portfolio_core_1.NetworkId.solana,
|
44
45
|
});
|
45
46
|
const connection = (0, clients_1.getClientSolana)();
|
46
|
-
const solTokenPrice =
|
47
|
-
|
47
|
+
// const solTokenPrice = await cache.getTokenPrice(vsToken, NetworkId.solana);
|
48
|
+
const solSources = yield (0, helpers_1.getJupiterPrices)([new web3_js_1.PublicKey(vsToken)], new web3_js_1.PublicKey(solana_1.usdcSolanaMint));
|
49
|
+
const solPrice = solSources.get(vsToken);
|
50
|
+
if (!solPrice)
|
48
51
|
return;
|
52
|
+
const solTokenPrice = { price: solPrice };
|
49
53
|
const mintsPk = mints.map((m) => new web3_js_1.PublicKey(m));
|
50
54
|
if (sanctumMints)
|
51
55
|
mintsPk.push(...sanctumMints.map((m) => new web3_js_1.PublicKey(m)));
|
@@ -64,7 +68,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
64
68
|
timestamp: Date.now(),
|
65
69
|
price: solTokenPrice.price * price,
|
66
70
|
platformId: constants_2.walletTokensPlatform.id,
|
67
|
-
weight:
|
71
|
+
weight: 1,
|
68
72
|
};
|
69
73
|
sources.push(source);
|
70
74
|
});
|
@@ -73,7 +77,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
73
77
|
const job = {
|
74
78
|
id: `${constants_1.platformId}-pricing`,
|
75
79
|
executor,
|
76
|
-
label: '
|
80
|
+
label: 'realtime',
|
77
81
|
};
|
78
82
|
exports.default = job;
|
79
83
|
//# sourceMappingURL=pricingJob.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAG5C,oDAAkD;AAClD,uCAA6C;AAC7C,mDAA2D;AAC3D,0FAAuF;AACvF,iDAAsD;AACtD,oDAAgF;
|
1
|
+
{"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAG5C,oDAAkD;AAClD,uCAA6C;AAC7C,mDAA2D;AAC3D,0FAAuF;AACvF,iDAAsD;AACtD,oDAAgF;AAChF,+CAAoD;AAEpD,MAAM,KAAK,GAAG;IACZ,6CAA6C,EAAE,YAAY;IAC3D,8CAA8C,EAAE,yCAAyC;IACzF,6CAA6C,EAAE,wCAAwC;IACvF,8CAA8C,EAAE,0CAA0C;IAC1F,8CAA8C,EAAE,iCAAiC;IACjF,6CAA6C,EAAE,iCAAiC;IAChF,8CAA8C,EAAE,oBAAoB;IACpE,8CAA8C,EAAE,QAAQ;IACxD,8CAA8C,EAAE,yCAAyC;IACzF,8CAA8C,EAAE,0CAA0C;IAC1F,8CAA8C,EAAE,oCAAoC;IACpF,8CAA8C,EAAE,oCAAoC;IACpF,8CAA8C,EAAE,6BAA6B;IAC7E,6CAA6C,EAAE,iCAAiC;IAChF,8CAA8C,EAAE,+BAA+B;IAC/E,8CAA8C,EAAE,iCAAiC;IACjF,6CAA6C,EAAE,MAAM;CACtD,CAAC;AACF,MAAM,OAAO,GAAG,2CAA0B,CAAC;AAE3C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,OAAO,CAAW,mBAAO,EAAE;QAC1D,MAAM,EAAE,sBAAiB;QACzB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,8EAA8E;IAC9E,MAAM,UAAU,GAAG,MAAM,IAAA,0BAAgB,EACvC,CAAC,IAAI,mBAAS,CAAC,OAAO,CAAC,CAAC,EACxB,IAAI,mBAAS,CAAC,uBA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AAM,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,UAAU;CAClB,CAAC;AACF,kBAAe,GAAG,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;
|
@@ -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
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
function getQueryBalanceByOwner(owner) {
|
4
|
-
return JSON.parse(`{
|
5
|
-
"balance": {
|
6
|
-
"address": "${owner}"
|
7
|
-
}
|
4
|
+
return JSON.parse(`{
|
5
|
+
"balance": {
|
6
|
+
"address": "${owner}"
|
7
|
+
}
|
8
8
|
}`);
|
9
9
|
}
|
10
10
|
exports.default = getQueryBalanceByOwner;
|