@sonarwatch/portfolio-plugins 0.12.133 → 0.12.135
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +2261 -2253
- 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/jewel/constants.d.ts +13 -0
- package/src/plugins/jewel/constants.js +35 -0
- package/src/plugins/jewel/constants.js.map +1 -0
- package/src/plugins/jewel/index.d.ts +6 -0
- package/src/plugins/jewel/index.js +13 -0
- package/src/plugins/jewel/index.js.map +1 -0
- package/src/plugins/jewel/stakedAssetsPricingJob.d.ts +3 -0
- package/src/plugins/jewel/stakedAssetsPricingJob.js +40 -0
- package/src/plugins/jewel/stakedAssetsPricingJob.js.map +1 -0
- package/src/plugins/jewel/stakedFetcher.d.ts +3 -0
- package/src/plugins/jewel/stakedFetcher.js +102 -0
- package/src/plugins/jewel/stakedFetcher.js.map +1 -0
- package/src/plugins/jewel/types.d.ts +47 -0
- package/src/plugins/jewel/types.js +3 -0
- package/src/plugins/jewel/types.js.map +1 -0
- package/src/plugins/kriya/constants.js +10 -0
- package/src/plugins/kriya/constants.js.map +1 -1
- package/src/plugins/kriya/vaultsFetcher.js +2 -0
- package/src/plugins/kriya/vaultsFetcher.js.map +1 -1
- package/src/plugins/save/helpers.js +8 -9
- package/src/plugins/save/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
package/src/index.js
CHANGED
@@ -135,6 +135,7 @@ const thevault_1 = require("./plugins/thevault");
|
|
135
135
|
const deepbook_1 = require("./plugins/deepbook");
|
136
136
|
const suins_1 = require("./plugins/suins");
|
137
137
|
const debridge_1 = require("./plugins/debridge");
|
138
|
+
const jewel_1 = require("./plugins/jewel");
|
138
139
|
var constants_1 = require("./plugins/tokens/constants");
|
139
140
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
140
141
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -263,6 +264,7 @@ exports.platforms = [
|
|
263
264
|
...deepbook_1.platforms,
|
264
265
|
...suins_1.platforms,
|
265
266
|
...debridge_1.platforms,
|
267
|
+
...jewel_1.platforms,
|
266
268
|
];
|
267
269
|
// JOBS //
|
268
270
|
exports.jobs = [
|
@@ -374,6 +376,7 @@ exports.jobs = [
|
|
374
376
|
...deepbook_1.jobs,
|
375
377
|
...suins_1.jobs,
|
376
378
|
...debridge_1.jobs,
|
379
|
+
...jewel_1.jobs,
|
377
380
|
];
|
378
381
|
// FETCHERS //
|
379
382
|
exports.fetchers = [
|
@@ -487,6 +490,7 @@ exports.fetchers = [
|
|
487
490
|
...deepbook_1.fetchers,
|
488
491
|
...suins_1.fetchers,
|
489
492
|
...debridge_1.fetchers,
|
493
|
+
...jewel_1.fetchers,
|
490
494
|
];
|
491
495
|
exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
|
492
496
|
exports.airdropFetchers = [
|
package/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5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e;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,uBAAoB;IACvB,GAAG,mBAAgB;IACnB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,iBAAc;IACjB,GAAG,kBAAe;IAClB,GAAG,oBAAiB;IACpB,GAAG,8BAA2B;IAC9B,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,gBAAa;CACjB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,GAAG,yBAAsB;IACzB,GAAG,wBAAqB;IACxB,GAAG,yBAAsB;IACzB,sBAAmB;IACnB,sBAAmB;IACnB,yBAAsB;IACtB,sBAAmB;IACnB,yBAAsB;CACvB,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
|
@@ -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;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
2
|
+
export declare const platformId = "jewel-swap";
|
3
|
+
export declare const platform: Platform;
|
4
|
+
export declare const marketsCachePrefix = "jewel-swap-markets";
|
5
|
+
export declare const jwlSui = "0x2921ca2fe6ee99698b095f046bc9759ce7a764d2e91ab0ad182c143649c3df79::jwlsui::JWLSUI";
|
6
|
+
export declare const suiUserInfosParentId = "0xcf75f09267573f3723c8b36fd99b88659039980d34e73c3e267ca3eff52ee313";
|
7
|
+
export declare const scaUserInfosParentid = "0xe33921e7069d7bffa01188aca3594cd3bbbdfe8344e704cdf16cf5f46a046d4a";
|
8
|
+
export declare const cetusUserInfosParentid = "0xbdb8742b0c3e31aef61997faef504a1160158951546d69fc0d329c6272c42a91";
|
9
|
+
export declare const stakedAssetInfos: {
|
10
|
+
asset: string;
|
11
|
+
underlying: string;
|
12
|
+
parentId: string;
|
13
|
+
}[];
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.stakedAssetInfos = exports.cetusUserInfosParentid = exports.scaUserInfosParentid = exports.suiUserInfosParentId = exports.jwlSui = exports.marketsCachePrefix = exports.platform = exports.platformId = void 0;
|
4
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
5
|
+
exports.platformId = 'jewel-swap';
|
6
|
+
exports.platform = {
|
7
|
+
id: exports.platformId,
|
8
|
+
name: 'Jewel Swap',
|
9
|
+
image: 'https://sonar.watch/img/platforms/jewel.webp',
|
10
|
+
website: 'https://sui.jewelswap.io/',
|
11
|
+
twitter: 'https://twitter.com/JewelSwapX',
|
12
|
+
};
|
13
|
+
exports.marketsCachePrefix = `${exports.platformId}-markets`;
|
14
|
+
exports.jwlSui = '0x2921ca2fe6ee99698b095f046bc9759ce7a764d2e91ab0ad182c143649c3df79::jwlsui::JWLSUI';
|
15
|
+
exports.suiUserInfosParentId = '0xcf75f09267573f3723c8b36fd99b88659039980d34e73c3e267ca3eff52ee313';
|
16
|
+
exports.scaUserInfosParentid = '0xe33921e7069d7bffa01188aca3594cd3bbbdfe8344e704cdf16cf5f46a046d4a';
|
17
|
+
exports.cetusUserInfosParentid = '0xbdb8742b0c3e31aef61997faef504a1160158951546d69fc0d329c6272c42a91';
|
18
|
+
exports.stakedAssetInfos = [
|
19
|
+
{
|
20
|
+
asset: '0x0e25582daef54ee41052390c4db5e70a82ec1baed97942db0eb6094267624b5d::jwlsca::JWLSCA',
|
21
|
+
underlying: '0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA',
|
22
|
+
parentId: '0xe33921e7069d7bffa01188aca3594cd3bbbdfe8344e704cdf16cf5f46a046d4a',
|
23
|
+
},
|
24
|
+
{
|
25
|
+
asset: exports.jwlSui,
|
26
|
+
underlying: portfolio_core_1.suiNativeAddress,
|
27
|
+
parentId: '0xcf75f09267573f3723c8b36fd99b88659039980d34e73c3e267ca3eff52ee313',
|
28
|
+
},
|
29
|
+
{
|
30
|
+
asset: '0x0e25582daef54ee41052390c4db5e70a82ec1baed97942db0eb6094267624b5d::jwlcetus::JWLCETUS',
|
31
|
+
underlying: '0x06864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b::cetus::CETUS',
|
32
|
+
parentId: '0xbdb8742b0c3e31aef61997faef504a1160158951546d69fc0d329c6272c42a91',
|
33
|
+
},
|
34
|
+
];
|
35
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jewel/constants.ts"],"names":[],"mappings":";;;AAAA,+DAAwE;AAE3D,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,8CAA8C;IACrD,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,gCAAgC;CAC1C,CAAC;AACW,QAAA,kBAAkB,GAAG,GAAG,kBAAU,UAAU,CAAC;AAE7C,QAAA,MAAM,GACjB,oFAAoF,CAAC;AAC1E,QAAA,oBAAoB,GAC/B,oEAAoE,CAAC;AAE1D,QAAA,oBAAoB,GAC/B,oEAAoE,CAAC;AAE1D,QAAA,sBAAsB,GACjC,oEAAoE,CAAC;AAE1D,QAAA,gBAAgB,GAAG;IAC9B;QACE,KAAK,EACH,oFAAoF;QACtF,UAAU,EACR,8EAA8E;QAChF,QAAQ,EACN,oEAAoE;KACvE;IACD;QACE,KAAK,EAAE,cAAM;QACb,UAAU,EAAE,iCAAgB;QAC5B,QAAQ,EACN,oEAAoE;KACvE;IACD;QACE,KAAK,EACH,wFAAwF;QAC1F,UAAU,EACR,kFAAkF;QACpF,QAAQ,EACN,oEAAoE;KACvE;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 stakedAssetsPricingJob_1 = __importDefault(require("./stakedAssetsPricingJob"));
|
9
|
+
const stakedFetcher_1 = __importDefault(require("./stakedFetcher"));
|
10
|
+
exports.platforms = [constants_1.platform];
|
11
|
+
exports.jobs = [stakedAssetsPricingJob_1.default];
|
12
|
+
exports.fetchers = [stakedFetcher_1.default];
|
13
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jewel/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,sFAAiD;AACjD,oEAA+C;AAElC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,gCAAS,CAAC,CAAC;AAC1B,QAAA,QAAQ,GAAc,CAAC,uBAAgB,CAAC,CAAC"}
|
@@ -0,0 +1,40 @@
|
|
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
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
|
+
const constants_1 = require("./constants");
|
14
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
15
|
+
const tokenPriceById = yield cache.getTokenPricesAsMap(constants_1.stakedAssetInfos.map((info) => info.underlying), portfolio_core_1.NetworkId.sui);
|
16
|
+
const promises = [];
|
17
|
+
constants_1.stakedAssetInfos.forEach((info) => {
|
18
|
+
const underlyingTokenPrice = tokenPriceById.get((0, portfolio_core_1.formatTokenAddress)(info.underlying, portfolio_core_1.NetworkId.sui));
|
19
|
+
if (!underlyingTokenPrice)
|
20
|
+
return;
|
21
|
+
promises.push(cache.setTokenPriceSource({
|
22
|
+
address: info.asset,
|
23
|
+
decimals: underlyingTokenPrice.decimals,
|
24
|
+
id: constants_1.platformId,
|
25
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
26
|
+
platformId: portfolio_core_1.walletTokensPlatformId,
|
27
|
+
price: underlyingTokenPrice.price,
|
28
|
+
timestamp: Date.now(),
|
29
|
+
weight: 0.01,
|
30
|
+
}));
|
31
|
+
});
|
32
|
+
yield Promise.all(promises);
|
33
|
+
});
|
34
|
+
const job = {
|
35
|
+
id: `${constants_1.platformId}-assets-pricing`,
|
36
|
+
executor,
|
37
|
+
label: 'normal',
|
38
|
+
};
|
39
|
+
exports.default = job;
|
40
|
+
//# sourceMappingURL=stakedAssetsPricingJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stakedAssetsPricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jewel/stakedAssetsPricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAIoC;AAGpC,2CAA2D;AAE3D,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACpD,4BAAgB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,EAC/C,0BAAS,CAAC,GAAG,CACd,CAAC;IAEF,MAAM,QAAQ,GAAoB,EAAE,CAAC;IACrC,4BAAgB,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAChC,MAAM,oBAAoB,GAAG,cAAc,CAAC,GAAG,CAC7C,IAAA,mCAAkB,EAAC,IAAI,CAAC,UAAU,EAAE,0BAAS,CAAC,GAAG,CAAC,CACnD,CAAC;QACF,IAAI,CAAC,oBAAoB;YAAE,OAAO;QAElC,QAAQ,CAAC,IAAI,CACX,KAAK,CAAC,mBAAmB,CAAC;YACxB,OAAO,EAAE,IAAI,CAAC,KAAK;YACnB,QAAQ,EAAE,oBAAoB,CAAC,QAAQ;YACvC,EAAE,EAAE,sBAAU;YACd,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAE,uCAAsB;YAClC,KAAK,EAAE,oBAAoB,CAAC,KAAK;YACjC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,MAAM,EAAE,IAAI;SACb,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,iBAAiB;IAClC,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -0,0 +1,102 @@
|
|
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 clients_1 = require("../../utils/clients");
|
19
|
+
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
20
|
+
const getDynamicFieldObject_1 = require("../../utils/sui/getDynamicFieldObject");
|
21
|
+
const tenDays = 10 * 24 * 60 * 60 * 1000;
|
22
|
+
const sevenDays = 7 * 24 * 60 * 60 * 1000;
|
23
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
24
|
+
var _a, _b, _c, _d, _e, _f;
|
25
|
+
const client = (0, clients_1.getClientSui)();
|
26
|
+
const userInfos = yield Promise.all([
|
27
|
+
...constants_1.stakedAssetInfos.map((info) => (0, getDynamicFieldObject_1.getDynamicFieldObject)(client, {
|
28
|
+
parentId: info.parentId,
|
29
|
+
name: {
|
30
|
+
type: 'address',
|
31
|
+
value: owner,
|
32
|
+
},
|
33
|
+
})),
|
34
|
+
]);
|
35
|
+
if (!userInfos.some((obj) => obj.data))
|
36
|
+
return [];
|
37
|
+
const tokenPriceById = yield cache.getTokenPricesAsMap(constants_1.stakedAssetInfos.map((info) => [info.underlying, info.asset]).flat(), portfolio_core_1.NetworkId.sui);
|
38
|
+
const suiUnstakingAssets = [];
|
39
|
+
const stakedAssets = [];
|
40
|
+
for (let n = 0; n < userInfos.length; n++) {
|
41
|
+
if (!((_b = (_a = userInfos[n].data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields))
|
42
|
+
continue;
|
43
|
+
const assetInfo = constants_1.stakedAssetInfos[n];
|
44
|
+
const assetTokenPrice = tokenPriceById.get((0, portfolio_core_1.formatMoveTokenAddress)(assetInfo.asset));
|
45
|
+
if (assetInfo.underlying === portfolio_core_1.suiNativeAddress) {
|
46
|
+
const { fields } = ((_d = (_c = userInfos[n].data) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.fields).value;
|
47
|
+
const sjwlAmount = new bignumber_js_1.default(fields.sjwlsui_amount).dividedBy(Math.pow(10, 9));
|
48
|
+
const unstakingSuiAmount = new bignumber_js_1.default(fields.reserved_redeem_amount).dividedBy(Math.pow(10, 9));
|
49
|
+
if (!unstakingSuiAmount.isZero()) {
|
50
|
+
const suiTokenPrice = tokenPriceById.get((0, portfolio_core_1.formatMoveTokenAddress)(portfolio_core_1.suiNativeAddress));
|
51
|
+
suiUnstakingAssets.push((0, tokenPriceToAssetToken_1.default)(portfolio_core_1.suiNativeAddress, unstakingSuiAmount.toNumber(), portfolio_core_1.NetworkId.sui, suiTokenPrice, undefined, {
|
52
|
+
lockedUntil: Number(fields.last_redeem_reserved_at) + tenDays,
|
53
|
+
}));
|
54
|
+
}
|
55
|
+
if (!sjwlAmount.isZero())
|
56
|
+
stakedAssets.push((0, tokenPriceToAssetToken_1.default)(constants_1.jwlSui, sjwlAmount.toNumber(), portfolio_core_1.NetworkId.sui, assetTokenPrice));
|
57
|
+
}
|
58
|
+
else {
|
59
|
+
const { fields } = ((_f = (_e = userInfos[n].data) === null || _e === void 0 ? void 0 : _e.content) === null || _f === void 0 ? void 0 : _f.fields).value.fields.value;
|
60
|
+
const amount = new bignumber_js_1.default(fields.jwltoken_staked).dividedBy(Math.pow(10, 9));
|
61
|
+
if (!amount.isZero())
|
62
|
+
stakedAssets.push((0, tokenPriceToAssetToken_1.default)(assetInfo.asset, amount.toNumber(), portfolio_core_1.NetworkId.sui, assetTokenPrice, undefined, {
|
63
|
+
lockedUntil: Number(fields.last_staked_at) + sevenDays,
|
64
|
+
}));
|
65
|
+
}
|
66
|
+
}
|
67
|
+
if (!stakedAssets && !suiUnstakingAssets)
|
68
|
+
return [];
|
69
|
+
const elements = [];
|
70
|
+
if (stakedAssets) {
|
71
|
+
elements.push({
|
72
|
+
type: portfolio_core_1.PortfolioElementType.multiple,
|
73
|
+
label: 'Staked',
|
74
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
75
|
+
platformId: constants_1.platformId,
|
76
|
+
data: {
|
77
|
+
assets: stakedAssets,
|
78
|
+
},
|
79
|
+
value: (0, portfolio_core_1.getUsdValueSum)(stakedAssets.map((a) => a.value)),
|
80
|
+
});
|
81
|
+
}
|
82
|
+
if (suiUnstakingAssets.length !== 0) {
|
83
|
+
elements.push({
|
84
|
+
type: portfolio_core_1.PortfolioElementType.multiple,
|
85
|
+
label: 'Deposit',
|
86
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
87
|
+
platformId: constants_1.platformId,
|
88
|
+
data: {
|
89
|
+
assets: suiUnstakingAssets,
|
90
|
+
},
|
91
|
+
value: (0, portfolio_core_1.getUsdValueSum)(suiUnstakingAssets.map((a) => a.value)),
|
92
|
+
});
|
93
|
+
}
|
94
|
+
return elements;
|
95
|
+
});
|
96
|
+
const fetcher = {
|
97
|
+
id: `${constants_1.platformId}-deposits`,
|
98
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
99
|
+
executor,
|
100
|
+
};
|
101
|
+
exports.default = fetcher;
|
102
|
+
//# sourceMappingURL=stakedFetcher.js.map
|
@@ -0,0 +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,GAAoB,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,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SAC9D,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
export type UserInfo = {
|
2
|
+
id: ID;
|
3
|
+
name: string;
|
4
|
+
value: UserInfoValueV1;
|
5
|
+
};
|
6
|
+
export type ID = {
|
7
|
+
id: string;
|
8
|
+
};
|
9
|
+
export type UserInfoValueV1 = {
|
10
|
+
fields: UserInfoFieldsV1;
|
11
|
+
type: string;
|
12
|
+
};
|
13
|
+
export type UserInfoFieldsV1 = {
|
14
|
+
last_redeem_reserved_at: string;
|
15
|
+
reserved_redeem_amount: string;
|
16
|
+
sjwlsui_amount: string;
|
17
|
+
voted_sjwlsui_amount: string;
|
18
|
+
};
|
19
|
+
export type UserJwltokenInfo = {
|
20
|
+
id: ID;
|
21
|
+
name: string;
|
22
|
+
value: TableValue;
|
23
|
+
};
|
24
|
+
export type TableValue = {
|
25
|
+
fields: TableFields;
|
26
|
+
type: string;
|
27
|
+
};
|
28
|
+
export type TableFields = {
|
29
|
+
next: null;
|
30
|
+
prev: string;
|
31
|
+
value: UserInfoValueV2;
|
32
|
+
};
|
33
|
+
export type UserInfoValueV2 = {
|
34
|
+
fields: UserInfoFieldsV2;
|
35
|
+
type: string;
|
36
|
+
};
|
37
|
+
export type UserInfoFieldsV2 = {
|
38
|
+
jwltoken_staked: string;
|
39
|
+
last_epoch_checked: string;
|
40
|
+
last_staked_at: string;
|
41
|
+
total_rewards: string;
|
42
|
+
};
|
43
|
+
export type StakedAssetInfo = {
|
44
|
+
asset: string;
|
45
|
+
underlying: string;
|
46
|
+
parentId: string;
|
47
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jewel/types.ts"],"names":[],"mappings":""}
|
@@ -25,6 +25,16 @@ exports.vaultsInfo = [
|
|
25
25
|
id: '0x5eb2f7e07e4fbe6ce47dd10dc040efd5c79228ed767d242c320571dcd7c5a976',
|
26
26
|
underlyingPool: '0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630',
|
27
27
|
},
|
28
|
+
{
|
29
|
+
tokenType: '0x1e06cc1e491b434cd1be9f24e1f8a82f6fcb016f6fb87f0586b0fe57ecca6cbb::kc_navx_chopper_vt::KC_NAVX_CHOPPER_VT',
|
30
|
+
id: '0xce23eccbba8e6fe0351a8d6e2f736929723ef0ada2ca9d3612557ac6bc423c87',
|
31
|
+
underlyingPool: '0x0254747f5ca059a1972cd7f6016485d51392a3fde608107b93bbaebea550f703',
|
32
|
+
},
|
33
|
+
{
|
34
|
+
tokenType: '0x6d8c1becd365aaa5474a0642247b15189e1625f32104945749f1e8802b768d6d::kc_degen_vt::KC_DEGEN_VT',
|
35
|
+
id: '0x264c3b7de2abf0df2871bc0486bfab001f88b76c865bbdda377cd583b633c17a',
|
36
|
+
underlyingPool: '0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630',
|
37
|
+
},
|
28
38
|
];
|
29
39
|
exports.dynamicFieldPositionType = '0x2::dynamic_field::Field<vector<u8>, 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::position::Position>';
|
30
40
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/constants.ts"],"names":[],"mappings":";;;AAGa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,YAAY,EAAE,sCAAsC;IACjE,OAAO,EAAE,gCAAgC;IACzC,OAAO,EAAE,8BAA8B;CACxC,CAAC;AAEW,QAAA,eAAe,GAC1B,oEAAoE,CAAC;AAC1D,QAAA,cAAc,GACzB,oEAAoE,CAAC;AAE1D,QAAA,aAAa,GAAG,aAAa,CAAC;AAC9B,QAAA,YAAY,GAAG,YAAY,CAAC;AAE5B,QAAA,SAAS,GACpB,4EAA4E,CAAC;AAClE,QAAA,QAAQ,GACnB,2EAA2E,CAAC;AAEjE,QAAA,iBAAiB,GAAG;IAC/B,wGAAwG;CACzG,CAAC;AAEW,QAAA,UAAU,GAAgB;IACrC;QACE,SAAS,EACP,wGAAwG;QAC1G,EAAE,EAAE,oEAAoE;QACxE,cAAc,EACZ,oEAAoE;KACvE;CACF,CAAC;AAEW,QAAA,wBAAwB,GACnC,+HAA+H,CAAC"}
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/constants.ts"],"names":[],"mappings":";;;AAGa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,YAAY,EAAE,sCAAsC;IACjE,OAAO,EAAE,gCAAgC;IACzC,OAAO,EAAE,8BAA8B;CACxC,CAAC;AAEW,QAAA,eAAe,GAC1B,oEAAoE,CAAC;AAC1D,QAAA,cAAc,GACzB,oEAAoE,CAAC;AAE1D,QAAA,aAAa,GAAG,aAAa,CAAC;AAC9B,QAAA,YAAY,GAAG,YAAY,CAAC;AAE5B,QAAA,SAAS,GACpB,4EAA4E,CAAC;AAClE,QAAA,QAAQ,GACnB,2EAA2E,CAAC;AAEjE,QAAA,iBAAiB,GAAG;IAC/B,wGAAwG;CACzG,CAAC;AAEW,QAAA,UAAU,GAAgB;IACrC;QACE,SAAS,EACP,wGAAwG;QAC1G,EAAE,EAAE,oEAAoE;QACxE,cAAc,EACZ,oEAAoE;KACvE;IACD;QACE,SAAS,EACP,4GAA4G;QAC9G,EAAE,EAAE,oEAAoE;QACxE,cAAc,EACZ,oEAAoE;KACvE;IACD;QACE,SAAS,EACP,8FAA8F;QAChG,EAAE,EAAE,oEAAoE;QACxE,cAAc,EACZ,oEAAoE;KACvE;CACF,CAAC;AAEW,QAAA,wBAAwB,GACnC,+HAA+H,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/vaultsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAGrC,2CAAoE;AACpE,iDAAmD;AACnD,6EAA0E;AAE1E,kDAAqD;AAErD,wFAAyF;AACzF,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,cAAc,GAAG,MAAM,IAAA,yCAAmB,EAC9C,MAAM,EACN,KAAK,EACL,sBAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAC3C,CAAC;IAEF,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,KAAK,GAAG,CAAC;QACjE,OAAO,EAAE,CAAC;IAEZ,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,QAAQ,CACpC,sBAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,EAC/C,EAAE,MAAM,EAAE,2BAAe,EAAE,SAAS,EAAE,0BAAS,CAAC,GAAG,EAAE,CACtD,CAAC;IAEF,MAAM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ACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -6,12 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getElementsFromObligations = exports.parseDataflat = exports.getObligationSeed = exports.upperFirst = void 0;
|
7
7
|
const beet_1 = require("@metaplex-foundation/beet");
|
8
8
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
9
|
-
const web3_js_1 = require("@solana/web3.js");
|
10
9
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
11
10
|
const structs_1 = require("./structs");
|
12
11
|
const constants_1 = require("./constants");
|
13
12
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
14
|
-
const helpers_1 = require("../../utils/solana/pyth/helpers");
|
15
13
|
const upperFirst = (string) => string ? string.charAt(0).toUpperCase() + string.slice(1) : '';
|
16
14
|
exports.upperFirst = upperFirst;
|
17
15
|
function getObligationSeed(marketAddress, accountId) {
|
@@ -66,13 +64,14 @@ function getElementsFromObligations(obligations, reserveByAddress, marketByAddre
|
|
66
64
|
const lTokenPrice = tokenPriceByAddress.get(lMint);
|
67
65
|
let price;
|
68
66
|
if (!lTokenPrice) {
|
69
|
-
|
70
|
-
const
|
71
|
-
const
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
67
|
+
continue;
|
68
|
+
// const pythOracle = new PublicKey(reserve.liquidity.pythOracle);
|
69
|
+
// const pythAccount = pythAccountByAddress.get(pythOracle.toString());
|
70
|
+
// console.log('Account', pythAccount?.data.byteLength);
|
71
|
+
// const pythPrice = pythAccount
|
72
|
+
// ? parsePriceData(pythAccount.data)
|
73
|
+
// : undefined;
|
74
|
+
// if (pythPrice) price = pythPrice.price;
|
76
75
|
}
|
77
76
|
const decimals = liquidity.mintDecimals;
|
78
77
|
const reserveBorrowAmount = new bignumber_js_1.default(liquidity.borrowedAmountWads)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/save/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAkE;AAClE,+DASoC;
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/save/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAkE;AAClE,+DASoC;AAEpC,gEAAqC;AACrC,uCAImB;AAGnB,2CAAsD;AACtD,qGAA6E;AAGtE,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,EAAE,CAC3C,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AADpD,QAAA,UAAU,cAC0C;AAEjE,SAAgB,iBAAiB,CAAC,aAAqB,EAAE,SAAiB;IACxE,IAAI,SAAS,KAAK,CAAC;QAAE,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACvD,2EAA2E;IAC3E,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,UAAU,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACtE,CAAC;AAJD,8CAIC;AAEM,MAAM,aAAa,GAAG,CAC3B,QAAgB,EAChB,WAAmB,EACnB,UAAkB,EAClB,EAAE;IACF,MAAM,yBAAyB,GAAG,IAAA,4BAAqB,EACrD,oCAA0B,EAC1B,WAAW,CACZ,CAAC;IACF,MAAM,QAAQ,GAAG,yBAAyB,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC7D,MAAM,WAAW,GAAG,IAAI,GAAG,C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C;YAAE,SAAS;QAEzE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC;YACtB,cAAc;YACd,cAAc;YACd,YAAY;YACZ,YAAY;YACZ,eAAe;SAChB,CAAC,CAAC;QAEL,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AApKD,gEAoKC"}
|
@@ -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;
|