@sonarwatch/portfolio-plugins 0.12.105 → 0.12.107
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +2136 -2128
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/AirdropFetcher.js +4 -1
- package/src/AirdropFetcher.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/parcl/constants.d.ts +1 -1
- package/src/plugins/parcl/constants.js +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/tokens/fetchers/bitcoin.js +2 -2
- package/src/plugins/tokens/fetchers/bitcoin.js.map +1 -1
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/zeta/airdropFetcher.js +14 -14
- package/src/utils/clients/getMempoolEndpoint.d.ts +2 -0
- package/src/utils/clients/getMempoolEndpoint.js +12 -0
- package/src/utils/clients/getMempoolEndpoint.js.map +1 -0
- package/src/utils/clients/index.d.ts +1 -0
- package/src/utils/clients/index.js +3 -1
- package/src/utils/clients/index.js.map +1 -1
- package/src/utils/misc/runInParallel2.d.ts +1 -0
- package/src/utils/misc/runInParallel2.js +48 -0
- package/src/utils/misc/runInParallel2.js.map +1 -0
- 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
package/src/AirdropFetcher.js
CHANGED
@@ -114,6 +114,7 @@ function getAirdropItems(items) {
|
|
114
114
|
}
|
115
115
|
function runAirdropFetchers(owner, addressSystem, fetchers, cache, useCache = false) {
|
116
116
|
return __awaiter(this, void 0, void 0, function* () {
|
117
|
+
const startDate = Date.now();
|
117
118
|
const fOwner = (0, portfolio_core_1.formatAddress)(owner, addressSystem);
|
118
119
|
const isFetchersValids = fetchers.every((f) => portfolio_core_1.networks[f.networkId].addressSystem === addressSystem);
|
119
120
|
if (!isFetchersValids)
|
@@ -143,12 +144,14 @@ function runAirdropFetchers(owner, addressSystem, fetchers, cache, useCache = fa
|
|
143
144
|
return [];
|
144
145
|
return r.value.airdrop;
|
145
146
|
});
|
147
|
+
const now = Date.now();
|
146
148
|
return {
|
147
|
-
date:
|
149
|
+
date: now,
|
148
150
|
owner: fOwner,
|
149
151
|
addressSystem,
|
150
152
|
fetcherReports: fReports,
|
151
153
|
airdrops,
|
154
|
+
duration: now - startDate,
|
152
155
|
};
|
153
156
|
});
|
154
157
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AirdropFetcher.js","sourceRoot":"","sources":["../../../../packages/plugins/src/AirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DA2BoC;AAEpC,iFAAyD;AAEzD,iGAAyE;AACzE,+EAAuD;AAa1C,QAAA,2BAA2B,GAAG,kBAAkB,CAAC;AAC9D,SAAsB,oBAAoB,CACxC,MAGG,EACH,SAAwB,EACxB,KAAY;;QAEZ,MAAM,KAAK,CAAC,QAAQ,CAClB,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;YAChC,GAAG,EAAE,KAAK;YACV,KAAK,EAAE,KAAK;SACb,CAAC,CAAC,EACH;YACE,SAAS;YACT,MAAM,EAAE,mCAA2B;SACpC,CACF,CAAC;IACJ,CAAC;CAAA;AAlBD,oDAkBC;AAED,SAAe,oBAAoB,CACjC,MAAgB,EAChB,UAAyB,EACzB,KAAY;;QAEZ,MAAM,SAAS,GAA0B,IAAI,GAAG,EAAE,CAAC;QACnD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,SAAS,CAAC;QAE1C,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAS,MAAM,EAAE;YAClD,SAAS,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E,IAAI,CAAC,QAAQ;qBACxB,CAAC;gBACN,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;YAEH,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,EAAE,CAAC;YACnC,OAAO;gBACL;oBACE,SAAS,EAAE,cAAc,CAAC,SAAS;oBACnC,KAAK,EAAE,SAAS;oBAChB,IAAI,EAAE;wBACJ,MAAM;qBACP;oBACD,UAAU;oBACV,IAAI,EAAE,qCAAoB,CAAC,QAAQ;oBACnC,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;oBACjD,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,SAAS;iBAChC;aACF,CAAC;QACJ,CAAC,CAAA;KACF,CAAC;AACJ,CAAC;AA1ED,0DA0EC"}
|
@@ -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;
|
@@ -9,7 +9,7 @@ export declare const platform: Platform;
|
|
9
9
|
export declare const programId: PublicKey;
|
10
10
|
export declare const stakingProgramId: PublicKey;
|
11
11
|
export declare const airdropApi = "https://gnome-api-mainnet.fly.dev/user/";
|
12
|
-
export declare const allocationPrefix = "parcl
|
12
|
+
export declare const allocationPrefix = "parcl-allocation";
|
13
13
|
export declare const prclMint = "4LLbsb5ReP3yEtYzmXewyGjcir5uXtKFURtaEUVC2AHs";
|
14
14
|
export declare const prclDecimals = 6;
|
15
15
|
export declare const merkleApi = "https://worker.jup.ag/jup-claim-proof";
|
@@ -17,7 +17,7 @@ exports.platform = {
|
|
17
17
|
exports.programId = new web3_js_1.PublicKey('3parcLrT7WnXAcyPfkCz49oofuuf2guUKkjuFkAhZW8Y');
|
18
18
|
exports.stakingProgramId = new web3_js_1.PublicKey('2gWf5xLAzZaKX9tQj9vuXsaxTWtzTZDFRn21J3zjNVgu');
|
19
19
|
exports.airdropApi = 'https://gnome-api-mainnet.fly.dev/user/';
|
20
|
-
exports.allocationPrefix = `${exports.platformId}
|
20
|
+
exports.allocationPrefix = `${exports.platformId}-allocation`;
|
21
21
|
exports.prclMint = '4LLbsb5ReP3yEtYzmXewyGjcir5uXtKFURtaEUVC2AHs';
|
22
22
|
exports.prclDecimals = 6;
|
23
23
|
exports.merkleApi = 'https://worker.jup.ag/jup-claim-proof';
|
@@ -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;
|
@@ -18,8 +18,8 @@ const clients_1 = require("../../../utils/clients");
|
|
18
18
|
const getBalance_1 = require("../../../utils/bitcoin/getBalance");
|
19
19
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../../utils/misc/tokenPriceToAssetToken"));
|
20
20
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
21
|
-
const
|
22
|
-
const amount = yield (0, getBalance_1.getBalance)(
|
21
|
+
const endpoint = yield (0, clients_1.getMempoolEndpoint)();
|
22
|
+
const amount = yield (0, getBalance_1.getBalance)(endpoint, owner);
|
23
23
|
if (amount === 0)
|
24
24
|
return [];
|
25
25
|
const btcTokenPrice = yield cache.getTokenPrice(portfolio_core_1.bitcoinNetwork.native.address, portfolio_core_1.NetworkId.bitcoin);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"bitcoin.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/bitcoin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAIpC,4CAAoD;AACpD,oDAA4D;AAC5D,kEAA+D;AAC/D,wGAAgF;AAEhF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,
|
1
|
+
{"version":3,"file":"bitcoin.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/bitcoin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAIpC,4CAAoD;AACpD,oDAA4D;AAC5D,kEAA+D;AAC/D,wGAAgF;AAEhF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,QAAQ,GAAG,MAAM,IAAA,4BAAkB,GAAE,CAAC;IAC5C,MAAM,MAAM,GAAG,MAAM,IAAA,uBAAU,EAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACjD,IAAI,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE5B,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,aAAa,CAC7C,+BAAc,CAAC,MAAM,CAAC,OAAO,EAC7B,0BAAS,CAAC,OAAO,CAClB,CAAC;IAEF,MAAM,KAAK,GAAG,IAAA,gCAAsB,EAClC,+BAAc,CAAC,MAAM,CAAC,OAAO,EAC7B,MAAM,EACN,0BAAS,CAAC,OAAO,EACjB,aAAa,CACd,CAAC;IAEF,MAAM,OAAO,GAA6B;QACxC,IAAI,EAAE,qCAAoB,CAAC,QAAQ;QACnC,SAAS,EAAE,0BAAS,CAAC,OAAO;QAC5B,UAAU,EAAE,gCAAoB,CAAC,EAAE;QACnC,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,IAAI,EAAE;YACJ,MAAM,EAAE,CAAC,KAAK,CAAC;SAChB;KACF,CAAC;IACF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,gCAAoB,CAAC,EAAE,UAAU;IACxC,SAAS,EAAE,0BAAS,CAAC,OAAO;IAC5B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -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 deriveClaimStatuses_1 = require("../../utils/solana/jupiter/deriveClaimStatuses");
|
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* () {
|
@@ -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
|
+
const urlToRpcEndpoint_1 = __importDefault(require("./urlToRpcEndpoint"));
|
7
|
+
function getMempoolEndpoint() {
|
8
|
+
const endpoint = process.env['PORTFOLIO_MEMPOOL_ENDPOINT'] || 'https://mempool.space/api/';
|
9
|
+
return (0, urlToRpcEndpoint_1.default)(endpoint);
|
10
|
+
}
|
11
|
+
exports.default = getMempoolEndpoint;
|
12
|
+
//# sourceMappingURL=getMempoolEndpoint.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getMempoolEndpoint.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clients/getMempoolEndpoint.ts"],"names":[],"mappings":";;;;;AACA,0EAAkD;AAElD,SAAwB,kBAAkB;IACxC,MAAM,QAAQ,GACZ,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,IAAI,4BAA4B,CAAC;IAC5E,OAAO,IAAA,0BAAgB,EAAC,QAAQ,CAAC,CAAC;AACpC,CAAC;AAJD,qCAIC"}
|
@@ -11,3 +11,4 @@ export { default as getEvmWeb3V1Client } from './getEvmWeb3V1Client';
|
|
11
11
|
export { default as getEvmClients } from './getEvmClients';
|
12
12
|
export { default as urlToRpcEndpoint } from './urlToRpcEndpoint';
|
13
13
|
export { default as getEsploraEndpoint } from './getEsploraEndpoint';
|
14
|
+
export { default as getMempoolEndpoint } from './getMempoolEndpoint';
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.getEsploraEndpoint = exports.urlToRpcEndpoint = exports.getEvmClients = exports.getEvmWeb3V1Client = exports.getEvmEthersClient = exports.getEvmClient = exports.getClientCosmWasm = exports.getClientIbc = exports.getClientCosmos = exports.getClientSei = exports.getClientSui = exports.getClientSolana = exports.getClientAptos = void 0;
|
6
|
+
exports.getMempoolEndpoint = exports.getEsploraEndpoint = exports.urlToRpcEndpoint = exports.getEvmClients = exports.getEvmWeb3V1Client = exports.getEvmEthersClient = exports.getEvmClient = exports.getClientCosmWasm = exports.getClientIbc = exports.getClientCosmos = exports.getClientSei = exports.getClientSui = exports.getClientSolana = exports.getClientAptos = void 0;
|
7
7
|
var getClientAptos_1 = require("./getClientAptos");
|
8
8
|
Object.defineProperty(exports, "getClientAptos", { enumerable: true, get: function () { return __importDefault(getClientAptos_1).default; } });
|
9
9
|
var getClientSolana_1 = require("./getClientSolana");
|
@@ -30,4 +30,6 @@ var urlToRpcEndpoint_1 = require("./urlToRpcEndpoint");
|
|
30
30
|
Object.defineProperty(exports, "urlToRpcEndpoint", { enumerable: true, get: function () { return __importDefault(urlToRpcEndpoint_1).default; } });
|
31
31
|
var getEsploraEndpoint_1 = require("./getEsploraEndpoint");
|
32
32
|
Object.defineProperty(exports, "getEsploraEndpoint", { enumerable: true, get: function () { return __importDefault(getEsploraEndpoint_1).default; } });
|
33
|
+
var getMempoolEndpoint_1 = require("./getMempoolEndpoint");
|
34
|
+
Object.defineProperty(exports, "getMempoolEndpoint", { enumerable: true, get: function () { return __importDefault(getMempoolEndpoint_1).default; } });
|
33
35
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clients/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA6D;AAApD,iIAAA,OAAO,OAAkB;AAClC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,yDAAmE;AAA1D,uIAAA,OAAO,OAAqB;AACrC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AACtC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AACtC,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AACjC,uDAAiE;AAAxD,qIAAA,OAAO,OAAoB;AACpC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clients/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA6D;AAApD,iIAAA,OAAO,OAAkB;AAClC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,yDAAmE;AAA1D,uIAAA,OAAO,OAAqB;AACrC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AACtC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AACtC,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AACjC,uDAAiE;AAAxD,qIAAA,OAAO,OAAoB;AACpC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AACtC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function runInParallel2<T>(tasks: (() => Promise<T>)[], concurrencyLimit: number): Promise<PromiseSettledResult<T>[]>;
|
@@ -0,0 +1,48 @@
|
|
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
|
+
exports.runInParallel2 = void 0;
|
13
|
+
function runInParallel2(tasks, concurrencyLimit) {
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
15
|
+
const results = [];
|
16
|
+
let runningTasks = [];
|
17
|
+
let taskIndex = 0;
|
18
|
+
function runNextTask() {
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
20
|
+
if (taskIndex >= tasks.length)
|
21
|
+
return;
|
22
|
+
// eslint-disable-next-line no-plusplus
|
23
|
+
const currentIndex = taskIndex++;
|
24
|
+
try {
|
25
|
+
const value = yield tasks[currentIndex]();
|
26
|
+
results[currentIndex] = { status: 'fulfilled', value };
|
27
|
+
}
|
28
|
+
catch (reason) {
|
29
|
+
results[currentIndex] = { status: 'rejected', reason };
|
30
|
+
}
|
31
|
+
runningTasks = runningTasks.filter((t) => t !== runningTasks[0]);
|
32
|
+
yield runNextTask();
|
33
|
+
});
|
34
|
+
}
|
35
|
+
while (taskIndex < tasks.length || runningTasks.length > 0) {
|
36
|
+
if (runningTasks.length < concurrencyLimit && taskIndex < tasks.length) {
|
37
|
+
const task = runNextTask();
|
38
|
+
runningTasks.push(task);
|
39
|
+
}
|
40
|
+
else {
|
41
|
+
yield Promise.race(runningTasks);
|
42
|
+
}
|
43
|
+
}
|
44
|
+
return results;
|
45
|
+
});
|
46
|
+
}
|
47
|
+
exports.runInParallel2 = runInParallel2;
|
48
|
+
//# sourceMappingURL=runInParallel2.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"runInParallel2.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/runInParallel2.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,SAAsB,cA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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;
|