@sonarwatch/portfolio-plugins 0.12.46 → 0.12.48

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/CHANGELOG.md +12 -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/01/constants.js +2 -1
  6. package/src/plugins/01/constants.js.map +1 -1
  7. package/src/plugins/hedgehog/ammJob.js +5 -5
  8. package/src/plugins/hedgehog/ammJob.js.map +1 -1
  9. package/src/plugins/hedgehog/constants.d.ts +0 -2
  10. package/src/plugins/hedgehog/constants.js +1 -3
  11. package/src/plugins/hedgehog/constants.js.map +1 -1
  12. package/src/plugins/jito/helper.d.ts +3 -0
  13. package/src/plugins/jito/helper.js +21 -0
  14. package/src/plugins/jito/helper.js.map +1 -0
  15. package/src/plugins/mango/redeemFetcher.js +1 -1
  16. package/src/plugins/mango/redeemFetcher.js.map +1 -1
  17. package/src/plugins/native-stake/solana/constants.d.ts +1 -1
  18. package/src/plugins/native-stake/solana/constants.js +2 -2
  19. package/src/plugins/native-stake/solana/constants.js.map +1 -1
  20. package/src/plugins/native-stake/solana/solanaFetcher.js +1 -1
  21. package/src/plugins/native-stake/solana/solanaFetcher.js.map +1 -1
  22. package/src/plugins/native-stake/solana/solanaValidatorsJob.js +17 -38
  23. package/src/plugins/native-stake/solana/solanaValidatorsJob.js.map +1 -1
  24. package/src/plugins/native-stake/solana/types.d.ts +7 -11
  25. package/src/plugins/nxfinance/constants.d.ts +8 -0
  26. package/src/plugins/nxfinance/constants.js +22 -0
  27. package/src/plugins/nxfinance/constants.js.map +1 -0
  28. package/src/plugins/nxfinance/idl.d.ts +166 -0
  29. package/src/plugins/nxfinance/idl.js +2169 -0
  30. package/src/plugins/nxfinance/idl.js.map +1 -0
  31. package/src/plugins/nxfinance/index.d.ts +6 -0
  32. package/src/plugins/nxfinance/index.js +12 -0
  33. package/src/plugins/nxfinance/index.js.map +1 -0
  34. package/src/plugins/nxfinance/positionsFetcher.d.ts +3 -0
  35. package/src/plugins/nxfinance/positionsFetcher.js +92 -0
  36. package/src/plugins/nxfinance/positionsFetcher.js.map +1 -0
  37. package/src/plugins/nxfinance/structs.d.ts +19 -0
  38. package/src/plugins/nxfinance/structs.js +22 -0
  39. package/src/plugins/nxfinance/structs.js.map +1 -0
  40. package/src/plugins/nxfinance/types.d.ts +21 -0
  41. package/src/plugins/nxfinance/types.js +3 -0
  42. package/src/plugins/nxfinance/types.js.map +1 -0
  43. package/src/plugins/parcl/constants.d.ts +0 -2
  44. package/src/plugins/parcl/constants.js +1 -3
  45. package/src/plugins/parcl/constants.js.map +1 -1
  46. package/src/plugins/parcl/marginFetcher.js +2 -2
  47. package/src/plugins/parcl/marginFetcher.js.map +1 -1
  48. package/src/plugins/zeta/airdropFetcher.js +8 -0
  49. package/src/plugins/zeta/airdropFetcher.js.map +1 -1
  50. package/src/plugins/zeta/constants.d.ts +5 -1
  51. package/src/plugins/zeta/constants.js +46 -2
  52. package/src/plugins/zeta/constants.js.map +1 -1
  53. package/src/plugins/zeta/depositsFetcher.js +2 -2
  54. package/src/plugins/zeta/depositsFetcher.js.map +1 -1
  55. package/src/plugins/zeta/helpers.d.ts +3 -0
  56. package/src/plugins/zeta/helpers.js +27 -1
  57. package/src/plugins/zeta/helpers.js.map +1 -1
  58. package/src/plugins/zeta/idls.d.ts +70 -0
  59. package/src/plugins/zeta/idls.js +749 -0
  60. package/src/plugins/zeta/idls.js.map +1 -0
  61. package/src/plugins/zeta/index.js +6 -1
  62. package/src/plugins/zeta/index.js.map +1 -1
  63. package/src/plugins/zeta/stakingFetcher.d.ts +3 -0
  64. package/src/plugins/zeta/stakingFetcher.js +69 -0
  65. package/src/plugins/zeta/stakingFetcher.js.map +1 -0
  66. package/src/plugins/zeta/structs.d.ts +7 -0
  67. package/src/plugins/zeta/structs.js +7 -1
  68. package/src/plugins/zeta/structs.js.map +1 -1
  69. package/src/plugins/zeta/types.d.ts +26 -0
  70. package/src/plugins/zeta/types.js +7 -0
  71. package/src/plugins/zeta/types.js.map +1 -1
  72. package/src/utils/misc/checkComputeAndStoreTokensPrices.js +2 -1
  73. package/src/utils/misc/checkComputeAndStoreTokensPrices.js.map +1 -1
  74. package/src/utils/misc/getLpUnderlyingTokenSource.js +2 -1
  75. package/src/utils/misc/getLpUnderlyingTokenSource.js.map +1 -1
  76. package/src/utils/solana/das/getAssetBatchDas.js +3 -2
  77. package/src/utils/solana/das/getAssetBatchDas.js.map +1 -1
  78. package/src/utils/solana/das/heliusAssetToAssetCollectible.js +6 -4
  79. package/src/utils/solana/das/heliusAssetToAssetCollectible.js.map +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"idl.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/idl.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;IAClC,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,kBAAkB;IACxB,SAAS,EAAE;QACT;YACE,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,aAAa;SACrB;QACD;YACE,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,WAAW;SACnB;QACD;YACE,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,WAAW;SACnB;QACD;YACE,IAAI,EAAE,sBAAsB;YAC5B,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,kBAAkB;SAC1B;QACD;YACE,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,MAAM;SACd;QACD;YACE,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,IAAI;SACZ;QACD;YACE,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,IAAI;SACZ;QACD;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,WAAW;YACjB,KAAK,EACH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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,12 @@
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 positionsFetcher_1 = __importDefault(require("./positionsFetcher"));
9
+ exports.platforms = [constants_1.platform];
10
+ exports.jobs = [];
11
+ exports.fetchers = [positionsFetcher_1.default];
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,0EAAkD;AAErC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,0BAAgB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,92 @@
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 tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
22
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
23
+ const connection = (0, clients_1.getClientSolana)();
24
+ const marginAccountPublicKey = web3_js_1.PublicKey.findProgramAddressSync([
25
+ web3_js_1.PublicKey.findProgramAddressSync([constants_1.ID.toBuffer()], constants_1.leverageFiProgramID)[0].toBuffer(),
26
+ new web3_js_1.PublicKey(owner).toBuffer(),
27
+ Buffer.from('account'),
28
+ ], constants_1.leverageFiProgramID)[0];
29
+ const marginAccount = (yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, constants_1.nxfinanceLeverageIdlItem, [marginAccountPublicKey]))[0];
30
+ if (!marginAccount)
31
+ return [];
32
+ const elements = [];
33
+ const borrowedAssets = [];
34
+ const borrowedYields = [];
35
+ const suppliedAssets = [];
36
+ const suppliedYields = [];
37
+ const rewardAssets = [];
38
+ const mints = new Set();
39
+ marginAccount.deposits.forEach((d) => mints.add((0, portfolio_core_1.formatTokenAddress)(d.tokenMint, portfolio_core_1.NetworkId.solana)));
40
+ marginAccount.loans.forEach((l) => mints.add((0, portfolio_core_1.formatTokenAddress)(l.tokenMint, portfolio_core_1.NetworkId.solana)));
41
+ const tokenPrices = yield cache.getTokenPricesAsMap([...mints], portfolio_core_1.NetworkId.solana);
42
+ marginAccount.deposits.forEach((deposit) => {
43
+ const tokenPrice = tokenPrices.get((0, portfolio_core_1.formatTokenAddress)(deposit.tokenMint, portfolio_core_1.NetworkId.solana));
44
+ if (!tokenPrice)
45
+ return;
46
+ suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPrice.address, new bignumber_js_1.default(deposit.depositToken)
47
+ .dividedBy(Math.pow(10, tokenPrice.decimals))
48
+ .toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice));
49
+ });
50
+ marginAccount.loans.forEach((loan) => {
51
+ const tokenPrice = tokenPrices.get((0, portfolio_core_1.formatTokenAddress)(loan.tokenMint, portfolio_core_1.NetworkId.solana));
52
+ if (!tokenPrice)
53
+ return;
54
+ borrowedAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPrice.address, new bignumber_js_1.default(loan.loanToken)
55
+ .dividedBy(Math.pow(10, tokenPrice.decimals))
56
+ .toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice));
57
+ });
58
+ if (suppliedAssets.length !== 0 || borrowedAssets.length !== 0) {
59
+ const { borrowedValue, suppliedValue, value, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({
60
+ suppliedAssets,
61
+ borrowedAssets,
62
+ rewardAssets,
63
+ });
64
+ elements.push({
65
+ type: portfolio_core_1.PortfolioElementType.borrowlend,
66
+ networkId: portfolio_core_1.NetworkId.solana,
67
+ platformId: constants_1.platformId,
68
+ label: 'Lending',
69
+ value,
70
+ data: {
71
+ borrowedAssets,
72
+ borrowedValue,
73
+ borrowedYields,
74
+ suppliedAssets,
75
+ suppliedValue,
76
+ suppliedYields,
77
+ rewardAssets,
78
+ rewardValue,
79
+ healthRatio: null,
80
+ value,
81
+ },
82
+ });
83
+ }
84
+ return elements;
85
+ });
86
+ const fetcher = {
87
+ id: `${constants_1.platformId}-positions`,
88
+ networkId: portfolio_core_1.NetworkId.solana,
89
+ executor,
90
+ };
91
+ exports.default = fetcher;
92
+ //# sourceMappingURL=positionsFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/position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;aACpC,QAAQ,EAAE,EACb,0BAAS,CAAC,MAAM,EAChB,UAAU,CACX,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/D,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,GACxD,IAAA,wCAAuB,EAAC;YACtB,cAAc;YACd,cAAc;YACd,YAAY;SACb,CAAC,CAAC;QAEL,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,YAAY;gBACZ,WAAW;gBACX,WAAW,EAAE,IAAI;gBACjB,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,19 @@
1
+ /// <reference types="node" />
2
+ import { BeetStruct } from '@metaplex-foundation/beet';
3
+ import { PublicKey } from '@solana/web3.js';
4
+ import BigNumber from 'bignumber.js';
5
+ export declare enum State {
6
+ Uninitialized = 0,
7
+ StakePool = 1,
8
+ InactiveStakePool = 2,
9
+ StakeAccount = 3
10
+ }
11
+ export type Liquidity = {
12
+ buffer: Buffer;
13
+ state: State;
14
+ mint: PublicKey;
15
+ owner: PublicKey;
16
+ amountDeposited: BigNumber;
17
+ space: number[];
18
+ };
19
+ export declare const liquidityStruct: BeetStruct<Liquidity, Partial<Liquidity>>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.liquidityStruct = exports.State = void 0;
4
+ const beet_1 = require("@metaplex-foundation/beet");
5
+ const beet_solana_1 = require("@metaplex-foundation/beet-solana");
6
+ const solana_1 = require("../../utils/solana");
7
+ var State;
8
+ (function (State) {
9
+ State[State["Uninitialized"] = 0] = "Uninitialized";
10
+ State[State["StakePool"] = 1] = "StakePool";
11
+ State[State["InactiveStakePool"] = 2] = "InactiveStakePool";
12
+ State[State["StakeAccount"] = 3] = "StakeAccount";
13
+ })(State || (exports.State = State = {}));
14
+ exports.liquidityStruct = new beet_1.BeetStruct([
15
+ ['buffer', (0, solana_1.blob)(8)],
16
+ ['state', beet_1.u8],
17
+ ['mint', beet_solana_1.publicKey],
18
+ ['owner', beet_solana_1.publicKey],
19
+ ['amountDeposited', solana_1.u64],
20
+ ['space', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 128)],
21
+ ], (args) => args);
22
+ //# sourceMappingURL=structs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/structs.ts"],"names":[],"mappings":";;;AAAA,oDAImC;AACnC,kEAA6D;AAG7D,+CAA+C;AAE/C,IAAY,KAKX;AALD,WAAY,KAAK;IACf,mDAAa,CAAA;IACb,2CAAS,CAAA;IACT,2DAAiB,CAAA;IACjB,iDAAY,CAAA;AACd,CAAC,EALW,KAAK,qBAAL,KAAK,QAKhB;AAWY,QAAA,eAAe,GAAG,IAAI,iBAAU,CAC3C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,SAAE,CAAC;IACb,CAAC,MAAM,EAAE,uBAAS,CAAC;IACnB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,OAAO,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,GAAG,CAAC,CAAC;CAC1C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAiB,CAC5B,CAAC"}
@@ -0,0 +1,21 @@
1
+ export type MarginAccount = {
2
+ leveragefi: string;
3
+ owner: string;
4
+ deposits: CollateralDetail[];
5
+ loans: LoanDetail[];
6
+ leverage: string;
7
+ jlpNotes: string;
8
+ activeLoan: string;
9
+ };
10
+ export type CollateralDetail = {
11
+ tokenMint: string;
12
+ depositNote: string;
13
+ depositToken: string;
14
+ marketValue: string;
15
+ };
16
+ export type LoanDetail = {
17
+ tokenMint: string;
18
+ loanNote: string;
19
+ loanToken: string;
20
+ loanValue: string;
21
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/types.ts"],"names":[],"mappings":""}
@@ -6,8 +6,6 @@ export declare const platformWebsite = "https://app.parcl.co/";
6
6
  export declare const platformName = "Parcl";
7
7
  export declare const platform: Platform;
8
8
  export declare const programId: PublicKey;
9
- export declare const usdcMint = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
10
- export declare const usdcDecimals = 6;
11
9
  export declare const airdropApi = "https://gnome-api-mainnet.fly.dev/user/";
12
10
  export declare const allocationPrefix = "parcl/allocation";
13
11
  export declare const prclMint = "4LLbsb5ReP3yEtYzmXewyGjcir5uXtKFURtaEUVC2AHs";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.distributorProgram = exports.merkleTree = exports.merkleApi = exports.prclDecimals = exports.prclMint = exports.allocationPrefix = exports.airdropApi = exports.usdcDecimals = exports.usdcMint = exports.programId = exports.platform = exports.platformName = exports.platformWebsite = exports.platformImage = exports.platformId = void 0;
3
+ exports.distributorProgram = exports.merkleTree = exports.merkleApi = exports.prclDecimals = exports.prclMint = exports.allocationPrefix = exports.airdropApi = exports.programId = exports.platform = exports.platformName = exports.platformWebsite = exports.platformImage = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  exports.platformId = 'parcl';
6
6
  exports.platformImage = 'https://sonar.watch/img/platforms/parcl.png';
@@ -15,8 +15,6 @@ exports.platform = {
15
15
  twitter: 'https://twitter.com/Parcl',
16
16
  };
17
17
  exports.programId = new web3_js_1.PublicKey('3parcLrT7WnXAcyPfkCz49oofuuf2guUKkjuFkAhZW8Y');
18
- exports.usdcMint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
19
- exports.usdcDecimals = 6;
20
18
  exports.airdropApi = 'https://gnome-api-mainnet.fly.dev/user/';
21
19
  exports.allocationPrefix = `${exports.platformId}/allocation`;
22
20
  exports.prclMint = '4LLbsb5ReP3yEtYzmXewyGjcir5uXtKFURtaEUVC2AHs';
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/parcl/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,aAAa,GAAG,6CAA6C,CAAC;AAC9D,QAAA,eAAe,GAAG,uBAAuB,CAAC;AAC1C,QAAA,YAAY,GAAG,OAAO,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,oBAAY;IAClB,KAAK,EAAE,qBAAa;IACpB,WAAW,EAAE,cAAc,EAAE,sCAAsC;IACnE,OAAO,EAAE,uBAAe;IACxB,OAAO,EAAE,2BAA2B;CACrC,CAAC;AAEW,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAC1D,QAAA,YAAY,GAAG,CAAC,CAAC;AACjB,QAAA,UAAU,GAAG,yCAAyC,CAAC;AACvD,QAAA,gBAAgB,GAAG,GAAG,kBAAU,aAAa,CAAC;AAC9C,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAC1D,QAAA,YAAY,GAAG,CAAC,CAAC;AACjB,QAAA,SAAS,GAAG,uCAAuC,CAAC;AACpD,QAAA,UAAU,GAAG,8CAA8C,CAAC;AAC5D,QAAA,kBAAkB,GAC7B,8CAA8C,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/parcl/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,aAAa,GAAG,6CAA6C,CAAC;AAC9D,QAAA,eAAe,GAAG,uBAAuB,CAAC;AAC1C,QAAA,YAAY,GAAG,OAAO,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,oBAAY;IAClB,KAAK,EAAE,qBAAa;IACpB,WAAW,EAAE,cAAc,EAAE,sCAAsC;IACnE,OAAO,EAAE,uBAAe;IACxB,OAAO,EAAE,2BAA2B;CACrC,CAAC;AAEW,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,UAAU,GAAG,yCAAyC,CAAC;AACvD,QAAA,gBAAgB,GAAG,GAAG,kBAAU,aAAa,CAAC;AAC9C,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAC1D,QAAA,YAAY,GAAG,CAAC,CAAC;AACjB,QAAA,SAAS,GAAG,uCAAuC,CAAC;AACpD,QAAA,UAAU,GAAG,8CAA8C,CAAC;AAC5D,QAAA,kBAAkB,GAC7B,8CAA8C,CAAC"}
@@ -23,7 +23,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
23
23
  const client = (0, clients_1.getClientSolana)();
24
24
  const [accounts, usdcTokenPrice] = yield Promise.all([
25
25
  (0, solana_1.getParsedProgramAccounts)(client, structs_1.marginAccountStruct, constants_1.programId, (0, filters_1.marginAccountFilter)(owner)),
26
- cache.getTokenPrice(constants_1.usdcMint, portfolio_core_1.NetworkId.solana),
26
+ cache.getTokenPrice(solana_1.usdcSolanaMint, portfolio_core_1.NetworkId.solana),
27
27
  ]);
28
28
  if (accounts.length === 0)
29
29
  return [];
@@ -31,7 +31,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
31
31
  for (const account of accounts) {
32
32
  if (account.margin.isZero())
33
33
  continue;
34
- assets.push(Object.assign(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(constants_1.usdcMint, account.margin.dividedBy(Math.pow(10, constants_1.usdcDecimals)).toNumber(), portfolio_core_1.NetworkId.solana, usdcTokenPrice)), { attributes: {} }));
34
+ assets.push(Object.assign(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(solana_1.usdcSolanaMint, account.margin.dividedBy(Math.pow(10, solana_1.usdcSolanaDecimals)).toNumber(), portfolio_core_1.NetworkId.solana, usdcTokenPrice)), { attributes: {} }));
35
35
  }
