@sonarwatch/portfolio-plugins 0.14.25 → 0.14.26
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1696 -1688
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/orca/constants.d.ts +1 -1
- package/src/plugins/orca/constants.js +2 -2
- package/src/plugins/orca/constants.js.map +1 -1
- package/src/plugins/orca/getWhirlpoolPositions.js +3 -3
- package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
- package/src/plugins/orca/helpers.js +1 -1
- package/src/plugins/orca/helpers.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/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;
|
@@ -6,6 +6,6 @@ export declare const orcaStakingPlatformId = "orca-staking";
|
|
6
6
|
export declare const orcaStakingPlatform: Platform;
|
7
7
|
export declare const poolsProgram: PublicKey;
|
8
8
|
export declare const aquafarmsProgram: PublicKey;
|
9
|
-
export declare const
|
9
|
+
export declare const positionsIdentifiers: string[];
|
10
10
|
export declare const whirlpoolPrefix = "orca-whirlpool";
|
11
11
|
export declare const whirlpoolProgram: PublicKey;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.whirlpoolProgram = exports.whirlpoolPrefix = exports.
|
3
|
+
exports.whirlpoolProgram = exports.whirlpoolPrefix = exports.positionsIdentifiers = exports.aquafarmsProgram = exports.poolsProgram = exports.orcaStakingPlatform = exports.orcaStakingPlatformId = exports.platform = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.platformId = 'orca';
|
6
6
|
exports.platform = {
|
@@ -19,7 +19,7 @@ exports.orcaStakingPlatform = {
|
|
19
19
|
};
|
20
20
|
exports.poolsProgram = new web3_js_1.PublicKey('9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP');
|
21
21
|
exports.aquafarmsProgram = new web3_js_1.PublicKey('82yxjeMsvaURa4MbZZ7WZZHfobirZYkH1zF8fmeGtyaQ');
|
22
|
-
exports.
|
22
|
+
exports.positionsIdentifiers = ['Orca Whirlpool Position', 'OWP'];
|
23
23
|
exports.whirlpoolPrefix = `${exports.platformId}-whirlpool`;
|
24
24
|
exports.whirlpoolProgram = new web3_js_1.PublicKey('whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc');
|
25
25
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,sBAAsB;CAChC,CAAC;AAEW,QAAA,qBAAqB,GAAG,cAAc,CAAC;AACvC,QAAA,mBAAmB,GAAa;IAC3C,EAAE,EAAE,6BAAqB;IACzB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,6CAA6C;IACpD,OAAO,EAAE,4BAA4B;CACtC,CAAC;AAEW,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,8CAA8C,CAC/C,CAAC;AACW,QAAA,gBAAgB,GAAG,IAAI,mBAAS,CAC3C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,sBAAsB;CAChC,CAAC;AAEW,QAAA,qBAAqB,GAAG,cAAc,CAAC;AACvC,QAAA,mBAAmB,GAAa;IAC3C,EAAE,EAAE,6BAAqB;IACzB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,6CAA6C;IACpD,OAAO,EAAE,4BAA4B;CACtC,CAAC;AAEW,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,8CAA8C,CAC/C,CAAC;AACW,QAAA,gBAAgB,GAAG,IAAI,mBAAS,CAC3C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;AAC1D,QAAA,eAAe,GAAG,GAAG,kBAAU,YAAY,CAAC;AAC5C,QAAA,gBAAgB,GAAG,IAAI,mBAAS,CAC3C,6CAA6C,CAC9C,CAAC"}
|
@@ -136,9 +136,7 @@ function getOrcaNftFetcher(platformId, programId) {
|
|
136
136
|
}
|
137
137
|
}
|
138
138
|
}
|
139
|
-
if (!assetTokenA ||
|
140
|
-
!assetTokenB ||
|
141
|
-
(assetTokenA.value === null && assetTokenB.value === null))
|
139
|
+
if (!assetTokenA || !assetTokenB)
|
142
140
|
continue;
|
143
141
|
const assets = [assetTokenA, assetTokenB];
|
144
142
|
const assetsValue = (0, portfolio_core_1.getUsdValueSum)([
|
@@ -147,6 +145,8 @@ function getOrcaNftFetcher(platformId, programId) {
|
|
147
145
|
]);
|
148
146
|
const rewardAssetsValue = (0, portfolio_core_1.getUsdValueSum)(rewardAssets.map((a) => a.value));
|
149
147
|
const totalValue = (0, portfolio_core_1.getUsdValueSum)([assetsValue, rewardAssetsValue]);
|
148
|
+
if (totalValue === 0 || totalValue === null)
|
149
|
+
continue;
|
150
150
|
elements.push({
|
151
151
|
type: portfolio_core_1.PortfolioElementType.liquidity,
|
152
152
|
networkId: portfolio_core_1.NetworkId.solana,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getWhirlpoolPositions.js","sourceRoot":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EACtB,aAAa,CAAC,gBAAgB,EAC9B,YAAY,CAAC,cAAc,EAC3B,YAAY,CAAC,cAAc,EAC3B,KAAK,CACN,CAAC;
|
1
|
+
{"version":3,"file":"getWhirlpoolPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/getWhirlpoolPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,6CAA4C;AAC5C,2CAIqB;AACrB,iDAAsD;AACtD,+CAG4B;AAE5B,mDAAgE;AAChE,qGAA6E;AAC7E,wFAAyF;AAEzF,iDAIwB;AAEX,QAAA,qBAAqB,GAAG,iBAAiB,CACpD,sBAAc,EACd,4BAAgB,CACjB,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,UAAkB,EAClB,SAAoB;IAEpB,OAAO,CACL,KAAY,EACZ,IAAiC,EACJ,EAAE;QAC/B,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;QACjC,MAAM,uBAAuB,GAAgB,EAAE,CAAC;QAEhD,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,MAAM,OAAO,GAAG,IAAI,mBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEhD,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;YAEnE,MAAM,CAAC,cAAc,CAAC,GAAG,mBAAS,CAAC,sBAAsB,CACvD,YAAY,EACZ,SAAS,CACV,CAAC;YACF,uBAAuB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QACH,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAEpD,MAAM,aAAa,GAAG,MAAM,IAAA,sCAA6B,EACvD,MAAM,EACN,0BAAc,EACd,uBAAuB,CACxB,CAAC;QACF,IAAI,CAAC,aAA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,MAAM,iBAAiB,GAAG,IAAA,+BAAc,EACtC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CACjC,CAAC;YACF,MAAM,UAAU,GAAG,IAAA,+BAAc,EAAC,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC;YAEpE,IAAI,UAAU,KAAK,CAAC,IAAI,UAAU,KAAK,IAAI;gBAAE,SAAS;YAEtD,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,qCAAoB,CAAC,SAAS;gBACpC,SAAS,EAAE,0BAAS,CAAC,MAAM;gBAC3B,UAAU;gBACV,KAAK,EAAE,eAAe;gBACtB,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE;oBACJ,WAAW,EAAE;wBACX;4BACE,MAAM;4BACN,WAAW;4BACX,YAAY;4BACZ,iBAAiB;4BACjB,KAAK,EAAE,UAAU;4BACjB,MAAM,EAAE,EAAE;yBACX;qBACF;iBACF;gBACD,IAAI;aACL,CAAC,CAAC;QACL,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAA,CAAC;AACJ,CAAC;AAtPD,8CAsPC"}
|
@@ -10,7 +10,7 @@ const bn_js_1 = __importDefault(require("bn.js"));
|
|
10
10
|
const decimal_js_1 = __importDefault(require("decimal.js"));
|
11
11
|
const constants_1 = require("./constants");
|
12
12
|
function isAnOrcaPosition(nft) {
|
13
|
-
return nft.name ===
|
13
|
+
return constants_1.positionsIdentifiers.some((identifier) => { var _a; return (_a = nft.name) === null || _a === void 0 ? void 0 : _a.includes(identifier); });
|
14
14
|
}
|
15
15
|
exports.isAnOrcaPosition = isAnOrcaPosition;
|
16
16
|
function signedShiftRight(n0, shiftBy, bitWidth) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/helpers.ts"],"names":[],"mapp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,YAAY,EAAE,IAAI,sBAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC;SACtD,CAAC;IACJ,CAAC;IAED,OAAO;QACL,YAAY,EAAE,IAAI,sBAAS,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC;QACtD,YAAY,EAAE,IAAI,sBAAS,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC;KACvD,CAAC;AACJ,CAAC;AA5CD,4EA4CC;AAED,SAAgB,mBAAmB,CACjC,YAAuB,EACvB,SAAiB,EACjB,SAAiB;IAEjB,OAAO,cAAc,CAAC,IAAI,oBAAO,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;SACxD,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,oBAAO,CAAC,GAAG,CAAC,EAAE,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC;AACjD,CAAC;AARD,kDAQC"}
|
@@ -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;
|