@sonarwatch/portfolio-plugins 0.12.52 → 0.12.54

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/src/index.js +4 -0
  4. package/src/index.js.map +1 -1
  5. package/src/plugins/famousfoxfederation/constants.d.ts +13 -0
  6. package/src/plugins/famousfoxfederation/constants.js +32 -0
  7. package/src/plugins/famousfoxfederation/constants.js.map +1 -0
  8. package/src/plugins/famousfoxfederation/helpers.d.ts +2 -0
  9. package/src/plugins/famousfoxfederation/helpers.js +11 -0
  10. package/src/plugins/famousfoxfederation/helpers.js.map +1 -0
  11. package/src/plugins/famousfoxfederation/index.d.ts +6 -0
  12. package/src/plugins/famousfoxfederation/index.js +14 -0
  13. package/src/plugins/famousfoxfederation/index.js.map +1 -0
  14. package/src/plugins/famousfoxfederation/stakingFetcher.d.ts +3 -0
  15. package/src/plugins/famousfoxfederation/stakingFetcher.js +70 -0
  16. package/src/plugins/famousfoxfederation/stakingFetcher.js.map +1 -0
  17. package/src/plugins/famousfoxfederation/stakingIdl.d.ts +31 -0
  18. package/src/plugins/famousfoxfederation/stakingIdl.js +226 -0
  19. package/src/plugins/famousfoxfederation/stakingIdl.js.map +1 -0
  20. package/src/plugins/famousfoxfederation/stakingJob.d.ts +3 -0
  21. package/src/plugins/famousfoxfederation/stakingJob.js +30 -0
  22. package/src/plugins/famousfoxfederation/stakingJob.js.map +1 -0
  23. package/src/plugins/famousfoxfederation/tokenMarketFetcher.d.ts +3 -0
  24. package/src/plugins/famousfoxfederation/tokenMarketFetcher.js +59 -0
  25. package/src/plugins/famousfoxfederation/tokenMarketFetcher.js.map +1 -0
  26. package/src/plugins/famousfoxfederation/tokenMarketIdl.d.ts +45 -0
  27. package/src/plugins/famousfoxfederation/tokenMarketIdl.js +792 -0
  28. package/src/plugins/famousfoxfederation/tokenMarketIdl.js.map +1 -0
  29. package/src/plugins/famousfoxfederation/types.d.ts +25 -0
  30. package/src/plugins/famousfoxfederation/types.js +3 -0
  31. package/src/plugins/famousfoxfederation/types.js.map +1 -0
  32. package/src/plugins/nxfinance/constants.d.ts +1 -0
  33. package/src/plugins/nxfinance/constants.js +2 -1
  34. package/src/plugins/nxfinance/constants.js.map +1 -1
  35. package/src/plugins/nxfinance/helpers.d.ts +4 -0
  36. package/src/plugins/nxfinance/helpers.js +52 -0
  37. package/src/plugins/nxfinance/helpers.js.map +1 -0
  38. package/src/plugins/nxfinance/positionsFetcher.js +57 -12
  39. package/src/plugins/nxfinance/positionsFetcher.js.map +1 -1
  40. package/src/plugins/nxfinance/types.d.ts +17 -0
  41. package/src/utils/solana/das/heliusAssetToAssetCollectible.js +1 -1
  42. package/src/utils/solana/das/heliusAssetToAssetCollectible.js.map +1 -1
  43. package/src/utils/solana/das/heliusAssetToAssetToken.d.ts +6 -0
  44. package/src/utils/solana/das/heliusAssetToAssetToken.js +27 -0
  45. package/src/utils/solana/das/heliusAssetToAssetToken.js.map +1 -0
  46. package/src/utils/solana/mintsToAssets.d.ts +3 -0
  47. package/src/utils/solana/mintsToAssets.js +58 -0
  48. package/src/utils/solana/mintsToAssets.js.map +1 -0
  49. package/src/plugins/nxfinance/structs.d.ts +0 -19
  50. package/src/plugins/nxfinance/structs.js +0 -22
  51. package/src/plugins/nxfinance/structs.js.map +0 -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.12.54](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.53...plugins-0.12.54) (2024-07-09)
6
+
7
+
8
+
9
+ ## [0.12.53](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.52...plugins-0.12.53) (2024-07-08)
10
+
11
+
12
+
5
13
  ## [0.12.52](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.51...plugins-0.12.52) (2024-07-08)
