@sonarwatch/portfolio-plugins 0.12.140 → 0.12.142
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +2281 -2273
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/plugins/abex/marketsJob.js +2 -3
- package/src/plugins/abex/marketsJob.js.map +1 -1
- package/src/plugins/aftermath/poolsJob.js +1 -2
- package/src/plugins/aftermath/poolsJob.js.map +1 -1
- package/src/plugins/aftermath/stakingFetcher.js +1 -2
- package/src/plugins/aftermath/stakingFetcher.js.map +1 -1
- package/src/plugins/auxexchange/aptosLpJob.js +3 -3
- package/src/plugins/auxexchange/aptosLpJob.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/bluefin/positionFetcher.js +2 -2
- package/src/plugins/bluefin/positionFetcher.js.map +1 -1
- package/src/plugins/cetus/poolsJob.js +12 -4
- package/src/plugins/cetus/poolsJob.js.map +1 -1
- package/src/plugins/circuit/vaultsJob.js +15 -6
- package/src/plugins/circuit/vaultsJob.js.map +1 -1
- package/src/plugins/drift/depositsFetcher.js +1 -1
- package/src/plugins/drift/depositsFetcher.js.map +1 -1
- package/src/plugins/elixir/positionsFetcher.js +1 -2
- package/src/plugins/elixir/positionsFetcher.js.map +1 -1
- package/src/plugins/flash/perpetualFetcher.js +2 -1
- package/src/plugins/flash/perpetualFetcher.js.map +1 -1
- package/src/plugins/flowx/poolJob.js +3 -4
- package/src/plugins/flowx/poolJob.js.map +1 -1
- package/src/plugins/flowx/stakingPoolJob.js +2 -3
- package/src/plugins/flowx/stakingPoolJob.js.map +1 -1
- package/src/plugins/kriya/farmsJob.js +1 -0
- package/src/plugins/kriya/farmsJob.js.map +1 -1
- package/src/plugins/kriya/vaultsFetcher.js +3 -0
- package/src/plugins/kriya/vaultsFetcher.js.map +1 -1
- package/src/plugins/liquidswap/aptosLpJob.js +2 -2
- package/src/plugins/liquidswap/aptosLpJob.js.map +1 -1
- package/src/plugins/mole/depositsFetcher.js +4 -5
- package/src/plugins/mole/depositsFetcher.js.map +1 -1
- package/src/plugins/mole/farmsFetcher.js +10 -4
- package/src/plugins/mole/farmsFetcher.js.map +1 -1
- package/src/plugins/pancakeswap/aptosLpJob.js +5 -5
- package/src/plugins/pancakeswap/aptosLpJob.js.map +1 -1
- package/src/plugins/staking-aptos/constants.js +2 -2
- package/src/plugins/staking-aptos/constants.js.map +1 -1
- package/src/plugins/sushiswap/aptos/poolsJob.js +2 -2
- package/src/plugins/sushiswap/aptos/poolsJob.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/thala/farmingPoolsFetcher.js +1 -1
- package/src/plugins/thala/farmingPoolsFetcher.js.map +1 -1
- package/src/plugins/thala/lpTokensJob.js +2 -2
- package/src/plugins/thala/lpTokensJob.js.map +1 -1
- package/src/plugins/tokens/fetchers/aptos.js +1 -1
- package/src/plugins/tokens/fetchers/aptos.js.map +1 -1
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/zeta/airdropFetcher.js +16 -16
- package/src/plugins/zeta/airdropFetcher.js.map +1 -1
- package/src/utils/aptos/index.d.ts +0 -2
- package/src/utils/aptos/index.js +0 -2
- package/src/utils/aptos/index.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/utils/sui/queryEvents.js +1 -4
- package/src/utils/sui/queryEvents.js.map +1 -1
- package/src/utils/sui/queryEventsSafe.d.ts +4 -0
- package/src/utils/sui/queryEventsSafe.js +34 -0
- package/src/utils/sui/queryEventsSafe.js.map +1 -0
- package/src/utils/aptos/parseTypeString.d.ts +0 -2
- package/src/utils/aptos/parseTypeString.js +0 -76
- package/src/utils/aptos/parseTypeString.js.map +0 -1
- package/src/utils/aptos/types.d.ts +0 -8
- package/src/utils/aptos/types.js +0 -3
- package/src/utils/aptos/types.js.map +0 -1
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
@@ -19,7 +19,6 @@ const clients_1 = require("../../utils/clients");
|
|
19
19
|
const getDynamicFields_1 = require("../../utils/sui/getDynamicFields");
|
20
20
|
const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
|
21
21
|
const getLpTokenSourceRawOld_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRawOld"));
|
22
|
-
const aptos_1 = require("../../utils/aptos");
|
23
22
|
const getObject_1 = require("../../utils/sui/getObject");
|
24
23
|
const constants_2 = require("../tokens/constants");
|
25
24
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
@@ -46,7 +45,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
46
45
|
const oType = (_b = (_a = o.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.value.type;
|
47
46
|
if (!oType)
|
48
47
|
return;
|
49
|
-
const uType = (_d = (_c = (0,
|
48
|
+
const uType = (_d = (_c = (0, portfolio_core_1.parseTypeString)(oType).keys) === null || _c === void 0 ? void 0 : _c.at(0)) === null || _d === void 0 ? void 0 : _d.type;
|
50
49
|
if (!uType)
|
51
50
|
return;
|
52
51
|
uTypes.push(uType);
|
@@ -58,7 +57,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
58
57
|
const market = (_f = (_e = object.data) === null || _e === void 0 ? void 0 : _e.content) === null || _f === void 0 ? void 0 : _f.fields;
|
59
58
|
if (!market)
|
60
59
|
return;
|
61
|
-
const uType = (_h = (_g = (0,
|
60
|
+
const uType = (_h = (_g = (0, portfolio_core_1.parseTypeString)(market.value.type).keys) === null || _g === void 0 ? void 0 : _g.at(0)) === null || _h === void 0 ? void 0 : _h.type;
|
62
61
|
if (!uType)
|
63
62
|
return;
|
64
63
|
const tokenPrice = tokenPrices.get((0, portfolio_core_1.formatTokenAddress)(uType, portfolio_core_1.NetworkId.sui));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"marketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/abex/marketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"marketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/abex/marketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,gEAAqC;AAGrC,2CAQqB;AACrB,iDAAmD;AACnD,uEAAoE;AAEpE,qEAAkE;AAClE,qGAEiD;AACjD,yDAAsD;AACtD,mDAA2D;AAE3D,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,OAAO;IACP,MAAM,UAAU,GAAG,MAAM,IAAA,qBAAS,EAAO,MAAM,EAAE,wBAAY,CAAC,CAAC;IAC/D,MAAM,iBAAiB,GACrB,MAAA,MAAA,UAAU,CAAC,IAAI,0CAAE,OAAO,0CAAE,MAAM,CAAC,oBAAoB,CAAC;IACxD,IAAI,iBAAiB,EAAE,CAAC;QACtB,MAAM,KAAK,CAAC,OAAO,CAAC,oCAAwB,EAAE,iBAAiB,EAAE;YAC/D,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;SACzB,CAAC,CAAC;IACL,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAS,EAAY,MAAM,EAAE,6BAAiB,CAAC,CAAC;IACvE,MAAM,QAAQ,GAAG,MAAA,MAAA,QAAQ,CAAC,IAAI,0CAAE,OAAO,0CAAE,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC;IACvE,IAAI,CAAC,QAAQ;QAAE,OAAO;IAEtB,MAAM,kBAAkB,GAAG,MAAM,IAAA,mCAAgB,EAC/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Q;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -16,7 +16,6 @@ const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
16
16
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
17
17
|
const clients_1 = require("../../utils/clients");
|
18
18
|
const constants_1 = require("./constants");
|
19
|
-
const aptos_1 = require("../../utils/aptos");
|
20
19
|
const getDynamicFields_1 = require("../../utils/sui/getDynamicFields");
|
21
20
|
const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
|
22
21
|
const getLpTokenSourceRaw_1 = require("../../utils/misc/getLpTokenSourceRaw");
|
@@ -53,7 +52,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
53
52
|
const poolInfo = (_d = (_c = pool.data) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.fields;
|
54
53
|
if (poolInfo.lp_supply.fields.value === '0')
|
55
54
|
continue;
|
56
|
-
const moveType = (0,
|
55
|
+
const moveType = (0, portfolio_core_1.parseTypeString)(poolInfo.lp_supply.type);
|
57
56
|
if (!moveType.keys)
|
58
57
|
continue;
|
59
58
|
const lpAddress = moveType.keys[0].type;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aftermath/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,+
|
1
|
+
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aftermath/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,+DAIoC;AAGpC,iDAAmD;AACnD,2CAAuD;AAEvD,uEAAoE;AACpE,qEAAkE;AAClE,8EAG8C;AAE9C,MAAM,SAAS,GAAG,0BAAS,CAAC,GAAG,CAAC;AAEhC,MAAM,QAAQ,GAAgB,CAAO,KAAY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AAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAA,EAAE,EAAI,EAAE,CAAA,CAAC,CAAC,QAAQ,EAAE;aACpE,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,IAAI,kBAAkB,CAAC,MAAM,KAAK,QAAQ,CAAC,mBAAmB,CAAC,MAAM;YACnE,SAAS;QACX,MAAM,SAAS,GAAG,IAAA,yCAAmB,EAAC;YACpC,SAAS;YACT,UAAU,EAAV,sBAAU;YACV,SAAS,EAAE;gBACT,OAAO,EAAE,SAAS;gBAClB,QAAQ,EAAE,QAAQ,CAAC,WAAW;gBAC9B,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK;aAC3C;YACD,QAAQ,EAAE,SAAS;YACnB,kBAAkB;YAClB,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;IAC7B,CAAC;IACD,MAAM,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -18,7 +18,6 @@ const constants_1 = require("./constants");
|
|
18
18
|
const clients_1 = require("../../utils/clients");
|
19
19
|
const getOwnedObjects_1 = require("../../utils/sui/getOwnedObjects");
|
20
20
|
const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
|
21
|
-
const aptos_1 = require("../../utils/aptos");
|
22
21
|
const tokenPriceToAssetTokens_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetTokens"));
|
23
22
|
const farmFactor = new bignumber_js_1.default(Math.pow(10, 9));
|
24
23
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
@@ -47,7 +46,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
47
46
|
var _a, _b;
|
48
47
|
if (!type)
|
49
48
|
return undefined;
|
50
|
-
const lp = (_b = (_a = (0,
|
49
|
+
const lp = (_b = (_a = (0, portfolio_core_1.parseTypeString)(type).keys) === null || _a === void 0 ? void 0 : _a.at(0)) === null || _b === void 0 ? void 0 : _b.type;
|
51
50
|
if (!lp || !lp.includes('af_lp'))
|
52
51
|
return undefined;
|
53
52
|
return (0, portfolio_core_1.formatTokenAddress)(lp, portfolio_core_1.NetworkId.sui);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aftermath/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aftermath/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAGrC,2CAAsD;AACtD,iDAAmD;AACnD,qEAAkE;AAElE,qEAAkE;AAClE,uGAA+E;AAE/E,MAAM,UAAU,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AAE1C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,eAAe,GAAG,MAAM,IAAA,iCAAe,EAC3C,MAAM,EACN,KAAK,EACL;QACE,MAAM,EAAE;YACN,UAAU,EAAE,uBAAW;SACxB;QACD,OAAO,EAAE;YACP,WAAW,EAAE,IAAI;SAClB;KACF,CACF,CAAC;IACF,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE5C,MAAM,YAAY,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;;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GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SAC3D;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -32,7 +32,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
32
|
});
|
33
33
|
const tokenPrices = yield cache.getTokenPricesAsMap(resources
|
34
34
|
.map((resource) => {
|
35
|
-
const { keys } = (0,
|
35
|
+
const { keys } = (0, portfolio_core_1.parseTypeString)(resource.type);
|
36
36
|
return keys ? keys.map((key) => key.type) : [];
|
37
37
|
})
|
38
38
|
.flat(), portfolio_core_1.NetworkId.aptos);
|
@@ -41,7 +41,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
41
|
const resource = resources[i];
|
42
42
|
if (!resource.type.startsWith(constants_1.lpCoinInfoTypePrefix))
|
43
43
|
continue;
|
44
|
-
const lpType = (_b = (_a = (0,
|
44
|
+
const lpType = (_b = (_a = (0, portfolio_core_1.parseTypeString)(resource.type).keys) === null || _a === void 0 ? void 0 : _a.at(0)) === null || _b === void 0 ? void 0 : _b.type;
|
45
45
|
if (!lpType)
|
46
46
|
continue;
|
47
47
|
const lpInfoData = resource.data;
|
@@ -52,7 +52,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
52
52
|
const lpSupply = new bignumber_js_1.default(lpSupplyString);
|
53
53
|
if (lpSupply.isZero())
|
54
54
|
continue;
|
55
|
-
const parsedLpType = (0,
|
55
|
+
const parsedLpType = (0, portfolio_core_1.parseTypeString)(lpType);
|
56
56
|
const poolId = (_f = parsedLpType.keys) === null || _f === void 0 ? void 0 : _f.map((t) => t.type).join(', ');
|
57
57
|
const typeX = (_h = (_g = parsedLpType.keys) === null || _g === void 0 ? void 0 : _g.at(0)) === null || _h === void 0 ? void 0 : _h.type;
|
58
58
|
const typeY = (_k = (_j = parsedLpType.keys) === null || _j === void 0 ? void 0 : _j.at(1)) === null || _k === void 0 ? void 0 : _k.type;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"aptosLpJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/auxexchange/aptosLpJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,+
|
1
|
+
{"version":3,"file":"aptosLpJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/auxexchange/aptosLpJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,+DAKoC;AAGpC,6CAI2B;AAC3B,iDAAqD;AACrD,2CAA0E;AAC1E,8EAA2E;AAC3E,mHAA2F;AAC3F,qGAA6E;AAO7E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,wBAAc,GAAE,CAAC;IAChC,MAAM,SAAS,GAAG,MAAM,IAAA,2BAAmB,EAAC,MAAM,EAAE,qBAAS,CAAC,CAAC;IAC/D,IAAI,CAAC,SAAS;QAAE,OAAO;IAEvB,MAAM,eAAe,GAAuC,IAAI,GAAG,EAAE,CAAC;IACtE,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC7B,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACjD,SAAS;SACN,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;QAChB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,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AS,CAAC,CAAC;AAC9C,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,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;
|
@@ -94,12 +94,12 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
94
94
|
type: portfolio_core_1.PortfolioAssetType.generic,
|
95
95
|
networkId: portfolio_core_1.NetworkId.solana,
|
96
96
|
value: pnl.toNumber(),
|
97
|
+
imageUri: constants_3.usdcLogoUri,
|
97
98
|
attributes: {},
|
99
|
+
name: 'PnL',
|
98
100
|
data: {
|
99
101
|
amount: pnl.toNumber(),
|
100
102
|
price: 1,
|
101
|
-
name: 'PnL',
|
102
|
-
imageUri: constants_3.usdcLogoUri,
|
103
103
|
},
|
104
104
|
};
|
105
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;AACxD,0DAAyD;AAEzD,MAAM,QAAQ,GAAG,KAAK,CAAC;AACvB,MAAM,KAAK,GAA6B,IAAI,GAAG,EAAE,CAAC;AAClD,IAAI,eAAe,GAAG,CAAC,CAAC;AAExB,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,oBAAoB;IACpB,IAAI,eAAe,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,EAAE,CAAC;QAC5C,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,CAAW,2BAAe,EAAE;YAC7D,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;SACzB,CAAC,CAAC;QACH,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,aAAa,GAAG,MAAM,IAAA,iCAAe,EAAc,MAAM,EAAE,OAAO,CAAC,CAAC;YAC1E,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;;gBAC1B,IAAI,CAAA,MAAA,CAAC,CAAC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IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -20,23 +20,31 @@ const helpers_1 = require("./helpers");
|
|
20
20
|
const tokenPricesFromSqrt_1 = __importDefault(require("../../utils/clmm/tokenPricesFromSqrt"));
|
21
21
|
const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
|
22
22
|
const queryEvents_1 = require("../../utils/sui/queryEvents");
|
23
|
+
let lastFetchTime;
|
23
24
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
24
25
|
var _a;
|
25
26
|
const client = (0, clients_1.getClientSui)();
|
26
27
|
const eventsData = yield (0, queryEvents_1.queryEvents)(client, {
|
27
28
|
MoveEventType: constants_1.createPoolEvent,
|
29
|
+
TimeRange: lastFetchTime
|
30
|
+
? {
|
31
|
+
startTime: lastFetchTime.toString(),
|
32
|
+
endTime: Date.now().toString(),
|
33
|
+
}
|
34
|
+
: undefined,
|
28
35
|
});
|
36
|
+
lastFetchTime = Date.now();
|
29
37
|
const poolsAddresses = eventsData
|
30
38
|
.map((eventData) => eventData.parsedJson ? eventData.parsedJson.pool_id : [])
|
31
39
|
.flat();
|
32
40
|
const poolsObjects = yield (0, multiGetObjects_1.multiGetObjects)(client, poolsAddresses);
|
33
41
|
const promises = [];
|
34
42
|
const cacheItems = [];
|
35
|
-
for (
|
36
|
-
const poolId = (_a =
|
43
|
+
for (let i = 0; i < poolsObjects.length; i++) {
|
44
|
+
const poolId = (_a = poolsObjects[i].data) === null || _a === void 0 ? void 0 : _a.objectId;
|
37
45
|
if (!poolId)
|
38
46
|
continue;
|
39
|
-
const pool = (0, helpers_1.getPoolFromObject)(
|
47
|
+
const pool = (0, helpers_1.getPoolFromObject)(poolsObjects[i]);
|
40
48
|
if (!pool)
|
41
49
|
continue;
|
42
50
|
promises.push((0, tokenPricesFromSqrt_1.default)(cache, portfolio_core_1.NetworkId.sui, pool.poolAddress, new bignumber_js_1.default(pool.coinAmountA), new bignumber_js_1.default(pool.coinAmountB), new bignumber_js_1.default(pool.current_sqrt_price), pool.coinTypeA, pool.coinTypeB));
|
@@ -49,7 +57,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
49
57
|
prefix: constants_1.clmmPoolsPrefix,
|
50
58
|
networkId: portfolio_core_1.NetworkId.sui,
|
51
59
|
});
|
52
|
-
yield
|
60
|
+
yield Promise.all(promises);
|
53
61
|
});
|
54
62
|
const job = {
|
55
63
|
id: `${constants_1.platformId}-pools`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,iDAAmD;AACnD,2CAA2E;AAC3E,uCAA8C;AAC9C,+FAA4E;AAE5E,qEAAkE;AAClE,6DAA0D;AAE1D,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,UAAU,GAAG,MAAM,IAAA,yBAAW,EAAkB,MAAM,EAAE;QAC5D,aAAa,EAAE,2BAAe;
|
1
|
+
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,iDAAmD;AACnD,2CAA2E;AAC3E,uCAA8C;AAC9C,+FAA4E;AAE5E,qEAAkE;AAClE,6DAA0D;AAE1D,IAAI,aAAiC,CAAC;AAEtC,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,UAAU,GAAG,MAAM,IAAA,yBAA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,kBAAkB,CAAC,EACtC,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,SAAS,CACf,CACF,CAAC;QACF,UAAU,CAAC,IAAI,CAAC;YACd,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;IACL,CAAC;IAED,MAAM,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE;QAC/B,MAAM,EAAE,2BAAe;QACvB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;IAEH,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -18,11 +18,16 @@ const filters_1 = require("./filters");
|
|
18
18
|
const structs_1 = require("./structs");
|
19
19
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
20
|
const client = (0, clients_1.getClientSolana)();
|
21
|
-
const vaults = yield
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
const [vaults, spotMarkets] = yield Promise.all([
|
22
|
+
(0, solana_1.getParsedProgramAccounts)(client, structs_1.vaultStruct, constants_2.circuitPid, filters_1.vaultFilter),
|
23
|
+
cache.getItem(constants_1.keySpotMarkets, {
|
24
|
+
prefix: constants_1.platformId,
|
25
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
26
|
+
}),
|
27
|
+
]);
|
28
|
+
if (!spotMarkets)
|
29
|
+
return;
|
30
|
+
const cachedItems = [];
|
26
31
|
for (const vault of vaults) {
|
27
32
|
const name = (0, solana_1.u8ArrayToString)(vault.name);
|
28
33
|
const spotMarket = spotMarkets.find((sm) => sm.marketIndex === vault.spotMarketIndex);
|
@@ -31,8 +36,12 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
36
|
const mint = spotMarket.mint.toString();
|
32
37
|
const { decimals } = spotMarket;
|
33
38
|
const pubkey = vault.pubkey.toString();
|
34
|
-
|
39
|
+
cachedItems.push({ key: pubkey, value: { pubkey, name, mint, decimals } });
|
35
40
|
}
|
41
|
+
yield cache.setItems(cachedItems, {
|
42
|
+
prefix: constants_2.prefixVaults,
|
43
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
44
|
+
});
|
36
45
|
});
|
37
46
|
const job = {
|
38
47
|
id: `${constants_2.platformId}-vaults`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/circuit/vaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA+E;AAC/E,kDAG4B;AAC5B,2CAAmE;AACnE,uCAAwC;AACxC,uCAAwC;AAIxC,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,MAAM,GAAG,MAAM,IAAA,iCAAwB,
|
1
|
+
{"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/circuit/vaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA+E;AAC/E,kDAG4B;AAC5B,2CAAmE;AACnE,uCAAwC;AACxC,uCAAwC;AAIxC,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC9C,IAAA,iCAAwB,EAAC,MAAM,EAAE,qBAAW,EAAE,sBAAU,EAAE,qBAAW,CAAC;QACtE,KAAK,CAAC,OAAO,CAAuB,0BAAc,EAAE;YAClD,MAAM,EAAE,sBAAe;YACvB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC;KACH,CAAC,CAAC;IAEH,IAAI,CAAC,WAAW;QAAE,OAAO;IAEzB,MAAM,WAAW,GAAG,EAAE,CAAC;IACvB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,IAAA,wBAAe,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CACjC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,WAAW,KAAK,KAAK,CAAC,eAAe,CACjD,CAAC;QACF,IAAI,CAAC,UAAU;YAAE,SAAS;QAE1B,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACxC,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC;QAChC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACvC,WAAW,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED,MAAM,KAAK,CAAC,QAAQ,CAAY,WAAW,EAAE;QAC3C,MAAM,EAAE,wBAAY;QACpB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -143,8 +143,8 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
143
143
|
type: portfolio_core_1.PortfolioAssetType.generic,
|
144
144
|
networkId: portfolio_core_1.NetworkId.solana,
|
145
145
|
value: pnl,
|
146
|
+
name: (0, solana_1.u8ArrayToString)(market.name),
|
146
147
|
data: {
|
147
|
-
name: (0, solana_1.u8ArrayToString)(market.name),
|
148
148
|
address: mint || undefined,
|
149
149
|
},
|
150
150
|
attributes: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAaoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,2CAKqB;AACrB,qCAKkB;AAClB,uCAMmB;AAEnB,+CAM4B;AAC5B,iDAAsD;AACtD,qGAA6E;AAC7E,qDAGgC;AAChC,uDAAqE;AACrE,+CAAwD;AACxD,iEAA8D;AAC9D,+DAA4D;AAC5D,uEAAoE;AAEpE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,OAAO,CAC1C,0BAAc,EACd;QACE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CACF,CAAC;IACF,MAAM,iBAAiB,GAAoC,IAAI,GAAG,EAAE,CAAC;IACrE,MAAM,WAAW,GAAG,EAAE,CAAC;IACvB,MAAM,mCAAmC,GAAgB,EAAE,CAAC;IAC5D,MAAM,oBAAoB,GAAgB,EAAE,CAAC;IAC7C,KAAK,MAAM,cAAc,IAAI,gBAAgB,IAAI,EAAE,EAAE,CAAC;QACpD,mCAAmC,CAAC,cAAc,CAAC,WAAW,CAAC;YAC7D,IAAA,mDAAyC,EACvC,wBAAY,EACZ,IAAI,mBAAS,CAAC,KAAK,CAAC,EACpB,cAAc,CAAC,WAAW,CAC3B,CAAC;QACJ,oBAAoB,CAAC,IAAI,CACvB,IAAI,mBAAS,CAA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,0BAAS,CAAC,MAAM;gBAC3B,KAAK,EAAE,GAAG;gBACV,IAAI,EAAE
|
1
|
+
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAaoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,2CAKqB;AACrB,qCAKkB;AAClB,uCAMmB;AAEnB,+CAM4B;AAC5B,iDAAsD;AACtD,qGAA6E;AAC7E,qDAGgC;AAChC,uDAAqE;AACrE,+CAAwD;AACxD,iEAA8D;AAC9D,+DAA4D;AAC5D,uEAAoE;AAEpE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,OAAO,CAC1C,0BAAc,EACd;QACE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CACF,CAAC;IACF,MAAM,iBAAiB,GAAoC,IAAI,GAAG,EAAE,CAAC;IACrE,MAAM,WAAW,GAAG,EAAE,CAAC;IACvB,MAAM,mCAAmC,GAAgB,EAAE,CAAC;IAC5D,MAAM,oBAAoB,GAAgB,EAAE,CAAC;IAC7C,KAAK,MAAM,cAAc,IAAI,gBAAgB,IAAI,EAAE,EAAE,CAAC;QACpD,mCAAmC,CAAC,cAAc,CAAC,WAAW,CAAC;YAC7D,IAAA,mDAAyC,EACvC,wBAAY,EACZ,IAAI,mBAAS,CAAC,KAAK,CAAC,EACpB,cAAc,CAAC,WAAW,CAC3B,CAAC;QACJ,oBAAoB,CAAC,IAAI,CACvB,IAAI,mBAAS,CAAC,cAAc,CAAC,aAAa,CAAC,KAAK,CAAC,CAClD,CAAC;QACF,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QA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EACb,aAAa,EACb,KAAK,EACL,WAAW,EACX,WAAW,EACX,cAAc,GACf,GAAG,IAAA,wCAAuB,EAAC;YAC1B,cAAc;YACd,cAAc;YACd,YAAY;YACZ,eAAe;SAChB,CAAC,CAAC;QAEH,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;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,YAAY;gBACZ,WAAW;gBACX,WAAW;gBACX,SAAS,EAAE;oBACT,MAAM,EAAE,eAAe;oBACvB,KAAK,EAAE,cAAc;iBACtB;gBACD,KAAK;aACN;YACD,IAAI,EAAE,IAAA,wBAAe,EAAC,WAAW,CAAC,IAAI,CAAC;SACxC,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,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -16,7 +16,6 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
|
16
16
|
const constants_1 = require("./constants");
|
17
17
|
const clients_1 = require("../../utils/clients");
|
18
18
|
const getDynamicFieldObject_1 = require("../../utils/sui/getDynamicFieldObject");
|
19
|
-
const aptos_1 = require("../../utils/aptos");
|
20
19
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
21
20
|
const helpers_1 = require("./helpers");
|
22
21
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
@@ -59,7 +58,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
59
58
|
return null;
|
60
59
|
if (!((_f = v.data) === null || _f === void 0 ? void 0 : _f.type))
|
61
60
|
return null;
|
62
|
-
const { keys: coinType } = (0,
|
61
|
+
const { keys: coinType } = (0, portfolio_core_1.parseTypeString)((_g = v.data) === null || _g === void 0 ? void 0 : _g.type);
|
63
62
|
if (!coinType)
|
64
63
|
return null;
|
65
64
|
return {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/elixir/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/elixir/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAWoC;AAGpC,2CAMqB;AAErB,iDAAmD;AACnD,iFAA8E;AAE9E,qGAA6E;AAC7E,uCAGmB;AAEnB,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAClD,KAAK,CAAC,OAAO,CAA0B,qBAAS,EAAE;YAChD,MAAM,EAAE,wBAAY;YACpB,SAAS,EAAE,0BAAS,CAAC,GAAG;SACzB,CAAC;QACF,KAAK,CAAC,OAAO,CAAa,wBAAY,EAAE;YACtC,MAAM,EAAE,wBAAY;YACpB,SAAS,EAAE,0BAAS,CAAC,GAAG;SACzB,CAAC;KACH,CAAC,CAAC;IAEH,IAAI,CAAC,YAAY,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAC;IAE3C,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,GAAG,CACpC,YAAY,CAAC,GAAG,CAAC,CAAO,CAAC,EAAE,EAAE;;QAC3B,IA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;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -108,7 +108,8 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
108
108
|
networkId: portfolio_core_1.NetworkId.solana,
|
109
109
|
value: pnl,
|
110
110
|
attributes: {},
|
111
|
-
|
111
|
+
name: 'PNL ($)',
|
112
|
+
data: { amount: pnl, price: null },
|
112
113
|
});
|
113
114
|
// rewardAssets.push({
|
114
115
|
// type: 'generic',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,2CAA+D;AAC/D,iDAAsD;AACtD,+CAA8D;AAC9D,6DAAqE;AACrE,uCAAsD;AACtD,uCAA2C;AAE3C,yDAAmD;AAEnD,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AACzC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,mBAAmB,GAAG,MAAM,IAAA,iCAAwB,EACxD,MAAM,EACN,wBAAc,EACd,oBAAQ,EACR,IAAA,mCAAyB,EAAC,KAAK,CAAC,CACjC,CAAC;IACF,IACE,mBAAmB,CAAC,MAAM,KAAK,CAAC;QAChC,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAElE,OAAO,EAAE,CAAC;IAEZ,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,OAAO,CAAe,sBAAU,EAAE;QACjE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,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C,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACrC,MAAM,QAAQ,GAAG,UAAU,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAEpD,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;QAEnE,cAAc,CAAC,IAAI,CAAC;YAClB,IAAI,EAAE,OAAO;YACb,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,KAAK,EAAE,WAAW;YAClB,UAAU,EAAE,EAAE;YACd,IAAI,EAAE;gBACJ,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE;gBAC/B,OAAO,EAAE,iBAAiB,CAAC,IAAI;gBAC/B,KAAK,EAAE,sBAAsB;aAC9B;SACF,CAAC,CAAC;QACH,cAAc,CAAC,IAAI,CAAC;YAClB,IAAI,EAAE,OAAO;YACb,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,KAAK,EAAE,WAAW;YAClB,UAAU,EAAE,EAAE;YACd,IAAI,EAAE;gBACJ,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE;gBAC/B,OAAO,EAAE,aAAa,CAAC,IAAI;gBAC3B,KAAK,EAAE,WAAW;aACnB;SACF,CAAC,CAAC;QACH,YAAY,CAAC,IAAI,CAAC;YAChB,IAAI,EAAE,SAAS;YACf,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,KAAK,EAAE,GAAG;YACV,UAAU,EAAE,EAAE;YACd,IAAI,EAAE,
|
1
|
+
{"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,2CAA+D;AAC/D,iDAAsD;AACtD,+CAA8D;AAC9D,6DAAqE;AACrE,uCAAsD;AACtD,uCA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I,IAAI,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG;YAC7C,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,YAAY;gBACZ,WAAW;gBACX,WAAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,aAAa;IAC9B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -15,7 +15,6 @@ const clients_1 = require("../../utils/clients");
|
|
15
15
|
const getDynamicFields_1 = require("../../utils/sui/getDynamicFields");
|
16
16
|
const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
|
17
17
|
const getLpTokenSourceRaw_1 = require("../../utils/misc/getLpTokenSourceRaw");
|
18
|
-
const aptos_1 = require("../../utils/aptos");
|
19
18
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
19
|
const client = (0, clients_1.getClientSui)();
|
21
20
|
const pairIds = yield (0, getDynamicFields_1.getDynamicFields)(client, constants_1.pairsOwner).then((pairs) => pairs.map((p) => p.objectId));
|
@@ -31,15 +30,15 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
30
|
return null;
|
32
31
|
}
|
33
32
|
const enhancedPairInfo = (_d = (_c = pairInfo.data) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.fields.value.fields;
|
34
|
-
const { keys: coinTypeX } = (0,
|
33
|
+
const { keys: coinTypeX } = (0, portfolio_core_1.parseTypeString)(enhancedPairInfo.reserve_x.type);
|
35
34
|
if (coinTypeX) {
|
36
35
|
enhancedPairInfo.reserve_x.coinType = coinTypeX[0].type;
|
37
36
|
}
|
38
|
-
const { keys: coinTypeY } = (0,
|
37
|
+
const { keys: coinTypeY } = (0, portfolio_core_1.parseTypeString)(enhancedPairInfo.reserve_y.type);
|
39
38
|
if (coinTypeY) {
|
40
39
|
enhancedPairInfo.reserve_y.coinType = coinTypeY[0].type;
|
41
40
|
}
|
42
|
-
const { keys: coinType } = (0,
|
41
|
+
const { keys: coinType } = (0, portfolio_core_1.parseTypeString)(enhancedPairInfo.lp_supply.type);
|
43
42
|
if (coinType) {
|
44
43
|
enhancedPairInfo.coinType = coinType[0].type;
|
45
44
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"poolJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flowx/poolJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"poolJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flowx/poolJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAKoC;AAGpC,2CAAiE;AACjE,iDAAmD;AACnD,uEAAoE;AACpE,qEAAkE;AAClE,8EAA2E;AAG3E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,OAAO,GAAG,MAAM,IAAA,mCAAgB,EAAC,MAAM,EAAE,sBAAU,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CACxE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAC7B,CAAC;IACF,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAEjC,MAAM,SAAS,GAAuB,EAAE,CAAC;IAEzC,MAAM,WAAW,GAAG,MAAM,IAAA,iCAAe,EAAa,MAAM,EAAE,OAAO,EAAE;QACrE,WAAW,EAAE,IAAI;KAClB,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,CAA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B,UAAU,EAAV,sBAAU;YACV,gBAAgB,EAAE,IAAI;YACtB,SAAS,EAAE;gBACT,OAAO,EAAE,QAAQ,CAAC,QAAQ;gBAC1B,QAAQ,EAAE,sBAAU;gBACpB,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK;aAC3C;YACD,kBAAkB,EAAE;gBAClB;oBACE,OAAO,EAAE,IAAA,mCAAkB,EACzB,QAAQ,CAAC,SAAS,CAAC,QAAQ,EAC3B,0BAAS,CAAC,GAAG,CACd;oBACD,QAAQ,EAAE,WAAW,CAAC,QAAQ;oBAC9B,gBAAgB,EAAE,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO;oBACnD,MAAM,EAAE,GAAG;oBACX,UAAU,EAAE,WAAW;iBACxB;gBACD;oBACE,OAAO,EAAE,IAAA,mCAAkB,EACzB,QAAQ,CAAC,SAAS,CAAC,QAAQ,EAC3B,0BAAS,CAAC,GAAG,CACd;oBACD,QAAQ,EAAE,WAAW,CAAC,QAAQ;oBAC9B,gBAAgB,EAAE,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO;oBACnD,MAAM,EAAE,GAAG;oBACX,UAAU,EAAE,WAAW;iBACxB;aACF;SACF,CAAC,CAAC;QAEH,SAAS,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,MAAM,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAC9C,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -14,7 +14,6 @@ const constants_1 = require("./constants");
|
|
14
14
|
const getDynamicFields_1 = require("../../utils/sui/getDynamicFields");
|
15
15
|
const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
|
16
16
|
const clients_1 = require("../../utils/clients");
|
17
|
-
const aptos_1 = require("../../utils/aptos");
|
18
17
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
19
18
|
var _a, _b, _c, _d;
|
20
19
|
const client = (0, clients_1.getClientSui)();
|
@@ -30,8 +29,8 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
30
29
|
const poolId = (_d = (_c = poolObject.data) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.fields.name;
|
31
30
|
if (!poolId)
|
32
31
|
continue;
|
33
|
-
const { keys: coinTypeLpToken } = (0,
|
34
|
-
const { keys: coinTypeRewardToken } = (0,
|
32
|
+
const { keys: coinTypeLpToken } = (0, portfolio_core_1.parseTypeString)(poolObjectFields.lp_custodian.type);
|
33
|
+
const { keys: coinTypeRewardToken } = (0, portfolio_core_1.parseTypeString)(poolObjectFields.reward_token_custodian.type);
|
35
34
|
if (!coinTypeLpToken || !coinTypeRewardToken)
|
36
35
|
continue;
|
37
36
|
pools[Number(poolId)] = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stakingPoolJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flowx/stakingPoolJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"stakingPoolJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flowx/stakingPoolJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAwE;AAGxE,2CAA4E;AAC5E,uEAAoE;AACpE,qEAAkE;AAClE,iDAAmD;AAGnD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACnC,IAAA,mCAAgB,EAAC,MAAM,EAAE,sBAAU,CAAC,CAAC,IAAI,CAAC,CAAC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