@sonarwatch/portfolio-plugins 0.11.181 → 0.11.182

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. package/CHANGELOG.md +1459 -1455
  2. package/README.md +3 -3
  3. package/package.json +2 -2
  4. package/src/index.js +4 -0
  5. package/src/index.js.map +1 -1
  6. package/src/plugins/balancer/helpers/pools.js +21 -21
  7. package/src/plugins/clone/constants.d.ts +7 -0
  8. package/src/plugins/clone/constants.js +17 -0
  9. package/src/plugins/clone/constants.js.map +1 -0
  10. package/src/plugins/clone/depositsFetcher.d.ts +3 -0
  11. package/src/plugins/clone/depositsFetcher.js +135 -0
  12. package/src/plugins/clone/depositsFetcher.js.map +1 -0
  13. package/src/plugins/clone/helpers.d.ts +2 -0
  14. package/src/plugins/clone/helpers.js +10 -0
  15. package/src/plugins/clone/helpers.js.map +1 -0
  16. package/src/plugins/clone/index.d.ts +6 -0
  17. package/src/plugins/clone/index.js +13 -0
  18. package/src/plugins/clone/index.js.map +1 -0
  19. package/src/plugins/clone/poolsJob.d.ts +3 -0
  20. package/src/plugins/clone/poolsJob.js +33 -0
  21. package/src/plugins/clone/poolsJob.js.map +1 -0
  22. package/src/plugins/clone/structs.d.ts +60 -0
  23. package/src/plugins/clone/structs.js +57 -0
  24. package/src/plugins/clone/structs.js.map +1 -0
  25. package/src/plugins/clone/types.d.ts +25 -0
  26. package/src/plugins/clone/types.js +12 -0
  27. package/src/plugins/clone/types.js.map +1 -0
  28. package/src/plugins/sushiswap/helpers.js +24 -24
  29. package/src/plugins/uniswap-v2/helpers.js +22 -22
  30. package/src/utils/sei/constants.js +8 -8
  31. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  32. package/src/utils/solana/constants.d.ts +3 -0
  33. package/src/utils/solana/constants.js +7 -1
  34. package/src/utils/solana/constants.js.map +1 -1
@@ -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;
@@ -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;
@@ -1,5 +1,8 @@
1
1
  import { PublicKey } from '@solana/web3.js';
2
+ import BigNumber from 'bignumber.js';
2
3
  export declare const solanaTokenPid: PublicKey;
3
4
  export declare const solanaToken2022Pid: PublicKey;
4
5
  export declare const associatedTokenProgramId: PublicKey;
5
6
  export declare const usdcSolanaMint = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
7
+ export declare const usdcSolanaDecimals = 6;
8
+ export declare const usdcSolanaFactor: BigNumber;
@@ -1,9 +1,15 @@
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.usdcSolanaMint = exports.associatedTokenProgramId = exports.solanaToken2022Pid = exports.solanaTokenPid = void 0;
6
+ exports.usdcSolanaFactor = exports.usdcSolanaDecimals = exports.usdcSolanaMint = exports.associatedTokenProgramId = exports.solanaToken2022Pid = exports.solanaTokenPid = void 0;
4
7
  const web3_js_1 = require("@solana/web3.js");
8
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
5
9
  exports.solanaTokenPid = new web3_js_1.PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');
6
10
  exports.solanaToken2022Pid = new web3_js_1.PublicKey('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb');
7
11
  exports.associatedTokenProgramId = new web3_js_1.PublicKey('ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL');
8
12
  exports.usdcSolanaMint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
13
+ exports.usdcSolanaDecimals = 6;
14
+ exports.usdcSolanaFactor = new bignumber_js_1.default(Math.pow(10, 6));
9
15
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/solana/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE/B,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,kBAAkB,GAAG,IAAI,mBAAS,CAC7C,6CAA6C,CAC9C,CAAC;AACW,QAAA,wBAAwB,GAAG,IAAI,mBAAS,CACnD,8CAA8C,CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,8CAA8C,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/solana/constants.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA4C;AAC5C,gEAAqC;AAExB,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,kBAAkB,GAAG,IAAI,mBAAS,CAC7C,6CAA6C,CAC9C,CAAC;AACW,QAAA,wBAAwB,GAAG,IAAI,mBAAS,CACnD,8CAA8C,CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,8CAA8C,CAAC;AAChE,QAAA,kBAAkB,GAAG,CAAC,CAAC;AACvB,QAAA,gBAAgB,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC"}