@sonarwatch/portfolio-plugins 0.14.23 → 0.14.25
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1684 -1676
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/index.js +0 -4
- package/src/index.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/cyberfrogs/constants.js +1 -1
- package/src/plugins/cyberfrogs/constants.js.map +1 -1
- package/src/plugins/cyberfrogs/thorDepositFetcher.js +1 -0
- package/src/plugins/cyberfrogs/thorDepositFetcher.js.map +1 -1
- package/src/plugins/nxfinance/constants.d.ts +4 -0
- package/src/plugins/nxfinance/constants.js +10 -1
- package/src/plugins/nxfinance/constants.js.map +1 -1
- package/src/plugins/nxfinance/index.js +8 -2
- package/src/plugins/nxfinance/index.js.map +1 -1
- package/src/plugins/nxfinance/stakingFetcher.d.ts +3 -0
- package/src/plugins/nxfinance/stakingFetcher.js +88 -0
- package/src/plugins/nxfinance/stakingFetcher.js.map +1 -0
- package/src/plugins/nxfinance/stakingIdl.d.ts +189 -0
- package/src/plugins/nxfinance/stakingIdl.js +1262 -0
- package/src/plugins/nxfinance/stakingIdl.js.map +1 -0
- package/src/plugins/nxfinance/stakingPoolJob.d.ts +3 -0
- package/src/plugins/nxfinance/stakingPoolJob.js +31 -0
- package/src/plugins/nxfinance/stakingPoolJob.js.map +1 -0
- package/src/plugins/nxfinance/types.d.ts +19 -0
- 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/misc/getSourceWeight.d.ts +1 -1
- package/src/utils/misc/getSourceWeight.js +3 -3
- package/src/utils/misc/getSourceWeight.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
package/README.md
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
# @sonarwatch/portfolio-plugins
|
2
|
-
|
3
|
-
This library is @sonarwatch/portfolio-plugins
|
1
|
+
# @sonarwatch/portfolio-plugins
|
2
|
+
|
3
|
+
This library is @sonarwatch/portfolio-plugins
|
package/package.json
CHANGED
package/src/index.js
CHANGED
@@ -148,7 +148,6 @@ const joule_1 = require("./plugins/joule");
|
|
148
148
|
const meso_1 = require("./plugins/meso");
|
149
149
|
const loopscale_1 = require("./plugins/loopscale");
|
150
150
|
const vaultka_1 = require("./plugins/vaultka");
|
151
|
-
const loverflow_1 = require("./plugins/loverflow");
|
152
151
|
const zelo_1 = require("./plugins/zelo");
|
153
152
|
const hxro_1 = require("./plugins/hxro");
|
154
153
|
const spdr_1 = require("./plugins/spdr");
|
@@ -295,7 +294,6 @@ exports.platforms = [
|
|
295
294
|
...meso_1.platforms,
|
296
295
|
...loopscale_1.platforms,
|
297
296
|
...vaultka_1.platforms,
|
298
|
-
...loverflow_1.platforms,
|
299
297
|
...zelo_1.platforms,
|
300
298
|
...hxro_1.platforms,
|
301
299
|
...spdr_1.platforms,
|
@@ -426,7 +424,6 @@ exports.jobs = [
|
|
426
424
|
...meso_1.jobs,
|
427
425
|
...loopscale_1.jobs,
|
428
426
|
...vaultka_1.jobs,
|
429
|
-
...loverflow_1.jobs,
|
430
427
|
...zelo_1.jobs,
|
431
428
|
...hxro_1.jobs,
|
432
429
|
...spdr_1.jobs,
|
@@ -558,7 +555,6 @@ exports.fetchers = [
|
|
558
555
|
...meso_1.fetchers,
|
559
556
|
...loopscale_1.fetchers,
|
560
557
|
...vaultka_1.fetchers,
|
561
|
-
...loverflow_1.fetchers,
|
562
558
|
...zelo_1.fetchers,
|
563
559
|
...hxro_1.fetchers,
|
564
560
|
...spdr_1.fetchers,
|
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;AACh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IACnB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,iBAAc;IACjB,GAAG,kBAAe;IAClB,GAAG,oBAAiB;IACpB,GAAG,8BAA2B;IAC9B,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,gBAAa;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;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"}
|
@@ -36,27 +36,27 @@ exports.getBalancerPoolsV2 = void 0;
|
|
36
36
|
const graphql_request_1 = __importStar(require("graphql-request"));
|
37
37
|
function getBalancerPoolsV2(url) {
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
39
|
-
const query = (0, graphql_request_1.gql) `
|
40
|
-
query pools {
|
41
|
-
pools(
|
42
|
-
first: 1000
|
43
|
-
orderBy: totalLiquidity
|
44
|
-
orderDirection: desc
|
45
|
-
where: { totalLiquidity_gt: "500" }
|
46
|
-
) {
|
47
|
-
id
|
48
|
-
address
|
49
|
-
symbol
|
50
|
-
totalLiquidity
|
51
|
-
totalShares
|
52
|
-
tokens {
|
53
|
-
balance
|
54
|
-
decimals
|
55
|
-
symbol
|
56
|
-
address
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
39
|
+
const query = (0, graphql_request_1.gql) `
|
40
|
+
query pools {
|
41
|
+
pools(
|
42
|
+
first: 1000
|
43
|
+
orderBy: totalLiquidity
|
44
|
+
orderDirection: desc
|
45
|
+
where: { totalLiquidity_gt: "500" }
|
46
|
+
) {
|
47
|
+
id
|
48
|
+
address
|
49
|
+
symbol
|
50
|
+
totalLiquidity
|
51
|
+
totalShares
|
52
|
+
tokens {
|
53
|
+
balance
|
54
|
+
decimals
|
55
|
+
symbol
|
56
|
+
address
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
60
|
`;
|
61
61
|
const res = yield (0, graphql_request_1.default)(url, query);
|
62
62
|
const pools = res.pools;
|
@@ -5,7 +5,7 @@ const web3_js_1 = require("@solana/web3.js");
|
|
5
5
|
exports.platformId = 'cyberfrogs';
|
6
6
|
exports.platform = {
|
7
7
|
id: exports.platformId,
|
8
|
-
name: 'CyberFrogs
|
8
|
+
name: 'CyberFrogs',
|
9
9
|
image: 'https://sonar.watch/img/platforms/cyberfrogs.webp',
|
10
10
|
website: 'https://legacy.cyberfrogs.io/faction-contracts-v3',
|
11
11
|
twitter: 'https://twitter.com/CyberFrogsNFT',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cyberfrogs/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cyberfrogs/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,mDAAmD;IAC1D,OAAO,EAAE,mDAAmD;IAC5D,OAAO,EAAE,mCAAmC;CAC7C,CAAC;AAEW,QAAA,GAAG,GAAG,IAAI,mBAAS,CAC9B,8CAA8C,CAC/C,CAAC"}
|
@@ -31,6 +31,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
31
31
|
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
32
32
|
const element = elementRegistry.addElementMultiple({
|
33
33
|
label: 'Deposit',
|
34
|
+
name: 'Thor V3',
|
34
35
|
});
|
35
36
|
accounts.forEach((deposit) => {
|
36
37
|
element.addAsset({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"thorDepositFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cyberfrogs/thorDepositFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAEvD,2CAA8C;AAE9C,iDAAsD;AACtD,uCAA0C;AAC1C,gFAA6E;AAC7E,+CAA8E;AAE9E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,UAAU,EACV,uBAAa,EACb,eAAG,EACH;QACE;YACE,MAAM,EAAE;gBACN,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,EAAE;aACX;SACF;QACD;YACE,QAAQ,EAAE,EAAE;SACb;KACF,CACF,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,eAAe,CAAC,kBAAkB,CAAC;QACjD,KAAK,EAAE,SAAS;
|
1
|
+
{"version":3,"file":"thorDepositFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cyberfrogs/thorDepositFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAEvD,2CAA8C;AAE9C,iDAAsD;AACtD,uCAA0C;AAC1C,gFAA6E;AAC7E,+CAA8E;AAE9E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,UAAU,EACV,uBAAa,EACb,eAAG,EACH;QACE;YACE,MAAM,EAAE;gBACN,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,EAAE;aACX;SACF;QACD;YACE,QAAQ,EAAE,EAAE;SACb;KACF,CACF,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,eAAe,CAAC,kBAAkB,CAAC;QACjD,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC;IAEH,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,OAAO,CAAC,QAAQ,CAAC;YACf,OAAO,EAAE,uBAAc;YACvB,MAAM,EAAE,OAAO,CAAC,cAAc;YAC9B,UAAU,EAAE;gBACV,WAAW,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;aAClD;SACF,CAAC,CAAC;IACL,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,eAAe;IAChC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -10,4 +10,8 @@ export declare const nxfinanceLeverageIdlItem: IdlItem;
|
|
10
10
|
export declare const lendProgramId: PublicKey;
|
11
11
|
export declare const nxfinanceLendIdlItem: IdlItem;
|
12
12
|
export declare const lendingPoolKey = "lending-pools";
|
13
|
+
export declare const stakingPoolKey = "staking-pool";
|
13
14
|
export declare const lendingPools: PublicKey[];
|
15
|
+
export declare const stakePool = "2P1eeegdbEhN3bnCroJJPXiH13i4rw1XYk8ftdh9meRY";
|
16
|
+
export declare const stakingProgramId = "9un1MopS4NRhgVDLXB1DqoQDTmq1un48YKJuPiMLpSc9";
|
17
|
+
export declare const nxfinanceStakingIdlItem: IdlItem;
|
@@ -1,9 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.lendingPools = exports.lendingPoolKey = exports.nxfinanceLendIdlItem = exports.lendProgramId = exports.nxfinanceLeverageIdlItem = exports.leverageVaultsMints = exports.leverageFiProgramID = exports.ID = exports.platform = exports.platformId = void 0;
|
3
|
+
exports.nxfinanceStakingIdlItem = exports.stakingProgramId = exports.stakePool = exports.lendingPools = exports.stakingPoolKey = exports.lendingPoolKey = exports.nxfinanceLendIdlItem = exports.lendProgramId = exports.nxfinanceLeverageIdlItem = exports.leverageVaultsMints = exports.leverageFiProgramID = exports.ID = exports.platform = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
const leverageIdl_1 = require("./leverageIdl");
|
6
6
|
const lendIdl_1 = require("./lendIdl");
|
7
|
+
const stakingIdl_1 = require("./stakingIdl");
|
7
8
|
exports.platformId = 'nxfinance';
|
8
9
|
exports.platform = {
|
9
10
|
id: exports.platformId,
|
@@ -33,7 +34,15 @@ exports.nxfinanceLendIdlItem = {
|
|
33
34
|
idlType: 'anchor',
|
34
35
|
};
|
35
36
|
exports.lendingPoolKey = 'lending-pools';
|
37
|
+
exports.stakingPoolKey = 'staking-pool';
|
36
38
|
exports.lendingPools = [
|
37
39
|
new web3_js_1.PublicKey('HVn3F2wq2Fvr8T5yX7VS9yWaNxX5PMgxTyHb4aKAX8z3'),
|
38
40
|
];
|
41
|
+
exports.stakePool = '2P1eeegdbEhN3bnCroJJPXiH13i4rw1XYk8ftdh9meRY';
|
42
|
+
exports.stakingProgramId = '9un1MopS4NRhgVDLXB1DqoQDTmq1un48YKJuPiMLpSc9';
|
43
|
+
exports.nxfinanceStakingIdlItem = {
|
44
|
+
programId: new web3_js_1.PublicKey(exports.stakingProgramId).toString(),
|
45
|
+
idl: stakingIdl_1.NxfinanceStakingIdl,
|
46
|
+
idlType: 'anchor',
|
47
|
+
};
|
39
48
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/constants.ts"],"names":[],"mappings":";;;AAEA,6CAA4C;AAC5C,+CAAqD;AACrD,uCAA6C;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/constants.ts"],"names":[],"mappings":";;;AAEA,6CAA4C;AAC5C,+CAAqD;AACrD,uCAA6C;AAC7C,6CAAmD;AAEtC,QAAA,UAAU,GAAG,WAAW,CAAC;AACzB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,gCAAgC;IACzC,WAAW,EAAE,YAAY,EAAE,sCAAsC;CAClE,CAAC;AAEW,QAAA,EAAE,GAAG,IAAI,mBAAS,CAAC,6CAA6C,CAAC,CAAC;AAElE,QAAA,mBAAmB,GAAG,IAAI,mBAAS,CAC9C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,mBAAmB,GAAG;IACjC,8CAA8C,EAAE,MAAM;IACtD,6CAA6C,EAAE,SAAS;IACxD,6CAA6C,EAAE,OAAO;IACtD,6CAA6C,EAAE,OAAO;CACvD,CAAC;AAEW,QAAA,wBAAwB,GAAG;IACtC,SAAS,EAAE,2BAAmB,CAAC,QAAQ,EAAE;IACzC,GAAG,EAAE,kCAAoB;IACzB,OAAO,EAAE,QAAQ;CACP,CAAC;AAEA,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAClC,SAAS,EAAE,qBAAa,CAAC,QAAQ,EAAE;IACnC,GAAG,EAAE,0BAAgB;IACrB,OAAO,EAAE,QAAQ;CACP,CAAC;AAEA,QAAA,cAAc,GAAG,eAAe,CAAC;AACjC,QAAA,cAAc,GAAG,cAAc,CAAC;AAEhC,QAAA,YAAY,GAAG;IAC1B,IAAI,mBAAS,CAAC,8CAA8C,CAAC;CAC9D,CAAC;AAEW,QAAA,SAAS,GAAG,8CAA8C,CAAC;AAC3D,QAAA,gBAAgB,GAAG,8CAA8C,CAAC;AAElE,QAAA,uBAAuB,GAAG;IACrC,SAAS,EAAE,IAAI,mBAAS,CAAC,wBAAgB,CAAC,CAAC,QAAQ,EAAE;IACrD,GAAG,EAAE,gCAAmB;IACxB,OAAO,EAAE,QAAQ;CACP,CAAC"}
|
@@ -8,7 +8,13 @@ const constants_1 = require("./constants");
|
|
8
8
|
const positionsFetcher_1 = __importDefault(require("./positionsFetcher"));
|
9
9
|
const lendPositionsFetcher_1 = __importDefault(require("./lendPositionsFetcher"));
|
10
10
|
const lendingPoolsJob_1 = __importDefault(require("./lendingPoolsJob"));
|
11
|
+
const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
|
12
|
+
const stakingPoolJob_1 = __importDefault(require("./stakingPoolJob"));
|
11
13
|
exports.platforms = [constants_1.platform];
|
12
|
-
exports.jobs = [lendingPoolsJob_1.default];
|
13
|
-
exports.fetchers = [
|
14
|
+
exports.jobs = [lendingPoolsJob_1.default, stakingPoolJob_1.default];
|
15
|
+
exports.fetchers = [
|
16
|
+
positionsFetcher_1.default,
|
17
|
+
lendPositionsFetcher_1.default,
|
18
|
+
stakingFetcher_1.default,
|
19
|
+
];
|
14
20
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,0EAAkD;AAClD,kFAA0D;AAC1D,wEAAgD;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,0EAAkD;AAClD,kFAA0D;AAC1D,wEAAgD;AAChD,sEAA8C;AAC9C,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,yBAAe,EAAE,wBAAc,CAAC,CAAC;AAChD,QAAA,QAAQ,GAAc;IACjC,0BAAgB;IAChB,8BAAoB;IACpB,wBAAc;CACf,CAAC"}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
|
+
const web3_js_1 = require("@solana/web3.js");
|
17
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
18
|
+
const constants_1 = require("./constants");
|
19
|
+
const clients_1 = require("../../utils/clients");
|
20
|
+
const solana_1 = require("../../utils/solana");
|
21
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
22
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
23
|
+
const connection = (0, clients_1.getClientSolana)();
|
24
|
+
const stakingAccount = (yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, constants_1.nxfinanceStakingIdlItem, [
|
25
|
+
web3_js_1.PublicKey.findProgramAddressSync([
|
26
|
+
new web3_js_1.PublicKey(constants_1.stakePool).toBuffer(),
|
27
|
+
Buffer.from('nx_account', 'utf8'),
|
28
|
+
new web3_js_1.PublicKey(owner).toBuffer(),
|
29
|
+
], new web3_js_1.PublicKey(constants_1.stakingProgramId))[0],
|
30
|
+
]))[0];
|
31
|
+
if (!stakingAccount || stakingAccount.stakedTokens === '0')
|
32
|
+
return [];
|
33
|
+
const stakePoolAccount = yield cache.getItem(constants_1.stakingPoolKey, {
|
34
|
+
prefix: constants_1.platformId,
|
35
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
36
|
+
});
|
37
|
+
if (!stakePoolAccount)
|
38
|
+
return [];
|
39
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
40
|
+
const element = elementRegistry.addElementBorrowlend({
|
41
|
+
label: 'Staked',
|
42
|
+
});
|
43
|
+
element.addSuppliedAsset({
|
44
|
+
address: stakePoolAccount.stakeTokenMint,
|
45
|
+
amount: stakingAccount.stakedTokens,
|
46
|
+
});
|
47
|
+
/* const m = new Date(
|
48
|
+
new BigNumber(stakingAccount.lastUpdateNoteTime)
|
49
|
+
.multipliedBy(new BigNumber(1e3))
|
50
|
+
.toNumber()
|
51
|
+
);
|
52
|
+
const stakedTokens = new BigNumber(stakingAccount.stakedTokens);
|
53
|
+
const w = new BigNumber(stakePoolAccount.increaseNoteRatePerSecond)
|
54
|
+
.times(stakedTokens)
|
55
|
+
.times(new BigNumber(Date.now()).minus(m.getTime()))
|
56
|
+
.div(1e3)
|
57
|
+
.dividedBy(10 ** 9);
|
58
|
+
const stakedNotes = new BigNumber(stakingAccount.stakedNotes);
|
59
|
+
const A = stakedTokens.multipliedBy(2).minus(stakedNotes);
|
60
|
+
const M = new BigNumber(stakingAccount.notes).plus(w);
|
61
|
+
|
62
|
+
element.addRewardAsset({
|
63
|
+
address: stakePoolAccount.stakeTokenMint,
|
64
|
+
amount: (M.isGreaterThan(A) ? A : M).toNumber(),
|
65
|
+
}); */
|
66
|
+
element.addRewardAsset({
|
67
|
+
address: portfolio_core_1.solanaNativeAddress,
|
68
|
+
amount: stakingAccount.claimableReward,
|
69
|
+
});
|
70
|
+
element.addSuppliedAsset({
|
71
|
+
address: stakePoolAccount.stakeTokenMint,
|
72
|
+
amount: stakingAccount.withdrawingTokens,
|
73
|
+
attributes: {
|
74
|
+
lockedUntil: new bignumber_js_1.default(stakingAccount.timeOfWithdrawApply)
|
75
|
+
.plus(14 * 24 * 60 * 60) // 14 days
|
76
|
+
.multipliedBy(new bignumber_js_1.default(1e3))
|
77
|
+
.toNumber(),
|
78
|
+
},
|
79
|
+
});
|
80
|
+
return elementRegistry.getElements(cache);
|
81
|
+
});
|
82
|
+
const fetcher = {
|
83
|
+
id: `${constants_1.platformId}-staking`,
|
84
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
85
|
+
executor,
|
86
|
+
};
|
87
|
+
exports.default = fetcher;
|
88
|
+
//# sourceMappingURL=stakingFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA4E;AAC5E,6CAA4C;AAC5C,gEAAqC;AAErC,2CAMqB;AAErB,iDAAsD;AACtD,+CAAuE;AAEvE,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,cAAc,GAAG,CACrB,MAAM,IAAA,0CAAiC,EACrC,UAAU,EACV,mCAAuB,EACvB;QACE,mBAAS,CAAC,sBAAsB,CAC9B;YACE,IAAI,mBAAS,CAAC,qBAAS,CAAC,CAAC,QAAQ,EAAE;YACnC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC;YACjC,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;SAChC,EACD,IAAI,mBAAS,CAAC,4BAAgB,CAAC,CAChC,CAAC,CAAC,CAAC;KACL,CACF,CACF,CAAC,CAAC,CAAC,CAAC;IAEL,IAAI,CAAC,cAAc,IAAI,cAAc,CAAC,YAAY,KAAK,GAAG;QAAE,OAAO,EAAE,CAAC;IAEtE,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,OAAO,CAC1C,0BAAc,EACd;QACE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CACF,CAAC;IAEF,IAAI,CAAC,gBAAgB;QAAE,OAAO,EAAE,CAAC;IAEjC,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,eAAe,CAAC,oBAAoB,CAAC;QACnD,KAAK,EAAE,QAAQ;KAChB,CAAC,CAAC;IAEH,OAAO,CAAC,gBAAgB,CAAC;QACvB,OAAO,EAAE,gBAAgB,CAAC,cAAc;QACxC,MAAM,EAAE,cAAc,CAAC,YAAY;KACpC,CAAC,CAAC;IAEH;;;;;;;;;;;;;;;;;;UAkBM;IAEN,OAAO,CAAC,cAAc,CAAC;QACrB,OAAO,EAAE,oCAAmB;QAC5B,MAAM,EAAE,cAAc,CAAC,eAAe;KACvC,CAAC,CAAC;IAEH,OAAO,CAAC,gBAAgB,CAAC;QACvB,OAAO,EAAE,gBAAgB,CAAC,cAAc;QACxC,MAAM,EAAE,cAAc,CAAC,iBAAiB;QACxC,UAAU,EAAE;YACV,WAAW,EAAE,IAAI,sBAAS,CAAC,cAAc,CAAC,mBAAmB,CAAC;iBAC3D,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU;iBAClC,YAAY,CAAC,IAAI,sBAAS,CAAC,GAAG,CAAC,CAAC;iBAChC,QAAQ,EAAE;SACd;KACF,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,189 @@
|
|
1
|
+
export declare const NxfinanceStakingIdl: {
|
2
|
+
version: string;
|
3
|
+
name: string;
|
4
|
+
constants: ({
|
5
|
+
name: string;
|
6
|
+
type: string;
|
7
|
+
value: string;
|
8
|
+
} | {
|
9
|
+
name: string;
|
10
|
+
type: {
|
11
|
+
defined: string;
|
12
|
+
array?: undefined;
|
13
|
+
};
|
14
|
+
value: string;
|
15
|
+
} | {
|
16
|
+
name: string;
|
17
|
+
type: {
|
18
|
+
array: (number | {
|
19
|
+
defined: string;
|
20
|
+
})[];
|
21
|
+
defined?: undefined;
|
22
|
+
};
|
23
|
+
value: string;
|
24
|
+
})[];
|
25
|
+
instructions: ({
|
26
|
+
name: string;
|
27
|
+
accounts: ({
|
28
|
+
name: string;
|
29
|
+
isMut: boolean;
|
30
|
+
isSigner: boolean;
|
31
|
+
docs?: undefined;
|
32
|
+
} | {
|
33
|
+
name: string;
|
34
|
+
isMut: boolean;
|
35
|
+
isSigner: boolean;
|
36
|
+
docs: string[];
|
37
|
+
})[];
|
38
|
+
args: {
|
39
|
+
name: string;
|
40
|
+
type: {
|
41
|
+
defined: string;
|
42
|
+
};
|
43
|
+
}[];
|
44
|
+
} | {
|
45
|
+
name: string;
|
46
|
+
accounts: ({
|
47
|
+
name: string;
|
48
|
+
isMut: boolean;
|
49
|
+
isSigner: boolean;
|
50
|
+
docs?: undefined;
|
51
|
+
} | {
|
52
|
+
name: string;
|
53
|
+
isMut: boolean;
|
54
|
+
isSigner: boolean;
|
55
|
+
docs: string[];
|
56
|
+
})[];
|
57
|
+
args: {
|
58
|
+
name: string;
|
59
|
+
type: string;
|
60
|
+
}[];
|
61
|
+
})[];
|
62
|
+
accounts: ({
|
63
|
+
name: string;
|
64
|
+
type: {
|
65
|
+
kind: string;
|
66
|
+
fields: ({
|
67
|
+
name: string;
|
68
|
+
docs: string[];
|
69
|
+
type: string;
|
70
|
+
} | {
|
71
|
+
name: string;
|
72
|
+
docs: string[];
|
73
|
+
type: {
|
74
|
+
vec: {
|
75
|
+
defined: string;
|
76
|
+
};
|
77
|
+
defined?: undefined;
|
78
|
+
};
|
79
|
+
} | {
|
80
|
+
name: string;
|
81
|
+
type: {
|
82
|
+
defined: string;
|
83
|
+
vec?: undefined;
|
84
|
+
};
|
85
|
+
docs?: undefined;
|
86
|
+
})[];
|
87
|
+
};
|
88
|
+
} | {
|
89
|
+
name: string;
|
90
|
+
type: {
|
91
|
+
kind: string;
|
92
|
+
fields: ({
|
93
|
+
name: string;
|
94
|
+
type: string;
|
95
|
+
docs?: undefined;
|
96
|
+
} | {
|
97
|
+
name: string;
|
98
|
+
docs: string[];
|
99
|
+
type: string;
|
100
|
+
})[];
|
101
|
+
};
|
102
|
+
})[];
|
103
|
+
types: ({
|
104
|
+
name: string;
|
105
|
+
type: {
|
106
|
+
kind: string;
|
107
|
+
fields: ({
|
108
|
+
name: string;
|
109
|
+
type: string;
|
110
|
+
docs?: undefined;
|
111
|
+
} | {
|
112
|
+
name: string;
|
113
|
+
docs: string[];
|
114
|
+
type: string;
|
115
|
+
})[];
|
116
|
+
variants?: undefined;
|
117
|
+
};
|
118
|
+
docs?: undefined;
|
119
|
+
} | {
|
120
|
+
name: string;
|
121
|
+
docs: string[];
|
122
|
+
type: {
|
123
|
+
kind: string;
|
124
|
+
fields: ({
|
125
|
+
name: string;
|
126
|
+
type: {
|
127
|
+
defined: string;
|
128
|
+
};
|
129
|
+
} | {
|
130
|
+
name: string;
|
131
|
+
type: string;
|
132
|
+
})[];
|
133
|
+
variants?: undefined;
|
134
|
+
};
|
135
|
+
} | {
|
136
|
+
name: string;
|
137
|
+
docs: string[];
|
138
|
+
type: {
|
139
|
+
kind: string;
|
140
|
+
fields: {
|
141
|
+
name: string;
|
142
|
+
docs: string[];
|
143
|
+
type: string;
|
144
|
+
}[];
|
145
|
+
variants?: undefined;
|
146
|
+
};
|
147
|
+
} | {
|
148
|
+
name: string;
|
149
|
+
type: {
|
150
|
+
kind: string;
|
151
|
+
fields: ({
|
152
|
+
name: string;
|
153
|
+
type: string;
|
154
|
+
} | {
|
155
|
+
name: string;
|
156
|
+
type: {
|
157
|
+
defined: string;
|
158
|
+
};
|
159
|
+
})[];
|
160
|
+
variants?: undefined;
|
161
|
+
};
|
162
|
+
docs?: undefined;
|
163
|
+
} | {
|
164
|
+
name: string;
|
165
|
+
type: {
|
166
|
+
kind: string;
|
167
|
+
variants: {
|
168
|
+
name: string;
|
169
|
+
}[];
|
170
|
+
fields?: undefined;
|
171
|
+
};
|
172
|
+
docs?: undefined;
|
173
|
+
} | {
|
174
|
+
name: string;
|
175
|
+
docs: string[];
|
176
|
+
type: {
|
177
|
+
kind: string;
|
178
|
+
variants: {
|
179
|
+
name: string;
|
180
|
+
}[];
|
181
|
+
fields?: undefined;
|
182
|
+
};
|
183
|
+
})[];
|
184
|
+
errors: {
|
185
|
+
code: number;
|
186
|
+
name: string;
|
187
|
+
msg: string;
|
188
|
+
}[];
|
189
|
+
};
|