@sonarwatch/portfolio-plugins 0.12.132 → 0.12.134
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +2257 -2249
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/AirdropFetcher.js +5 -3
- package/src/AirdropFetcher.js.map +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/sushiswap/helpers.js +24 -24
- 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
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/AirdropFetcher.js
CHANGED
@@ -74,14 +74,16 @@ function enhanceAirdrop(airdropRaw, owner, networkId, cache) {
|
|
74
74
|
const airdropStatus = (0, portfolio_core_1.getAirdropStatus)(airdropRaw.claimStart, airdropRaw.claimEnd);
|
75
75
|
const prices = yield getAirdropItemsPrices(airdropRaw, networkId, cache);
|
76
76
|
const items = airdropRaw.items
|
77
|
-
.map((i, index) => enhanceAirdropItem(i, airdropRaw.id, airdropStatus, prices[index], owner))
|
77
|
+
.map((i, index) => enhanceAirdropItem(i, airdropRaw.id, airdropStatus, prices[index], owner, networkId))
|
78
78
|
.sort((a, b) => (0, portfolio_core_1.compareName)(a.label, b.label));
|
79
79
|
return Object.assign(Object.assign({}, airdropRaw), { owner,
|
80
80
|
networkId, status: airdropStatus, items, value: (0, portfolio_core_1.getUsdValueSum)(items.map((i) => i.value)) });
|
81
81
|
});
|
82
82
|
}
|
83
|
-
function enhanceAirdropItem(airdropItem, airdropId, airdropStatus, price, owner) {
|
84
|
-
return Object.assign(Object.assign({}, airdropItem), {
|
83
|
+
function enhanceAirdropItem(airdropItem, airdropId, airdropStatus, price, owner, networkId) {
|
84
|
+
return Object.assign(Object.assign({}, airdropItem), { address: airdropItem.address
|
85
|
+
? (0, portfolio_core_1.formatTokenAddress)(airdropItem.address, networkId)
|
86
|
+
: undefined, airdropId,
|
85
87
|
price, status: (0, portfolio_core_1.getAirdropItemStatus)(airdropStatus, airdropItem.amount, airdropItem.isClaimed), value: price ? price * airdropItem.amount : null, owner });
|
86
88
|
}
|
87
89
|
const runAirdropFetcherTimeout = 10000;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AirdropFetcher.js","sourceRoot":"","sources":["../../../../packages/plugins/src/AirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"AirdropFetcher.js","sourceRoot":"","sources":["../../../../packages/plugins/src/AirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DA4BoC;AAEpC,iFAAyD;AAEzD,iGAAyE;AACzE,+EAAuD;AAa1C,QAAA,2BAA2B,GAAG,kBAAkB,CAAC;AAC9D,SAAsB,oBAAoB,CACxC,MAGG,EACH,SAAwB,EACxB,KAAY;;QAEZ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AI,EAAE;wBACJ,MAAM;qBACP;oBACD,UAAU;oBACV,IAAI,EAAE,qCAAoB,CAAC,QAAQ;oBACnC,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;oBACjD,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,SAAS;iBAChC;aACF,CAAC;QACJ,CAAC,CAAA;KACF,CAAC;AACJ,CAAC;AA1ED,0DA0EC"}
|
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;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAI6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAK0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAG6B;AAC7B,yCAIwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,+CAK2B;AAC3B,yCAIwB;AACxB,2CAIyB;AACzB,mDAI6B;AAC7B,2CAIyB;AACzB,2CAIyB;AACzB,sCAIsB;AACtB,+CAI2B;AAC3B,yCAIwB;AACxB,iDAI4B;AAC5B,yCAIwB;AACxB,mDAI6B;AAC7B,qDAI8B;AAC9B,2CAIyB;AACzB,2CAKyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,2CAIyB;AACzB,uDAI+B;AAC/B,6DAIkC;AAClC,2CAIyB;AACzB,yCAIwB;AACxB,mDAI6B;AAC7B,6CAI0B;AAC1B,iEAIoC;AACpC,6DAIkC;AAClC,yCAIwB;AACxB,uCAIuB;AACvB,+CAI2B;AAC3B,iDAI4B;AAC5B,mDAI6B;AAC7B,2CAIyB;AACzB,+CAI2B;AAC3B,uCAIuB;AACvB,iDAI4B;AAC5B,yCAIwB;AACxB,6CAI0B;AAC1B,yCAIwB;AACxB,mDAI6B;AAC7B,2CAIyB;AACzB,mDAI6B;AAC7B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,2CAIyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,+CAI2B;AAC3B,iDAI4B;AAC5B,yDAIgC;AAChC,iDAI4B;AAC5B,6CAI0B;AAC1B,iDAI4B;AAC5B,+CAI2B;AAC3B,6CAI0B;AAC1B,6CAI0B;AAC1B,+CAK2B;AAC3B,mDAI6B;AAC7B,uEAIuC;AACvC,mDAI6B;AAC7B,+CAI2B;AAC3B,+CAI2B;AAC3B,+CAI2B;AAC3B,6CAI0B;AAC1B,iDAI4B;AAC5B,iDAK4B;AAC5B,2CAKyB;AACzB,iDAK4B;
|
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;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D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B,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,kBAAe;IAClB,GAAG,cAAW;IACd,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,iBAAc;IACjB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,iBAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;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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ED,IAAI,kBAAkB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpC,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE;gBACJ,MAAM,EAAE,kBAAkB;aAC3B;YACD,KAAK,EAAE,IAAA,+BAAc,EAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,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":""}
|
@@ -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;
|