@sonarwatch/portfolio-plugins 0.14.32 → 0.14.34
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/src/plugins/alphafi/positionsFetcher.js +1 -1
- package/src/plugins/alphafi/positionsFetcher.js.map +1 -1
- package/src/plugins/cetus/vaultsJob.js +1 -0
- package/src/plugins/cetus/vaultsJob.js.map +1 -1
- package/src/plugins/elixir/positionsFetcher.js +29 -51
- package/src/plugins/elixir/positionsFetcher.js.map +1 -1
- package/src/plugins/flash/helpers.d.ts +1 -1
- package/src/plugins/flash/helpers.js +2 -2
- package/src/plugins/flash/helpers.js.map +1 -1
- package/src/plugins/flash/poolJob.js +25 -5
- package/src/plugins/flash/poolJob.js.map +1 -1
- package/src/plugins/flash/structs.d.ts +4 -0
- package/src/plugins/flash/structs.js +4 -0
- package/src/plugins/flash/structs.js.map +1 -1
- package/src/plugins/flash/types.d.ts +1 -0
- package/src/plugins/haedal/vaultFetcher.js +1 -2
- package/src/plugins/haedal/vaultFetcher.js.map +1 -1
- package/src/plugins/kai/vaultsJob.js +1 -2
- package/src/plugins/kai/vaultsJob.js.map +1 -1
- package/src/plugins/kriya/vaultsFetcher.js +1 -2
- package/src/plugins/kriya/vaultsFetcher.js.map +1 -1
- package/src/plugins/metaplex/resizableNftFetcher.js +3 -1
- package/src/plugins/metaplex/resizableNftFetcher.js.map +1 -1
- package/src/plugins/mole/depositsFetcher.js +1 -1
- package/src/plugins/mole/depositsFetcher.js.map +1 -1
- package/src/plugins/tensor/airdropPowerUsersFetcher.js +25 -21
- package/src/plugins/tensor/airdropPowerUsersFetcher.js.map +1 -1
- package/src/plugins/tensor/constants.d.ts +1 -3
- package/src/plugins/tensor/constants.js +2 -4
- package/src/plugins/tensor/constants.js.map +1 -1
- package/src/plugins/tensor/filters.d.ts +1 -1
- package/src/plugins/tensor/filters.js +5 -5
- package/src/plugins/tensor/filters.js.map +1 -1
- package/src/plugins/tensor/helpers.d.ts +1 -1
- package/src/plugins/tensor/helpers.js +4 -7
- package/src/plugins/tensor/helpers.js.map +1 -1
- package/src/plugins/tensor/sharedEscrowFetcher.js +14 -18
- package/src/plugins/tensor/sharedEscrowFetcher.js.map +1 -1
- package/src/plugins/tensor/struct.d.ts +5 -0
- package/src/plugins/tensor/struct.js +5 -1
- package/src/plugins/tensor/struct.js.map +1 -1
- package/src/plugins/thala/farmingPoolsFetcher.js +14 -50
- package/src/plugins/thala/farmingPoolsFetcher.js.map +1 -1
- package/src/plugins/tokens/fetchers/sui.js +3 -3
- package/src/plugins/tokens/fetchers/sui.js.map +1 -1
- package/src/plugins/tokens/helpers.d.ts +3 -2
- package/src/plugins/tokens/helpers.js +5 -4
- package/src/plugins/tokens/helpers.js.map +1 -1
- package/src/plugins/turbos/clmmVaultFetcher.js +1 -2
- package/src/plugins/turbos/clmmVaultFetcher.js.map +1 -1
- package/src/plugins/typus/safuFetcher.js +2 -2
- package/src/plugins/typus/safuFetcher.js.map +1 -1
- package/src/plugins/typus/vaultsFetcher.js +1 -1
- package/src/plugins/typus/vaultsFetcher.js.map +1 -1
- package/src/utils/elementbuilder/AssetBuilder.d.ts +2 -1
- package/src/utils/elementbuilder/AssetBuilder.js +14 -2
- package/src/utils/elementbuilder/AssetBuilder.js.map +1 -1
- package/src/utils/elementbuilder/ElementLiquidityBuilder.d.ts +2 -1
- package/src/utils/elementbuilder/ElementLiquidityBuilder.js +2 -2
- package/src/utils/elementbuilder/ElementLiquidityBuilder.js.map +1 -1
- package/src/utils/elementbuilder/LiquidityBuilder.d.ts +3 -1
- package/src/utils/elementbuilder/LiquidityBuilder.js +5 -2
- package/src/utils/elementbuilder/LiquidityBuilder.js.map +1 -1
- package/src/utils/elementbuilder/LiquidityParams.d.ts +3 -0
- package/src/utils/elementbuilder/LiquidityParams.js +3 -0
- package/src/utils/elementbuilder/LiquidityParams.js.map +1 -0
- package/src/plugins/elixir/helpers.d.ts +0 -2
- package/src/plugins/elixir/helpers.js +0 -40
- package/src/plugins/elixir/helpers.js.map +0 -1
@@ -8,33 +8,37 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
9
|
});
|
10
10
|
};
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
-
};
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
12
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
|
+
const web3_js_1 = require("@solana/web3.js");
|
16
14
|
const constants_1 = require("./constants");
|
15
|
+
const clients_1 = require("../../utils/clients");
|
16
|
+
const solana_1 = require("../../utils/solana");
|
17
|
+
const struct_1 = require("./struct");
|
18
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
17
19
|
const helpers_1 = require("./helpers");
|
18
|
-
const
|
20
|
+
const filters_1 = require("./filters");
|
19
21
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
|
-
|
21
|
-
|
22
|
+
if (!(0, helpers_1.ownerHasPowerUserAllocation)(owner))
|
23
|
+
return [];
|
24
|
+
const connection = (0, clients_1.getClientSolana)();
|
25
|
+
const accounts = yield (0, solana_1.getParsedProgramAccounts)(connection, struct_1.vestingAccountStruct, new web3_js_1.PublicKey(constants_1.magmaProgramId), (0, filters_1.vestingFilter)(owner), 1);
|
26
|
+
if (!accounts.length)
|
27
|
+
return [];
|
28
|
+
const tokenAccounts = yield connection.getParsedTokenAccountsByOwner(accounts[0].pubkey, { mint: new web3_js_1.PublicKey(constants_1.tnsrMint) });
|
29
|
+
if (!tokenAccounts.value[0])
|
22
30
|
return [];
|
23
|
-
const
|
24
|
-
const
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
},
|
35
|
-
value: asset.value,
|
36
|
-
},
|
37
|
-
];
|
31
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
32
|
+
const element = elementRegistry.addElementMultiple({
|
33
|
+
label: 'Airdrop',
|
34
|
+
name: 'Power User',
|
35
|
+
});
|
36
|
+
element.addAsset({
|
37
|
+
address: tokenAccounts.value[0].account.data.parsed.info.mint,
|
38
|
+
amount: tokenAccounts.value[0].account.data.parsed.info.tokenAmount.uiAmount,
|
39
|
+
alreadyShifted: true,
|
40
|
+
});
|
41
|
+
return elementRegistry.getElements(cache);
|
38
42
|
});
|
39
43
|
const fetcher = {
|
40
44
|
id: `${constants_1.platformId}-airdrop-power-users`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"airdropPowerUsersFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/airdropPowerUsersFetcher.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"airdropPowerUsersFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/airdropPowerUsersFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAG5C,2CAAmE;AACnE,iDAAsD;AACtD,+CAA8D;AAC9D,qCAAgD;AAChD,gFAA6E;AAC7E,uCAAwD;AACxD,uCAA0C;AAE1C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,IAAI,CAAC,IAAA,qCAA2B,EAAC,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnD,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,UAAU,EACV,6BAAoB,EACpB,IAAI,mBAAS,CAAC,0BAAc,CAAC,EAC7B,IAAA,uBAAa,EAAC,KAAK,CAAC,EACpB,CAAC,CACF,CAAC;IAEF,IAAI,CAAC,QAAQ,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAEhC,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,6BAA6B,CAClE,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,EAClB,EAAE,IAAI,EAAE,IAAI,mBAAS,CAAC,oBAAQ,CAAC,EAAE,CAClC,CAAC;IAEF,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QAAE,OAAO,EAAE,CAAC;IAEvC,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAE1E,MAAM,OAAO,GAAG,eAAe,CAAC,kBAAkB,CAAC;QACjD,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,YAAY;KACnB,CAAC,CAAC;IAEH,OAAO,CAAC,QAAQ,CAAC;QACf,OAAO,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI;QAC7D,MAAM,EACJ,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ;QACtE,cAAc,EAAE,IAAI;KACrB,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,sBAAsB;IACvC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -2,8 +2,6 @@ import { PublicKey } from '@solana/web3.js';
|
|
2
2
|
import { Platform } from '@sonarwatch/portfolio-core';
|
3
3
|
export declare const platformId = "tensor";
|
4
4
|
export declare const platform: Platform;
|
5
|
-
export declare const cachePrefix = "tensor";
|
6
5
|
export declare const tensorPid: PublicKey;
|
7
|
-
export declare const locksPid: PublicKey;
|
8
6
|
export declare const tnsrMint = "TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6";
|
9
|
-
export declare const
|
7
|
+
export declare const magmaProgramId = "3zK38YBP6u3BpLUpaa6QhRHh4VXdv3J8cmD24fFpuyqy";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.magmaProgramId = exports.tnsrMint = exports.tensorPid = exports.platform = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.platformId = 'tensor';
|
6
6
|
exports.platform = {
|
@@ -10,9 +10,7 @@ exports.platform = {
|
|
10
10
|
twitter: 'https://twitter.com/tensor_hq',
|
11
11
|
website: 'https://www.tensor.trade/',
|
12
12
|
};
|
13
|
-
exports.cachePrefix = 'tensor';
|
14
13
|
exports.tensorPid = new web3_js_1.PublicKey('TSWAPaqyCSx2KABk68Shruf4rp7CxcNi8hAsbdwmHbN');
|
15
|
-
exports.locksPid = new web3_js_1.PublicKey('TLoCKic2wGJm7VhZKumih4Lc35fUhYqVMgA4j389Buk');
|
16
14
|
exports.tnsrMint = 'TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6';
|
17
|
-
exports.
|
15
|
+
exports.magmaProgramId = '3zK38YBP6u3BpLUpaa6QhRHh4VXdv3J8cmD24fFpuyqy';
|
18
16
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,+CAA+C;IACtD,OAAO,EAAE,+BAA+B;IACxC,OAAO,EAAE,2BAA2B;CACrC,CAAC;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,+CAA+C;IACtD,OAAO,EAAE,+BAA+B;IACxC,OAAO,EAAE,2BAA2B;CACrC,CAAC;AAEW,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,QAAQ,GAAG,6CAA6C,CAAC;AAEzD,QAAA,cAAc,GAAG,8CAA8C,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { GetProgramAccountsFilter } from '@solana/web3.js';
|
2
2
|
export declare const singleListingFilter: (owner: string) => GetProgramAccountsFilter[];
|
3
3
|
export declare const poolFilter: (owner: string) => GetProgramAccountsFilter[];
|
4
|
-
export declare const
|
4
|
+
export declare const vestingFilter: (owner: string) => GetProgramAccountsFilter[];
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.vestingFilter = exports.poolFilter = exports.singleListingFilter = void 0;
|
4
4
|
const struct_1 = require("./struct");
|
5
5
|
const singleListingFilter = (owner) => [
|
6
6
|
{ dataSize: struct_1.singleListingStruct.byteSize },
|
@@ -22,14 +22,14 @@ const poolFilter = (owner) => [
|
|
22
22
|
},
|
23
23
|
];
|
24
24
|
exports.poolFilter = poolFilter;
|
25
|
-
const
|
26
|
-
{ dataSize: 472 },
|
25
|
+
const vestingFilter = (owner) => [
|
27
26
|
{
|
28
27
|
memcmp: {
|
28
|
+
offset: 8,
|
29
29
|
bytes: owner,
|
30
|
-
offset: 47,
|
31
30
|
},
|
32
31
|
},
|
32
|
+
{ dataSize: 269 },
|
33
33
|
];
|
34
|
-
exports.
|
34
|
+
exports.vestingFilter = vestingFilter;
|
35
35
|
//# sourceMappingURL=filters.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/filters.ts"],"names":[],"mappings":";;;AACA,qCAA+C;AAExC,MAAM,mBAAmB,GAAG,CACjC,KAAa,EACe,EAAE,CAAC;IAC/B,EAAE,QAAQ,EAAE,4BAAmB,CAAC,QAAQ,EAAE;IAC1C;QACE,MAAM,EAAE;YACN,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,CAAC;SACV;KACF;CACF,CAAC;AAVW,QAAA,mBAAmB,uBAU9B;AAEK,MAAM,UAAU,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACvE,EAAE,QAAQ,EAAE,GAAG,EAAE;IACjB;QACE,MAAM,EAAE;YACN,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,EAAE;SACX;KACF;CACF,CAAC;AARW,QAAA,UAAU,cAQrB;AAEK,MAAM,
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/filters.ts"],"names":[],"mappings":";;;AACA,qCAA+C;AAExC,MAAM,mBAAmB,GAAG,CACjC,KAAa,EACe,EAAE,CAAC;IAC/B,EAAE,QAAQ,EAAE,4BAAmB,CAAC,QAAQ,EAAE;IAC1C;QACE,MAAM,EAAE;YACN,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,CAAC;SACV;KACF;CACF,CAAC;AAVW,QAAA,mBAAmB,uBAU9B;AAEK,MAAM,UAAU,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACvE,EAAE,QAAQ,EAAE,GAAG,EAAE;IACjB;QACE,MAAM,EAAE;YACN,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,EAAE;SACX;KACF;CACF,CAAC;AARW,QAAA,UAAU,cAQrB;AAEK,MAAM,aAAa,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IAC1E;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AARW,QAAA,aAAa,iBAQxB"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { PublicKey } from '@solana/web3.js';
|
2
|
-
export declare function
|
2
|
+
export declare function ownerHasPowerUserAllocation(owner: string): boolean;
|
3
3
|
export declare const findMarginPDA: (owner: string) => PublicKey;
|
@@ -3,19 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.findMarginPDA = exports.
|
6
|
+
exports.findMarginPDA = exports.ownerHasPowerUserAllocation = void 0;
|
7
7
|
const bn_js_1 = __importDefault(require("bn.js"));
|
8
8
|
const web3_js_1 = require("@solana/web3.js");
|
9
9
|
const powerUsers_json_1 = __importDefault(require("./powerUsers.json"));
|
10
10
|
const constants_1 = require("./constants");
|
11
|
-
function
|
11
|
+
function ownerHasPowerUserAllocation(owner) {
|
12
12
|
const users = powerUsers_json_1.default;
|
13
|
-
|
14
|
-
if (!amount)
|
15
|
-
return undefined;
|
16
|
-
return amount;
|
13
|
+
return users[owner] !== null;
|
17
14
|
}
|
18
|
-
exports.
|
15
|
+
exports.ownerHasPowerUserAllocation = ownerHasPowerUserAllocation;
|
19
16
|
const findMarginPDA = (owner) => web3_js_1.PublicKey.findProgramAddressSync([
|
20
17
|
Buffer.from('margin'),
|
21
18
|
web3_js_1.PublicKey.findProgramAddressSync([], constants_1.tensorPid)[0].toBytes(),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAuB;AACvB,6CAA4C;AAC5C,wEAA2C;AAC3C,2CAAwC;AAExC,SAAgB,
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAuB;AACvB,6CAA4C;AAC5C,wEAA2C;AAC3C,2CAAwC;AAExC,SAAgB,2BAA2B,CAAC,KAAa;IACvD,MAAM,KAAK,GAA8B,yBAAU,CAAC;IACpD,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;AAC/B,CAAC;AAHD,kEAGC;AAEM,MAAM,aAAa,GAAG,CAAC,KAAa,EAAE,EAAE,CAC7C,mBAAS,CAAC,sBAAsB,CAC9B;IACE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACrB,mBAAS,CAAC,sBAAsB,CAAC,EAAE,EAAE,qBAAS,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE;IAC5D,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE;IAC9B,8DAA8D;IAC9D,IAAI,eAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,UAAiB,EAAE,IAAI,EAAE,CAAC,CAAC;CAClD,EACD,qBAAS,CACV,CAAC,CAAC,CAAC,CAAC;AAVM,QAAA,aAAa,iBAUnB"}
|
@@ -16,8 +16,8 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
|
16
16
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
17
17
|
const constants_1 = require("./constants");
|
18
18
|
const clients_1 = require("../../utils/clients");
|
19
|
-
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
20
19
|
const helpers_1 = require("./helpers");
|
20
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
21
21
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
22
22
|
const client = (0, clients_1.getClientSolana)();
|
23
23
|
const marginPDA = (0, helpers_1.findMarginPDA)(owner);
|
@@ -25,23 +25,19 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
25
25
|
if (!solRawBalance || solRawBalance === 0)
|
26
26
|
return [];
|
27
27
|
const rent = yield client.getMinimumBalanceForRentExemption(8);
|
28
|
-
const
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
value: asset.value,
|
42
|
-
data: { assets: [asset] },
|
43
|
-
},
|
44
|
-
];
|
28
|
+
const amount = new bignumber_js_1.default(solRawBalance).minus(rent);
|
29
|
+
if (amount.lte(1000000))
|
30
|
+
return [];
|
31
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
32
|
+
const element = elementRegistry.addElementMultiple({
|
33
|
+
label: 'Deposit',
|
34
|
+
name: 'Shared Escrow',
|
35
|
+
});
|
36
|
+
element.addAsset({
|
37
|
+
address: portfolio_core_1.solanaNativeAddress,
|
38
|
+
amount,
|
39
|
+
});
|
40
|
+
return elementRegistry.getElements(cache);
|
45
41
|
});
|
46
42
|
const fetcher = {
|
47
43
|
id: `${constants_1.platformId}-shared-escrow`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sharedEscrowFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/sharedEscrowFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"sharedEscrowFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/sharedEscrowFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA4E;AAC5E,gEAAqC;AAGrC,2CAAyC;AACzC,iDAAsD;AACtD,uCAA0C;AAC1C,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,SAAS,GAAG,IAAA,uBAAa,EAAC,KAAK,CAAC,CAAC;IAEvC,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAEzD,IAAI,CAAC,aAAa,IAAI,aAAa,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,iCAAiC,CAAC,CAAC,CAAC,CAAC;IAE/D,MAAM,MAAM,GAAG,IAAI,sBAAS,CAAC,aAAa,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAExD,IAAI,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAE1E,MAAM,OAAO,GAAG,eAAe,CAAC,kBAAkB,CAAC;QACjD,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,eAAe;KACtB,CAAC,CAAC;IAEH,OAAO,CAAC,QAAQ,CAAC;QACf,OAAO,EAAE,oCAAmB;QAC5B,MAAM;KACP,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AACF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,gBAAgB;IACjC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -89,3 +89,8 @@ export type OrderStateLock = {
|
|
89
89
|
reserved: number[];
|
90
90
|
};
|
91
91
|
export declare const orderStateLockStruct: BeetStruct<OrderStateLock, Partial<OrderStateLock>>;
|
92
|
+
export type VestingAccount = {
|
93
|
+
padding: Buffer;
|
94
|
+
owner: PublicKey;
|
95
|
+
};
|
96
|
+
export declare const vestingAccountStruct: BeetStruct<VestingAccount, Partial<VestingAccount>>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.orderStateLockStruct = exports.OrderType = exports.poolStruct = exports.tSwapStruct = exports.tSwapConfigStruct = exports.poolConfigStruct = exports.CurveType = exports.PoolType = exports.singleListingStruct = void 0;
|
3
|
+
exports.vestingAccountStruct = exports.orderStateLockStruct = exports.OrderType = exports.poolStruct = exports.tSwapStruct = exports.tSwapConfigStruct = exports.poolConfigStruct = exports.CurveType = exports.PoolType = exports.singleListingStruct = void 0;
|
4
4
|
const beet_1 = require("@metaplex-foundation/beet");
|
5
5
|
const beet_solana_1 = require("@metaplex-foundation/beet-solana");
|
6
6
|
const solana_1 = require("../../utils/solana");
|
@@ -86,4 +86,8 @@ exports.orderStateLockStruct = new beet_1.BeetStruct([
|
|
86
86
|
['takerWithdrawnFunds', solana_1.u64],
|
87
87
|
['reserved', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 128)],
|
88
88
|
], (args) => args);
|
89
|
+
exports.vestingAccountStruct = new beet_1.BeetStruct([
|
90
|
+
['padding', (0, solana_1.blob)(8)],
|
91
|
+
['owner', beet_solana_1.publicKey],
|
92
|
+
], (args) => args);
|
89
93
|
//# sourceMappingURL=struct.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"struct.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/struct.ts"],"names":[],"mappings":";;;AAAA,oDAOmC;AACnC,kEAA6D;AAG7D,+CAAoD;AAavC,QAAA,mBAAmB,GAAG,IAAI,iBAAU,CAC/C;IACE,CAAC,SAAS,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACpB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,SAAS,EAAE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AAE,YAAG,CAAC;IAClB,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,UAAU,EAAE,UAAG,CAAC;IACjB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,UAAU,EAAE,YAAG,CAAC;IACjB,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,oBAAoB,EAAE,WAAI,CAAC;IAC5B,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,eAAe,EAAE,UAAG,CAAC;IACtB,CAAC,mBAAmB,EAAE,YAAG,CAAC;IAC1B,CAAC,oBAAoB,EAAE,UAAG,CAAC;IAC3B,CAAC,qBAAqB,EAAE,YAAG,CAAC;IAC5B,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,GAAG,CAAC,CAAC;CAC7C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAsB,CACjC,CAAC;AAOW,QAAA,oBAAoB,GAAG,IAAI,iBAAU,CAChD;IACE,CAAC,SAAS,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACpB,CAAC,OAAO,EAAE,uBAAS,CAAC;CACrB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAsB,CACjC,CAAC"}
|
@@ -8,16 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
9
|
});
|
10
10
|
};
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
-
};
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
12
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
|
-
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
17
13
|
const constants_1 = require("./constants");
|
18
14
|
const aptos_1 = require("../../utils/aptos");
|
19
15
|
const clients_1 = require("../../utils/clients");
|
20
|
-
const
|
16
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
21
17
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
22
18
|
const client = (0, clients_1.getClientAptos)();
|
23
19
|
const [farmingPools, resources] = yield Promise.all([
|
@@ -92,56 +88,24 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
92
88
|
})));
|
93
89
|
if (!stakedTokens || stakedTokens.length === 0)
|
94
90
|
return [];
|
95
|
-
const
|
96
|
-
|
97
|
-
|
98
|
-
st.rewards.forEach((r) => tokenMints.add(r.coinType));
|
91
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.aptos, constants_1.platformId);
|
92
|
+
const element = elementRegistry.addElementLiquidity({
|
93
|
+
label: 'Farming',
|
99
94
|
});
|
100
|
-
const tokenPrices = yield cache.getTokenPricesAsMap([...tokenMints], portfolio_core_1.NetworkId.aptos);
|
101
|
-
const liquidities = [];
|
102
95
|
stakedTokens.forEach((stakedToken) => {
|
103
|
-
const
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
const asset = (0, tokenPriceToAssetToken_1.default)(stakedToken.coinType, new bignumber_js_1.default(stakedToken.amount)
|
108
|
-
.dividedBy(Math.pow(10, tokenPrice.decimals))
|
109
|
-
.toNumber(), portfolio_core_1.NetworkId.aptos, tokenPrice);
|
110
|
-
stakedToken.rewards.forEach((r) => {
|
111
|
-
if (r.amount === '0')
|
112
|
-
return;
|
113
|
-
const rewardTokenPrice = tokenPrices.get((0, portfolio_core_1.formatMoveTokenAddress)(r.coinType));
|
114
|
-
if (!rewardTokenPrice)
|
115
|
-
return;
|
116
|
-
rewardAssets.push((0, tokenPriceToAssetToken_1.default)(r.coinType, new bignumber_js_1.default(r.amount)
|
117
|
-
.dividedBy(Math.pow(10, rewardTokenPrice.decimals))
|
118
|
-
.toNumber(), portfolio_core_1.NetworkId.aptos, rewardTokenPrice));
|
96
|
+
const liquidity = element.addLiquidity();
|
97
|
+
liquidity.addAsset({
|
98
|
+
address: stakedToken.coinType,
|
99
|
+
amount: stakedToken.amount,
|
119
100
|
});
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
rewardAssets,
|
126
|
-
rewardAssetsValue,
|
127
|
-
value,
|
128
|
-
yields: [],
|
101
|
+
stakedToken.rewards.forEach((r) => {
|
102
|
+
liquidity.addRewardAsset({
|
103
|
+
address: r.coinType,
|
104
|
+
amount: r.amount,
|
105
|
+
});
|
129
106
|
});
|
130
107
|
});
|
131
|
-
|
132
|
-
return [];
|
133
|
-
return [
|
134
|
-
{
|
135
|
-
networkId: portfolio_core_1.NetworkId.aptos,
|
136
|
-
label: 'Farming',
|
137
|
-
platformId: constants_1.platformId,
|
138
|
-
type: portfolio_core_1.PortfolioElementType.liquidity,
|
139
|
-
value: (0, portfolio_core_1.getUsdValueSum)(liquidities.map((a) => a.value)),
|
140
|
-
data: {
|
141
|
-
liquidities,
|
142
|
-
},
|
143
|
-
},
|
144
|
-
];
|
108
|
+
return elementRegistry.getElements(cache);
|
145
109
|
});
|
146
110
|
const fetcher = {
|
147
111
|
id: `${constants_1.platformId}-farming-pools`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"farmingPoolsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/thala/farmingPoolsFetcher.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"farmingPoolsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/thala/farmingPoolsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAwE;AAGxE,2CAKqB;AACrB,6CAK2B;AAC3B,iDAAqD;AAErD,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,wBAAc,GAAE,CAAC;IAEhC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AC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,gBAAgB;IACjC,SAAS,EAAE,0BAAS,CAAC,KAAK;IAC1B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -45,7 +45,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
45
45
|
yields: [],
|
46
46
|
name: tokenPrice.liquidityName,
|
47
47
|
};
|
48
|
-
const tag = (0, helpers_1.getLpTag)(tokenPrice.platformId, tokenPrice.elementName);
|
48
|
+
const tag = (0, helpers_1.getLpTag)(tokenPrice.platformId, tokenPrice.elementName, tokenPrice.label);
|
49
49
|
if (!liquiditiesByTag[tag]) {
|
50
50
|
liquiditiesByTag[tag] = [];
|
51
51
|
}
|
@@ -70,13 +70,13 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
70
70
|
elements.push(walletTokensElement);
|
71
71
|
}
|
72
72
|
for (const [tag, liquidities] of Object.entries(liquiditiesByTag)) {
|
73
|
-
const { platformId, elementName } = (0, helpers_1.parseLpTag)(tag);
|
73
|
+
const { platformId, elementName, label } = (0, helpers_1.parseLpTag)(tag);
|
74
74
|
elements.push({
|
75
75
|
type: portfolio_core_1.PortfolioElementType.liquidity,
|
76
76
|
networkId: portfolio_core_1.NetworkId.sui,
|
77
77
|
platformId,
|
78
78
|
name: elementName,
|
79
|
-
label: 'LiquidityPool',
|
79
|
+
label: label !== null && label !== void 0 ? label : 'LiquidityPool',
|
80
80
|
value: (0, portfolio_core_1.getUsdValueSum)(liquidities.map((a) => a.value)),
|
81
81
|
data: {
|
82
82
|
liquidities,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sui.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/sui.ts"],"names":[],"mappings":";;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,EACpC,QAAQ,EACR,MAAM,EACN,0BAAS,CAAC,GAAG,EACb,UAAU,CACX,CAAC;YACF,MAAM,SAAS,GAAuB;gBACpC,MAAM;gBACN,WAAW,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACvD,YAAY,EAAE,EAAE;gBAChB,iBAAiB,EAAE,CAAC;gBACpB,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACjD,MAAM,EAAE,EAAE;gBACV,IAAI,EAAE,UAAU,CAAC,aAAa;aAC/B,CAAC;YACF,MAAM,GAAG,GAAG,IAAA,kBAAQ,
|
1
|
+
{"version":3,"file":"sui.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/sui.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AAIpC,oDAAsD;AACtD,wGAAgF;AAChF,4CAAoD;AACpD,0GAAkF;AAClF,wCAAkD;AAElD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAE7D,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACpD,CAAC,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,EACpD,0BAAS,CAAC,GAAG,CACd,CAAC;IAEF,MAAM,kBAAkB,GAA0B,EAAE,CAAC;IACrD,MAAM,gBAAgB,GAAyC,EAAE,CAAC;IAClE,KAAK,IAAI,C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aAAL,KAAK,cAAL,KAAK,GAAI,eAAe;YAC/B,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACtD,IAAI,EAAE;gBACJ,WAAW;aACZ;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,gCAAoB,CAAC,EAAE,MAAM;IACpC,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -1,12 +1,13 @@
|
|
1
|
-
import { NetworkIdType, TokenPriceSource, UniTokenList, UniTokenListVersion } from '@sonarwatch/portfolio-core';
|
1
|
+
import { NetworkIdType, PortfolioElementLabel, TokenPriceSource, UniTokenList, UniTokenListVersion } from '@sonarwatch/portfolio-core';
|
2
2
|
import { TokenData } from './types';
|
3
3
|
export declare function compareVersion(versionA: UniTokenListVersion, versionB: UniTokenListVersion): 1 | -1 | 0;
|
4
4
|
export declare function isLatestVersion(newVersion: UniTokenListVersion, oldVersion: UniTokenListVersion): boolean;
|
5
5
|
export declare function getCoingeckoSources(networkId: NetworkIdType, tokensData: TokenData[]): Promise<TokenPriceSource[]>;
|
6
6
|
export declare function getTokensData(tokenList: UniTokenList): TokenData[];
|
7
7
|
export declare const lpTagSeparator = "<|>";
|
8
|
-
export declare function getLpTag(platformId: string, elementName?: string): string;
|
8
|
+
export declare function getLpTag(platformId: string, elementName?: string, label?: PortfolioElementLabel): string;
|
9
9
|
export declare function parseLpTag(tag: string): {
|
10
10
|
platformId: string;
|
11
11
|
elementName?: string;
|
12
|
+
label?: PortfolioElementLabel;
|
12
13
|
};
|
@@ -124,17 +124,18 @@ function getTokensData(tokenList) {
|
|
124
124
|
}
|
125
125
|
exports.getTokensData = getTokensData;
|
126
126
|
exports.lpTagSeparator = '<|>';
|
127
|
-
function getLpTag(platformId, elementName) {
|
128
|
-
return `${platformId}${elementName ? `${exports.lpTagSeparator}${elementName}` :
|
127
|
+
function getLpTag(platformId, elementName, label) {
|
128
|
+
return `${platformId}${label ? `${exports.lpTagSeparator}${label}` : `${exports.lpTagSeparator}`}${elementName ? `${exports.lpTagSeparator}${elementName}` : `${exports.lpTagSeparator}`}`;
|
129
129
|
}
|
130
130
|
exports.getLpTag = getLpTag;
|
131
131
|
function parseLpTag(tag) {
|
132
|
-
const split = tag.split(exports.lpTagSeparator,
|
132
|
+
const split = tag.split(exports.lpTagSeparator, 3);
|
133
133
|
if (split.length < 1)
|
134
134
|
throw new Error(`Tag is not valid: ${tag}`);
|
135
135
|
return {
|
136
136
|
platformId: split[0],
|
137
|
-
|
137
|
+
label: split.at(1) === '' ? undefined : split.at(1),
|
138
|
+
elementName: split.at(2) === '' ? undefined : split.at(2),
|
138
139
|
};
|
139
140
|
}
|
140
141
|
exports.parseLpTag = parseLpTag;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tokens/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA6C;
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tokens/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA6C;AAQ7C,2CAAgE;AAEhE,iFAAyD;AACzD,mEAA2C;AAC3C,+DAAyE;AAEzE,SAAgB,cAAc,CAC5B,QAA6B,EAC7B,QAA6B;IAE7B,IAAI,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK;QAAE,OAAO,CAAC,CAAC;IAC9C,IAAI,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK;QAAE,OAAO,CAAC,CAAC,CAAC;IAC/C,IAAI,QAAQ,CAAC,KAAK,GAAG,QAA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CAAC,CAAC,GAAG,sBAAc,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,sBAAc,EACzD,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,sBAAc,GAAG,WAAW,EAAE,CAAC,CAAC,CAAC,GAAG,sBAAc,EAAE,EAAE,CAAC;AAC7E,CAAC;AARD,4BAQC;AAED,SAAgB,UAAU,CAAC,GAAW;IAKpC,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,sBAAc,EAAE,CAAC,CAAC,CAAC;IAC3C,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC;IAClE,OAAO;QACL,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;QACpB,KAAK,EACH,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAA2B;QACzE,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;KAC1D,CAAC;AACJ,CAAC;AAbD,gCAaC"}
|
@@ -169,8 +169,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
169
169
|
type: portfolio_core_1.PortfolioElementType.liquidity,
|
170
170
|
networkId: portfolio_core_1.NetworkId.sui,
|
171
171
|
platformId: constants_1.platformId,
|
172
|
-
label: '
|
173
|
-
name: 'Vault',
|
172
|
+
label: 'Vault',
|
174
173
|
value: totalLiquidityValue,
|
175
174
|
data: {
|
176
175
|
liquidities: assets,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"clmmVaultFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/turbos/clmmVaultFetcher.ts"],"names":[],"mappings":";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pC,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"clmmVaultFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/turbos/clmmVaultFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AAGrC,2CAA0E;AAC1E,qEAAkE;AAClE,iDAAmD;AAQnD,qEAAkE;AAClE,wFAAyF;AACzF,qGAA6E;AAC7E,uFAAoF;AACpF,+DAA4D;AAE5D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,uBAAuB,GAAG,MAAM,IAAA,iCAAe,EACnD,MAAM,EACN,KAAK,EACL;QACE,MAAM,EAAE;YACN,OAAO,EAAE,0BAAc;SACxB;QACD,OAAO,EAAE;YACP,WAAW,EAAE,IAAI;YACjB,QAAQ,EAAE,IAAI;SACf;KACF,CACF,CAAC;IAEF,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEpD,MAAM,WAAW,GAAgB,IAAI,GAAG,EAAE,CAAC;IAC3C,MAAM,iBAAiB,GAA0B,IAAI,GAAG,EAAE,CAAC;IAC3D,uBAAuB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;;QACtC,IAAI,MAAA,GAAG,CAAC,IAAI,0CAAE,OAAO,EAAE,CAAC;YACtB,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACrD,MAAM,UAAU,GAAG,iBAAiB,CAAC,GAAG,CACtC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CACpC,CAAC;YACF,IAAI,UAAU,EAAE,CAAC;gBACf,UAAU,CAAC,IAA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EAAE;SACX,CAAC,CAAC;QACH,mBAAmB,IAAI,KAAK,CAAC;IAC/B,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,SAAS;YACpC,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,OAAO;YACd,KAAK,EAAE,mBAAmB;YAC1B,IAAI,EAAE;gBACJ,WAAW,EAAE,MAAM;aACpB;SACF;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,aAAa;IAC9B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -13,12 +13,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
15
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
16
17
|
const constants_1 = require("./constants");
|
17
18
|
const clients_1 = require("../../utils/clients");
|
18
19
|
const safu_helpers_1 = require("./safu_helpers");
|
19
20
|
const MemoizedCache_1 = require("../../utils/misc/MemoizedCache");
|
20
21
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
21
|
-
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
22
22
|
const vaultsMemo = new MemoizedCache_1.MemoizedCache(constants_1.safuVaultsKey, {
|
23
23
|
prefix: constants_1.platformId,
|
24
24
|
networkId: portfolio_core_1.NetworkId.sui,
|
@@ -45,7 +45,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
45
45
|
const vaultIndex = constants_1.vaultsIndexes[i];
|
46
46
|
const share = shareDatas[vaultIndex];
|
47
47
|
if (share.length > 0) {
|
48
|
-
const [vault
|
48
|
+
const [vault] = vaults[vaultIndex];
|
49
49
|
if (!vault)
|
50
50
|
continue;
|
51
51
|
const amount = new bignumber_js_1.default(share[0].share.active_share)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"safuFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/safuFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;
|
1
|
+
{"version":3,"file":"safuFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/safuFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AAGrC,2CAKqB;AACrB,iDAAmD;AACnD,iDAA8C;AAC9C,kEAA+D;AAE/D,qGAA6E;AAE7E,MAAM,UAAU,GAAG,IAAI,6BAAa,CAEjC,yBAAa,EAAE;IAChB,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;CACzB,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,UAAU,GAAG,MAAM,IAAA,2BAAY,EAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAErD,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,yBAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9C,MAAM,UAAU,GAAG,yBAAa,CAAC,CAAC,CAAC,CAAC;QACpC,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtC,WAAW,GAAG,IAAI,CAAC;YACnB,MAAM;QACR,CAAC;IACH,CAAC;IACD,IAAI,CAAC,WAAW;QAAE,OAAO,E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