6
14
 
7
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.12.52",
3
+ "version": "0.12.54",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
package/src/index.js CHANGED
@@ -125,6 +125,7 @@ const citrus_1 = require("./plugins/citrus");
125
125
  const sharky_1 = require("./plugins/sharky");
126
126
  const sanctum_1 = require("./plugins/sanctum");
127
127
  const allbridge_1 = require("./plugins/allbridge");
128
+ const famousfoxfederation_1 = require("./plugins/famousfoxfederation");
128
129
  const nxfinance_1 = require("./plugins/nxfinance");
129
130
  var constants_1 = require("./plugins/tokens/constants");
130
131
  Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
@@ -244,6 +245,7 @@ exports.platforms = [
244
245
  ...sharky_1.platforms,
245
246
  ...sanctum_1.platforms,
246
247
  ...allbridge_1.platforms,
248
+ ...famousfoxfederation_1.platforms,
247
249
  ...nxfinance_1.platforms,
248
250
  ];
249
251
  // JOBS //
@@ -346,6 +348,7 @@ exports.jobs = [
346
348
  ...sharky_1.jobs,
347
349
  ...sanctum_1.jobs,
348
350
  ...allbridge_1.jobs,
351
+ ...famousfoxfederation_1.jobs,
349
352
  ...nxfinance_1.jobs,
350
353
  ];
351
354
  // FETCHERS //
@@ -450,6 +453,7 @@ exports.fetchers = [
450
453
  ...sharky_1.fetchers,
451
454
  ...sanctum_1.fetchers,
452
455
  ...allbridge_1.fetchers,
456
+ ...famousfoxfederation_1.fetchers,
453
457
  ...nxfinance_1.fetchers,
454
458
  ];
455
459
  exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.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,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,u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IAChB,GAAG,iBAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,uBAAoB;IACvB,GAAG,mBAAgB;IACnB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,iBAAc;IACjB,GAAG,kBAAe;IAClB,GAAG,oBAAiB;IACpB,GAAG,oBAAiB;CACrB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,sBAAmB;IACnB,sBAAmB;CACpB,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,6CAI0B;AAC1B,+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,6CAI0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;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sBAAmB;IACnB,sBAAmB;CACpB,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ import { IdlItem } from '@solanafm/explorer-kit-idls';
