@sonarwatch/portfolio-plugins 0.12.181 → 0.12.183
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1534 -1526
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/jewel/stakedFetcher.js +1 -1
- package/src/plugins/jewel/stakedFetcher.js.map +1 -1
- package/src/plugins/pyth/stakingFetcher.js +3 -2
- package/src/plugins/pyth/stakingFetcher.js.map +1 -1
- package/src/plugins/pyth/structs.d.ts +2 -2
- package/src/plugins/pyth/structs.js +2 -2
- package/src/plugins/pyth/structs.js.map +1 -1
- package/src/plugins/stabble/constants.js +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/tokens/fetchers/sui-nfts.js +3 -3
- package/src/plugins/tokens/fetchers/sui-nfts.js.map +1 -1
- 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/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;
|
@@ -67,7 +67,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
67
67
|
if (!stakedAssets && !suiUnstakingAssets)
|
68
68
|
return [];
|
69
69
|
const elements = [];
|
70
|
-
if (stakedAssets) {
|
70
|
+
if (stakedAssets.length !== 0) {
|
71
71
|
elements.push({
|
72
72
|
type: portfolio_core_1.PortfolioElementType.multiple,
|
73
73
|
label: 'Staked',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stakedFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jewel/stakedFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AAErC,2CAAmE;AAEnE,iDAAmD;AAEnD,qGAA6E;AAC7E,iFAA8E;AAE9E,MAAM,OAAO,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACzC,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAE1C,MAAM,QAAQ,GAA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AAe,OAAO,CAAC"}
|
@@ -17,14 +17,15 @@ const web3_js_1 = require("@solana/web3.js");
|
|
17
17
|
const constants_1 = require("./constants");
|
18
18
|
const clients_1 = require("../../utils/clients");
|
19
19
|
const solana_1 = require("../../utils/solana");
|
20
|
-
const structs_1 = require("./structs");
|
21
20
|
const filters_1 = require("./filters");
|
22
21
|
const getParsedAccountInfo_1 = require("../../utils/solana/getParsedAccountInfo");
|
23
22
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
24
23
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
25
24
|
const client = (0, clients_1.getClientSolana)();
|
26
25
|
const [stakingAccounts, tokenPrice] = yield Promise.all([
|
27
|
-
|
26
|
+
client.getProgramAccounts(constants_1.stakingProgramId, {
|
27
|
+
filters: (0, filters_1.positionsDataFilter)(owner),
|
28
|
+
}),
|
28
29
|
cache.getTokenPrice(constants_1.pythMint, portfolio_core_1.NetworkId.solana),
|
29
30
|
]);
|
30
31
|
if (stakingAccounts.length !== 1)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/pyth/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA6E;AAC7E,6CAA4C;AAG5C,2CAAqE;AACrE,iDAAsD;AACtD,+
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/pyth/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA6E;AAC7E,6CAA4C;AAG5C,2CAAqE;AACrE,iDAAsD;AACtD,+CAAwD;AACxD,uCAAgD;AAChD,kFAA+E;AAC/E,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,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ACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="node" />
|
2
|
-
import { BeetStruct } from '@metaplex-foundation/beet';
|
2
|
+
import { BeetStruct, FixableBeetStruct } from '@metaplex-foundation/beet';
|
3
3
|
import { PublicKey } from '@solana/web3.js';
|
4
4
|
export type Position = {
|
5
5
|
array: number[];
|
@@ -10,4 +10,4 @@ export type PositionData = {
|
|
10
10
|
owner: PublicKey;
|
11
11
|
positions: Position[];
|
12
12
|
};
|
13
|
-
export declare const positionDataStruct:
|
13
|
+
export declare const positionDataStruct: FixableBeetStruct<PositionData, Partial<PositionData>>;
|
@@ -5,9 +5,9 @@ const beet_1 = require("@metaplex-foundation/beet");
|
|
5
5
|
const beet_solana_1 = require("@metaplex-foundation/beet-solana");
|
6
6
|
const solana_1 = require("../../utils/solana");
|
7
7
|
exports.positionStruct = new beet_1.BeetStruct([['array', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 200)]], (args) => args);
|
8
|
-
exports.positionDataStruct = new beet_1.
|
8
|
+
exports.positionDataStruct = new beet_1.FixableBeetStruct([
|
9
9
|
['buffer', (0, solana_1.blob)(8)],
|
10
10
|
['owner', beet_solana_1.publicKey],
|
11
|
-
['positions', (0, beet_1.
|
11
|
+
['positions', (0, beet_1.array)(exports.positionStruct)],
|
12
12
|
], (args) => args);
|
13
13
|
//# sourceMappingURL=structs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/pyth/structs.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/pyth/structs.ts"],"names":[],"mappings":";;;AAAA,oDAMmC;AACnC,kEAA6D;AAE7D,+CAA0C;AAM7B,QAAA,cAAc,GAAG,IAAI,iBAAU,CAC1C,CAAC,CAAC,OAAO,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,GAAG,CAAC,CAAC,CAAC,EAC3C,CAAC,IAAI,EAAE,EAAE,CAAC,IAAgB,CAC3B,CAAC;AAQW,QAAA,kBAAkB,GAAG,IAAI,wBAAiB,CACrD;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,WAAW,EAAE,IAAA,YAAK,EAAC,sBAAc,CAAC,CAAC;CACrC,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAoB,CAC/B,CAAC"}
|
@@ -6,7 +6,7 @@ const weightedIdl_1 = require("./weightedIdl");
|
|
6
6
|
exports.platformId = 'stabble';
|
7
7
|
exports.platform = {
|
8
8
|
id: exports.platformId,
|
9
|
-
name: '
|
9
|
+
name: 'stabble',
|
10
10
|
image: 'https://sonar.watch/img/platforms/stabble.webp',
|
11
11
|
website: 'https://app.stabble.org/',
|
12
12
|
twitter: 'https://x.com/stabbleorg',
|
@@ -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;
|
@@ -36,7 +36,7 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
|
36
36
|
// TODO add Kiosk objects
|
37
37
|
const assets = [];
|
38
38
|
nftObjects.forEach((object) => {
|
39
|
-
var _a, _b, _c;
|
39
|
+
var _a, _b, _c, _d, _e, _f;
|
40
40
|
if (!object.data)
|
41
41
|
return;
|
42
42
|
if (object.data.type === obKioskObject)
|
@@ -44,8 +44,8 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
|
44
44
|
const display = (_a = object.data.display) === null || _a === void 0 ? void 0 : _a.data;
|
45
45
|
const content = object.data.content;
|
46
46
|
let attributes;
|
47
|
-
if ((_b = content.fields
|
48
|
-
attributes = (
|
47
|
+
if ((_e = (_d = (_c = (_b = content.fields) === null || _b === void 0 ? void 0 : _b.attributes) === null || _c === void 0 ? void 0 : _c.fields.map) === null || _d === void 0 ? void 0 : _d.fields) === null || _e === void 0 ? void 0 : _e.contents) {
|
48
|
+
attributes = (_f = content.fields.attributes.fields.map.fields.contents) === null || _f === void 0 ? void 0 : _f.map((c) => ({
|
49
49
|
trait_type: c.fields.key,
|
50
50
|
value: c.fields.value,
|
51
51
|
}));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sui-nfts.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/sui-nfts.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAOoC;AAEpC,oDAAsD;AACtD,4CAAkD;AAClD,4DAAiE;AACjE,wEAAqE;AAIrE,0EAAuE;AACvE,wEAAqE;AAErE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,EAAE;;IACxD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,YAAY,GAAG,MAAM,IAAA,iCAAe,EAAC,MAAM,EAAE,KAAK,EAAE;QACxD,OAAO,EAAE;YACP,WAAW,EAAE,IAAI;SAClB;KACF,CAAC,CAAC;IACH,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACzC,MAAM,UAAU,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,eAAC,OAAA,MAAA,MAAA,CAAC,CAAC,IAAI,0CAAE,OAAO,0CAAE,IAAI,CAAA,EAAA,CAAC,CAAC,CAAC;IAE1E,MAAM,aAAa,GAAG,YAAY,CAAC,IAAI,CACrC,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,CAAA,MAAA,CAAC,CAAC,IAAI,0CAAE,IAAI,MAAK,6BAAiB,CAAA,EAAA,CAC1C,CAAC;IACF,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,mBAAmB,GAAG,MAAM,IAAA,mCAAgB,EAChD,MAAM,EACN,CAAC,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,0CAAE,OAAmC,CAAA,CAAC,MAAM,CAAC,KAAK,EACtE,IAAI,CACL,CAAC;QACF,MAAM,iBAAiB,GAAG,MAAM,IAAA,iCAAe,EAC7C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AA6B;QACxC,IAAI,EAAE,qCAAoB,CAAC,QAAQ;QACnC,SAAS,EAAE,0BAAS,CAAC,GAAG;QACxB,UAAU,EAAE,8BAAkB,CAAC,EAAE;QACjC,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,IAAI;QACX,IAAI,EAAE;YACJ,MAAM;SACP;KACF,CAAC;IACF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,8BAAkB,CAAC,EAAE,IAAI,0BAAS,CAAC,GAAG,EAAE;IAC/C,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,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 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;
|