@sonarwatch/portfolio-plugins 0.11.220 → 0.11.222

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 +1634 -1626
  2. package/README.md +3 -3
  3. package/package.json +2 -2
  4. package/src/index.js +8 -0
  5. package/src/index.js.map +1 -1
  6. package/src/plugins/balancer/helpers/pools.js +21 -21
  7. package/src/plugins/hedgehog/ammJob.d.ts +3 -0
  8. package/src/plugins/hedgehog/ammJob.js +119 -0
  9. package/src/plugins/hedgehog/ammJob.js.map +1 -0
  10. package/src/plugins/hedgehog/constants.d.ts +6 -0
  11. package/src/plugins/hedgehog/constants.js +16 -0
  12. package/src/plugins/hedgehog/constants.js.map +1 -0
  13. package/src/plugins/hedgehog/index.d.ts +6 -0
  14. package/src/plugins/hedgehog/index.js +12 -0
  15. package/src/plugins/hedgehog/index.js.map +1 -0
  16. package/src/plugins/hedgehog/structs.d.ts +40 -0
  17. package/src/plugins/hedgehog/structs.js +41 -0
  18. package/src/plugins/hedgehog/structs.js.map +1 -0
  19. package/src/plugins/orca/getWhirlpoolPositions.d.ts +3 -3
  20. package/src/plugins/orca/getWhirlpoolPositions.js +4 -4
  21. package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
  22. package/src/plugins/raydium/clmmJob.js +1 -1
  23. package/src/plugins/raydium/clmmJob.js.map +1 -1
  24. package/src/plugins/raydium/constants.d.ts +1 -0
  25. package/src/plugins/raydium/constants.js +2 -1
  26. package/src/plugins/raydium/constants.js.map +1 -1
  27. package/src/plugins/raydium/cpmmJob.d.ts +3 -0
  28. package/src/plugins/raydium/cpmmJob.js +98 -0
  29. package/src/plugins/raydium/cpmmJob.js.map +1 -0
  30. package/src/plugins/raydium/filters.d.ts +2 -1
  31. package/src/plugins/raydium/filters.js +5 -2
  32. package/src/plugins/raydium/filters.js.map +1 -1
  33. package/src/plugins/raydium/index.js +2 -1
  34. package/src/plugins/raydium/index.js.map +1 -1
  35. package/src/plugins/raydium/structs/cpmm.d.ts +30 -0
  36. package/src/plugins/raydium/structs/cpmm.js +32 -0
  37. package/src/plugins/raydium/structs/cpmm.js.map +1 -0
  38. package/src/plugins/scallop/cnyAirdropFetcher.d.ts +3 -0
  39. package/src/plugins/scallop/cnyAirdropFetcher.js +79 -0
  40. package/src/plugins/scallop/cnyAirdropFetcher.js.map +1 -0
  41. package/src/plugins/scallop/constants.d.ts +2 -0
  42. package/src/plugins/scallop/constants.js +3 -1
  43. package/src/plugins/scallop/constants.js.map +1 -1
  44. package/src/plugins/scallop/index.js +2 -0
  45. package/src/plugins/scallop/index.js.map +1 -1
  46. package/src/plugins/scallop/types/data.d.ts +29 -0
  47. package/src/plugins/sushiswap/helpers.js +24 -24
  48. package/src/plugins/tokens/fetchers/solana-nfts-underlyings.js +39 -24
  49. package/src/plugins/tokens/fetchers/solana-nfts-underlyings.js.map +1 -1
  50. package/src/plugins/tokens/fetchers/solana.js +2 -0
  51. package/src/plugins/tokens/fetchers/solana.js.map +1 -1
  52. package/src/plugins/tokens/types.d.ts +1 -1
  53. package/src/plugins/uniswap-v2/helpers.js +22 -22
  54. package/src/plugins/whalesmarket/constants.d.ts +5 -0
  55. package/src/plugins/whalesmarket/constants.js +15 -0
  56. package/src/plugins/whalesmarket/constants.js.map +1 -0
  57. package/src/plugins/whalesmarket/depositFetcher.d.ts +3 -0
  58. package/src/plugins/whalesmarket/depositFetcher.js +81 -0
  59. package/src/plugins/whalesmarket/depositFetcher.js.map +1 -0
  60. package/src/plugins/whalesmarket/filters.d.ts +10 -0
  61. package/src/plugins/whalesmarket/filters.js +16 -0
  62. package/src/plugins/whalesmarket/filters.js.map +1 -0
  63. package/src/plugins/whalesmarket/index.d.ts +6 -0
  64. package/src/plugins/whalesmarket/index.js +12 -0
  65. package/src/plugins/whalesmarket/index.js.map +1 -0
  66. package/src/plugins/whalesmarket/structs.d.ts +58 -0
  67. package/src/plugins/whalesmarket/structs.js +61 -0
  68. package/src/plugins/whalesmarket/structs.js.map +1 -0
  69. package/src/plugins/x-staking-solana/constants.d.ts +0 -2
  70. package/src/plugins/x-staking-solana/constants.js +3 -11
  71. package/src/plugins/x-staking-solana/constants.js.map +1 -1
  72. package/src/plugins/x-staking-solana/index.js +1 -4
  73. package/src/plugins/x-staking-solana/index.js.map +1 -1
  74. package/src/utils/misc/getLpTokenSourceRaw.js +1 -1
  75. package/src/utils/misc/getLpTokenSourceRaw.js.map +1 -1
  76. package/src/utils/misc/getLpUnderlyingTokenSource.js +6 -6
  77. package/src/utils/misc/getLpUnderlyingTokenSource.js.map +1 -1
  78. package/src/utils/sei/constants.js +8 -8
  79. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -40,28 +40,28 @@ function getPairKey(version) {
40
40
  exports.getPairKey = getPairKey;
41
41
  function getPairsV2FromTheGraph(url, length = 300) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
43
- const query = (0, graphql_request_1.gql) `
44
- {
45
- pairs(
46
- orderBy: reserveUSD
47
- first: ${length}
48
- orderDirection: desc
49
- where: { trackedReserveETH_not: "0" }
50
- ) {
51
- id
52
- reserve0
53
- reserve1
54
- totalSupply
55
- token0 {
56
- id
57
- decimals
58
- }
59
- token1 {
60
- id
61
- decimals
62
- }
63
- }
64
- }
43
+ const query = (0, graphql_request_1.gql) `
44
+ {
45
+ pairs(
46
+ orderBy: reserveUSD
47
+ first: ${length}
48
+ orderDirection: desc
49
+ where: { trackedReserveETH_not: "0" }
50
+ ) {
51
+ id
52
+ reserve0
53
+ reserve1
54
+ totalSupply
55
+ token0 {
56
+ id
57
+ decimals
58
+ }
59
+ token1 {
60
+ id
61
+ decimals
62
+ }
63
+ }
64
+ }
65
65
  `;
66
66
  const res = yield (0, graphql_request_1.default)(url, query);
67
67
  const pairs = res.pairs;
@@ -0,0 +1,5 @@
1
+ import { PublicKey } from '@solana/web3.js';
2
+ import { Platform } from '@sonarwatch/portfolio-core';
3
+ export declare const platformId = "whalesmarket";
4
+ export declare const platform: Platform;
5
+ export declare const pid: PublicKey;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pid = exports.platform = exports.platformId = void 0;
4
+ const web3_js_1 = require("@solana/web3.js");
5
+ exports.platformId = 'whalesmarket';
6
+ exports.platform = {
7
+ id: exports.platformId,
8
+ name: 'Whales Market',
9
+ image: 'https://sonar.watch/img/platforms/whalesmarket.png',
10
+ defiLlamaId: 'whales-market', // from https://defillama.com/docs/api
11
+ website: 'https://app.whales.market/',
12
+ twitter: 'https://twitter.com/WhalesMarket',
13
+ };
14
+ exports.pid = new web3_js_1.PublicKey('stPdYNaJNsV3ytS9Xtx4GXXXRcVqVS6x66ZFa26K39S');
15
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,cAAc,CAAC;AAC5B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,oDAAoD;IAC3D,WAAW,EAAE,eAAe,EAAE,sCAAsC;IACpE,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,GAAG,GAAG,IAAI,mBAAS,CAAC,6CAA6C,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,81 @@
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 structs_1 = require("./structs");
20
+ const filters_1 = require("./filters");
21
+ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
22
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
23
+ const client = (0, clients_1.getClientSolana)();
24
+ const offers = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.offerStruct, constants_1.pid, (0, filters_1.offerFilter)(owner));
25
+ const mints = new Set();
26
+ offers.forEach((offer) => mints.add(offer.exToken.toString()));
27
+ const tokenPriceById = yield cache.getTokenPricesAsMap(Array.from(mints), portfolio_core_1.NetworkId.solana);
28
+ const buyOfferAssets = [];
29
+ const sellOfferAssets = [];
30
+ for (const offer of offers) {
31
+ if (offer.status === structs_1.OfferStatus.Closed || offer.collateral.isZero())
32
+ continue;
33
+ const mint = offer.exToken.toString();
34
+ const tokenPrice = tokenPriceById.get(mint);
35
+ if (!tokenPrice)
36
+ continue;
37
+ const amount = offer.collateral
38
+ .dividedBy(Math.pow(10, tokenPrice.decimals))
39
+ .toNumber();
40
+ const asset = (0, tokenPriceToAssetToken_1.default)(mint, amount, portfolio_core_1.NetworkId.solana, tokenPrice);
41
+ if (offer.offerType === structs_1.OfferType.Sell) {
42
+ sellOfferAssets.push(asset);
43
+ }
44
+ else {
45
+ buyOfferAssets.push(asset);
46
+ }
47
+ }
48
+ if (sellOfferAssets.length === 0 && buyOfferAssets.length === 0)
49
+ return [];
50
+ const elements = [];
51
+ if (sellOfferAssets.length > 0) {
52
+ elements.push({
53
+ type: portfolio_core_1.PortfolioElementType.multiple,
54
+ label: 'Deposit',
55
+ name: 'Sell offers',
56
+ networkId: portfolio_core_1.NetworkId.solana,
57
+ platformId: constants_1.platformId,
58
+ data: { assets: sellOfferAssets },
59
+ value: (0, portfolio_core_1.getUsdValueSum)(sellOfferAssets.map((asset) => asset.value)),
60
+ });
61
+ }
62
+ if (buyOfferAssets.length > 0) {
63
+ elements.push({
64
+ type: portfolio_core_1.PortfolioElementType.multiple,
65
+ label: 'Deposit',
66
+ name: 'Buy offers',
67
+ networkId: portfolio_core_1.NetworkId.solana,
68
+ platformId: constants_1.platformId,
69
+ data: { assets: buyOfferAssets },
70
+ value: (0, portfolio_core_1.getUsdValueSum)(buyOfferAssets.map((asset) => asset.value)),
71
+ });
72
+ }
73
+ return elements;
74
+ });
75
+ const fetcher = {
76
+ id: `${constants_1.platformId}-deposit`,
77
+ networkId: portfolio_core_1.NetworkId.solana,
78
+ executor,
79
+ };
80
+ exports.default = fetcher;
81
+ //# sourceMappingURL=depositFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"depositFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/depositFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAGpC,2CAA8C;AAC9C,iDAAsD;AACtD,+CAA8D;AAC9D,uCAAgE;AAChE,uCAAwC;AACxC,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,MAAM,GAAG,MAAM,IAAA,iCAAwB,EAC3C,MAAM,EACN,qBAAW,EACX,eAAG,EACH,IAAA,qBAAW,EAAC,KAAK,CAAC,CACnB,CAAC;IAEF,MAAM,KAAK,GAAgB,IAAI,GAAG,EAAE,CAAC;IACrC,MAAM,CAA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
9
+ memcmp?: undefined;
10
+ })[];
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.offerFilter = void 0;
4
+ const offerFilter = (owner) => [
5
+ {
6
+ memcmp: {
7
+ offset: 116,
8
+ bytes: owner,
9
+ },
10
+ },
11
+ {
12
+ dataSize: 181,
13
+ },
14
+ ];
15
+ exports.offerFilter = offerFilter;
16
+ //# sourceMappingURL=filters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/filters.ts"],"names":[],"mappings":";;;AAAO,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC;IAC5C;QACE,MAAM,EAAE;YACN,MAAM,EAAE,GAAG;YACX,KAAK,EAAE,KAAK;SACb;KACF;IACD;QACE,QAAQ,EAAE,GAAG;KACd;CACF,CAAC;AAVW,QAAA,WAAW,eAUtB"}
@@ -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,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 depositFetcher_1 = __importDefault(require("./depositFetcher"));
9
+ exports.platforms = [constants_1.platform];
10
+ exports.jobs = [];
11
+ exports.fetchers = [depositFetcher_1.default];
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,wBAAc,CAAC,CAAC"}
@@ -0,0 +1,58 @@
1
+ /// <reference types="node" />
2
+ import { BeetStruct } from '@metaplex-foundation/beet';
3
+ import BigNumber from 'bignumber.js';
4
+ import { PublicKey } from '@metaplex-foundation/js';
5
+ export declare enum OfferStatus {
6
+ Open = 0,
7
+ Closed = 1
8
+ }
9
+ export declare enum OfferType {
10
+ Buy = 0,
11
+ Sell = 1
12
+ }
13
+ export declare enum OrderStatus {
14
+ Open = 0,
15
+ Closed = 1,
16
+ Cancelled = 2
17
+ }
18
+ export type Offer = {
19
+ buffer: Buffer;
20
+ version: number;
21
+ id: BigNumber;
22
+ offerType: OfferType;
23
+ tokenConfig: PublicKey;
24
+ totalAmount: BigNumber;
25
+ price: BigNumber;
26
+ exToken: PublicKey;
27
+ collateral: BigNumber;
28
+ status: OfferStatus;
29
+ filledAmount: BigNumber;
30
+ isFullMatch: boolean;
31
+ authority: PublicKey;
32
+ bump: number;
33
+ config: PublicKey;
34
+ };
35
+ export declare const offerStruct: BeetStruct<Offer, Partial<Offer>>;
36
+ export type Order = {
37
+ version: number;
38
+ id: BigNumber;
39
+ config: PublicKey;
40
+ offer: PublicKey;
41
+ authority: PublicKey;
42
+ bump: number;
43
+ seller: PublicKey;
44
+ buyer: PublicKey;
45
+ status: OrderStatus;
46
+ amount: BigNumber;
47
+ };
48
+ export declare const orderStruct: BeetStruct<Order, Partial<Order>>;
49
+ export type ExToken = {
50
+ version: number;
51
+ bump: number;
52
+ isAccepted: boolean;
53
+ token: PublicKey;
54
+ config: PublicKey;
55
+ vaultToken: PublicKey;
56
+ vaultTokenBump: number;
57
+ };
58
+ export declare const exTokenStruct: BeetStruct<ExToken, Partial<ExToken>>;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.exTokenStruct = exports.orderStruct = exports.offerStruct = exports.OrderStatus = exports.OfferType = exports.OfferStatus = 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 OfferStatus;
8
+ (function (OfferStatus) {
9
+ OfferStatus[OfferStatus["Open"] = 0] = "Open";
10
+ OfferStatus[OfferStatus["Closed"] = 1] = "Closed";
11
+ })(OfferStatus || (exports.OfferStatus = OfferStatus = {}));
12
+ var OfferType;
13
+ (function (OfferType) {
14
+ OfferType[OfferType["Buy"] = 0] = "Buy";
15
+ OfferType[OfferType["Sell"] = 1] = "Sell";
16
+ })(OfferType || (exports.OfferType = OfferType = {}));
17
+ var OrderStatus;
18
+ (function (OrderStatus) {
19
+ OrderStatus[OrderStatus["Open"] = 0] = "Open";
20
+ OrderStatus[OrderStatus["Closed"] = 1] = "Closed";
21
+ OrderStatus[OrderStatus["Cancelled"] = 2] = "Cancelled";
22
+ })(OrderStatus || (exports.OrderStatus = OrderStatus = {}));
23
+ exports.offerStruct = new beet_1.BeetStruct([
24
+ ['buffer', (0, solana_1.blob)(8)],
25
+ ['version', beet_1.u8],
26
+ ['id', solana_1.u64],
27
+ ['offerType', beet_1.u8],
28
+ ['tokenConfig', beet_solana_1.publicKey],
29
+ ['totalAmount', solana_1.u64],
30
+ ['price', solana_1.u64],
31
+ ['exToken', beet_solana_1.publicKey],
32
+ ['collateral', solana_1.u64],
33
+ ['status', beet_1.u8],
34
+ ['filledAmount', solana_1.u64],
35
+ ['isFullMatch', beet_1.bool],
36
+ ['authority', beet_solana_1.publicKey],
37
+ ['bump', beet_1.u8],
38
+ ['config', beet_solana_1.publicKey],
39
+ ], (args) => args);
40
+ exports.orderStruct = new beet_1.BeetStruct([
41
+ ['version', beet_1.u8],
42
+ ['id', solana_1.u64],
43
+ ['config', beet_solana_1.publicKey],
44
+ ['offer', beet_solana_1.publicKey],
45
+ ['authority', beet_solana_1.publicKey],
46
+ ['bump', beet_1.u8],
47
+ ['seller', beet_solana_1.publicKey],
48
+ ['buyer', beet_solana_1.publicKey],
49
+ ['status', beet_1.u8],
50
+ ['amount', solana_1.u64],
51
+ ], (args) => args);
52
+ exports.exTokenStruct = new beet_1.BeetStruct([
53
+ ['version', beet_1.u8],
54
+ ['bump', beet_1.u8],
55
+ ['isAccepted', beet_1.bool],
56
+ ['token', beet_solana_1.publicKey],
57
+ ['config', beet_solana_1.publicKey],
58
+ ['vaultToken', beet_solana_1.publicKey],
59
+ ['vaultTokenBump', beet_1.u8],
60
+ ], (args) => args);
61
+ //# sourceMappingURL=structs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/structs.ts"],"names":[],"mappings":";;;AAAA,oDAAiE;AACjE,kEAA6D;AAG7D,+CAA+C;AAE/C,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,6CAAI,CAAA;IACJ,iDAAM,CAAA;AACR,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,uCAAG,CAAA;IACH,yCAAI,CAAA;AACN,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAED,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,6CAAI,CAAA;IACJ,iDAAM,CAAA;IACN,uDAAS,CAAA;AACX,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAoBY,QAAA,WAAW,GAAG,IAAI,iBAAU,CACvC;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,SAAS,EAAE,SAAE,CAAC;IACf,CAAC,IAAI,EAAE,YAAG,CAAC;IACX,CAAC,WAAW,EAAE,SAAE,CAAC;IACjB,CAAC,aAAa,EAAE,uBAAS,CAAC;IAC1B,CAAC,aAAa,EAAE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
@@ -1,6 +1,4 @@
1
1
  import { Platform } from '@sonarwatch/portfolio-core';
2
- export declare const whalesMarketPlatformId = "whalesmarket";
3
- export declare const whalesMarketPlatform: Platform;
4
2
  export declare const stepFinancePlatformId = "stepfinance";
5
3
  export declare const stepFinancePlatform: Platform;
6
4
  export declare const allbridgePlatformId = "allbridge";
@@ -1,17 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.xStakingConfigs = exports.allbridgePlatform = exports.allbridgePlatformId = exports.stepFinancePlatform = exports.stepFinancePlatformId = exports.whalesMarketPlatform = exports.whalesMarketPlatformId = void 0;
3
+ exports.xStakingConfigs = exports.allbridgePlatform = exports.allbridgePlatformId = exports.stepFinancePlatform = exports.stepFinancePlatformId = void 0;
4
4
  const constants_1 = require("../aurory/constants");
5
5
  const constants_2 = require("../hawksight/constants");
6
- exports.whalesMarketPlatformId = 'whalesmarket';
7
- exports.whalesMarketPlatform = {
8
- id: exports.whalesMarketPlatformId,
9
- name: 'Whales Market',
10
- image: 'https://sonar.watch/img/platforms/whalesmarket.png',
11
- // defiLlamaId: 'foo-finance', // from https://defillama.com/docs/api
12
- website: 'https://app.whales.market/',
13
- twitter: 'https://twitter.com/WhalesMarket',
14
- };
6
+ const constants_3 = require("../whalesmarket/constants");
15
7
  exports.stepFinancePlatformId = 'stepfinance';
16
8
  exports.stepFinancePlatform = {
17
9
  id: exports.stepFinancePlatformId,
@@ -43,7 +35,7 @@ exports.xStakingConfigs = [
43
35
  vault: 'Cm1KT2iqQ3LoxbmLy4WrQ9wE7WByJx6R512A28LbjGh9',
44
36
  xMint: '3wCoTb3TArUdzmeTBPzPFyPBUP6EJXaW5LAzGsWCpySu',
45
37
  xDecimals: 6,
46
- platformId: exports.whalesMarketPlatformId,
38
+ platformId: constants_3.platformId,
47
39
  },
48
40
  {
49
41
  mint: 'StepAscQoEioFxxWGnh2sLBDFp9d8rvKz2Yp39iDpyT',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/x-staking-solana/constants.ts"],"names":[],"mappings":";;;AACA,mDAM6B;AAC7B,sDAA2E;AAE9D,QAAA,sBAAsB,GAAG,cAAc,CAAC;AACxC,QAAA,oBAAoB,GAAa;IAC5C,EAAE,EAAE,8BAAsB;IAC1B,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,oDAAoD;IAC3D,qEAAqE;IACrE,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,qBAAqB,GAAG,aAAa,CAAC;AACtC,QAAA,mBAAmB,GAAa;IAC3C,EAAE,EAAE,6BAAqB;IACzB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,mDAAmD;IAC1D,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,mBAAmB,GAAG,WAAW,CAAC;AAClC,QAAA,iBAAiB,GAAa;IACzC,EAAE,EAAE,2BAAmB;IACvB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,uCAAuC;IAChD,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,eAAe,GAAoB;IAC9C;QACE,IAAI,EAAE,oBAAQ;QACd,QAAQ,EAAR,oBAAQ;QACR,KAAK,EAAE,uBAAW;QAClB,KAAK,EAAE,qBAAS;QAChB,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,sBAAgB;KAC7B;IACD;QACE,IAAI,EAAE,8CAA8C;QACpD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,8CAA8C;QACrD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,8BAAsB;KACnC;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,6BAAqB;KAClC;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,2BAAmB;KAChC;IACD;QACE,IAAI,EAAE,8CAA8C;QACpD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,sBAAmB;KAChC;CACF,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/x-staking-solana/constants.ts"],"names":[],"mappings":";;;AACA,mDAM6B;AAC7B,sDAA2E;AAC3E,yDAAiF;AAEpE,QAAA,qBAAqB,GAAG,aAAa,CAAC;AACtC,QAAA,mBAAmB,GAAa;IAC3C,EAAE,EAAE,6BAAqB;IACzB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,mDAAmD;IAC1D,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,mBAAmB,GAAG,WAAW,CAAC;AAClC,QAAA,iBAAiB,GAAa;IACzC,EAAE,EAAE,2BAAmB;IACvB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,uCAAuC;IAChD,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,eAAe,GAAoB;IAC9C;QACE,IAAI,EAAE,oBAAQ;QACd,QAAQ,EAAR,oBAAQ;QACR,KAAK,EAAE,uBAAW;QAClB,KAAK,EAAE,qBAAS;QAChB,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,sBAAgB;KAC7B;IACD;QACE,IAAI,EAAE,8CAA8C;QACpD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,8CAA8C;QACrD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,sBAAsB;KACnC;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,6BAAqB;KAClC;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,2BAAmB;KAChC;IACD;QACE,IAAI,EAAE,8CAA8C;QACpD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,sBAAmB;KAChC;CACF,CAAC"}
@@ -6,10 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fetchers = exports.jobs = exports.platforms = void 0;
7
7
  const constants_1 = require("./constants");
8
8
  const stakingJob_1 = __importDefault(require("./stakingJob"));
9
- exports.platforms = [
10
- constants_1.whalesMarketPlatform,
11
- constants_1.stepFinancePlatform,
12
- ];
9
+ exports.platforms = [constants_1.stepFinancePlatform, constants_1.allbridgePlatform];
13
10
  exports.jobs = [stakingJob_1.default];
14
11
  exports.fetchers = [];
15
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/x-staking-solana/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAwE;AACxE,8DAAuC;AAE1B,QAAA,SAAS,GAAe;IACnC,gCAAoB;IACpB,+BAAmB;CACpB,CAAC;AACW,QAAA,IAAI,GAAU,CAAC,oBAAW,CAAC,CAAC;AAC5B,QAAA,QAAQ,GAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/x-staking-solana/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAqE;AACrE,8DAAuC;AAE1B,QAAA,SAAS,GAAe,CAAC,+BAAmB,EAAE,6BAAiB,CAAC,CAAC;AACjE,QAAA,IAAI,GAAU,CAAC,oBAAW,CAAC,CAAC;AAC5B,QAAA,QAAQ,GAAc,EAAE,CAAC"}
@@ -21,7 +21,7 @@ function getLpTokenSourceRaw(params) {
21
21
  sourceId: params.sourceId,
22
22
  poolUnderlyings: fPoolUnderlyingsRaw,
23
23
  elementName: params.elementName,
24
- liquidityName: params.elementName,
24
+ liquidityName: params.liquidityName,
25
25
  priceUnderlyings: params.priceUnderlyings,
26
26
  });
27
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getLpTokenSourceRaw.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpTokenSourceRaw.ts"],"names":[],"mappings":";;;;;;AAKA,gEAAqC;AACrC,yDAAiE;AA4BjE,SAAgB,mBAAmB,CACjC,MAAiC;IAEjC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;IACjD,MAAM,UAAU,mCACX,SAAS,KACZ,MAAM,EAAE,IAAI,sBAAS,CAAC,SAAS,CAAC,SAAS,CAAC;aACvC,GAAG,CAAC,SAAA,EAAE,EAAI,SAAS,CAAC,QAAQ,CAAA,CAAC;aAC7B,QAAQ,EAAE,GACd,CAAC;IACF,MAAM,mBAAmB,GAAqB,kBAAkB,CAAC,GAAG,CAClE,CAAC,EAAE,EAAE,EAAE,CAAC,iCACH,EAAE,KACL,aAAa,EAAE,IAAI,sBAAS,CAAC,EAAE,CAAC,gBAAgB,CAAC;aAC9C,GAAG,CAAC,SAAA,EAAE,EAAI,EAAE,CAAC,QAAQ,CAAA,CAAC;aACtB,QAAQ,EAAE,IACb,CACH,CAAC;IAEF,OAAO,IAAA,mCAAgB,EAAC;QACtB,SAAS,EAAE,UAAU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QAC/B,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;KAC1C,CAAC,CAAC;AACL,CAAC;AA7BD,kDA6BC"}
@@ -62,7 +62,7 @@ function getLpUnderlyingTokenSource(params) {
62
62
  throw new Error(`Weights are greater than 1: ${totalWeight}`);
63
63
  if (totalWeight < 0.99)
64
64
  throw new Error(`Weights are smaller than 1: ${totalWeight}`);
65
- let knownUnderlaying;
65
+ let knownUnderlying;
66
66
  const fAddresses = poolUnderlyings.map((u) => (0, portfolio_core_1.formatTokenAddress)(u.address, networkId));
67
67
  let knownReserveValue;
68
68
  for (let i = 0; i < poolUnderlyings.length; i++) {
@@ -72,18 +72,18 @@ function getLpUnderlyingTokenSource(params) {
72
72
  if (!acceptedPairs.includes(fAddresses[i]))
73
73
  continue;
74
74
  const reserveValue = u.tokenPrice.price * u.reserveAmount;
75
- if (knownUnderlaying &&
75
+ if (knownUnderlying &&
76
76
  knownReserveValue &&
77
77
  knownReserveValue > reserveValue)
78
78
  continue;
79
- knownUnderlaying = u;
79
+ knownUnderlying = u;
80
80
  knownReserveValue = reserveValue;
81
81
  }
82
- if (!knownUnderlaying || !knownReserveValue)
82
+ if (!knownUnderlying || !knownReserveValue)
83
83
  return [];
84
84
  if (knownReserveValue < minReserveValue)
85
85
  return [];
86
- const knownUnderlayingAddress = (0, portfolio_core_1.formatTokenAddress)(knownUnderlaying.address, networkId);
86
+ const knownUnderlayingAddress = (0, portfolio_core_1.formatTokenAddress)(knownUnderlying.address, networkId);
87
87
  const sources = [];
88
88
  for (let i = 0; i < poolUnderlyings.length; i++) {
89
89
  const u = poolUnderlyings[i];
@@ -94,7 +94,7 @@ function getLpUnderlyingTokenSource(params) {
94
94
  if (u.tokenPrice &&
95
95
  u.tokenPrice.sources.some((s) => s.id === portfolio_core_1.coingeckoSourceId))
96
96
  continue;
97
- const price = ((u.weight / knownUnderlaying.weight) * knownReserveValue) /
97
+ const price = ((u.weight / knownUnderlying.weight) * knownReserveValue) /
98
98
  u.reserveAmount;
99
99
  const source = {
100
100
  id: sourceId,
@@ -1 +1 @@
1
- {"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAYoC;AACpC,8DAAsE;AACtE,wEAAgD;AAEnC,QAAA,oBAAoB,GAAG,IAAI,GAAG,CAA0B;IACnE;QACE,0BAAS,CAAC,GAAG;QACb;YACE,iCAAgB;YAChB,sEAAsE,EAAE,OAAO;YAC/E,qHAAqH,EAAE,SAAS;SACjI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,GAAG,CAAC,CAAC;KACnD;IACD;QACE,0BAAS,CAAC,MAAM;QAChB;YACE,oCAAmB;YACnB,2CAA0B;YAC1B,8CAA8C,EAAE,OAAO;YACvD,8CAA8C,EAAE,OAAO;SACxD,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,MAAM,CAAC,CAAC;KACtD;IACD;QACE,0BAAS,CAAC,KAAK;QACf;YACE,mCAAkB;YAClB,6EAA6E,EAAE,SAAS;YACxF,mFAAmF,EAAE,oBAAoB;SAC1G,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,KAAK,CAAC,CAAC;KACrD;IACD;QACE,0BAAS,CAAC,GAAG;QACb;YACE,iCAAgB;YAChB,eAAe;YACf,gFAAgF,EAAE,SAAS;YAC3F,gFAAgF,EAAE,SAAS;SAC5F,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,GAAG,CAAC,CAAC;KACnD;CACF,CAAC,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M,MAAM,GAAqB;YAC/B,EAAE,EAAE,QAAQ;YACZ,SAAS;YACT,UAAU,EAAE,gCAAoB,CAAC,EAAE;YACnC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;YACtB,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,KAAK;YACL,MAAM,EAAE,IAAA,yBAAe,EAAC,iBAAiB,CAAC;YAC1C,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;SACtB,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AA9ED,gEA8EC"}
1
+ {"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAYoC;AACpC,8DAAsE;AACtE,wEAAgD;AAEnC,QAAA,oBAAoB,GAAG,IAAI,GAAG,CAA0B;IACnE;QACE,0BAAS,CAAC,GAAG;QACb;YACE,iCAAgB;YAChB,sEAAsE,EAAE,OAAO;YAC/E,qHAAqH,EAAE,SAAS;SACjI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,GAAG,CAAC,CAAC;KACnD;IACD;QACE,0BAAS,CAAC,MAAM;QAChB;YACE,oCAAmB;YACnB,2CAA0B;YAC1B,8CAA8C,EAAE,OAAO;YACvD,8CAA8C,EAAE,OAAO;SACxD,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,MAAM,CAAC,CAAC;KACtD;IACD;QACE,0BAAS,CAAC,KAAK;QACf;YACE,mCAAkB;YAClB,6EAA6E,EAAE,SAAS;YACxF,mFAAmF,EAAE,oBAAoB;SAC1G,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,C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ACpD,IACE,CAAC,CAAC,UAAU;YACZ,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,kCAAiB,CAAC;YAE5D,SAAS;QAEX,MAAM,KAAK,GACT,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,GAAG,iBAAiB,CAAC;YACzD,CAAC,CAAC,aAAa,CAAC;QAElB,MAAM,MAAM,GAAqB;YAC/B,EAAE,EAAE,QAAQ;YACZ,SAAS;YACT,UAAU,EAAE,gCAAoB,CAAC,EAAE;YACnC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;YACtB,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,KAAK;YACL,MAAM,EAAE,IAAA,yBAAe,EAAC,iBAAiB,CAAC;YAC1C,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;SACtB,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AA9ED,gEA8EC"}
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.poolQueryMsg = exports.minterQueryMsg = exports.tokenInfoQueryMsg = exports.infoQueryMsg = void 0;
4
- exports.infoQueryMsg = JSON.parse(`{
5
- "info": {}
4
+ exports.infoQueryMsg = JSON.parse(`{
5
+ "info": {}
6
6
  }`);
7
- exports.tokenInfoQueryMsg = JSON.parse(`{
8
- "token_info": {}
7
+ exports.tokenInfoQueryMsg = JSON.parse(`{
8
+ "token_info": {}
9
9
  }`);
10
- exports.minterQueryMsg = JSON.parse(`{
11
- "minter": {}
10
+ exports.minterQueryMsg = JSON.parse(`{
11
+ "minter": {}
12
12
  }`);
13
- exports.poolQueryMsg = JSON.parse(`{
14
- "pool": {}
13
+ exports.poolQueryMsg = JSON.parse(`{
14
+ "pool": {}
15
15
  }`);
16
16
  //# sourceMappingURL=constants.js.map
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  function getQueryBalanceByOwner(owner) {
4
- return JSON.parse(`{
5
- "balance": {
6
- "address": "${owner}"
7
- }
4
+ return JSON.parse(`{
5
+ "balance": {
6
+ "address": "${owner}"
7
+ }
8
8
  }`);
9
9
  }
10
10
  exports.default = getQueryBalanceByOwner;