3
+ import { PublicKey } from '@solana/web3.js';
4
+ export declare const platformId = "famousfoxfederation";
5
+ export declare const platform: Platform;
6
+ export declare const tokenMarketProgram: PublicKey;
7
+ export declare const tokenMarketIdlItem: IdlItem;
8
+ export declare const foxProgram: PublicKey;
9
+ export declare const stakingConfigAccount: PublicKey;
10
+ export declare const foxyMint = "FoXyMu5xwXre7zEoSvzViRk3nGawHUp9kUh97y2NDhcq";
11
+ export declare const stakingIdlItem: IdlItem;
12
+ export declare const cachePrefix = "famousfoxfederation";
13
+ export declare const stakingConfigCacheKey = "stakingconfig";
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stakingConfigCacheKey = exports.cachePrefix = exports.stakingIdlItem = exports.foxyMint = exports.stakingConfigAccount = exports.foxProgram = exports.tokenMarketIdlItem = exports.tokenMarketProgram = exports.platform = exports.platformId = void 0;
4
+ const web3_js_1 = require("@solana/web3.js");
5
+ const stakingIdl_1 = require("./stakingIdl");
6
+ const tokenMarketIdl_1 = require("./tokenMarketIdl");
7
+ exports.platformId = 'famousfoxfederation';
8
+ exports.platform = {
9
+ id: exports.platformId,
10
+ name: 'Famous Fox Federation',
11
+ image: 'https://sonar.watch/img/platforms/famousfoxfederation.webp',
12
+ website: 'https://famousfoxes.com',
13
+ twitter: 'https://twitter.com/famousfoxfed',
14
+ // defiLlamaId: 'foo-finance', // from https://defillama.com/docs/api
15
+ };
16
+ exports.tokenMarketProgram = new web3_js_1.PublicKey('8BYmYs3zsBhftNELJdiKsCN2WyCBbrTwXd6WG4AFPr6n');
17
+ exports.tokenMarketIdlItem = {
18
+ programId: exports.tokenMarketProgram.toString(),
19
+ idl: tokenMarketIdl_1.tokenMarketIdl,
20
+ idlType: 'anchor',
21
+ };
22
+ exports.foxProgram = new web3_js_1.PublicKey('FoXpJL1exLBJgHVvdSHNKyKu2xX2uatctH9qp6dLmfpP');
23
+ exports.stakingConfigAccount = new web3_js_1.PublicKey('7N7M1H2CK51ip7sNtPgKhhv2eScx6BokLgHi1Ke3ZLiq');
24
+ exports.foxyMint = 'FoXyMu5xwXre7zEoSvzViRk3nGawHUp9kUh97y2NDhcq';
25
+ exports.stakingIdlItem = {
26
+ programId: exports.foxProgram.toString(),
27
+ idl: stakingIdl_1.StakingIDL,
28
+ idlType: 'anchor',
29
+ };
30
+ exports.cachePrefix = 'famousfoxfederation';
31
+ exports.stakingConfigCacheKey = 'stakingconfig';
32
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/famousfoxfederation/constants.ts"],"names":[],"mappings":";;;AAEA,6CAA4C;AAC5C,6CAA0C;AAC1C,qDAAkD;AAErC,QAAA,UAAU,GAAG,qBAAqB,CAAC;AAEnC,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,uBAAuB;IAC7B,KAAK,EAAE,4DAA4D;IACnE,OAAO,EAAE,yBAAyB;IAClC,OAAO,EAAE,kCAAkC;IAC3C,qEAAqE;CACtE,CAAC;AAEW,QAAA,kBAAkB,GAAG,IAAI,mBAAS,CAC7C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,kBAAkB,GAAG;IAChC,SAAS,EAAE,0BAAkB,CAAC,QAAQ,EAAE;IACxC,GAAG,EAAE,+BAAc;IACnB,OAAO,EAAE,QAAQ;CACP,CAAC;AAEA,QAAA,UAAU,GAAG,IAAI,mBAAS,CACrC,8CAA8C,CAC/C,CAAC;AACW,QAAA,oBAAoB,GAAG,IAAI,mBAAS,CAC/C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAE1D,QAAA,cAAc,GAAG;IAC5B,SAAS,EAAE,kBAAU,CAAC,QAAQ,EAAE;IAChC,GAAG,EAAE,uBAAU;IACf,OAAO,EAAE,QAAQ;CACP,CAAC;AAEA,QAAA,WAAW,GAAG,qBAAqB,CAAC;AACpC,QAAA,qBAAqB,GAAG,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { StakingAccount, StakingConfig } from './types';
2
+ export declare const calcEarnings: (stakingAccount: StakingAccount, stakingConfig: StakingConfig) => number;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calcEarnings = void 0;
4
+ const calcEarnings = (stakingAccount, stakingConfig) => {
5
+ const amount = Number(stakingConfig.amount);
6
+ return Math.floor(((Date.now() / 1e3 - Number(stakingAccount.lastClaim)) /
7
+ Number(stakingConfig.interval)) *
8
+ (stakingAccount.tff ? amount / 4 : amount));
9
+ };
10
+ exports.calcEarnings = calcEarnings;
11
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/famousfoxfederation/helpers.ts"],"names":[],"mappings":";;;AAEO,MAAM,YAAY,GAAG,CAC1B,cAA8B,EAC9B,aAA4B,EAC5B,EAAE;IACF,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5C,OAAO,IAAI,CAAC,KAAK,CACf,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QACpD,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAC/B,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAC7C,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,YAAY,gBAUvB"}
@@ -0,0 +1,6 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ import { Fetcher } from '../../Fetcher';
3
+ import { Job } from '../../Job';
4
+ export declare const platforms: Platform[];
5
+ export declare const jobs: Job[];
6
+ export declare const fetchers: Fetcher[];
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.fetchers = exports.jobs = exports.platforms = void 0;
7
+ const constants_1 = require("./constants");
8
+ const tokenMarketFetcher_1 = __importDefault(require("./tokenMarketFetcher"));
9
+ const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
10
+ const stakingJob_1 = __importDefault(require("./stakingJob"));
11
+ exports.platforms = [constants_1.platform];
12
+ exports.jobs = [stakingJob_1.default];
13
+ exports.fetchers = [tokenMarketFetcher_1.default, stakingFetcher_1.default];
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/famousfoxfederation/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,8EAAsD;AACtD,sEAA8C;AAC9C,8DAAsC;AAEzB,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,oBAAU,CAAC,CAAC;AAC3B,QAAA,QAAQ,GAAc,CAAC,4BAAkB,EAAE,wBAAc,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,70 @@
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 constants_1 = require("./constants");
17
+ const clients_1 = require("../../utils/clients");
18
+ const solana_1 = require("../../utils/solana");
19
+ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
20
+ const helpers_1 = require("./helpers");
21
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
22
+ const connection = (0, clients_1.getClientSolana)();
23
+ const [accounts] = yield Promise.all([
24
+ (0, solana_1.getAutoParsedProgramAccounts)(connection, constants_1.stakingIdlItem, [
25
+ {
26
+ memcmp: {
27
+ bytes: owner,
28
+ offset: 41,
29
+ },
30
+ },
31
+ ]),
32
+ ]);
33
+ if (!accounts.length)
34
+ return [];
35
+ const [tokenPrice, configAccount] = yield Promise.all([
36
+ cache.getTokenPrice((0, portfolio_core_1.formatTokenAddress)(constants_1.foxyMint, portfolio_core_1.NetworkId.solana), portfolio_core_1.NetworkId.solana),
37
+ cache.getItem(constants_1.stakingConfigCacheKey, {
38
+ prefix: constants_1.cachePrefix,
39
+ networkId: portfolio_core_1.NetworkId.solana,
40
+ }),
41
+ ]);
42
+ if (!tokenPrice || !configAccount)
43
+ return [];
44
+ const earnings = accounts.reduce((sum, stakingAccount) => {
45
+ const earningForThisOne = (0, helpers_1.calcEarnings)(stakingAccount, configAccount);
46
+ return earningForThisOne !== null ? sum + earningForThisOne : sum;
47
+ }, 0);
48
+ if (earnings === 0)
49
+ return [];
50
+ const asset = (0, tokenPriceToAssetToken_1.default)(constants_1.foxyMint, earnings, portfolio_core_1.NetworkId.solana, tokenPrice, undefined, { isClaimable: true });
51
+ return [
52
+ {
53
+ type: portfolio_core_1.PortfolioElementType.multiple,
54
+ networkId: portfolio_core_1.NetworkId.solana,
55
+ platformId: constants_1.platformId,
56
+ label: 'Rewards',
57
+ value: asset.value,
58
+ data: {
59
+ assets: [asset],
60
+ },
61
+ },
62
+ ];
63
+ });
64
+ const fetcher = {
65
+ id: `${constants_1.platformId}-staking`,
66
+ networkId: portfolio_core_1.NetworkId.solana,
67
+ executor,
68
+ };
69
+ exports.default = fetcher;
70
+ //# sourceMappingURL=stakingFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/famousfoxfederation/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AAEpC,2CAMqB;AAErB,iDAAsD;AACtD,+CAAkE;AAElE,qGAA6E;AAC7E,uCAAyC;AAEzC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACnC,IAAA,qCAA4B,EAAiB,UAAU,EAAE,0BAAc,EAAE;YACvE;gBACE,MAAM,EAAE;oBACN,KAAK,EAAE,KAAK;oBACZ,MAAM,EAAE,EAAE;iBACX;aACF;SACF,CAAC;KACH,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAEhC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACpD,KAAK,CAAC,aAAa,CACjB,IAAA,mCAAkB,EAAC,oBAAQ,EAAE,0BAAS,CAAC,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L: {
2
+ version: string;
3
+ name: string;
4
+ instructions: {
5
+ name: string;
6
+ accounts: {
7
+ name: string;
8
+ isMut: boolean;
9
+ isSigner: boolean;
10
+ }[];
11
+ args: {
12
+ name: string;
13
+ type: string;
14
+ }[];
15
+ }[];
16
+ accounts: {
17
+ name: string;
18
+ type: {
19
+ kind: string;
20
+ fields: {
21
+ name: string;
22
+ type: string;
23
+ }[];
24
+ };
25
+ }[];
26
+ errors: {
27
+ code: number;
28
+ name: string;
29
+ msg: string;
30
+ }[];
31
+ };
@@ -0,0 +1,226 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StakingIDL = void 0;
4
+ exports.StakingIDL = {
5
+ version: '0.1.0',
6
+ name: 'staking',
7
+ instructions: [
8
+ {
9
+ name: 'initialize',
10
+ accounts: [
11
+ { name: 'config', isMut: true, isSigner: true },
12
+ { name: 'authority', isMut: true, isSigner: false },
13
+ { name: 'systemProgram', isMut: false, isSigner: false },
14
+ ],
15
+ args: [
16
+ { name: 'reward', type: 'publicKey' },
17
+ { name: 'amount', type: 'i64' },
18
+ { name: 'interval', type: 'i64' },
19
+ { name: 'timelock', type: 'i64' },
20
+ ],
21
+ },
22
+ {
23
+ name: 'updateConfig',
24
+ accounts: [
25
+ { name: 'config', isMut: true, isSigner: false },
26
+ { name: 'authority', isMut: false, isSigner: true },
27
+ ],
28
+ args: [
29
+ { name: 'reward', type: 'publicKey' },
30
+ { name: 'amount', type: 'i64' },
31
+ { name: 'interval', type: 'i64' },
32
+ { name: 'timelock', type: 'i64' },
33
+ ],
34
+ },
35
+ {
36
+ name: 'initDeposit',
37
+ accounts: [
38
+ { name: 'config', isMut: true, isSigner: false },
39
+ { name: 'authority', isMut: false, isSigner: false },
40
+ { name: 'rewardAccount', isMut: true, isSigner: false },
41
+ { name: 'reward', isMut: false, isSigner: false },
42
+ { name: 'owner', isMut: false, isSigner: true },
43
+ { name: 'tokenProgram', isMut: false, isSigner: false },
44
+ { name: 'systemProgram', isMut: false, isSigner: false },
45
+ { name: 'rent', isMut: false, isSigner: false },
46
+ ],
47
+ args: [
48
+ { name: 'authBump', type: 'u8' },
49
+ { name: 'rewardBump', type: 'u8' },
50
+ ],
51
+ },
52
+ {
53
+ name: 'deposit',
54
+ accounts: [
55
+ { name: 'config', isMut: true, isSigner: false },
56
+ { name: 'authority', isMut: false, isSigner: false },
57
+ { name: 'rewardAccount', isMut: true, isSigner: false },
58
+ { name: 'reward', isMut: false, isSigner: false },
59
+ { name: 'mainAccount', isMut: true, isSigner: false },
60
+ { name: 'owner', isMut: false, isSigner: true },
61
+ { name: 'tokenProgram', isMut: false, isSigner: false },
62
+ ],
63
+ args: [{ name: 'amount', type: 'u64' }],
64
+ },
65
+ {
66
+ name: 'stakeFox',
67
+ accounts: [
68
+ { name: 'config', isMut: true, isSigner: false },
69
+ { name: 'authority', isMut: true, isSigner: false },
70
+ { name: 'stakeAccount', isMut: true, isSigner: false },
71
+ { name: 'tokenAccount', isMut: true, isSigner: false },
72
+ { name: 'owner', isMut: false, isSigner: true },
73
+ { name: 'fromAccount', isMut: true, isSigner: false },
74
+ { name: 'mint', isMut: false, isSigner: false },
75
+ { name: 'metadata', isMut: false, isSigner: false },
76
+ { name: 'tokenProgram', isMut: false, isSigner: false },
77
+ { name: 'systemProgram', isMut: false, isSigner: false },
78
+ { name: 'rent', isMut: false, isSigner: false },
79
+ { name: 'clock', isMut: false, isSigner: false },
80
+ ],
81
+ args: [
82
+ { name: 'authBump', type: 'u8' },
83
+ { name: 'stakeBump', type: 'u8' },
84
+ { name: 'tokenBump', type: 'u8' },
85
+ ],
86
+ },
87
+ {
88
+ name: 'stakeFoxV2',
89
+ accounts: [
90
+ { name: 'config', isMut: true, isSigner: false },
91
+ { name: 'authority', isMut: true, isSigner: false },
92
+ { name: 'stakeAccount', isMut: true, isSigner: false },
93
+ { name: 'owner', isMut: false, isSigner: true },
94
+ { name: 'fromAccount', isMut: true, isSigner: false },
95
+ { name: 'mint', isMut: false, isSigner: false },
96
+ { name: 'metadata', isMut: false, isSigner: false },
97
+ { name: 'metaplexAcc', isMut: false, isSigner: false },
98
+ { name: 'masterEdition', isMut: false, isSigner: false },
99
+ { name: 'tokenProgram', isMut: false, isSigner: false },
100
+ { name: 'systemProgram', isMut: false, isSigner: false },
101
+ { name: 'rent', isMut: false, isSigner: false },
102
+ { name: 'clock', isMut: false, isSigner: false },
103
+ ],
104
+ args: [
105
+ { name: 'authBump', type: 'u8' },
106
+ { name: 'stakeBump', type: 'u8' },
107
+ ],
108
+ },
109
+ {
110
+ name: 'unstakeFox',
111
+ accounts: [
112
+ { name: 'config', isMut: true, isSigner: false },
113
+ { name: 'authority', isMut: true, isSigner: false },
114
+ { name: 'stakeAccount', isMut: true, isSigner: false },
115
+ { name: 'tokenAccount', isMut: true, isSigner: false },
116
+ { name: 'owner', isMut: true, isSigner: true },
117
+ { name: 'toAccount', isMut: true, isSigner: false },
118
+ { name: 'mint', isMut: false, isSigner: false },
119
+ { name: 'tokenProgram', isMut: false, isSigner: false },
120
+ { name: 'systemProgram', isMut: false, isSigner: false },
121
+ { name: 'clock', isMut: false, isSigner: false },
122
+ { name: 'associatedTokenProgram', isMut: false, isSigner: false },
123
+ { name: 'rent', isMut: false, isSigner: false },
124
+ ],
125
+ args: [],
126
+ },
127
+ {
128
+ name: 'bonkDerug',
129
+ accounts: [
130
+ { name: 'config', isMut: true, isSigner: false },
131
+ { name: 'authority', isMut: true, isSigner: false },
132
+ { name: 'tokenAccount', isMut: true, isSigner: false },
133
+ { name: 'owner', isMut: true, isSigner: true },
134
+ { name: 'toAccount', isMut: true, isSigner: false },
135
+ { name: 'mint', isMut: false, isSigner: false },
136
+ { name: 'tokenProgram', isMut: false, isSigner: false },
137
+ { name: 'systemProgram', isMut: false, isSigner: false },
138
+ { name: 'associatedTokenProgram', isMut: false, isSigner: false },
139
+ { name: 'rent', isMut: false, isSigner: false },
140
+ ],
141
+ args: [{ name: 'bump', type: 'u8' }],
142
+ },
143
+ {
144
+ name: 'unstakeFoxV2',
145
+ accounts: [
146
+ { name: 'config', isMut: true, isSigner: false },
147
+ { name: 'authority', isMut: true, isSigner: false },
148
+ { name: 'stakeAccount', isMut: true, isSigner: false },
149
+ { name: 'masterEdition', isMut: false, isSigner: false },
150
+ { name: 'metaplexAcc', isMut: false, isSigner: false },
151
+ { name: 'owner', isMut: true, isSigner: true },
152
+ { name: 'toAccount', isMut: true, isSigner: false },
153
+ { name: 'mint', isMut: false, isSigner: false },
154
+ { name: 'tokenProgram', isMut: false, isSigner: false },
155
+ { name: 'systemProgram', isMut: false, isSigner: false },
156
+ { name: 'clock', isMut: false, isSigner: false },
157
+ { name: 'rent', isMut: false, isSigner: false },
158
+ ],
159
+ args: [],
160
+ },
161
+ {
162
+ name: 'claim',
163
+ accounts: [
164
+ { name: 'config', isMut: true, isSigner: false },
165
+ { name: 'authority', isMut: false, isSigner: false },
166
+ { name: 'rewardAccount', isMut: true, isSigner: false },
167
+ { name: 'userRewardAccount', isMut: true, isSigner: false },
168
+ { name: 'stakeAccount', isMut: true, isSigner: false },
169
+ { name: 'owner', isMut: false, isSigner: true },
170
+ { name: 'mint', isMut: false, isSigner: false },
171
+ { name: 'reward', isMut: false, isSigner: false },
172
+ { name: 'clock', isMut: false, isSigner: false },
173
+ { name: 'tokenProgram', isMut: false, isSigner: false },
174
+ { name: 'associatedTokenProgram', isMut: false, isSigner: false },
175
+ { name: 'rent', isMut: false, isSigner: false },
176
+ { name: 'systemProgram', isMut: false, isSigner: false },
177
+ ],
178
+ args: [],
179
+ },
180
+ ],
181
+ accounts: [
182
+ {
183
+ name: 'StakingAccount',
184
+ type: {
185
+ kind: 'struct',
186
+ fields: [
187
+ { name: 'bump', type: 'u8' },
188
+ { name: 'fox', type: 'publicKey' },
189
+ { name: 'owner', type: 'publicKey' },
190
+ { name: 'lock', type: 'i64' },
191
+ { name: 'lastClaim', type: 'i64' },
192
+ { name: 'tff', type: 'bool' },
193
+ { name: 'v2', type: 'bool' },
194
+ ],
195
+ },
196
+ },
197
+ {
198
+ name: 'StakingConfig',
199
+ type: {
200
+ kind: 'struct',
201
+ fields: [
202
+ { name: 'bump', type: 'u8' },
203
+ { name: 'reward', type: 'publicKey' },
204
+ { name: 'authority', type: 'publicKey' },
205
+ { name: 'amount', type: 'i64' },
206
+ { name: 'interval', type: 'i64' },
207
+ { name: 'timelock', type: 'i64' },
208
+ { name: 'count', type: 'u64' },
209
+ { name: 'tcount', type: 'u64' },
210
+ ],
211
+ },
212
+ },
213
+ ],
214
+ errors: [
215
+ { code: 6000, name: 'IncorrectOwner', msg: 'Invalid owner account' },
216
+ { code: 6001, name: 'FoxLocked', msg: 'Fox is locked' },
217
+ { code: 6002, name: 'FoxNotStaked', msg: 'Fox not staked' },
218
+ { code: 6003, name: 'FoxNotFound', msg: 'Fox not found' },
219
+ { code: 6004, name: 'NoReward', msg: 'No reward' },
220
+ { code: 6005, name: 'InvalidReward', msg: 'Invalid reward account' },
221
+ { code: 6006, name: 'InvalidFox', msg: 'Invalid Index' },
222
+ { code: 6007, name: 'InvalidMetadata', msg: 'Invalid Fox' },
223
+ { code: 6008, name: 'ClaimReward', msg: 'Claim Reward' },
224
+ ],
225
+ };
226
+ //# sourceMappingURL=stakingIdl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stakingIdl.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/famousfoxfederation/stakingIdl.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;IACxB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,SAAS;IACf,YAAY,EAAE;QACZ;YACE,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE;gBACR,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/C,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE;gBACnD,EAAE,IAAI,EA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AAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,EAAE;QACzD,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,EAAE;QAClD,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,EAAE,wBAAwB,EAAE;QACpE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,eAAe,EAAE;QACxD,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,EAAE,aAAa,EAAE;QAC3D,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,cAAc,EAAE;KACzD;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,30 @@
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 solana_1 = require("../../utils/solana");
15
+ const clients_1 = require("../../utils/clients");
16
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
17
+ const connection = (0, clients_1.getClientSolana)();
18
+ const [stakingConfig] = yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, constants_1.stakingIdlItem, [constants_1.stakingConfigAccount]);
19
+ yield cache.setItem(constants_1.stakingConfigCacheKey, stakingConfig, {
20
+ prefix: constants_1.cachePrefix,
21
+ networkId: portfolio_core_1.NetworkId.solana,
22
+ });
23
+ });
24
+ const job = {
25
+ id: `${constants_1.platformId}-staking`,
26
+ executor,
27
+ label: 'normal',
28
+ };
29
+ exports.default = job;
30
+ //# sourceMappingURL=stakingJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stakingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/famousfoxfederation/stakingJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAMqB;AAErB,+CAAuE;AACvE,iDAAsD;AAEtD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,CAAC,aAAa,CAAC,GACnB,MAAM,IAAA,0CAAiC,EACrC,UAAU,EACV,0BAAc,EACd,CAAC,gCAAoB,CAAC,CACvB,CAAC;IAEJ,MAAM,KAAK,CAAC,OAAO,CAAC,iCAAqB,EAAE,aAAa,EAAE;QACxD,MAAM,EAAE,uBAAW;QACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;