@sonarwatch/portfolio-plugins 0.14.12 → 0.14.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. package/CHANGELOG.md +1640 -1632
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/plugins/abex/positionsFetcher.js +1 -1
  5. package/src/plugins/abex/positionsFetcher.js.map +1 -1
  6. package/src/plugins/balancer/helpers/pools.js +21 -21
  7. package/src/plugins/debridge/airdropFetcher.js +31 -11
  8. package/src/plugins/debridge/airdropFetcher.js.map +1 -1
  9. package/src/plugins/debridge/constants.d.ts +4 -1
  10. package/src/plugins/debridge/constants.js +8 -3
  11. package/src/plugins/debridge/constants.js.map +1 -1
  12. package/src/plugins/native-stake/solana/solanaValidatorsJob.js +1 -0
  13. package/src/plugins/native-stake/solana/solanaValidatorsJob.js.map +1 -1
  14. package/src/plugins/native-stake/solana/types.d.ts +2 -0
  15. package/src/plugins/parcl/stakingFetcher.js +9 -34
  16. package/src/plugins/parcl/stakingFetcher.js.map +1 -1
  17. package/src/plugins/parcl/types.d.ts +0 -9
  18. package/src/plugins/sushiswap/helpers.js +24 -24
  19. package/src/plugins/tradeport/bidsFetcher.d.ts +3 -0
  20. package/src/plugins/tradeport/bidsFetcher.js +46 -0
  21. package/src/plugins/tradeport/bidsFetcher.js.map +1 -0
  22. package/src/plugins/tradeport/bidsJob.d.ts +3 -0
  23. package/src/plugins/tradeport/bidsJob.js +41 -0
  24. package/src/plugins/tradeport/bidsJob.js.map +1 -0
  25. package/src/plugins/tradeport/constants.d.ts +4 -0
  26. package/src/plugins/tradeport/constants.js +5 -1
  27. package/src/plugins/tradeport/constants.js.map +1 -1
  28. package/src/plugins/tradeport/index.js +4 -2
  29. package/src/plugins/tradeport/index.js.map +1 -1
  30. package/src/plugins/tradeport/types.d.ts +18 -0
  31. package/src/plugins/uniswap-v2/helpers.js +22 -22
  32. package/src/plugins/zeta/airdropFetcher.js +14 -14
  33. package/src/utils/elementbuilder/LevPositionBuilder.js +2 -1
  34. package/src/utils/elementbuilder/LevPositionBuilder.js.map +1 -1
  35. package/src/utils/sei/constants.js +8 -8
  36. 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;
@@ -42,20 +42,20 @@ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/token
42
42
  const clients_1 = require("../../utils/clients");
43
43
  const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
44
44
  const helpers_1 = require("./helpers");
45
- const query = (0, graphql_request_1.gql) `
46
- query GetAirdropFinalFrontend($authority: String!) {
47
- getAirdropFinalFrontend(authority: $authority) {
48
- authority
49
- community_allocation
50
- eligibility
51
- main_allocation
52
- og_allocation
53
- s1_allocation
54
- s2_allocation
55
- total_allocation
56
- __typename
57
- }
58
- }
45
+ const query = (0, graphql_request_1.gql) `
46
+ query GetAirdropFinalFrontend($authority: String!) {
47
+ getAirdropFinalFrontend(authority: $authority) {
48
+ authority
49
+ community_allocation
50
+ eligibility
51
+ main_allocation
52
+ og_allocation
53
+ s1_allocation
54
+ s2_allocation
55
+ total_allocation
56
+ __typename
57
+ }
58
+ }
59
59
  `;
60
60
  const networkId = portfolio_core_1.NetworkId.solana;
61
61
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.LevPositionBuilder = void 0;
7
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
7
8
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
8
9
  class LevPositionBuilder {
9
10
  constructor(params) {
@@ -32,7 +33,7 @@ class LevPositionBuilder {
32
33
  collateralValue = new bignumber_js_1.default(this.params.collateralValue);
33
34
  }
34
35
  return {
35
- address: this.params.address,
36
+ address: (0, portfolio_core_1.formatTokenAddress)(this.params.address, networkId),
36
37
  side: this.params.side,
37
38
  liquidationPrice: this.params.liquidationPrice || null,
38
39
  collateralValue: collateralValue.toNumber(),
@@ -1 +1 @@
1
- {"version":3,"file":"LevPositionBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/LevPositionBuilder.ts"],"names":[],"mappings":";;;;;;AACA,gEAAqC;AAIrC,MAAa,kBAAkB;IAG7B,YAAY,MAAyB;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,KAAK;QACH,IAAI,IAAI,CAAC,MAAM,CAAC,gBAAgB;YAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC/D,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,GAAG,CACD,SAAwB,EACxB,WAA0B;;QAE1B,IAAI,eAAe,CAAC;QACpB,IAAI,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC;YACjC,MAAM,oBAAoB,GAAG,WAAW,CAAC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3C,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE;YAC3C,QAAQ,EAAE,MAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,0CAAE,QAAQ,EAAE;YAC1C,KAAK,EAAE,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE;YACjE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI;YACtB,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ;YAC9B,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ;SAChB,CAAC;IACnB,CAAC;CACF;AA1CD,gDA0CC"}
@@ -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;