@sonarwatch/portfolio-plugins 0.14.30 → 0.14.32
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/index.js +6 -2
- package/src/index.js.map +1 -1
- package/src/plugins/banx/loansFetcher.js +2 -1
- package/src/plugins/banx/loansFetcher.js.map +1 -1
- package/src/plugins/cetus/clmmsFetcher.js +5 -7
- package/src/plugins/cetus/clmmsFetcher.js.map +1 -1
- package/src/plugins/cetus/constants.d.ts +1 -0
- package/src/plugins/cetus/constants.js +17 -1
- package/src/plugins/cetus/constants.js.map +1 -1
- package/src/plugins/cetus/farmsFetcher.js +3 -7
- package/src/plugins/cetus/farmsFetcher.js.map +1 -1
- package/src/plugins/cetus/getPools.d.ts +3 -0
- package/src/plugins/cetus/getPools.js +50 -0
- package/src/plugins/cetus/getPools.js.map +1 -0
- package/src/plugins/cetus/poolsJob.js +4 -3
- package/src/plugins/cetus/poolsJob.js.map +1 -1
- package/src/plugins/cetus/types.d.ts +32 -31
- package/src/plugins/drift-market-maker-vault/constants.d.ts +2 -0
- package/src/plugins/drift-market-maker-vault/constants.js +11 -1
- package/src/plugins/drift-market-maker-vault/constants.js.map +1 -1
- package/src/plugins/drift-market-maker-vault/depositsFetcher.d.ts +2 -0
- package/src/plugins/drift-market-maker-vault/depositsFetcher.js +4 -2
- package/src/plugins/drift-market-maker-vault/depositsFetcher.js.map +1 -1
- package/src/plugins/drift-market-maker-vault/index.js +1 -0
- package/src/plugins/drift-market-maker-vault/index.js.map +1 -1
- package/src/plugins/kai/constants.d.ts +9 -0
- package/src/plugins/kai/constants.js +37 -2
- package/src/plugins/kai/constants.js.map +1 -1
- package/src/plugins/kai/helpers.d.ts +8 -0
- package/src/plugins/kai/helpers.js +49 -0
- package/src/plugins/kai/helpers.js.map +1 -0
- package/src/plugins/kai/index.js +4 -2
- package/src/plugins/kai/index.js.map +1 -1
- package/src/plugins/kai/lpVaultsFetcher.d.ts +3 -0
- package/src/plugins/kai/lpVaultsFetcher.js +112 -0
- package/src/plugins/kai/lpVaultsFetcher.js.map +1 -0
- package/src/plugins/kai/supplyPoolsJob.d.ts +3 -0
- package/src/plugins/kai/supplyPoolsJob.js +35 -0
- package/src/plugins/kai/supplyPoolsJob.js.map +1 -0
- package/src/plugins/kai/types.d.ts +107 -0
- package/src/plugins/kai/vaultsJob.js +19 -12
- package/src/plugins/kai/vaultsJob.js.map +1 -1
- package/src/plugins/metaplex/constants.d.ts +7 -0
- package/src/plugins/metaplex/constants.js +17 -0
- package/src/plugins/metaplex/constants.js.map +1 -0
- package/src/plugins/metaplex/helpers.d.ts +3 -0
- package/src/plugins/metaplex/helpers.js +19 -0
- package/src/plugins/metaplex/helpers.js.map +1 -0
- package/src/plugins/metaplex/index.d.ts +6 -0
- package/src/plugins/metaplex/index.js +12 -0
- package/src/plugins/metaplex/index.js.map +1 -0
- package/src/plugins/metaplex/resizableNftFetcher.d.ts +3 -0
- package/src/plugins/metaplex/resizableNftFetcher.js +75 -0
- package/src/plugins/metaplex/resizableNftFetcher.js.map +1 -0
- package/src/plugins/native-stake/solana/solanaValidatorsJob.js +2 -1
- package/src/plugins/native-stake/solana/solanaValidatorsJob.js.map +1 -1
- package/src/plugins/native-stake/solana/types.d.ts +3 -1
- package/src/plugins/pyth/pricingJob.js +98 -2
- package/src/plugins/pyth/pricingJob.js.map +1 -1
- package/src/plugins/symmetry/basketsJob.js +8 -2
- package/src/plugins/symmetry/basketsJob.js.map +1 -1
- package/src/utils/solana/pyth/helpers.d.ts +11 -6
- package/src/utils/solana/pyth/helpers.js +13 -18
- package/src/utils/solana/pyth/helpers.js.map +1 -1
- package/src/utils/sui/constants.d.ts +2 -0
- package/src/utils/sui/constants.js +3 -1
- package/src/utils/sui/constants.js.map +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.14.32](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.31...plugins-0.14.32) (2024-11-14)
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
## [0.14.31](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.30...plugins-0.14.31) (2024-11-14)
|
10
|
+
|
11
|
+
|
12
|
+
|
5
13
|
## [0.14.30](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.29...plugins-0.14.30) (2024-11-11)
|
6
14
|
|
7
15
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
@@ -153,6 +153,7 @@ const hxro_1 = require("./plugins/hxro");
|
|
153
153
|
const spdr_1 = require("./plugins/spdr");
|
154
154
|
const grass_1 = require("./plugins/grass");
|
155
155
|
const cyberfrogs_1 = require("./plugins/cyberfrogs");
|
156
|
+
const metaplex_1 = require("./plugins/metaplex");
|
156
157
|
var constants_1 = require("./plugins/tokens/constants");
|
157
158
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
158
159
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -299,6 +300,7 @@ exports.platforms = [
|
|
299
300
|
...spdr_1.platforms,
|
300
301
|
...grass_1.platforms,
|
301
302
|
...cyberfrogs_1.platforms,
|
303
|
+
...metaplex_1.platforms,
|
302
304
|
];
|
303
305
|
// JOBS //
|
304
306
|
exports.jobs = [
|
@@ -395,7 +397,7 @@ exports.jobs = [
|
|
395
397
|
...whalesmarket_1.jobs,
|
396
398
|
...futarchy_1.jobs,
|
397
399
|
...elixir_1.jobs,
|
398
|
-
...
|
400
|
+
// ...moonwalkJobs,
|
399
401
|
...bluefin_1.jobs,
|
400
402
|
...citrus_1.jobs,
|
401
403
|
...sharky_1.jobs,
|
@@ -429,6 +431,7 @@ exports.jobs = [
|
|
429
431
|
...spdr_1.jobs,
|
430
432
|
...grass_1.jobs,
|
431
433
|
...cyberfrogs_1.jobs,
|
434
|
+
...metaplex_1.jobs,
|
432
435
|
];
|
433
436
|
// FETCHERS //
|
434
437
|
exports.fetchers = [
|
@@ -526,7 +529,7 @@ exports.fetchers = [
|
|
526
529
|
...whalesmarket_1.fetchers,
|
527
530
|
...futarchy_1.fetchers,
|
528
531
|
...elixir_1.fetchers,
|
529
|
-
...
|
532
|
+
// ...moonwalkFetchers,
|
530
533
|
...bluefin_1.fetchers,
|
531
534
|
...citrus_1.fetchers,
|
532
535
|
...sharky_1.fetchers,
|
@@ -560,6 +563,7 @@ exports.fetchers = [
|
|
560
563
|
...spdr_1.fetchers,
|
561
564
|
...grass_1.fetchers,
|
562
565
|
...cyberfrogs_1.fetchers,
|
566
|
+
...metaplex_1.fetchers,
|
563
567
|
];
|
564
568
|
exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
|
565
569
|
exports.airdropFetchers = [
|
package/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,wEAAgD;AAChD,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAI6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAK0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACz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I2B;AAC3B,2CAIyB;AACzB,mDAI6B;AAC7B,iDAI4B;AAC5B,+CAI2B;AAC3B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAI6B;AAC7B,6CAI0B;AAC1B,2CAIyB;AACzB,yCAIwB;AACxB,mDAI6B;AAC7B,+CAI2B;AAC3B,yCAIwB;AACxB,yCAIwB;AACxB,yCAIwB;AACxB,2CAIyB;AACzB,qDAI8B;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,wEAAgD;AAChD,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAI6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAK0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAG6B;AAC7B,yCAIwB;AACxB,2CAIyB;AACzB,yCAIwB;AACxB,iDAI4B;AAC5B,+CAK2B;AAC3B,yCAIwB;AACxB,2CAIyB;AACzB,mDAI6B;AAC7B,2CAIyB;AACzB,2CAIyB;AACzB,sCAIsB;AACtB,+CAI2B;AAC3B,yCAIwB;AACxB,iD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Aa;IAChB,GAAG,oBAAiB;IACpB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,iBAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,eAAY;IACf,GAAG,eAAY;IACf,GAAG,eAAY;IACf,GAAG,gBAAa;IAChB,GAAG,qBAAgB;IACnB,GAAG,mBAAgB;CACpB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,GAAG,yBAAsB;IACzB,GAAG,wBAAqB;IACxB,GAAG,yBAAsB;IACzB,sBAAmB;IACnB,sBAAmB;IACnB,yBAAsB;IACtB,sBAAmB;IACnB,GAAG,0BAAuB;CAC3B,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
|
@@ -43,7 +43,8 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
43
43
|
acc.bondTradeTransactionState.perpetualRefinancedActive ||
|
44
44
|
acc.bondTradeTransactionState.perpetualManualTerminating ||
|
45
45
|
acc.bondTradeTransactionState.active) &&
|
46
|
-
acc.redeemedAt === '0'
|
46
|
+
acc.redeemedAt === '0' &&
|
47
|
+
!acc.redeemResult.instantRefinanced);
|
47
48
|
if (accounts.length === 0)
|
48
49
|
return [];
|
49
50
|
const [tokenPrices, fbondTokenMints, bondOffers, collections] = yield Promise.all([
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"loansFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/loansFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,6CAA4C;AAC5C,gEAAqC;AAGrC,iDAAsD;AACtD,oGAA4E;AAC5E,+CAK4B;AAC5B,8EAAgF;AAChF,wGAAqG;AACrG,qGAA6E;AAC7E,2CAKqB;AAOrB,uCAAwE;AACxE,uCAAuD;AACvD,kEAA+D;AAC/D,4DAAyD;AAEzD,MAAM,eAAe,GAAG,IAAI,6BAAa,CAIvC,+BAAmB,EACnB;IACE,MAAM,EAAE,uBAAW;IACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAU,EAAC,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,CAC/C,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IACrC,MAAM,MAAM,GAAG,IAAA,8BAAoB,GAAE,CAAC;IAEtC,MAAM,QAAQ,GAAG,CACf,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,IAAA,qCAA4B,EAC1B,UAAU,EACV,uBAAW,EACX,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB;QACD,IAAA,qCAA4B,EAC1B,UAAU,EACV,uBAAW,EACX,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB;KACF,CAAC,CACH;SACE,IAAI,EAAE;SACN,MAAM,CACL,CAAC,GAAG,EAAE,EAAE,CACN,CAAC,GAAG,CAAC,yBAAyB,CAAC,eAAe;QAC5C,GAAG,CAAC,yBAAyB,CAAC,sBAAsB;QACpD,GAAG,CAAC,yBAAyB,CAAC,yBAAyB;QACvD,GAAG,CAAC,yBAAyB,CAAC,0BAA0B;QACxD,GAAG,CAAC,yBAAyB,CAAC,MAAM,CAAC;QACvC,GAAG,CAAC,UAAU,KAAK,GAAG,
|
1
|
+
{"version":3,"file":"loansFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/loansFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,6CAA4C;AA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AC;QAED,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,EAAE,GACxD,IAAA,2CAA0B,EAAC;gBACzB,cAAc;gBACd,cAAc;gBACd,YAAY,EAAE,EAAE;gBAChB,MAAM,EAAE,GAAG,CAAC,IAAI,KAAK,KAAK,CAAC,QAAQ,EAAE;aACtC,CAAC,CAAC;YAEL,QAAQ,CAAC,IAAI,CAAC;gBACZ,SAAS,EAAE,0BAAS,CAAC,MAAM;gBAC3B,KAAK,EAAE,SAAS;gBAChB,UAAU,EAAV,sBAAU;gBACV,IAAI,EAAE,qCAAoB,CAAC,UAAU;gBACrC,KAAK;gBACL,IAAI;gBACJ,IAAI,EAAE;oBACJ,cAAc;oBACd,aAAa;oBACb,cAAc,EAAE,EAAE;oBAClB,cAAc;oBACd,aAAa;oBACb,cAAc,EAAE,EAAE;oBAClB,YAAY,EAAE,EAAE;oBAChB,WAAW;oBACX,WAAW,EAAE,IAAI;oBACjB,KAAK;iBACN;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -19,8 +19,8 @@ const clients_1 = require("../../utils/clients");
|
|
19
19
|
const helpers_1 = require("./helpers");
|
20
20
|
const tokenAmountFromLiquidity_1 = require("../../utils/clmm/tokenAmountFromLiquidity");
|
21
21
|
const getOwnedObjects_1 = require("../../utils/sui/getOwnedObjects");
|
22
|
-
const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
|
23
22
|
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
23
|
+
const getPools_1 = require("./getPools");
|
24
24
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
25
25
|
const client = (0, clients_1.getClientSui)();
|
26
26
|
const ownerRes = yield (0, getOwnedObjects_1.getOwnedObjects)(client, owner, {
|
@@ -49,12 +49,10 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
49
49
|
return [];
|
50
50
|
const poolsIds = clmmPositions.map((position) => position.pool);
|
51
51
|
const poolsById = new Map();
|
52
|
-
const poolsObjects = yield (0,
|
53
|
-
poolsObjects.forEach((
|
54
|
-
|
55
|
-
|
56
|
-
const pool = (0, helpers_1.getPoolFromObject)(poolObj);
|
57
|
-
poolsById.set(poolObj.data.objectId, pool);
|
52
|
+
const poolsObjects = yield (0, getPools_1.getPools)([...new Set(poolsIds)], cache);
|
53
|
+
poolsObjects.forEach((pool) => {
|
54
|
+
if (pool) {
|
55
|
+
poolsById.set(pool.poolAddress, pool);
|
58
56
|
}
|
59
57
|
});
|
60
58
|
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.sui, constants_1.platformId);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"clmmsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/clmmsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,2CAAsE;AACtE,iDAAmD;AACnD,
|
1
|
+
{"version":3,"file":"clmmsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/clmmsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,2CAAsE;AACtE,iDAAmD;AACnD,uCAKmB;AAGnB,wFAAyF;AACzF,qEAAkE;AAClE,gFAA6E;AAC7E,yCAAsC;AAEtC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG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,CAAC,cAAc,CAAC;gBACvB,OAAO,EAAE,kBAAkB,CAAC,YAAY;gBACxC,MAAM,EAAE,kBAAkB,CAAC,WAAW;aACvC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,YAAY,CAAC,MAAM,EAAE,IAAI,YAAY,CAAC,MAAM,EAAE;YAChD,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -7,6 +7,7 @@ export declare const clmmType = "0x1eabed72c53feb3805120a081dc15963c204dc8d09154
|
|
7
7
|
export declare const createPoolEvent = "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::factory::CreatePoolEvent";
|
8
8
|
export declare const poolParentId = "0x4c9ab808d50ca1358cc699bb53b6334b9471d4718fb19bb621ff41c2e93bbce4";
|
9
9
|
export declare const firstPool = "0x58ec75646f31c384f485bd92a5f1d19aa60713eabe2447cbc1354c8c229b10b7";
|
10
|
+
export declare const hardCodedPools: string[];
|
10
11
|
export declare const vaultManagerMap = "0x9036bcc5aa7fd2cceec1659a6a1082871f45bc400c743f50063363457d1738bd";
|
11
12
|
export declare const farmNftType = "0x11ea791d82b5742cc8cab0bf7946035c97d9001d7c3803a93f119753da66f526::pool::WrappedPositionNFT";
|
12
13
|
export declare const limitPackageId = "0x533fab9a116080e2cb1c87f1832c1bf4231ab4c32318ced041e75cc28604bba9";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.dcaUserIndexerId = exports.devInspectTxSender = exports.limitUserIndexId = exports.limitPackageId = exports.farmNftType = exports.vaultManagerMap = exports.firstPool = exports.poolParentId = exports.createPoolEvent = exports.clmmType = exports.clmmPoolPackageId = exports.clmmPoolsPrefix = exports.platform = exports.platformId = void 0;
|
3
|
+
exports.dcaUserIndexerId = exports.devInspectTxSender = exports.limitUserIndexId = exports.limitPackageId = exports.farmNftType = exports.vaultManagerMap = exports.hardCodedPools = exports.firstPool = exports.poolParentId = exports.createPoolEvent = exports.clmmType = exports.clmmPoolPackageId = exports.clmmPoolsPrefix = exports.platform = exports.platformId = void 0;
|
4
4
|
exports.platformId = 'cetus';
|
5
5
|
exports.platform = {
|
6
6
|
id: exports.platformId,
|
@@ -15,6 +15,22 @@ exports.clmmType = `${exports.clmmPoolPackageId}::position::Position`;
|
|
15
15
|
exports.createPoolEvent = `${exports.clmmPoolPackageId}::factory::CreatePoolEvent`;
|
16
16
|
exports.poolParentId = '0x4c9ab808d50ca1358cc699bb53b6334b9471d4718fb19bb621ff41c2e93bbce4';
|
17
17
|
exports.firstPool = '0x58ec75646f31c384f485bd92a5f1d19aa60713eabe2447cbc1354c8c229b10b7';
|
18
|
+
// add cetus poolIds here to be sure they're included in the job
|
19
|
+
// pools with most volume from https://app.cetus.zone/pool/list
|
20
|
+
exports.hardCodedPools = [
|
21
|
+
'0xb8d7d9e66a60c239e7a60110efcf8de6c705580ed924d0dde141f4a0e2c90105',
|
22
|
+
'0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630',
|
23
|
+
'0x1efc96c99c9d91ac0f54f0ca78d2d9a6ba11377d29354c0a192c86f0495ddec7',
|
24
|
+
'0xb785e6eed355c1f8367c06d2b0cb9303ab167f8359a129bb003891ee54c6fce0',
|
25
|
+
'0x4c50ba9d1e60d229800293a4222851c9c3f797aa5ba8a8d32cc67ec7e79fec60',
|
26
|
+
'0x59cf0d333464ad29443d92bfd2ddfd1f794c5830141a5ee4a815d1ef3395bf6c',
|
27
|
+
'0x2e041f3fd93646dcc877f783c1f2b7fa62d30271bdef1f21ef002cebf857bded',
|
28
|
+
'0xe01243f37f712ef87e556afb9b1d03d0fae13f96d324ec912daffc339dfdcbd2',
|
29
|
+
'0x6bd72983b0b5a77774af8c77567bb593b418ae3cd750a5926814fcd236409aaa',
|
30
|
+
'0xc8d7a1503dc2f9f5b05449a87d8733593e2f0f3e7bffd90541252782e4d2ca20',
|
31
|
+
'0x871d8a227114f375170f149f7e9d45be822dd003eba225e83c05ac80828596bc',
|
32
|
+
'0x0254747f5ca059a1972cd7f6016485d51392a3fde608107b93bbaebea550f703',
|
33
|
+
];
|
18
34
|
// VaultsManager : 0x25b82dd2f5ee486ed1c8af144b89a8931cd9c29dee3a86a1bfe194fdea9d04a6
|
19
35
|
// Vaults https://api-sui.cetus.zone/v2/sui/auto_pools
|
20
36
|
exports.vaultManagerMap = '0x9036bcc5aa7fd2cceec1659a6a1082871f45bc400c743f50063363457d1738bd';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,cAAc;IAC3B,OAAO,EAAE,yBAAyB;CACnC,CAAC;AACW,QAAA,eAAe,GAAG,GAAG,kBAAU,YAAY,CAAC;AAE5C,QAAA,iBAAiB,GAC5B,oEAAoE,CAAC;AAE1D,QAAA,QAAQ,GAAG,GAAG,yBAAiB,sBAAsB,CAAC;AAEtD,QAAA,eAAe,GAAG,GAAG,yBAAiB,4BAA4B,CAAC;AACnE,QAAA,YAAY,GACvB,oEAAoE,CAAC;AAC1D,QAAA,SAAS,GACpB,oEAAoE,CAAC;AAEvE,qFAAqF;AACrF,sDAAsD;AACzC,QAAA,eAAe,GAC1B,oEAAoE,CAAC;AAE1D,QAAA,WAAW,GACtB,8FAA8F,CAAC;AAEpF,QAAA,cAAc,GACzB,oEAAoE,CAAC;AAC1D,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC;AAC1D,QAAA,kBAAkB,GAC7B,oEAAoE,CAAC;AAC1D,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC"}
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,cAAc;IAC3B,OAAO,EAAE,yBAAyB;CACnC,CAAC;AACW,QAAA,eAAe,GAAG,GAAG,kBAAU,YAAY,CAAC;AAE5C,QAAA,iBAAiB,GAC5B,oEAAoE,CAAC;AAE1D,QAAA,QAAQ,GAAG,GAAG,yBAAiB,sBAAsB,CAAC;AAEtD,QAAA,eAAe,GAAG,GAAG,yBAAiB,4BAA4B,CAAC;AACnE,QAAA,YAAY,GACvB,oEAAoE,CAAC;AAC1D,QAAA,SAAS,GACpB,oEAAoE,CAAC;AAEvE,gEAAgE;AAChE,+DAA+D;AAClD,QAAA,cAAc,GAAG;IAC5B,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;IACpE,oEAAoE;CACrE,CAAC;AAEF,qFAAqF;AACrF,sDAAsD;AACzC,QAAA,eAAe,GAC1B,oEAAoE,CAAC;AAE1D,QAAA,WAAW,GACtB,8FAA8F,CAAC;AAEpF,QAAA,cAAc,GACzB,oEAAoE,CAAC;AAC1D,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC;AAC1D,QAAA,kBAAkB,GAC7B,oEAAoE,CAAC;AAC1D,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC"}
|
@@ -22,6 +22,7 @@ const bitsToNumber_1 = require("../../utils/sui/bitsToNumber");
|
|
22
22
|
const tokenAmountFromLiquidity_1 = require("../../utils/clmm/tokenAmountFromLiquidity");
|
23
23
|
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
24
24
|
const helpers_1 = require("./helpers");
|
25
|
+
const getPools_1 = require("./getPools");
|
25
26
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
26
27
|
const client = (0, clients_1.getClientSui)();
|
27
28
|
const positions = yield (0, getOwnedObjects_1.getOwnedObjects)(client, owner, {
|
@@ -38,14 +39,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
38
39
|
(0, multiGetObjects_1.multiGetObjects)(client, positions
|
39
40
|
.map((position) => { var _a, _b; return (_b = (_a = position.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.pool_id; })
|
40
41
|
.filter((s) => s !== null)),
|
41
|
-
|
42
|
-
.getItems(positions
|
42
|
+
(0, getPools_1.getPools)(positions
|
43
43
|
.map((position) => { var _a, _b; return (_b = (_a = position.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.clmm_postion.fields.pool; })
|
44
|
-
.filter((s) => s !== null),
|
45
|
-
prefix: constants_1.clmmPoolsPrefix,
|
46
|
-
networkId: portfolio_core_1.NetworkId.sui,
|
47
|
-
})
|
48
|
-
.then((res) => res.filter((p) => p !== null)),
|
44
|
+
.filter((s) => s !== null), cache).then((res) => res.filter((p) => p !== null)),
|
49
45
|
(0, helpers_1.fetchPosFeeAmount)(positions
|
50
46
|
.map((position) => {
|
51
47
|
var _a, _b;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"farmsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/farmsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,
|
1
|
+
{"version":3,"file":"farmsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/farmsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,2CAAsD;AACtD,iDAAmD;AAQnD,qEAAkE;AAClE,qEAAkE;AAClE,+DAA4D;AAC5D,wFAAyF;AACzF,gFAA6E;AAC7E,uCAAuE;AACvE,yCAAsC;AAEtC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,SAAS,GAAG,MAAM,IAAA,iCAAe,EAAqB,MAAM,EAAE,KAAK,EAAE;QACzE,OAAO,EAAE;YACP,WAAW,EAAE,IAAI;SAClB;QACD,MAAM,EAAE;YACN,UAAU,EAAE,uBAAW;SACxB;KACF,CAAC,CAAC;IACH,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEtC,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAChD,IAAA,iCAAe,EACb,MAAM,EACN,SAAS;aACN,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,eAAC,OAAA,MAAA,MAAA,QAAQ,CAAC,IAAI,0CAAE,OAAO,0CAAE,MAAM,CAAC,OAAO,CAAA,EAAA,CAAC;aACzD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAa,CACzC;QACD,IAAA,mBAAQ,EACN,SAAS;aACN,GAAG,CACF,CAAC,QAAQ,EAAE,EAAE,eAAC,OAAA,MAAA,MAAA,QAAQ,CAAC,IAAI,0CAAE,OAAO,0CAAE,MAAM,CAAC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@ -0,0 +1,50 @@
|
|
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
|
+
exports.getPools = void 0;
|
13
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
14
|
+
const constants_1 = require("./constants");
|
15
|
+
const clients_1 = require("../../utils/clients");
|
16
|
+
const getObject_1 = require("../../utils/sui/getObject");
|
17
|
+
const helpers_1 = require("./helpers");
|
18
|
+
// always use this helper to get Cetus Pools
|
19
|
+
// use cache is available, get on-chain data otherwise
|
20
|
+
const getPools = (poolIds, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
21
|
+
var _a;
|
22
|
+
const pools = [];
|
23
|
+
const cachedPools = yield cache.getItems(poolIds, {
|
24
|
+
prefix: constants_1.clmmPoolsPrefix,
|
25
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
26
|
+
});
|
27
|
+
const client = (0, clients_1.getClientSui)();
|
28
|
+
for (const poolId of poolIds) {
|
29
|
+
const i = poolIds.indexOf(poolId);
|
30
|
+
const cachedPool = cachedPools[i];
|
31
|
+
if (cachedPool) {
|
32
|
+
pools.push(cachedPool);
|
33
|
+
}
|
34
|
+
else {
|
35
|
+
const poolObject = yield (0, getObject_1.getObject)(client, poolId);
|
36
|
+
const pool = (0, helpers_1.getPoolFromObject)(poolObject);
|
37
|
+
if (((_a = poolObject.data) === null || _a === void 0 ? void 0 : _a.objectId) !== poolId || !pool) {
|
38
|
+
pools.push(null);
|
39
|
+
}
|
40
|
+
yield cache.setItem(poolId, pool, {
|
41
|
+
prefix: constants_1.clmmPoolsPrefix,
|
42
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
43
|
+
});
|
44
|
+
pools.push(pool);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
return pools;
|
48
|
+
});
|
49
|
+
exports.getPools = getPools;
|
50
|
+
//# sourceMappingURL=getPools.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getPools.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/getPools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAAuD;AAEvD,2CAA8C;AAE9C,iDAAmD;AACnD,yDAAsD;AACtD,uCAA8C;AAE9C,4CAA4C;AAC5C,sDAAsD;AAC/C,MAAM,QAAQ,GAAG,CACtB,OAAiB,EACjB,KAAY,EACc,EAAE;;IAC5B,MAAM,KAAK,GAAG,EAAE,CAAC;IAEjB,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAO,OAAO,EAAE;QACtD,MAAM,EAAE,2BAAe;QACvB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAClC,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAClC,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,MAAM,UAAU,GAAG,MAAM,IAAA,qBAAS,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACnD,MAAM,IAAI,GAAG,IAAA,2BAAiB,EAAC,UAAU,CAAC,CAAC;YAE3C,IAAI,CAAA,MAAA,UAAU,CAAC,IAAI,0CAAE,QAAQ,MAAK,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;gBAClD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC;YAED,MAAM,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE;gBAChC,MAAM,EAAE,2BAAe;gBACvB,SAAS,EAAE,0BAAS,CAAC,GAAG;aACzB,CAAC,CAAC;YACH,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAA,CAAC;AAnCW,QAAA,QAAQ,YAmCnB"}
|
@@ -25,7 +25,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
25
|
const client = (0, clients_1.getClientSui)();
|
26
26
|
const promises = [];
|
27
27
|
const cacheItems = [];
|
28
|
-
const poolsAddresses =
|
28
|
+
const poolsAddresses = new Set(constants_1.hardCodedPools);
|
29
29
|
let poolInfo;
|
30
30
|
let value;
|
31
31
|
do {
|
@@ -43,9 +43,9 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
43
43
|
},
|
44
44
|
});
|
45
45
|
if ((_c = poolInfo.data) === null || _c === void 0 ? void 0 : _c.content)
|
46
|
-
poolsAddresses.
|
46
|
+
poolsAddresses.add(poolInfo.data.content.fields.value.fields.value.fields.pool_id);
|
47
47
|
} while (poolInfo && ((_e = (_d = poolInfo.data) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e.fields.value.fields.next));
|
48
|
-
const poolsObjects = yield (0, multiGetObjects_1.multiGetObjects)(client, poolsAddresses);
|
48
|
+
const poolsObjects = yield (0, multiGetObjects_1.multiGetObjects)(client, [...poolsAddresses]);
|
49
49
|
let poolId;
|
50
50
|
let pool;
|
51
51
|
for (let i = 0; i < poolsObjects.length; i++) {
|
@@ -61,6 +61,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
61
61
|
value: pool,
|
62
62
|
});
|
63
63
|
}
|
64
|
+
// always use getPools helper to retrieve cetus pools
|
64
65
|
yield cache.setItems(cacheItems, {
|
65
66
|
prefix: constants_1.clmmPoolsPrefix,
|
66
67
|
networkId: portfolio_core_1.NetworkId.sui,
|
@@ -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,
|
1
|
+
{"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cetus/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,iDAAmD;AACnD,2CAMqB;AACrB,uCAA8C;AAC9C,+FAA4E;AAE5E,qEAAkE;AAClE,iFAA8E;AAE9E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,QAAQ,GAAG,EAAE,CAAC;IACpB,MAAM,UAAU,GAAG,EAAE,CAAC;IAEtB,MAAM,cAAc,GAAgB,IAAI,GAAG,CAAC,0BAAc,CAAC,CAAC;IAC5D,IAAI,QAAQ,CAAC;IACb,IAAI,KAAK,CAAC;IACV,GAAG,CAAC;QACF,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,KAAK,GAAG,qBAAS,CAAC;QACpB,CAAC;aAAM,CAAC;YACN,KAAK,GAAG,MAAA,MAAA,QAAQ,CAAC,IAAI,0CAAE,OAAO,0CAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;QAC3D,CAAC;QAED,QAAQ,GAAG,MAAM,IAA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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,qDAAqD;IACrD,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"}
|
@@ -149,43 +149,44 @@ export type Vault = {
|
|
149
149
|
type: string;
|
150
150
|
}[];
|
151
151
|
};
|
152
|
-
export type
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
name: string;
|
158
|
-
};
|
159
|
-
type: string;
|
152
|
+
export type LpPosition = {
|
153
|
+
fields: {
|
154
|
+
coin_type_a: {
|
155
|
+
fields: {
|
156
|
+
name: string;
|
160
157
|
};
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
158
|
+
type: string;
|
159
|
+
};
|
160
|
+
coin_type_b: {
|
161
|
+
fields: {
|
162
|
+
name: string;
|
166
163
|
};
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
164
|
+
type: string;
|
165
|
+
};
|
166
|
+
description: string;
|
167
|
+
id: ID;
|
168
|
+
index: number;
|
169
|
+
liquidity: string;
|
170
|
+
name: string;
|
171
|
+
pool: SuiObjectIdType;
|
172
|
+
tick_lower_index: {
|
173
|
+
fields: {
|
174
|
+
bits: number;
|
178
175
|
};
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
176
|
+
type: string;
|
177
|
+
};
|
178
|
+
tick_upper_index: {
|
179
|
+
fields: {
|
180
|
+
bits: number;
|
184
181
|
};
|
185
|
-
|
182
|
+
type: string;
|
186
183
|
};
|
187
|
-
|
184
|
+
url: string;
|
188
185
|
};
|
186
|
+
type: string;
|
187
|
+
};
|
188
|
+
export type WrappedPositionNFT = {
|
189
|
+
clmm_postion: LpPosition;
|
189
190
|
id: ID;
|
190
191
|
pool_id: string;
|
191
192
|
url: string;
|
@@ -8,6 +8,8 @@ export declare const neutralPlatformId = "neutral";
|
|
8
8
|
export declare const neutralPlatform: Platform;
|
9
9
|
export declare const gauntletPlatformId = "gauntlet";
|
10
10
|
export declare const gauntletPlatform: Platform;
|
11
|
+
export declare const hedgyPlatformId = "hedgy";
|
12
|
+
export declare const hedgyPlatform: Platform;
|
11
13
|
export declare const vaultsPids: PublicKey[];
|
12
14
|
export declare const prefixVaults = "circuitVaults";
|
13
15
|
export declare const platformIdByVaultManager: Map<string, string>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.platformIdByVaultManager = exports.prefixVaults = exports.vaultsPids = exports.gauntletPlatform = exports.gauntletPlatformId = exports.neutralPlatform = exports.neutralPlatformId = exports.moosePlatform = exports.moosePlatformId = exports.circuitPlatform = exports.circuitPlatformId = void 0;
|
3
|
+
exports.platformIdByVaultManager = exports.prefixVaults = exports.vaultsPids = exports.hedgyPlatform = exports.hedgyPlatformId = exports.gauntletPlatform = exports.gauntletPlatformId = exports.neutralPlatform = exports.neutralPlatformId = exports.moosePlatform = exports.moosePlatformId = exports.circuitPlatform = exports.circuitPlatformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.circuitPlatformId = 'circuit';
|
6
6
|
exports.circuitPlatform = {
|
@@ -33,6 +33,14 @@ exports.gauntletPlatform = {
|
|
33
33
|
image: 'https://sonar.watch/img/platforms/gauntlet.webp',
|
34
34
|
twitter: 'https://twitter.com/gauntlet_xyz',
|
35
35
|
};
|
36
|
+
exports.hedgyPlatformId = 'hedgy';
|
37
|
+
exports.hedgyPlatform = {
|
38
|
+
id: exports.hedgyPlatformId,
|
39
|
+
name: 'Hedgy',
|
40
|
+
image: 'https://sonar.watch/img/platforms/hedgy.webp',
|
41
|
+
twitter: 'https://x.com/HedgyMarket',
|
42
|
+
website: 'https://hedgy.market/',
|
43
|
+
};
|
36
44
|
exports.vaultsPids = [
|
37
45
|
new web3_js_1.PublicKey('vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR'), // from Drift
|
38
46
|
new web3_js_1.PublicKey('9Fcn3Fd4d5ocrb12xCUtEvezxcjFEAyHBPfrZDiPt9Qj'), // from Neutral
|
@@ -46,5 +54,7 @@ exports.platformIdByVaultManager = new Map([
|
|
46
54
|
['C77bxLHWjnAVeG9HdMxu1gunFnjRCcWUDZYfa7xbacHr', exports.neutralPlatformId],
|
47
55
|
['neutBqYtHqPiu89Yfuk3X3cebgBtyppzSbxJ9tt1eSB', exports.neutralPlatformId],
|
48
56
|
['G6L1NE8tLYYzvMHYHbkHZqPFvfEsiRAsHSvyNQ2hut3o', exports.gauntletPlatformId],
|
57
|
+
['GcGx7VBJX9AxW2EKayVVovpPXvfjpCdjGkKXa27Ryg3a', exports.hedgyPlatformId],
|
58
|
+
['86fYXDydyKKnL7gxWpVrUDnsrVyQyZkwb4YsisBHC9ab', exports.gauntletPlatformId],
|
49
59
|
]);
|
50
60
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,iBAAiB,GAAG,SAAS,CAAC;AAC9B,QAAA,eAAe,GAAa;IACvC,EAAE,E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,EAAE,0BAAkB,CAAC;CACrE,CAAC,CAAC"}
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,iBAAiB,GAAG,SAAS,CAAC;AAC9B,QAAA,eAAe,GAAa;IACvC,EAAE,EAAE,yBAAiB;IACrB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,gDAAgD;IACvD,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,qCAAqC;CAC/C,CAAC;AAEW,QAAA,eAAe,GAAG,OAAO,CAAC;AAC1B,QAAA,aAAa,GAAa;IACrC,EAAE,EAAE,uBAAe;IACnB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,8CAA8C;IACrD,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,iBAAiB,GAAG,SAAS,CAAC;AAC9B,QAAA,eAAe,GAAa;IACvC,EAAE,EAAE,yBAAiB;IACrB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,gDAAgD;IACvD,OAAO,EAAE,gCAAgC;IACzC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,kBAAkB,GAAG,UAAU,CAAC;AAChC,QAAA,gBAAgB,GAAa;IACxC,EAAE,EAAE,0BAAkB;IACtB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,eAAe,GAAG,OAAO,CAAC;AAC1B,QAAA,aAAa,GAAa;IACrC,EAAE,EAAE,uBAAe;IACnB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,uBAAuB;CACjC,CAAC;AAEW,QAAA,UAAU,GAAG;IACxB,IAAI,mBAAS,CAAC,6CAA6C,CAAC,EAAE,aAAa;IAC3E,IAAI,mBAAS,CAAC,8CAA8C,CAAC,EAAE,eAAe;IAC9E,IAAI,mBAAS,CAAC,8CAA8C,CAAC,EAAE,eAAe;IAC9E,IAAI,mBAAS,CAAC,8CAA8C,CAAC,EAAE,eAAe;CAC/E,CAAC;AAEW,QAAA,YAAY,GAAG,eAAe,CAAC;AAE/B,QAAA,wBAAwB,GAAwB,IAAI,GAAG,CAAC;IACnE,CAAC,8CAA8C,EAAE,yBAAiB,CAAC;IACnE,CAAC,8CAA8C,EAAE,uBAAe,CAAC;IACjE,CAAC,8CAA8C,EAAE,yBAAiB,CAAC;IACnE,CAAC,6CAA6C,EAAE,yBAAiB,CAAC;IAClE,CAAC,8CAA8C,EAAE,0BAAkB,CAAC;IACpE,CAAC,8CAA8C,EAAE,uBAAe,CAAC;IACjE,CAAC,8CAA8C,EAAE,0BAAkB,CAAC;CACrE,CAAC,CAAC"}
|
@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
exports.sevenDays = exports.oneDay = void 0;
|
15
16
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
17
|
const constants_1 = require("../drift/constants");
|
17
18
|
const constants_2 = require("./constants");
|
@@ -20,7 +21,8 @@ const solana_1 = require("../../utils/solana");
|
|
20
21
|
const structs_1 = require("./structs");
|
21
22
|
const filters_1 = require("./filters");
|
22
23
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
23
|
-
|
24
|
+
exports.oneDay = 1000 * 60 * 60 * 24;
|
25
|
+
exports.sevenDays = 7 * exports.oneDay;
|
24
26
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
25
27
|
const client = (0, clients_1.getClientSolana)();
|
26
28
|
const depositAccounts = (yield Promise.all(constants_2.vaultsPids.map((vaultsPid) => (0, solana_1.getParsedProgramAccounts)(client, structs_1.vaultDepositorStruct, vaultsPid, (0, filters_1.vaultDepositorFilter)(owner))))).flat();
|
@@ -54,7 +56,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
54
56
|
.toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice)), { attributes: {
|
55
57
|
lockedUntil: depositAccount.lastWithdrawRequest.ts
|
56
58
|
.times(1000)
|
57
|
-
.plus(
|
59
|
+
.plus(platformId === constants_2.neutralPlatformId ? exports.oneDay : exports.sevenDays)
|
58
60
|
.toNumber(),
|
59
61
|
} }));
|
60
62
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/depositsFetcher.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAOoC;AAGpC,kDAAmE;AACnE,2CAA0E;AAC1E,iDAAsD;AACtD,+CAA8D;AAC9D,uCAAiD;AACjD,uCAAiD;AACjD,qGAA6E;AAGhE,QAAA,MAAM,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAC7B,QAAA,SAAS,GAAG,CAAC,GAAG,cAAM,CAAC;AAEpC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,eAAe,GAAG,CACtB,MAAM,OAAO,CAAC,GAAG,CACf,sBAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAC3B,IAAA,iCAAwB,EACtB,MAAM,EACN,8BAAoB,EACpB,SAAS,EACT,IAAA,8BAAoB,EAAC,KAAK,CAAC,CAC5B,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,CACX,CACF,CAAC;QACF,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAElC,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU;YACV,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,IAAI;YACJ,IAAI,EAAE,EAAE,MAAM,EAAE;YAChB,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1D,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAe,qBAAqB;IAC3C,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/index.ts"],"names":[],"mappings":";;;;;;AAGA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAMqB;AACrB,wEAAgD;AAChD,4DAAoC;AAEvB,QAAA,SAAS,GAAe;IACnC,2BAAe;IACf,yBAAa;IACb,2BAAe;IACf,4BAAgB;IAChB,yBAAa;CACd,CAAC;AACW,QAAA,IAAI,GAAU,CAAC,mBAAS,CAAC,CAAC;AAC1B,QAAA,QAAQ,GAAc,CAAC,yBAAe,CAAC,CAAC"}
|