36
36
  if (assets.length === 0)
37
37
  return [];
@@ -1 +1 @@
1
- {"version":3,"file":"marginFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/parcl/marginFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAEpC,2CAA4E;AAE5E,iDAAsD;AACtD,+CAA8D;AAC9D,uCAAgD;AAChD,uCAAgD;AAChD,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACnD,IAAA,iCAAwB,EACtB,MAAM,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,MAAM,EAAE;YAChB,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1D;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -39,6 +39,9 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
39
39
  const graphql_request_1 = __importStar(require("graphql-request"));
40
40
  const constants_1 = require("./constants");
41
41
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
42
+ const helper_1 = require("../jito/helper");
43
+ const clients_1 = require("../../utils/clients");
44
+ const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
42
45
  const query = (0, graphql_request_1.gql) `
43
46
  query GetAirdropFinalFrontend($authority: String!) {
44
47
  getAirdropFinalFrontend(authority: $authority) {
@@ -68,6 +71,11 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
68
71
  const amount = res.getAirdropFinalFrontend.total_allocation;
69
72
  if (amount === 0)
70
73
  return [];
74
+ const claimStatuses = (0, helper_1.findClaimStatusesKeys)(owner, constants_1.distributors, constants_1.distributorPid);
75
+ const client = (0, clients_1.getClientSolana)();
76
+ const claimStatusesAccount = yield (0, getMultipleAccountsInfoSafe_1.getMultipleAccountsInfoSafe)(client, claimStatuses);
77
+ if (claimStatusesAccount.some((account) => account))
78
+ return [];
71
79
  const tokenPrice = yield cache.getTokenPrice(constants_1.zexMint, networkId);
72
80
  const asset = tokenPrice
73
81
  ? (0, tokenPriceToAssetToken_1.default)(tokenPrice.address, amount, networkId, tokenPrice, undefined, { lockedUntil: 1719475200000 })
@@ -1 +1 @@
1
- {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAAuE;AACvE,mEAA+C;AAG/C,2CAA8D;AAE9D,qGAA6E;AAE7E,MAAM,KAAK,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;CAchB,CAAC;AAEF,MAAM,SAAS,GAAG,0BAAS,CAAC,MAAM,CAAC;AAEnC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,GAAG,GAAG,MAAM,IAAA,yBAAO,EACvB,sBAAU,EACV,KAAK,EACL;QACE,SAAS,EAAE,KAAK;KACjB,EACD;QACE,MAAM,EAAE,4BAA4B;QACpC,QAAQ,EAAE,6BAA6B;QACvC,WAAW,EAAE,gCAAgC;KAC9C,CACF,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAEpB,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IAEpB,MAAM,MAAM,GAAG,GAAG,CAAC,uBAAuB,CAAC,gBAAgB,CAAC;IAE5D,IAAI,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE5B,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,mBAAO,EAAE,SAAS,CAAC,CAAC;IACjE,MAAM,KAAK,GAAmB,UAAU;QACtC,CAAC,CAAC,IAAA,gCAAsB,EACpB,UAAU,CAAC,OAAO,EAClB,MAAM,EACN,SAAS,EACT,UAAU,EACV,SAAS,EACT,EAAE,WAAW,EAAE,aAAa,EAAE,CAC/B;QACH,CAAC,CAAC;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE;gBACJ,OAAO,EAAE,mBAAO;gBAChB,QAAQ,EACN,kMAAkM;gBACpM,MAAM;gBACN,KAAK,EAAE,IAAI;gBACX,IAAI,EAAE,KAAK;aACZ;YACD,KAAK,EAAE,IAAI;YACX,SAAS;YACT,UAAU,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE;SAC3C,CAAC;IAEN,OAAO;QACL;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,SAAS;YAChB,SAAS;YACT,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC,KAAK,CAAC;aAChB;YACD,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS;IACT,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAAuE;AACvE,mEAA+C;AAG/C,2CAMqB;AAErB,qGAA6E;AAC7E,2CAAuD;AACvD,iDAAsD;AACtD,gGAA6F;AAE7F,MAAM,KAAK,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;CAchB,CAAC;AAEF,MAAM,SAAS,GAAG,0BAAS,CAAC,MAAM,CAAC;AAEnC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,GAAG,GAAG,MAAM,IAAA,yBAAO,EACvB,sBAAU,EACV,KAAK,EACL;QACE,SAAS,EAAE,KAAK;KACjB,EACD;QACE,MAAM,EAAE,4BAA4B;QACpC,QAAQ,EAAE,6BAA6B;QACvC,WAAW,EAAE,gCAAgC;KAC9C,CACF,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAEpB,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IAEpB,MAAM,MAAM,GAAG,GAAG,CAAC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,UAAU;IAC3B,SAAS;IACT,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -1,9 +1,13 @@
1
1
  import { PublicKey } from '@solana/web3.js';
2
2
  import { Platform } from '@sonarwatch/portfolio-core';
3
+ import { IdlItem } from '@solanafm/explorer-kit-idls';
3
4
  export declare const platformId = "zeta";
4
5
  export declare const platform: Platform;
5
- export declare const usdcMint = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
6
6
  export declare const programId: PublicKey;
7
7
  export declare const graphqlApi = "https://api-gql.zeta.markets/graphql";
8
8
  export declare const zexMint = "ZEXy1pqteRu3n13kdyh4LwPQknkFk3GzmMYMuNadWPo";
9
9
  export declare const zexDecimals = 6;
10
+ export declare const distributorPid = "4JSALTb4QbipG7NNLryAFJg4y8X5C1ELErSncsVMA3gZ";
11
+ export declare const distributors: string[];
12
+ export declare const stakingPid: PublicKey;
13
+ export declare const sharkyIdlItem: IdlItem;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zexDecimals = exports.zexMint = exports.graphqlApi = exports.programId = exports.usdcMint = exports.platform = exports.platformId = void 0;
3
+ exports.sharkyIdlItem = exports.stakingPid = exports.distributors = exports.distributorPid = exports.zexDecimals = exports.zexMint = exports.graphqlApi = exports.programId = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
+ const idls_1 = require("./idls");
5
6
  exports.platformId = 'zeta';
6
7
  exports.platform = {
7
8
  id: exports.platformId,
@@ -10,9 +11,52 @@ exports.platform = {
10
11
  defiLlamaId: 'zeta',
11
12
  website: 'https://www.zeta.markets/',
12
13
  };
13
- exports.usdcMint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
14
14
  exports.programId = new web3_js_1.PublicKey('ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD');
15
15
  exports.graphqlApi = 'https://api-gql.zeta.markets/graphql';
16
16
  exports.zexMint = 'ZEXy1pqteRu3n13kdyh4LwPQknkFk3GzmMYMuNadWPo';
17
17
  exports.zexDecimals = 6;
18
+ exports.distributorPid = '4JSALTb4QbipG7NNLryAFJg4y8X5C1ELErSncsVMA3gZ';
19
+ exports.distributors = [
20
+ 'Ena5PXG5QHAFqxLHueKW8fc74kGSghBVL2UDHyrUnFc1',
21
+ 'CLPmtotgeWyYqwEQrV3yXWqNdk6aSdj9f86gQHnHVEBo',
22
+ '4TqxRLvWyA3i8u18iG97ocuAY6wKL2mFLc1Qogd6moor',
23
+ '3rLQ4wYXhi4XxBvoeZXdsvCC5HD1Ei9xPZhAtUzNiPZf',
24
+ 'Csq8eYrtntuDEJ7YFG3jXuQ6SmMS9taxPbic7UZUYFNX',
25
+ 'Do44U3Nbi4Y1vdjB3XCNa1chJCpFgYvBN1reCx385wQ1',
26
+ 'DWpLKpu8xV8ndXAAHMbjgyeRUwUYAxtYhtwJh8Dssd2d',
27
+ '7BUBEu7jE2JazSFEzGN8oP949yq6z6xZFK1uRQu6hG88',
28
+ '3FT4V9KqAWPkpXkXS7RRbPR3kK2H6acuP92LFqX73FL6',
29
+ 'E1vJ43iC3ugkwwQK7xW5Zz9wRNkSYm4GZALoXTETv4t2',
30
+ 'HwBy6DAP2y1usiaWDCbiPQv5dtPLEZYenTUV3FCu7imG',
31
+ 'CQ5Fi2EcGwVScFjFN8hPvaVDmxj7MarWoqyziD6Wcept',
32
+ 'CMYgPw7cYAMtmxxWGiGLTeV8T6QFyh3nui7mkebh44LM',
33
+ '5jK9Aimc3ZxqL57cwvsHGJx3MR1dZHuXBwYBb7QCHVQD',
34
+ 'GdNKKg8TXZQbhFuUNkSGr5o3vuhnrvD3rbApbmipxtpG',
35
+ 'G9Ty1XbwuagpUEcsexNV6nP2YmmCt816GS5sGwMU11WF',
36
+ '2XXw2tHcH59YtLJwfaD4GdhkARGww6RBheyviUsFWEcf',
37
+ 'FxTYEUHqgc478su5Dge3FtSjbuByxWbYP9Dws5nLeMwW',
38
+ '4FaCZyR1vSgsR8nFgXf8x1f81rWg8gyjHKmEXwFjt129',
39
+ 'A4c6Mi9kqNyrNLUjRPiTPhnL9Yx63sXA5pygPuEoAh4M',
40
+ '5GnFHWaDAKYaf2T2gahmkzxpgTUNt4ddDhy65NGq2PT',
41
+ '4DBsW2Qdh39x1cb5jQ5mASKeSKjrZt4bCMkGV9ekxpuu',
42
+ 'GdqgRTuyhVDjv8GbPy3kC7YQzMbT3ffANpCXK7ie243u',
43
+ 'CFAejLQynRFa3mnWYPzVeKMSw66t5TsqKJuBheejif9E',
44
+ '5gh3BM2KQzGevAEid4sAYrHd99uQCNjqM2ipkkZb178H',
45
+ 'JA7CKeJEq2p11Taqp9rJw8sMu9AWK29FiqjXuz8PJ2Av',
46
+ 'AiB7Vgdm2DsXFe8FXqA7pjjPRBpshk4MNnpubJQTRL8L',
47
+ '5DvChKBPGYYS3VbbP1Pa7Qj7gUEwfbsRPrsARh6apPbn',
48
+ 'CNSWTtezkd7VwNc8bT4iLFedawHDgjBNVkkesVh2ciDK',
49
+ '5yrdm62pK6L4nxBfJjb2n31ZBStdL2Za2Dj8xWjWwm4N',
50
+ '5NveKpT8P41C8BgsEmGTRqCmZkWwjkaF5NC7WQ1jiBSd',
51
+ '4npWCt7noK6FXceZ5FgLuMsa4P2sqCzsKATJR66t1orC',
52
+ '8aTtdjE4v7HhiDgHAcS156vb1zvboCh1ukHLXa5AqBEk',
53
+ 'C12iWEzCdiyU1zL9VrJwFCW26XZTMmSwoJczc9ZrDuHo',
54
+ '6o1ZexNBJnQCDXiWtJgDPkE4u5WndgUb1wKDjofRuWme',
55
+ ];
56
+ exports.stakingPid = new web3_js_1.PublicKey('4DUapvWZDDCkfWJpdwvX2QjwAE9Yq4wU8792RMMv7Csg');
57
+ exports.sharkyIdlItem = {
58
+ programId: exports.stakingPid.toString(),
59
+ idl: idls_1.idls,
60
+ idlType: 'anchor',
61
+ };
18
62
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,4CAA4C;IACnD,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,2BAA2B;CACrC,CAAC;AAEW,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAC1D,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,6CAA6C,CAC9C,CAAC;AACW,QAAA,UAAU,GAAG,sCAAsC,CAAC;AACpD,QAAA,OAAO,GAAG,6CAA6C,CAAC;AACxD,QAAA,WAAW,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG5C,iCAA+C;AAElC,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,4CAA4C;IACnD,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,2BAA2B;CACrC,CAAC;AAEW,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,6CAA6C,CAC9C,CAAC;AACW,QAAA,UAAU,GAAG,sCAAsC,CAAC;AACpD,QAAA,OAAO,GAAG,6CAA6C,CAAC;AACxD,QAAA,WAAW,GAAG,CAAC,CAAC;AAChB,QAAA,cAAc,GAAG,8CAA8C,CAAC;AAChE,QAAA,YAAY,GAAG;IAC1B,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,6CAA6C;IAC7C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;CAC/C,CAAC;AAEW,QAAA,UAAU,GAAG,IAAI,mBAAS,CACrC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,kBAAU,CAAC,QAAQ,EAAE;IAChC,GAAG,EAAE,WAAa;IAClB,OAAO,EAAE,QAAQ;CACP,CAAC"}
@@ -22,7 +22,7 @@ const structs_1 = require("./structs");
22
22
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
23
23
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
24
24
  const client = (0, clients_1.getClientSolana)();
25
- const usdcTokenPrice = yield cache.getTokenPrice(constants_1.usdcMint, portfolio_core_1.NetworkId.solana);
25
+ const usdcTokenPrice = yield cache.getTokenPrice(solana_1.usdcSolanaMint, portfolio_core_1.NetworkId.solana);
26
26
  if (!usdcTokenPrice)
27
27
  return [];
28
28
  let id = 0;
@@ -42,7 +42,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
42
42
  continue;
43
43
  if (account.balance.isZero())
44
44
  continue;
45
- const asset = (0, tokenPriceToAssetToken_1.default)(constants_1.usdcMint, account.balance.dividedBy(Math.pow(10, usdcTokenPrice.decimals)).toNumber(), portfolio_core_1.NetworkId.solana, usdcTokenPrice);
45
+ const asset = (0, tokenPriceToAssetToken_1.default)(solana_1.usdcSolanaMint, account.balance.dividedBy(Math.pow(10, usdcTokenPrice.decimals)).toNumber(), portfolio_core_1.NetworkId.solana, usdcTokenPrice);
46
46
  elements.push({
47
47
  label: 'Deposit',
48
48
  networkId: portfolio_core_1.NetworkId.solana,
@@ -1 +1 @@
1
- {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,6CAA4C;AAG5C,2CAA8D;AAC9D,iDAAsD;AACtD,uCAAmD;AACnD,+CAAmE;AACnE,uCAAqD;AACrD,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,oBAAQ,EAAE,0BAAS,CAAC,MAAM,CAAC,CAAC;IAC7E,IAAI,CAAC,cAAc;QAAE,OAAO,EAAE,CAAC;IAE/B,IAAI,EAAE,GAAG,CAAC,CAAC;IACX,MAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAI,aAAa,CAAC;IAClB,GAAG,CAAC;QACF,MAAM,cAAc,GAAG,IAAA,gCAAsB,EAC3C,qBAAS,EACT,IAAI,mBAAS,CAAC,KAAK,CAAC,EACpB,EAAE,EACF,EAAE,GAAG,CAAC,CACP,CAAC;QACF,aAAa,GAAG,MAAM,IAAA,sCAA6B,EACjD,MAAM,EACN,kCAAwB,EACxB,cAAc,CACf,CAAC;QACF,YAAY,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC;QACpC,EAAE,IAAI,CAAC,CAAC;IACV,CAAC,QAAQ,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE;IAE9C,MAAM,QAAQ,GAAuB,EAAE,CAAC;IACxC,IAAI,CAAC,YAAY;QAAE,OAAO,QAAQ,CAAC;IAEnC,KAAK,MAAM,OAAO,IAAI,YAAY,EAAE,CAAC;QACnC,IAAI,CAAC,OAAO;YAAE,SAAS;QACvB,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE;YAAE,SAAS;QACvC,MAAM,KAAK,GAAmB,IAAA,gCAAsB,EAClD,oBAAQ,EACR,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,SAAA,EAAE,EAAI,cAAc,CAAC,QAAQ,CAAA,CAAC,CAAC,QAAQ,EAAE,EACnE,0BAAS,CAAC,MAAM,EAChB,cAAc,CACf,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC;YACZ,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE,EAAE;YAChD,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE;YACzB,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,6CAA4C;AAG5C,2CAAoD;AACpD,iDAAsD;AACtD,uCAAmD;AACnD,+CAG4B;AAC5B,uCAAqD;AACrD,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa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M;YAC3B,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE,EAAE;YAChD,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE;YACzB,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -2,3 +2,6 @@ import { PublicKey } from '@solana/web3.js';
2
2
  export declare function getCrossMarginAccount(programId: PublicKey, userKey: PublicKey, seedNumber: number): PublicKey;
3
3
  export declare function getMarginAccount(programId: PublicKey, zetaGroup: PublicKey, userKey: PublicKey): [PublicKey, number];
4
4
  export declare function getCrossMarginAccounts(programId: PublicKey, owner: PublicKey, startId: number, endId: number): PublicKey[];
5
+ export declare function getStakeAccountAddress(userKey: PublicKey, bit: number): [PublicKey, number];
6
+ export declare function getStakeAccountsAddresses(userKey: string, start: number, end: number): PublicKey[];
7
+ export declare function getTimestamp(stakeDuration: number, startEpoch: number): number;
@@ -1,7 +1,12 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCrossMarginAccounts = exports.getMarginAccount = exports.getCrossMarginAccount = void 0;
6
+ exports.getTimestamp = exports.getStakeAccountsAddresses = exports.getStakeAccountAddress = exports.getCrossMarginAccounts = exports.getMarginAccount = exports.getCrossMarginAccount = void 0;
4
7
  const web3_js_1 = require("@solana/web3.js");
8
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
9
+ const constants_1 = require("./constants");
5
10
  function getCrossMarginAccount(programId, userKey, seedNumber) {
6
11
  return web3_js_1.PublicKey.findProgramAddressSync([
7
12
  Buffer.from('cross-margin', 'utf-8'),
@@ -22,4 +27,25 @@ function getCrossMarginAccounts(programId, owner, startId, endId) {
22
27
  return keys;
23
28
  }
24
29
  exports.getCrossMarginAccounts = getCrossMarginAccounts;
30
+ function getStakeAccountAddress(userKey, bit) {
31
+ return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('stake-account'), userKey.toBuffer(), Uint8Array.from([bit])], constants_1.stakingPid);
32
+ }
33
+ exports.getStakeAccountAddress = getStakeAccountAddress;
34
+ function getStakeAccountsAddresses(userKey, start, end) {
35
+ const user = new web3_js_1.PublicKey(userKey);
36
+ const keys = [];
37
+ for (let i = start; i <= end; i++) {
38
+ keys.push(getStakeAccountAddress(user, i)[0]);
39
+ }
40
+ return keys;
41
+ }
42
+ exports.getStakeAccountsAddresses = getStakeAccountsAddresses;
43
+ const timestampOfEpoch0 = new bignumber_js_1.default(1719144000000);
44
+ const oneDay = 60 * 60 * 24 * 1000;
45
+ function getTimestamp(stakeDuration, startEpoch) {
46
+ return timestampOfEpoch0
47
+ .plus((startEpoch + stakeDuration) * oneDay)
48
+ .toNumber();
49
+ }
50
+ exports.getTimestamp = getTimestamp;
25
51
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/helpers.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C,SAAgB,qBAAqB,CACnC,SAAoB,EACpB,OAAkB,EAClB,UAAkB;IAElB,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC;QACpC,OAAO,CAAC,QAAQ,EAAE;QAClB,UAAU,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC;KAC9B,EACD,SAAS,CACV,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AAbD,sDAaC;AAED,SAAgB,gBAAgB,CAC9B,SAAoB,EACpB,SAAoB,EACpB,OAAkB;IAElB,OAAO,mBAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,QAAQ,EAAE,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,EAC1E,SAAS,CACV,CAAC;AACJ,CAAC;AATD,4CASC;AAED,SAAgB,sBAAsB,CACpC,SAAoB,EACpB,KAAgB,EAChB,OAAe,EACf,KAAa;IAEb,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAXD,wDAWC"}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA4C;AAC5C,gEAAqC;AACrC,2CAAyC;AAEzC,SAAgB,qBAAqB,CACnC,SAAoB,EACpB,OAAkB,EAClB,UAAkB;IAElB,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC;QACpC,OAAO,CAAC,QAAQ,EAAE;QAClB,UAAU,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC;KAC9B,EACD,SAAS,CACV,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AAbD,sDAaC;AAED,SAAgB,gBAAgB,CAC9B,SAAoB,EACpB,SAAoB,EACpB,OAAkB;IAElB,OAAO,mBAAS,CAAC,sBAAsB,CACrC,CAA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