@sonarwatch/portfolio-plugins 0.12.22 → 0.12.24
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1790 -1782
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/bluefin/positionFetcher.js +2 -0
- package/src/plugins/bluefin/positionFetcher.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/utils/misc/constants.d.ts +1 -0
- package/src/utils/misc/constants.js +2 -1
- package/src/utils/misc/constants.js.map +1 -1
- package/src/utils/name-service/services/aptos.js +9 -8
- package/src/utils/name-service/services/aptos.js.map +1 -1
- 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;
|
@@ -20,6 +20,7 @@ const clients_1 = require("../../utils/clients");
|
|
20
20
|
const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
|
21
21
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
22
22
|
const constants_2 = require("../../utils/sui/constants");
|
23
|
+
const constants_3 = require("../../utils/misc/constants");
|
23
24
|
const perpsTtl = 20000;
|
24
25
|
const perps = new Map();
|
25
26
|
let lastPerpsUpdate = 0;
|
@@ -98,6 +99,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
98
99
|
amount: pnl.toNumber(),
|
99
100
|
price: 1,
|
100
101
|
name: 'PnL',
|
102
|
+
imageUri: constants_3.usdcLogoUri,
|
101
103
|
},
|
102
104
|
};
|
103
105
|
rewardAssets.push(pnlAsset);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"positionFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bluefin/positionFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AAGrC,2CAA0D;AAC1D,iFAA8E;AAC9E,iDAAmD;AAEnD,qEAAkE;AAClE,qGAA6E;AAC7E,yDAAwD;
|
1
|
+
{"version":3,"file":"positionFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins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
|
|
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;
|
@@ -2,3 +2,4 @@ import BigNumber from 'bignumber.js';
|
|
2
2
|
export declare const zeroBigInt: bigint;
|
3
3
|
export declare const zeroBigNumber: BigNumber;
|
4
4
|
export declare const lpAddressesCachePrefix = "lp-addresses";
|
5
|
+
export declare const usdcLogoUri = "https://raw.githubusercontent.com/sonarwatch/token-lists/main/images/common/USDC.png";
|
@@ -3,9 +3,10 @@ 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.lpAddressesCachePrefix = exports.zeroBigNumber = exports.zeroBigInt = void 0;
|
6
|
+
exports.usdcLogoUri = exports.lpAddressesCachePrefix = exports.zeroBigNumber = exports.zeroBigInt = void 0;
|
7
7
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
8
8
|
exports.zeroBigInt = BigInt(0);
|
9
9
|
exports.zeroBigNumber = (0, bignumber_js_1.default)(0);
|
10
10
|
exports.lpAddressesCachePrefix = 'lp-addresses';
|
11
|
+
exports.usdcLogoUri = 'https://raw.githubusercontent.com/sonarwatch/token-lists/main/images/common/USDC.png';
|
11
12
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/constants.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AAExB,QAAA,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AACvB,QAAA,aAAa,GAAG,IAAA,sBAAS,EAAC,CAAC,CAAC,CAAC;AAC7B,QAAA,sBAAsB,GAAG,cAAc,CAAC"}
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/constants.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AAExB,QAAA,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AACvB,QAAA,aAAa,GAAG,IAAA,sBAAS,EAAC,CAAC,CAAC,CAAC;AAC7B,QAAA,sBAAsB,GAAG,cAAc,CAAC;AACxC,QAAA,WAAW,GACtB,sFAAsF,CAAC"}
|
@@ -11,22 +11,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
exports.nameService = void 0;
|
13
13
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
14
|
+
const clients_1 = require("../../clients");
|
14
15
|
function getOwner(name) {
|
15
16
|
return __awaiter(this, void 0, void 0, function* () {
|
16
|
-
const
|
17
|
-
|
18
|
-
if (!address)
|
17
|
+
const res = yield (0, clients_1.getClientAptos)().getName({ name });
|
18
|
+
if (!(res === null || res === void 0 ? void 0 : res.owner_address))
|
19
19
|
return null;
|
20
|
-
return
|
20
|
+
return res.owner_address;
|
21
21
|
});
|
22
22
|
}
|
23
23
|
function getNames(address) {
|
24
24
|
return __awaiter(this, void 0, void 0, function* () {
|
25
|
-
const
|
26
|
-
|
27
|
-
|
25
|
+
const res = yield (0, clients_1.getClientAptos)().getAccountNames({
|
26
|
+
accountAddress: address,
|
27
|
+
});
|
28
|
+
if (res.length === 0)
|
28
29
|
return [];
|
29
|
-
return
|
30
|
+
return res.map((el) => (el.domain ? `${el.domain}.apt` : [])).flat();
|
30
31
|
});
|
31
32
|
}
|
32
33
|
exports.nameService = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"aptos.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/name-service/services/aptos.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA8D;
|
1
|
+
{"version":3,"file":"aptos.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/name-service/services/aptos.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA8D;AAE9D,2CAA+C;AAE/C,SAAe,QAAQ,CAAC,IAAY;;QAClC,MAAM,GAAG,GAAG,MAAM,IAAA,wBAAc,GAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;QACrD,IAAI,CAAC,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,aAAa,CAAA;YAAE,OAAO,IAAI,CAAC;QAErC,OAAO,GAAG,CAAC,aAAa,CAAC;IAC3B,CAAC;CAAA;AAED,SAAe,QAAQ,CAAC,OAAe;;QACrC,MAAM,GAAG,GAAG,MAAM,IAAA,wBAAc,GAAE,CAAC,eAAe,CAAC;YACjD,cAAc,EAAE,OAAO;SACxB,CAAC,CAAC;QAEH,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAChC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACvE,CAAC;CAAA;AAEY,QAAA,WAAW,GAAgB;IACtC,EAAE,EAAE,OAAO;IACX,OAAO,EAAE,iCAAgB;IACzB,QAAQ;IACR,QAAQ;CACT,CAAC"}
|
@@ -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;
|