@sonarwatch/portfolio-plugins 0.12.116 → 0.12.117
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +2176 -2172
- 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/flowx/stakingFetcher.js +1 -1
- package/src/plugins/picasso/constants.d.ts +10 -0
- package/src/plugins/picasso/constants.js +24 -0
- package/src/plugins/picasso/constants.js.map +1 -0
- package/src/plugins/picasso/helpers.d.ts +6 -0
- package/src/plugins/picasso/helpers.js +69 -0
- package/src/plugins/picasso/helpers.js.map +1 -0
- package/src/plugins/picasso/idl.d.ts +145 -0
- package/src/plugins/picasso/idl.js +1019 -0
- package/src/plugins/picasso/idl.js.map +1 -0
- package/src/plugins/picasso/index.d.ts +6 -0
- package/src/plugins/picasso/index.js +13 -0
- package/src/plugins/picasso/index.js.map +1 -0
- package/src/plugins/picasso/types.d.ts +17 -0
- package/src/plugins/picasso/types.js +3 -0
- package/src/plugins/picasso/types.js.map +1 -0
- package/src/plugins/picasso/unstakingNftsJob.d.ts +3 -0
- package/src/plugins/picasso/unstakingNftsJob.js +60 -0
- package/src/plugins/picasso/unstakingNftsJob.js.map +1 -0
- package/src/plugins/picasso/unstakingPositionsFetcher.d.ts +3 -0
- package/src/plugins/picasso/unstakingPositionsFetcher.js +75 -0
- package/src/plugins/picasso/unstakingPositionsFetcher.js.map +1 -0
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/tokens/fetchers/solana-nfts-underlyings.js +9 -2
- package/src/plugins/tokens/fetchers/solana-nfts-underlyings.js.map +1 -1
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"idl.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/idl.ts"],"names":[],"mappings":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QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,oBAAoB;YAC1B,GAAG,EAAE,4FAA4F;SAClG;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,0CAA0C;YAChD,GAAG,EAAE,kDAAkD;SACxD;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,8BAA8B;YACpC,GAAG,EAAE,0CAA0C;SAChD;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,+BAA+B;YACrC,GAAG,EAAE,oDAAoD;SAC1D;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,mBAAmB;YACzB,GAAG,EAAE,yBAAyB;SAC/B;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,iBAAiB;YACvB,GAAG,EAAE,yCAAyC;SAC/C;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,qCAAqC;YAC3C,GAAG,EAAE,0CAA0C;SAChD;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,qBAAqB;YAC3B,GAAG,EAAE,yHAAyH;SAC/H;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,qBAAqB;YAC3B,GAAG,EAAE,uBAAuB;SAC7B;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,mBAAmB;YACzB,GAAG,EAAE,4FAA4F;SAClG;KACF;CACF,CAAC"}
|
@@ -0,0 +1,13 @@
|
|
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 unstakingNftsJob_1 = __importDefault(require("./unstakingNftsJob"));
|
9
|
+
const unstakingPositionsFetcher_1 = __importDefault(require("./unstakingPositionsFetcher"));
|
10
|
+
exports.platforms = [constants_1.platform];
|
11
|
+
exports.jobs = [unstakingNftsJob_1.default];
|
12
|
+
exports.fetchers = [unstakingPositionsFetcher_1.default];
|
13
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,0EAAkD;AAClD,4FAAoE;AAEvD,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,0BAAgB,CAAC,CAAC;AACjC,QAAA,QAAQ,GAAc,CAAC,mCAAyB,CAAC,CAAC"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export type Vault = {
|
2
|
+
stakeTimestampSec: string;
|
3
|
+
service: {
|
4
|
+
guestChain: {
|
5
|
+
validator: string;
|
6
|
+
};
|
7
|
+
};
|
8
|
+
stakeAmount: string;
|
9
|
+
stakeMint: string;
|
10
|
+
lastReceivedRewardsHeight: string;
|
11
|
+
withdrawalRequest?: WithdrawalRequestParams;
|
12
|
+
};
|
13
|
+
export type WithdrawalRequestParams = {
|
14
|
+
timestampInSec: string;
|
15
|
+
owner: string;
|
16
|
+
tokenAccount: string;
|
17
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,60 @@
|
|
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 portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
|
+
const web3_js_1 = require("@solana/web3.js");
|
17
|
+
const constants_1 = require("./constants");
|
18
|
+
const getSolanaDasEndpoint_1 = __importDefault(require("../../utils/clients/getSolanaDasEndpoint"));
|
19
|
+
const getAssetsByOwnerDas_1 = require("../../utils/solana/das/getAssetsByOwnerDas");
|
20
|
+
const heliusAssetToAssetCollectible_1 = require("../../utils/solana/das/heliusAssetToAssetCollectible");
|
21
|
+
const clients_1 = require("../../utils/clients");
|
22
|
+
const solana_1 = require("../../utils/solana");
|
23
|
+
const helpers_1 = require("./helpers");
|
24
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
25
|
+
var _a;
|
26
|
+
const dasEndpoint = (0, getSolanaDasEndpoint_1.default)();
|
27
|
+
const displayOptions = {
|
28
|
+
showCollectionMetadata: true,
|
29
|
+
showUnverifiedCollections: true,
|
30
|
+
showInscription: false,
|
31
|
+
showNativeBalance: false,
|
32
|
+
showGrandTotal: false,
|
33
|
+
showFungible: true,
|
34
|
+
};
|
35
|
+
const assets = yield (0, getAssetsByOwnerDas_1.getAssetsByOwnerDas)(dasEndpoint, constants_1.unstakingOwner, displayOptions);
|
36
|
+
const nfts = [];
|
37
|
+
for (let n = 0; n < assets.length; n += 1) {
|
38
|
+
const nft = (0, heliusAssetToAssetCollectible_1.heliusAssetToAssetCollectible)(assets[n]);
|
39
|
+
if (!nft)
|
40
|
+
continue;
|
41
|
+
if ((_a = nft.attributes.tags) === null || _a === void 0 ? void 0 : _a.includes('compressed'))
|
42
|
+
continue;
|
43
|
+
if (!(0, helpers_1.isPicassoPosition)(nft))
|
44
|
+
continue;
|
45
|
+
nfts.push(nft);
|
46
|
+
}
|
47
|
+
const connection = (0, clients_1.getClientSolana)();
|
48
|
+
const vaults = yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, constants_1.restakingIdlItem, nfts.map((asset) => (0, helpers_1.getPositionPublicKey)(new web3_js_1.PublicKey(asset.data.address)))).then((vs) => vs.filter((v) => v !== null));
|
49
|
+
yield cache.setItem(constants_1.unstakingNftsCacheKey, vaults, {
|
50
|
+
prefix: constants_1.unstakingNftsCachePrefix,
|
51
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
52
|
+
});
|
53
|
+
});
|
54
|
+
const job = {
|
55
|
+
id: `${constants_1.platformId}-unstaking-nfts`,
|
56
|
+
executor,
|
57
|
+
label: 'normal',
|
58
|
+
};
|
59
|
+
exports.default = job;
|
60
|
+
//# sourceMappingURL=unstakingNftsJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"unstakingNftsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/unstakingNftsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAGoC;AACpC,6CAA4C;AAG5C,2CAMqB;AACrB,oGAA4E;AAE5E,oFAAiF;AACjF,wGAAqG;AACrG,iDAAsD;AACtD,+CAAuE;AAEvE,uCAAoE;AAEpE,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,WAAW,GAAG,IAAA,8BAAoB,GAAE,CAAC;IAC3C,MAAM,cAAc,GAAmB;QACrC,sBAAsB,EAAE,IAAI;QAC5B,yBAAyB,EAAE,IAAI;QAC/B,eAAe,EAAE,KAAK;QACtB,iBAAiB,EAAE,KAAK;QACxB,cAAc,EAAE,KAAK;QACrB,YAAY,EAAE,IAAI;KACnB,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,IAAA,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,kBAAe,GAAG,CAAC"}
|
@@ -0,0 +1,75 @@
|
|
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 portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
17
|
+
const constants_1 = require("./constants");
|
18
|
+
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
19
|
+
const MemoizedCache_1 = require("../../utils/misc/MemoizedCache");
|
20
|
+
const allVaultsMemo = new MemoizedCache_1.MemoizedCache(constants_1.unstakingNftsCacheKey, {
|
21
|
+
prefix: constants_1.unstakingNftsCachePrefix,
|
22
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
23
|
+
});
|
24
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
25
|
+
// NFTs for active positions are in wallet
|
26
|
+
// NFTS for unstaking positions are in 'unstakingOwner' wallet
|
27
|
+
const allVaults = yield allVaultsMemo.getItem(cache);
|
28
|
+
if (!allVaults || allVaults.length === 0)
|
29
|
+
return [];
|
30
|
+
const myVaults = allVaults.filter((v) => { var _a; return ((_a = v.withdrawalRequest) === null || _a === void 0 ? void 0 : _a.owner) === owner; });
|
31
|
+
if (myVaults.length === 0)
|
32
|
+
return [];
|
33
|
+
const tokenMints = [
|
34
|
+
...new Set(myVaults.map((vault) => vault.stakeMint).flat()),
|
35
|
+
];
|
36
|
+
const tokenPrices = yield cache.getTokenPricesAsMap(tokenMints, portfolio_core_1.NetworkId.solana);
|
37
|
+
const assets = [];
|
38
|
+
myVaults.forEach((vault) => {
|
39
|
+
const tokenPrice = tokenPrices.get(vault.stakeMint);
|
40
|
+
if (!tokenPrice || !vault.withdrawalRequest)
|
41
|
+
return;
|
42
|
+
const unlockingAt = new Date(new bignumber_js_1.default(vault.withdrawalRequest.timestampInSec)
|
43
|
+
.plus(7 * 24 * 60 * 60)
|
44
|
+
.times(1000)
|
45
|
+
.toNumber());
|
46
|
+
const isClaimable = unlockingAt.getTime() < Date.now();
|
47
|
+
assets.push((0, tokenPriceToAssetToken_1.default)(vault.stakeMint, new bignumber_js_1.default(vault.stakeAmount)
|
48
|
+
.dividedBy(Math.pow(10, tokenPrice.decimals))
|
49
|
+
.toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice, undefined, {
|
50
|
+
isClaimable,
|
51
|
+
lockedUntil: unlockingAt.getTime(),
|
52
|
+
}));
|
53
|
+
});
|
54
|
+
if (assets.length === 0)
|
55
|
+
return [];
|
56
|
+
return [
|
57
|
+
{
|
58
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
59
|
+
label: 'Staked',
|
60
|
+
platformId: constants_1.platformId,
|
61
|
+
type: portfolio_core_1.PortfolioElementType.multiple,
|
62
|
+
value: (0, portfolio_core_1.getUsdValueSum)(assets.map((a) => a.value)),
|
63
|
+
data: {
|
64
|
+
assets,
|
65
|
+
},
|
66
|
+
},
|
67
|
+
];
|
68
|
+
});
|
69
|
+
const fetcher = {
|
70
|
+
id: `${constants_1.platformId}-unstaking-positions`,
|
71
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
72
|
+
executor,
|
73
|
+
};
|
74
|
+
exports.default = fetcher;
|
75
|
+
//# sourceMappingURL=unstakingPositionsFetcher.js.map
|
@@ -0,0 +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,CAAC;IAEF,MAAM,MAAM,GAA0B,EAAE,CAAC;IAEzC,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;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;
|
@@ -25,6 +25,7 @@ const getAssetsByOwnerDas_1 = require("../../../utils/solana/das/getAssetsByOwne
|
|
25
25
|
const heliusAssetToAssetCollectible_1 = require("../../../utils/solana/das/heliusAssetToAssetCollectible");
|
26
26
|
const constants_2 = require("../../orca/constants");
|
27
27
|
const constants_3 = require("../../cropper/constants");
|
28
|
+
const helpers_5 = require("../../picasso/helpers");
|
28
29
|
const nftsUnderlyingsMap = new Map([
|
29
30
|
[
|
30
31
|
'raydium',
|
@@ -51,6 +52,13 @@ const nftsUnderlyingsMap = new Map([
|
|
51
52
|
fetcher: helpers_4.getHeliumElementsFromNFTs,
|
52
53
|
},
|
53
54
|
],
|
55
|
+
[
|
56
|
+
'picasso',
|
57
|
+
{
|
58
|
+
checker: helpers_5.isPicassoPosition,
|
59
|
+
fetcher: helpers_5.getPicassoElementsFromNFTs,
|
60
|
+
},
|
61
|
+
],
|
54
62
|
]);
|
55
63
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
56
64
|
var _a, _b;
|
@@ -88,10 +96,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
88
96
|
results.push(fetcher(cache, nfts));
|
89
97
|
}
|
90
98
|
const result = yield Promise.allSettled(results);
|
91
|
-
|
99
|
+
return result
|
92
100
|
.map((res) => (res.status === 'rejected' ? [] : res.value))
|
93
101
|
.flat();
|
94
|
-
return elements;
|
95
102
|
});
|
96
103
|
const fetcher = {
|
97
104
|
id: `${constants_1.walletTokensPlatform.id}-solana-nfts-underlyings`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"solana-nfts-underlyings.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/solana-nfts-underlyings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AAGpC,4CAAoD;AAEpD,mFAAgF;AAChF,4EAAqE;AACrE,mDAA2D;AAC3D,gDAAsD;AACtD,mDAA4E;AAE5E,gDAG4B;AAC5B,uGAA+E;AAC/E,uFAAoF;AAEpF,2GAAwG;AAExG,oDAG8B;AAC9B,uDAGiC;
|
1
|
+
{"version":3,"file":"solana-nfts-underlyings.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/solana-nfts-underlyings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AAGpC,4CAAoD;AAEpD,mFAAgF;AAChF,4EAAqE;AACrE,mDAA2D;AAC3D,gDAAsD;AACtD,mDAA4E;AAE5E,gDAG4B;AAC5B,uGAA+E;AAC/E,uFAAoF;AAEpF,2GAAwG;AAExG,oDAG8B;AAC9B,uDAGiC;AACjC,mDAG+B;AAI/B,MAAM,kBAAkB,GAGpB,IAAI,GAAG,CAAC;IACV;QACE,SAAS;QACT,EAAE,OAAO,EAAE,4BAAkB,EAAE,OAAO,EAAE,iDAAuB,EAAE;KAClE;IACD;QACE,MAAM;QACN;YACE,OAAO,EAAE,0BAAgB;YACzB,OAAO,EAAE,IAAA,yCAAiB,EAAC,sBAAc,EAAE,4BAAgB,CAAC;SAC7D;KACF;IACD;QACE,SAAS;QACT;YACE,OAAO,EAAE,wBAAiB;YAC1B,OAAO,EAAE,IAAA,yCAAiB,EAAC,sBAAiB,EAAE,mBAAO,CAAC;SACvD;KACF;IACD;QACE,QAAQ;QACR;YACE,OAAO,EAAE,2BAAiB;YAC1B,OAAO,EAAE,mCAAyB;SACnC;KACF;IACD;QACE,SAAS;QACT;YACE,OAAO,EAAE,2BAAiB;YAC1B,OAAO,EAAE,oCAA0B;SACpC;KACF;CACF,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,WAAW,GAAG,IAAA,8BAAoB,GAAE,CAAC;IAC3C,MAAM,cAAc,GAAmB;QACrC,sBAAsB,EAAE,IAAI;QAC5B,yBAAyB,EAAE,IAAI;QAC/B,eAAe,EAAE,KAAK;QACtB,iBAAiB,EAAE,KAAK;QACxB,cAAc,EAAE,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AC;IACD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAEjD,OAAO,MAAM;SACV,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SAC1D,IAAI,EAAE,CAAC;AACZ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,gCAAoB,CAAC,EAAE,0BAA0B;IACxD,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,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;
|
@@ -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;
|