@sonarwatch/portfolio-plugins 0.12.176 → 0.12.178
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1514 -1506
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/index.js +8 -0
- package/src/index.js.map +1 -1
- package/src/plugins/adrena/constants.d.ts +8 -0
- package/src/plugins/adrena/constants.js +18 -0
- package/src/plugins/adrena/constants.js.map +1 -0
- package/src/plugins/adrena/custodiesJob.d.ts +3 -0
- package/src/plugins/adrena/custodiesJob.js +34 -0
- package/src/plugins/adrena/custodiesJob.js.map +1 -0
- package/src/plugins/adrena/filters.d.ts +3 -0
- package/src/plugins/adrena/filters.js +21 -0
- package/src/plugins/adrena/filters.js.map +1 -0
- package/src/plugins/adrena/helpers.d.ts +5 -0
- package/src/plugins/adrena/helpers.js +22 -0
- package/src/plugins/adrena/helpers.js.map +1 -0
- package/src/plugins/adrena/index.d.ts +6 -0
- package/src/plugins/adrena/index.js +14 -0
- package/src/plugins/adrena/index.js.map +1 -0
- package/src/plugins/adrena/positionsFetcher.d.ts +3 -0
- package/src/plugins/adrena/positionsFetcher.js +49 -0
- package/src/plugins/adrena/positionsFetcher.js.map +1 -0
- package/src/plugins/adrena/stakingFetcher.d.ts +3 -0
- package/src/plugins/adrena/stakingFetcher.js +69 -0
- package/src/plugins/adrena/stakingFetcher.js.map +1 -0
- package/src/plugins/adrena/structs.d.ts +187 -0
- package/src/plugins/adrena/structs.js +175 -0
- package/src/plugins/adrena/structs.js.map +1 -0
- package/src/plugins/adrena/types.d.ts +9 -0
- package/src/plugins/adrena/types.js +3 -0
- package/src/plugins/adrena/types.js.map +1 -0
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/elemental/constants.d.ts +6 -0
- package/src/plugins/elemental/constants.js +20 -0
- package/src/plugins/elemental/constants.js.map +1 -0
- package/src/plugins/elemental/depositFetcher.d.ts +5 -0
- package/src/plugins/elemental/depositFetcher.js +88 -0
- package/src/plugins/elemental/depositFetcher.js.map +1 -0
- package/src/plugins/elemental/elementalVaultIDL.d.ts +67 -0
- package/src/plugins/elemental/elementalVaultIDL.js +342 -0
- package/src/plugins/elemental/elementalVaultIDL.js.map +1 -0
- package/src/plugins/elemental/filters.d.ts +3 -0
- package/src/plugins/elemental/filters.js +21 -0
- package/src/plugins/elemental/filters.js.map +1 -0
- package/src/plugins/elemental/helpers.d.ts +5 -0
- package/src/plugins/elemental/helpers.js +29 -0
- package/src/plugins/elemental/helpers.js.map +1 -0
- package/src/plugins/elemental/index.d.ts +6 -0
- package/src/plugins/elemental/index.js +13 -0
- package/src/plugins/elemental/index.js.map +1 -0
- package/src/plugins/elemental/poolsJob.d.ts +3 -0
- package/src/plugins/elemental/poolsJob.js +35 -0
- package/src/plugins/elemental/poolsJob.js.map +1 -0
- package/src/plugins/elemental/structs.d.ts +48 -0
- package/src/plugins/elemental/structs.js +50 -0
- package/src/plugins/elemental/structs.js.map +1 -0
- package/src/plugins/elemental/types.d.ts +37 -0
- package/src/plugins/elemental/types.js +3 -0
- package/src/plugins/elemental/types.js.map +1 -0
- package/src/plugins/flash/helpers.js +16 -1
- package/src/plugins/flash/helpers.js.map +1 -1
- package/src/plugins/flash/types.d.ts +5 -0
- package/src/plugins/hawksight/positionsFetcher.js +4 -0
- package/src/plugins/hawksight/positionsFetcher.js.map +1 -1
- package/src/plugins/jupiter/exchange/constants.d.ts +1 -0
- package/src/plugins/jupiter/exchange/constants.js +2 -1
- package/src/plugins/jupiter/exchange/constants.js.map +1 -1
- package/src/plugins/jupiter/exchange/filters.d.ts +1 -0
- package/src/plugins/jupiter/exchange/filters.js +11 -1
- package/src/plugins/jupiter/exchange/filters.js.map +1 -1
- package/src/plugins/jupiter/exchange/lockFetcher.d.ts +3 -0
- package/src/plugins/jupiter/exchange/lockFetcher.js +47 -0
- package/src/plugins/jupiter/exchange/lockFetcher.js.map +1 -0
- package/src/plugins/jupiter/exchange/structs.d.ts +19 -0
- package/src/plugins/jupiter/exchange/structs.js +19 -1
- package/src/plugins/jupiter/exchange/structs.js.map +1 -1
- package/src/plugins/jupiter/index.js +2 -0
- package/src/plugins/jupiter/index.js.map +1 -1
- package/src/plugins/navi/collateralFetcher.js +42 -81
- package/src/plugins/navi/collateralFetcher.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/zeta/airdropFetcher.js +14 -14
- package/src/utils/elementbuilder/AssetBuilder.d.ts +2 -1
- package/src/utils/elementbuilder/AssetBuilder.js +2 -1
- package/src/utils/elementbuilder/AssetBuilder.js.map +1 -1
- package/src/utils/elementbuilder/ElementBorrowlendBuilder.js +1 -1
- package/src/utils/elementbuilder/ElementBorrowlendBuilder.js.map +1 -1
- package/src/utils/elementbuilder/PortfolioAssetParams.d.ts +2 -0
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -8,9 +8,13 @@ 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
|
+
};
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
15
|
exports.getLpTokenPrice = exports.getPdas = void 0;
|
13
16
|
const web3_js_1 = require("@solana/web3.js");
|
17
|
+
const axios_1 = __importDefault(require("axios"));
|
14
18
|
const constants_1 = require("./constants");
|
15
19
|
const anchorSighash_1 = require("../../utils/solana/anchorSighash");
|
16
20
|
const solana_1 = require("../../utils/solana");
|
@@ -64,17 +68,28 @@ function getLpTokenPrice(connection, pool, oracles) {
|
|
64
68
|
];
|
65
69
|
const data = Buffer.concat([(0, anchorSighash_1.anchorSighash)('global', 'getLpTokenPrice')]);
|
66
70
|
const recentBlockhash = (yield connection.getLatestBlockhash()).blockhash;
|
71
|
+
const prefixResponse = yield axios_1.default.get(`https://api.prod.flash.trade/backup-oracle/prices?poolAddress=${pool.pubkey.toString()}`);
|
72
|
+
if (!prefixResponse.data)
|
73
|
+
return null;
|
74
|
+
const addressLookupTable = (yield connection.getAddressLookupTable(new web3_js_1.PublicKey('4E5u7DBVrJp6tVaWkH1sr6r9hhkFwGWmhEHrHeTNDdnP'))).value;
|
75
|
+
if (!addressLookupTable)
|
76
|
+
return null;
|
67
77
|
const messageV0 = new web3_js_1.TransactionMessage({
|
68
78
|
payerKey: new web3_js_1.PublicKey(solana_1.emptyWithSol),
|
69
79
|
recentBlockhash,
|
70
80
|
instructions: [
|
81
|
+
new web3_js_1.TransactionInstruction({
|
82
|
+
keys: prefixResponse.data.keys,
|
83
|
+
programId: new web3_js_1.PublicKey(prefixResponse.data.programId),
|
84
|
+
data: Buffer.from(prefixResponse.data.data),
|
85
|
+
}),
|
71
86
|
new web3_js_1.TransactionInstruction({
|
72
87
|
keys,
|
73
88
|
programId: constants_1.flashPid,
|
74
89
|
data,
|
75
90
|
}),
|
76
91
|
],
|
77
|
-
}).compileToV0Message();
|
92
|
+
}).compileToV0Message([addressLookupTable]);
|
78
93
|
const versionedTransaction = new web3_js_1.VersionedTransaction(messageV0);
|
79
94
|
const simulatedTransactionResponse = yield connection.simulateTransaction(versionedTransaction);
|
80
95
|
const returnedData = (_a = simulatedTransactionResponse.value.returnData) === null || _a === void 0 ? void 0 : _a.data[0];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/helpers.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAOyB;AACzB,kDAA6C;AAC7C,2CAAoE;AAEpE,oEAAiE;AAEjE,+CAK4B;AAG5B,SAAgB,OAAO,CAAC,KAAa;IACnC,OAAO,sBAAU,C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AAC,CAAC;QACjE,MAAM,4BAA4B,GAAG,MAAM,UAAU,CAAC,mBAAmB,CACvE,oBAAoB,CACrB,CAAC;QAEF,MAAM,YAAY,GAAG,MAAA,4BAA4B,CAAC,KAAK,CAAC,UAAU,0CAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5E,IAAI,YAAY;YACd,OAAO,YAAG;iBACP,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;iBAC5C,GAAG,CAAC,SAAA,EAAE,EAAI,2BAAkB,CAAA,CAAC;iBAC7B,QAAQ,EAAE,CAAC;QAEhB,OAAO,IAAI,CAAC;;CACb;AAvFD,0CAuFC"}
|
@@ -17,6 +17,7 @@ const web3_js_1 = require("@solana/web3.js");
|
|
17
17
|
const constants_1 = require("./constants");
|
18
18
|
const helper_1 = require("./helper");
|
19
19
|
const obligationsFetcher_1 = __importDefault(require("../save/obligationsFetcher"));
|
20
|
+
const dlmmPositionsFetcher_1 = __importDefault(require("../meteora/dlmmPositionsFetcher"));
|
20
21
|
const solana_1 = __importDefault(require("../tokens/fetchers/solana"));
|
21
22
|
const getWhirlpoolPositions_1 = require("../orca/getWhirlpoolPositions");
|
22
23
|
const constants_2 = require("../tokens/constants");
|
@@ -53,6 +54,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
53
54
|
// This handles Save
|
54
55
|
obligationsFetcher_1.default.executor(derivedAddresses[0].toString(), cache),
|
55
56
|
obligationsFetcher_1.default.executor(derivedAddresses[1].toString(), cache),
|
57
|
+
// This handles Meteora
|
58
|
+
dlmmPositionsFetcher_1.default.executor(derivedAddresses[0].toString(), cache),
|
59
|
+
dlmmPositionsFetcher_1.default.executor(derivedAddresses[1].toString(), cache),
|
56
60
|
])).flat();
|
57
61
|
if (portfolioElements.length === 0)
|
58
62
|
return [];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","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GAAG,CAAC;QAChB,uCAAuC;QACvC,gBAAY,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC;QAC5D,gBAAY,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC;QAC5D,oBAAoB;QACpB,IAAA,6CAAqB,EAAC,KAAK,EAAE,YAAY,CAAC;QAC1C,oBAAoB;QACpB,4BAAkB,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC;QAClE,4BAAkB,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC;
|
1
|
+
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/hawksight/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,6CAA4C;AAG5C,2CAAyC;AACzC,qCAAgD;AAChD,oFAA4D;AAC5D,2FAAkE;AAClE,uEAAqD;AACrD,yEAAsE;AACtE,mDAA2D;AAC3D,oGAA4E;AAC5E,oFAAiF;AAEjF,wGAAqG;AAErG,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,8BAAoB,GAAE,CAAC;IACtC,MAAM,gBAAgB,GAAG,IAAA,6BAAoB,EAAC,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAEpE,MAAM,cAAc,GAAmB;QACrC,sBAAsB,EAAE,IAAI;QAC5B,yBAAyB,EAAE,IAAI;QAC/B,eAAe,EAAE,KAAK;QACtB,iBAAiB,EAAE,KAAK;QACxB,cAAc,EAAE,KAAK;QACrB,YAAY,EAAE,IAAI;KACnB,CAAC;IACF,MAAM,YAAY,GAAG,CACnB,MAAM,OA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AAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACzD,IAAI,KAAK,KAAK,CAAC;QACb,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;SACzB,CAAC,CAAC;IAEL,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -7,6 +7,7 @@ export declare const valueAverageProgramId: PublicKey;
|
|
7
7
|
export declare const limitProgramId: PublicKey;
|
8
8
|
export declare const limitV2ProgramId: PublicKey;
|
9
9
|
export declare const dcaProgramId: PublicKey;
|
10
|
+
export declare const lockProgramId: PublicKey;
|
10
11
|
export declare const jlpPool: PublicKey;
|
11
12
|
export declare const jlpToken: PublicKey;
|
12
13
|
export declare const custodiesKey = "custodies";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.perpPoolsKey = exports.custodiesKey = exports.jlpToken = exports.jlpPool = exports.dcaProgramId = exports.limitV2ProgramId = exports.limitProgramId = exports.valueAverageProgramId = exports.perpsProgramId = exports.platform = exports.platformId = void 0;
|
3
|
+
exports.perpPoolsKey = exports.custodiesKey = exports.jlpToken = exports.jlpPool = exports.lockProgramId = exports.dcaProgramId = exports.limitV2ProgramId = exports.limitProgramId = exports.valueAverageProgramId = exports.perpsProgramId = exports.platform = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.platformId = 'jupiter-exchange';
|
6
6
|
exports.platform = {
|
@@ -16,6 +16,7 @@ exports.valueAverageProgramId = new web3_js_1.PublicKey('JVAp1DSLnM4Qh8qM1QasQ8x
|
|
16
16
|
exports.limitProgramId = new web3_js_1.PublicKey('jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu');
|
17
17
|
exports.limitV2ProgramId = new web3_js_1.PublicKey('j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X');
|
18
18
|
exports.dcaProgramId = new web3_js_1.PublicKey('DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M');
|
19
|
+
exports.lockProgramId = new web3_js_1.PublicKey('LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn');
|
19
20
|
exports.jlpPool = new web3_js_1.PublicKey('5BUwFW4nRbftYTDMbgxykoFWqWHPzahFSNAaaaJtVKsq');
|
20
21
|
exports.jlpToken = new web3_js_1.PublicKey('27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4');
|
21
22
|
exports.custodiesKey = 'custodies';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAI/B,QAAA,UAAU,GAAG,kBAAkB,CAAC;AAChC,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,gDAAgD;IACvD,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EAAE,qCAAqC;CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,qBAAqB,GAAG,IAAI,mBAAS,CAChD,6CAA6C,CAC9C,CAAC;AACW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,gBAAgB,GAAG,IAAI,mBAAS,CAC3C,6CAA6C,CAC9C,CAAC;AACW,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,OAAO,GAAG,IAAI,mBAAS,CAClC,8CAA8C,CAC/C,CAAC;AACW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,8CAA8C,CAC/C,CAAC;AACW,QAAA,YAAY,GAAG,WAAW,CAAC;AAC3B,QAAA,YAAY,GAAG,WAAW,CAAC"}
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAI/B,QAAA,UAAU,GAAG,kBAAkB,CAAC;AAChC,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,gDAAgD;IACvD,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EAAE,qCAAqC;CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,qBAAqB,GAAG,IAAI,mBAAS,CAChD,6CAA6C,CAC9C,CAAC;AACW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,gBAAgB,GAAG,IAAI,mBAAS,CAC3C,6CAA6C,CAC9C,CAAC;AACW,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,8CAA8C,CAC/C,CAAC;AACW,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,OAAO,GAAG,IAAI,mBAAS,CAClC,8CAA8C,CAC/C,CAAC;AACW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,8CAA8C,CAC/C,CAAC;AACW,QAAA,YAAY,GAAG,WAAW,CAAC;AAC3B,QAAA,YAAY,GAAG,WAAW,CAAC"}
|
@@ -2,3 +2,4 @@ import { GetProgramAccountsFilter } from '@solana/web3.js';
|
|
2
2
|
export declare const limitFilters: (owner: string) => GetProgramAccountsFilter[];
|
3
3
|
export declare const DCAFilters: (owner: string) => GetProgramAccountsFilter[];
|
4
4
|
export declare const valueAverageFilters: (owner: string) => GetProgramAccountsFilter[];
|
5
|
+
export declare const lockFilters: (owner: string) => GetProgramAccountsFilter[];
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.valueAverageFilters = exports.DCAFilters = exports.limitFilters = void 0;
|
3
|
+
exports.lockFilters = exports.valueAverageFilters = exports.DCAFilters = exports.limitFilters = void 0;
|
4
4
|
const structs_1 = require("./structs");
|
5
5
|
const limitFilters = (owner) => [
|
6
6
|
{
|
@@ -37,4 +37,14 @@ const valueAverageFilters = (owner) => [
|
|
37
37
|
{ dataSize: 339 },
|
38
38
|
];
|
39
39
|
exports.valueAverageFilters = valueAverageFilters;
|
40
|
+
const lockFilters = (owner) => [
|
41
|
+
{
|
42
|
+
memcmp: {
|
43
|
+
offset: 8,
|
44
|
+
bytes: owner,
|
45
|
+
},
|
46
|
+
},
|
47
|
+
{ dataSize: 296 },
|
48
|
+
];
|
49
|
+
exports.lockFilters = lockFilters;
|
40
50
|
//# sourceMappingURL=filters.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/filters.ts"],"names":[],"mappings":";;;AACA,uCAAsC;AAE/B,MAAM,YAAY,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACzE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,aAAa;SACrB;KACF;IACD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;CACF,CAAC;AAbW,QAAA,YAAY,gBAavB;AAEK,MAAM,UAAU,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACvE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,mBAAS,CAAC,QAAQ,EAAE;CACjC,CAAC;AARW,QAAA,UAAU,cAQrB;AAEK,MAAM,mBAAmB,GAAG,CACjC,KAAa,EACe,EAAE,CAAC;IAC/B;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AAVW,QAAA,mBAAmB,uBAU9B"}
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/filters.ts"],"names":[],"mappings":";;;AACA,uCAAsC;AAE/B,MAAM,YAAY,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACzE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,aAAa;SACrB;KACF;IACD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;CACF,CAAC;AAbW,QAAA,YAAY,gBAavB;AAEK,MAAM,UAAU,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACvE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,mBAAS,CAAC,QAAQ,EAAE;CACjC,CAAC;AARW,QAAA,UAAU,cAQrB;AAEK,MAAM,mBAAmB,GAAG,CACjC,KAAa,EACe,EAAE,CAAC;IAC/B;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AAVW,QAAA,mBAAmB,uBAU9B;AAEK,MAAM,WAAW,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACxE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AARW,QAAA,WAAW,eAQtB"}
|
@@ -0,0 +1,47 @@
|
|
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 clients_1 = require("../../../utils/clients");
|
15
|
+
const solana_1 = require("../../../utils/solana");
|
16
|
+
const structs_1 = require("./structs");
|
17
|
+
const filters_1 = require("./filters");
|
18
|
+
const ElementRegistry_1 = require("../../../utils/elementbuilder/ElementRegistry");
|
19
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
|
+
const client = (0, clients_1.getClientSolana)();
|
21
|
+
const vestingEscrowAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.vestingEscrowStruct, constants_1.lockProgramId, (0, filters_1.lockFilters)(owner));
|
22
|
+
if (vestingEscrowAccounts.length === 0)
|
23
|
+
return [];
|
24
|
+
const registry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
25
|
+
const element = registry.addElementMultiple({
|
26
|
+
label: 'Vesting',
|
27
|
+
name: 'lock',
|
28
|
+
});
|
29
|
+
for (const lock of vestingEscrowAccounts) {
|
30
|
+
const endTime = lock.vestingStartTime.plus(lock.numberOfPeriod.times(lock.frequency));
|
31
|
+
element.addAsset({
|
32
|
+
address: lock.tokenMint,
|
33
|
+
amount: lock.amountPerPeriod
|
34
|
+
.times(lock.numberOfPeriod)
|
35
|
+
.minus(lock.totalClaimedAmount),
|
36
|
+
attributes: { lockedUntil: endTime.toNumber() },
|
37
|
+
});
|
38
|
+
}
|
39
|
+
return registry.getElements(cache);
|
40
|
+
});
|
41
|
+
const fetcher = {
|
42
|
+
id: `${constants_1.platformId}-lock`,
|
43
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
44
|
+
executor,
|
45
|
+
};
|
46
|
+
exports.default = fetcher;
|
47
|
+
//# sourceMappingURL=lockFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"lockFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/lockFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAAwD;AACxD,oDAAyD;AACzD,kDAAiE;AACjE,uCAAgD;AAChD,uCAAwC;AACxC,mFAAgF;AAEhF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,qBAAqB,GAAG,MAAM,IAAA,iCAAwB,EAC1D,MAAM,EACN,6BAAmB,EACnB,yBAAa,EACb,IAAA,qBAAW,EAAC,KAAK,CAAC,CACnB,CAAC;IACF,IAAI,qBAAqB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAElD,MAAM,QAAQ,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IACnE,MAAM,OAAO,GAAG,QAAQ,CAAC,kBAAkB,CAAC;QAC1C,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,MAAM;KACb,CAAC,CAAC;IAEH,KAAK,MAAM,IAAI,IAAI,qBAAqB,EAAE,CAAC;QACzC,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CACxC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAC1C,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC;YACf,OAAO,EAAE,IAAI,CAAC,SAAS;YACvB,MAAM,EAAE,IAAI,CAAC,eAAe;iBACzB,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC;iBAC1B,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC;YACjC,UAAU,EAAE,EAAE,WAAW,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -95,6 +95,25 @@ export type ValueAverage = {
|
|
95
95
|
outBalanceBeforeSwap: BigNumber;
|
96
96
|
};
|
97
97
|
export declare const valueAverageStruct: BeetStruct<ValueAverage, Partial<ValueAverage>>;
|
98
|
+
export type VestingEscrow = {
|
99
|
+
buffer: Buffer;
|
100
|
+
recipient: PublicKey;
|
101
|
+
tokenMint: PublicKey;
|
102
|
+
creator: PublicKey;
|
103
|
+
base: PublicKey;
|
104
|
+
escrowBump: number;
|
105
|
+
updateRecipientMode: number;
|
106
|
+
padding0: number[];
|
107
|
+
cliffTime: BigNumber;
|
108
|
+
frequency: BigNumber;
|
109
|
+
cliffUnlockAmount: BigNumber;
|
110
|
+
amountPerPeriod: BigNumber;
|
111
|
+
numberOfPeriod: BigNumber;
|
112
|
+
totalClaimedAmount: BigNumber;
|
113
|
+
vestingStartTime: BigNumber;
|
114
|
+
padding: BigNumber[];
|
115
|
+
};
|
116
|
+
export declare const vestingEscrowStruct: BeetStruct<VestingEscrow, Partial<VestingEscrow>>;
|
98
117
|
export type Limit = {
|
99
118
|
maxAumUsd: BigNumber;
|
100
119
|
maxIndividualLpToken: BigNumber;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.positionStruct = exports.Side = exports.custodyStruct = exports.fundingRateStateStruct = exports.assetsStruct = exports.permissionsStruct = exports.pricingParamsStruct = exports.oracleParamsStruct = exports.OracleType = exports.perpetualPoolStruct = exports.feesStruct = exports.poolAprStruct = exports.limitStruct = exports.valueAverageStruct = exports.dcaStruct = exports.limitOrderV2Struct = exports.limitOrderStruct = void 0;
|
3
|
+
exports.positionStruct = exports.Side = exports.custodyStruct = exports.fundingRateStateStruct = exports.assetsStruct = exports.permissionsStruct = exports.pricingParamsStruct = exports.oracleParamsStruct = exports.OracleType = exports.perpetualPoolStruct = exports.feesStruct = exports.poolAprStruct = exports.limitStruct = exports.vestingEscrowStruct = exports.valueAverageStruct = exports.dcaStruct = exports.limitOrderV2Struct = exports.limitOrderStruct = 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");
|
@@ -93,6 +93,24 @@ exports.valueAverageStruct = new beet_1.BeetStruct([
|
|
93
93
|
['nextOrderAt', solana_1.i64],
|
94
94
|
['outBalanceBeforeSwap', solana_1.u64],
|
95
95
|
], (args) => args);
|
96
|
+
exports.vestingEscrowStruct = new beet_1.BeetStruct([
|
97
|
+
['buffer', (0, solana_1.blob)(8)],
|
98
|
+
['recipient', beet_solana_1.publicKey],
|
99
|
+
['tokenMint', beet_solana_1.publicKey],
|
100
|
+
['creator', beet_solana_1.publicKey],
|
101
|
+
['base', beet_solana_1.publicKey],
|
102
|
+
['escrowBump', beet_1.u8],
|
103
|
+
['updateRecipientMode', beet_1.u8],
|
104
|
+
['padding0', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 6)],
|
105
|
+
['cliffTime', solana_1.u64],
|
106
|
+
['frequency', solana_1.u64],
|
107
|
+
['cliffUnlockAmount', solana_1.u64],
|
108
|
+
['amountPerPeriod', solana_1.u64],
|
109
|
+
['numberOfPeriod', solana_1.u64],
|
110
|
+
['totalClaimedAmount', solana_1.u64],
|
111
|
+
['vestingStartTime', solana_1.u64],
|
112
|
+
['padding', (0, beet_1.uniformFixedSizeArray)(solana_1.u128, 6)],
|
113
|
+
], (args) => args);
|
96
114
|
exports.limitStruct = new beet_1.BeetStruct([
|
97
115
|
['maxAumUsd', solana_1.u128],
|
98
116
|
['maxIndividualLpToken', solana_1.u128],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/structs.ts"],"names":[],"mappings":";;;AAAA,oDAQmC;AACnC,kEAA6D;AAG7D,kDAA6D;AAqBhD,QAAA,gBAAgB,GAAG,IAAI,iBAAU,CAC5C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,YAAY,EAAE,uBAAS,CAAC;IACzB,CAAC,SAAS,EAAE,WAAI,CAAC;IACjB,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,cAAc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B,CAAC,mBAAmB,EAAE,uBAAS,CAAC;IAChC,CAAC,UAAU,EAAE,YAAG,CAAC;IACjB,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,OAAO,EAAE,YAAG,CAAC;IACd,CAAC,SAAS,EAAE,YAAG,CAAC;IAChB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,4BAA4B,EAAE,aAAI,CAAC;IACpC,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,MAAM,EAAE,SAAE,CAAC;CACb,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAgB,CAC3B,CAAC"}
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/structs.ts"],"names":[],"mappings":";;;AAAA,oDAQmC;AACnC,kEAA6D;AAG7D,kDAA6D;AAqBhD,QAAA,gBAAgB,GAAG,IAAI,iBAAU,CAC5C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,YAAY,EAAE,uBAAS,CAAC;IACzB,CAAC,SAAS,EAAE,WAAI,CAAC;IACjB,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,mBAAmB,EAAE,uBAAS,CAAC;IAChC,CAAC,oBAAoB,EAAE,uBAAS,CAAC;IACjC,CAAC,SAAS,EAAE,uBAAS,CAAC;IACtB,CAAC,KAAK,EAAE,YAAG,CAAC;IACZ,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,MAAM,EAAE,uB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,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,kBAAkB,EAAE,SAAE,CAAC;IACxB,CAAC,SAAS,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;CACrB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAe,CAC1B,CAAC;AAEF,IAAY,IAIX;AAJD,WAAY,IAAI;IACd,+BAAI,CAAA;IACJ,+BAAI,CAAA;IACJ,iCAAK,CAAA;AACP,CAAC,EAJW,IAAI,oBAAJ,IAAI,QAIf;AAoBY,QAAA,cAAc,GAAG,IAAI,iBAAU,CAC1C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,MAAM,EAAE,uBAAS,CAAC;IACnB,CAAC,SAAS,EAAE,uBAAS,CAAC;IACtB,CAAC,mBAAmB,EAAE,uBAAS,CAAC;IAChC,CAAC,UAAU,EAAE,YAAG,CAAC;IACjB,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,OAAO,EAAE,YAAG,CAAC;IACd,CAAC,SAAS,EAAE,YAAG,CAAC;IAChB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,4BAA4B,EAAE,aAAI,CAAC;IACpC,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,MAAM,EAAE,SAAE,CAAC;CACb,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAgB,CAC3B,CAAC"}
|
@@ -8,6 +8,7 @@ const perpetualFetcher_1 = __importDefault(require("./exchange/perpetualFetcher"
|
|
8
8
|
const valueAverageFetcher_1 = __importDefault(require("./exchange/valueAverageFetcher"));
|
9
9
|
const limitFetcher_1 = __importDefault(require("./exchange/limitFetcher"));
|
10
10
|
const dcaFetcher_1 = __importDefault(require("./exchange/dcaFetcher"));
|
11
|
+
const lockFetcher_1 = __importDefault(require("./exchange/lockFetcher"));
|
11
12
|
const custodiesJob_1 = __importDefault(require("./exchange/custodiesJob"));
|
12
13
|
const constants_1 = require("./launchpad/constants");
|
13
14
|
const voteFetcher_1 = __importDefault(require("./governance/voteFetcher"));
|
@@ -27,6 +28,7 @@ exports.fetchers = [
|
|
27
28
|
valueAverageFetcher_1.default,
|
28
29
|
limitFetcher_1.default,
|
29
30
|
dcaFetcher_1.default,
|
31
|
+
lockFetcher_1.default,
|
30
32
|
voteFetcher_1.default,
|
31
33
|
asrAirdropFetcher_1.fetcher,
|
32
34
|
...launchpad_1.lfgFetchers,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/index.ts"],"names":[],"mappings":";;;;;;AAGA,mFAA2D;AAC3D,yFAAiE;AACjE,2EAAmD;AACnD,uEAA+C;AAC/C,2EAAmD;AAEnD,qDAAsE;AACtE,2EAAmD;AACnD,sDAAwE;AACxE,8DAAsC;AACtC,oDAAoE;AAEpE,sEAGwC;AACxC,2CAA8D;AAEjD,QAAA,SAAS,GAAe;IACnC,oBAAiB;IACjB,oBAAkB;IAClB,oBAAgB;CACjB,CAAC;AACW,QAAA,IAAI,GAAU,CAAC,sBAAY,EAAE,oBAAU,CAAC,CAAC;AACzC,QAAA,QAAQ,GAAc;IACjC,0BAAgB;IAChB,6BAAmB;IACnB,sBAAY;IACZ,oBAAU;IACV,qBAAW;IACX,2BAAU;IACV,GAAG,uBAAW;CACf,CAAC;AACW,QAAA,eAAe,GAAqB;IAC/C,kCAAiB;IACjB,GAAG,8BAAkB;CACtB,CAAC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/index.ts"],"names":[],"mappings":";;;;;;AAGA,mFAA2D;AAC3D,yFAAiE;AACjE,2EAAmD;AACnD,uEAA+C;AAC/C,yEAAiD;AACjD,2EAAmD;AAEnD,qDAAsE;AACtE,2EAAmD;AACnD,sDAAwE;AACxE,8DAAsC;AACtC,oDAAoE;AAEpE,sEAGwC;AACxC,2CAA8D;AAEjD,QAAA,SAAS,GAAe;IACnC,oBAAiB;IACjB,oBAAkB;IAClB,oBAAgB;CACjB,CAAC;AACW,QAAA,IAAI,GAAU,CAAC,sBAAY,EAAE,oBAAU,CAAC,CAAC;AACzC,QAAA,QAAQ,GAAc;IACjC,0BAAgB;IAChB,6BAAmB;IACnB,sBAAY;IACZ,oBAAU;IACV,qBAAW;IACX,qBAAW;IACX,2BAAU;IACV,GAAG,uBAAW;CACf,CAAC;AACW,QAAA,eAAe,GAAqB;IAC/C,kCAAiB;IACjB,GAAG,8BAAkB;CACtB,CAAC"}
|
@@ -16,81 +16,75 @@ 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 getDynamicFieldObject_1 = require("../../utils/sui/getDynamicFieldObject");
|
21
20
|
const getAvailableRewards_1 = require("./getAvailableRewards");
|
21
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
22
22
|
const amountFactor = new bignumber_js_1.default(Math.pow(10, 36));
|
23
23
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
24
24
|
var _a, _b, _c, _d;
|
25
25
|
const client = (0, clients_1.getClientSui)();
|
26
|
-
const borrowedAssets = [];
|
27
|
-
const borrowedYields = [];
|
28
|
-
const suppliedAssets = [];
|
29
|
-
const suppliedYields = [];
|
30
|
-
const rewardAssets = [];
|
31
|
-
const suppliedLtvs = [];
|
32
26
|
const reservesData = yield cache.getItem(constants_1.reservesKey, {
|
33
27
|
prefix: constants_1.reservesPrefix,
|
34
28
|
networkId: portfolio_core_1.NetworkId.sui,
|
35
29
|
});
|
36
30
|
if (!reservesData)
|
37
31
|
return [];
|
38
|
-
const [
|
39
|
-
|
40
|
-
|
41
|
-
]);
|
32
|
+
const [rewards] = yield Promise.all([(0, getAvailableRewards_1.getAvailableRewards)(client, owner)]);
|
33
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.sui, constants_1.platformId);
|
34
|
+
const element = elementRegistry.addElementBorrowlend({ label: 'Lending' });
|
42
35
|
for (const rData of reservesData) {
|
43
|
-
const borrowBalancePromise = (0, getDynamicFieldObject_1.getDynamicFieldObject)(client, {
|
44
|
-
parentId: rData.value.fields.borrow_balance.fields.user_state.fields.id.id,
|
45
|
-
name: { type: 'address', value: owner },
|
46
|
-
});
|
47
|
-
const supplyBalancePromise = (0, getDynamicFieldObject_1.getDynamicFieldObject)(client, {
|
48
|
-
parentId: rData.value.fields.supply_balance.fields.user_state.fields.id.id,
|
49
|
-
name: { type: 'address', value: owner },
|
50
|
-
});
|
51
36
|
const [borrowBalance, supplyBalance] = yield Promise.all([
|
52
|
-
|
53
|
-
|
37
|
+
(0, getDynamicFieldObject_1.getDynamicFieldObject)(client, {
|
38
|
+
parentId: rData.value.fields.borrow_balance.fields.user_state.fields.id.id,
|
39
|
+
name: { type: 'address', value: owner },
|
40
|
+
}),
|
41
|
+
(0, getDynamicFieldObject_1.getDynamicFieldObject)(client, {
|
42
|
+
parentId: rData.value.fields.supply_balance.fields.user_state.fields.id.id,
|
43
|
+
name: { type: 'address', value: owner },
|
44
|
+
}),
|
54
45
|
]);
|
55
|
-
const tokenPrice = tokenPrices.get((0, portfolio_core_1.formatTokenAddress)(rData.value.fields.coin_type, portfolio_core_1.NetworkId.sui));
|
56
46
|
if (!borrowBalance.error && ((_a = borrowBalance.data) === null || _a === void 0 ? void 0 : _a.content)) {
|
57
47
|
const borrowInfo = (_b = borrowBalance.data.content) === null || _b === void 0 ? void 0 : _b.fields;
|
58
48
|
if (borrowInfo.value) {
|
59
|
-
|
60
|
-
|
61
|
-
.
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
49
|
+
element.addBorrowedAsset({
|
50
|
+
address: rData.value.fields.coin_type,
|
51
|
+
amount: new bignumber_js_1.default(borrowInfo.value)
|
52
|
+
.times(rData.value.fields.current_borrow_index)
|
53
|
+
.dividedBy(amountFactor),
|
54
|
+
alreadyShifted: true,
|
55
|
+
});
|
56
|
+
const apy = new bignumber_js_1.default(rData.value.fields.current_borrow_rate)
|
57
|
+
.dividedBy(Math.pow(10, constants_1.rateFactor))
|
58
|
+
.toNumber();
|
59
|
+
element.addBorrowedYield([
|
60
|
+
{
|
61
|
+
apr: -(0, portfolio_core_1.apyToApr)(apy),
|
62
|
+
apy: -apy,
|
63
|
+
},
|
64
|
+
]);
|
75
65
|
}
|
76
66
|
}
|
77
67
|
if (!supplyBalance.error && ((_d = (_c = supplyBalance.data) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.fields)) {
|
78
68
|
const supplyInfo = supplyBalance.data.content.fields;
|
79
69
|
if (supplyInfo.value) {
|
80
|
-
|
70
|
+
const amount = new bignumber_js_1.default(supplyInfo.value)
|
81
71
|
.times(rData.value.fields.current_supply_index)
|
82
|
-
.dividedBy(amountFactor)
|
83
|
-
|
72
|
+
.dividedBy(amountFactor);
|
73
|
+
element.addSuppliedAsset({
|
74
|
+
address: rData.value.fields.coin_type,
|
75
|
+
amount,
|
76
|
+
alreadyShifted: true,
|
77
|
+
});
|
84
78
|
const apy = new bignumber_js_1.default(rData.value.fields.current_supply_rate)
|
85
79
|
.dividedBy(Math.pow(10, constants_1.rateFactor))
|
86
80
|
.toNumber();
|
87
|
-
|
81
|
+
element.addSuppliedYield([
|
88
82
|
{
|
89
83
|
apr: (0, portfolio_core_1.apyToApr)(apy),
|
90
84
|
apy,
|
91
85
|
},
|
92
86
|
]);
|
93
|
-
|
87
|
+
element.addSuppliedLtv(new bignumber_js_1.default(rData.value.fields.liquidation_factors.fields.threshold)
|
94
88
|
.div(Math.pow(10, 27))
|
95
89
|
.toNumber());
|
96
90
|
}
|
@@ -98,46 +92,13 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
98
92
|
}
|
99
93
|
if (rewards.size > 0) {
|
100
94
|
rewards.forEach((amount, coinType) => {
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
.dividedBy(Math.pow(10, tokenPrice.decimals))
|
106
|
-
.toNumber(), portfolio_core_1.NetworkId.sui, tokenPrice));
|
107
|
-
}
|
108
|
-
}
|
95
|
+
element.addRewardAsset({
|
96
|
+
address: coinType,
|
97
|
+
amount,
|
98
|
+
});
|
109
99
|
});
|
110
100
|
}
|
111
|
-
|
112
|
-
borrowedAssets.length === 0 &&
|
113
|
-
rewardAssets.length === 0)
|
114
|
-
return [];
|
115
|
-
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({
|
116
|
-
suppliedAssets,
|
117
|
-
borrowedAssets,
|
118
|
-
rewardAssets,
|
119
|
-
suppliedLtvs,
|
120
|
-
});
|
121
|
-
const element = {
|
122
|
-
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
123
|
-
networkId: portfolio_core_1.NetworkId.sui,
|
124
|
-
platformId: constants_1.platformId,
|
125
|
-
label: 'Lending',
|
126
|
-
value,
|
127
|
-
data: {
|
128
|
-
borrowedAssets,
|
129
|
-
borrowedValue,
|
130
|
-
borrowedYields,
|
131
|
-
suppliedAssets,
|
132
|
-
suppliedValue,
|
133
|
-
suppliedYields,
|
134
|
-
healthRatio,
|
135
|
-
rewardAssets,
|
136
|
-
rewardValue,
|
137
|
-
value,
|
138
|
-
},
|
139
|
-
};
|
140
|
-
return [element];
|
101
|
+
return elementRegistry.getElements(cache);
|
141
102
|
});
|
142
103
|
const fetcher = {
|
143
104
|
id: `${constants_1.platformId}-collateral`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"collateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/navi/collateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"collateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/navi/collateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAiE;AACjE,gEAAqC;AAGrC,2CAKqB;AACrB,iDAAmD;AAEnD,iFAA8E;AAC9E,+DAA4D;AAC5D,gFAA6E;AAE7E,MAAM,YAAY,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,EAAE,CAAA,CAAC,CAAC;AAE7C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,OAAO,CAAgB,uBAAW,EAAE;QACnE,MAAM,EAAE,0BAAc;QACtB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;IACH,IAAI,CAAC,YAAY;QAAE,OAAO,EAAE,CAAC;IAE7B,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,IAAA,yCAAmB,EAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAE1E,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,GAAG,EAAE,sBAAU,CAAC,CAAC;IACvE,MAAM,OAAO,GAAG,eAAe,CAAC,oBAAoB,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAE3E,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,CAAC;QACjC,MAAM,CAAC,aAAa,EAAE,aAAa,CAAC,GAAG,MAA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b,QAAQ,EAAE,CACd,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QACrB,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE;YACnC,OAAO,CAAC,cAAc,CAAC;gBACrB,OAAO,EAAE,QAAQ;gBACjB,MAAM;aACP,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,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"}
|
@@ -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;
|