@sonarwatch/portfolio-plugins 0.14.19 → 0.14.20

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # @sonarwatch/portfolio-plugins
2
-
3
- This library is @sonarwatch/portfolio-plugins
1
+ # @sonarwatch/portfolio-plugins
2
+
3
+ This library is @sonarwatch/portfolio-plugins
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.14.19",
3
+ "version": "0.14.20",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
@@ -36,27 +36,27 @@ exports.getBalancerPoolsV2 = void 0;
36
36
  const graphql_request_1 = __importStar(require("graphql-request"));
37
37
  function getBalancerPoolsV2(url) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
39
- const query = (0, graphql_request_1.gql) `
40
- query pools {
41
- pools(
42
- first: 1000
43
- orderBy: totalLiquidity
44
- orderDirection: desc
45
- where: { totalLiquidity_gt: "500" }
46
- ) {
47
- id
48
- address
49
- symbol
50
- totalLiquidity
51
- totalShares
52
- tokens {
53
- balance
54
- decimals
55
- symbol
56
- address
57
- }
58
- }
59
- }
39
+ const query = (0, graphql_request_1.gql) `
40
+ query pools {
41
+ pools(
42
+ first: 1000
43
+ orderBy: totalLiquidity
44
+ orderDirection: desc
45
+ where: { totalLiquidity_gt: "500" }
46
+ ) {
47
+ id
48
+ address
49
+ symbol
50
+ totalLiquidity
51
+ totalShares
52
+ tokens {
53
+ balance
54
+ decimals
55
+ symbol
56
+ address
57
+ }
58
+ }
59
+ }
60
60
  `;
61
61
  const res = yield (0, graphql_request_1.default)(url, query);
62
62
  const pools = res.pools;
@@ -4,6 +4,10 @@ export declare const circuitPlatformId = "circuit";
4
4
  export declare const circuitPlatform: Platform;
5
5
  export declare const moosePlatformId = "moose";
6
6
  export declare const moosePlatform: Platform;
7
- export declare const vaultsPid: PublicKey;
7
+ export declare const neutralPlatformId = "neutral";
8
+ export declare const neutralPlatform: Platform;
9
+ export declare const gauntletPlatformId = "gauntlet";
10
+ export declare const gauntletPlatform: Platform;
11
+ export declare const vaultsPids: PublicKey[];
8
12
  export declare const prefixVaults = "circuitVaults";
9
13
  export declare const platformIdByVaultManager: Map<string, string>;
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.platformIdByVaultManager = exports.prefixVaults = exports.vaultsPid = exports.moosePlatform = exports.moosePlatformId = exports.circuitPlatform = exports.circuitPlatformId = void 0;
3
+ exports.platformIdByVaultManager = exports.prefixVaults = exports.vaultsPids = exports.gauntletPlatform = exports.gauntletPlatformId = exports.neutralPlatform = exports.neutralPlatformId = exports.moosePlatform = exports.moosePlatformId = exports.circuitPlatform = exports.circuitPlatformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  exports.circuitPlatformId = 'circuit';
6
6
  exports.circuitPlatform = {
7
7
  id: exports.circuitPlatformId,
8
8
  name: 'Circuit',
9
9
  image: 'https://sonar.watch/img/platforms/circuit.webp',
10
- // defiLlamaId: 'foo-finance', // from https://defillama.com/docs/api
11
10
  website: 'https://app.circuit.trade/',
12
11
  twitter: 'https://twitter.com/CircuitTrading_',
13
12
  };
@@ -16,14 +15,36 @@ exports.moosePlatform = {
16
15
  id: exports.moosePlatformId,
17
16
  name: 'Moose Market',
18
17
  image: 'https://sonar.watch/img/platforms/moose.webp',
19
- // defiLlamaId: 'foo-finance', // from https://defillama.com/docs/api
20
18
  website: 'https://moose.market/',
21
19
  twitter: 'https://twitter.com/moose_market',
22
20
  };
23
- exports.vaultsPid = new web3_js_1.PublicKey('vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR');
21
+ exports.neutralPlatformId = 'neutral';
22
+ exports.neutralPlatform = {
23
+ id: exports.neutralPlatformId,
24
+ name: 'Neutral',
25
+ image: 'https://sonar.watch/img/platforms/neutral.webp',
26
+ website: 'https://www.app.neutral.trade/',
27
+ twitter: 'https://twitter.com/TradeNeutral',
28
+ };
29
+ exports.gauntletPlatformId = 'gauntlet';
30
+ exports.gauntletPlatform = {
31
+ id: exports.gauntletPlatformId,
32
+ name: 'Gauntlet',
33
+ image: 'https://sonar.watch/img/platforms/gauntlet.webp',
34
+ twitter: 'https://twitter.com/gauntlet_xyz',
35
+ };
36
+ exports.vaultsPids = [
37
+ new web3_js_1.PublicKey('vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR'), // from Drift
38
+ new web3_js_1.PublicKey('9Fcn3Fd4d5ocrb12xCUtEvezxcjFEAyHBPfrZDiPt9Qj'), // from Neutral
39
+ new web3_js_1.PublicKey('EuSLjg23BrtwYAk1t4TFe5ArYSXCVXLBqrHRBfWQiTeJ'), // from Neutral
40
+ new web3_js_1.PublicKey('BVddkVtFJLCihbVrtLo8e3iEd9NftuLunaznAxFFW8vf'), // from Neutral
41
+ ];
24
42
  exports.prefixVaults = 'circuitVaults';
25
43
  exports.platformIdByVaultManager = new Map([
26
44
  ['GT3RSBy5nS2ACpT3LCkycHWm9CVJCSuqErAgf4sE33Qu', exports.circuitPlatformId],
27
45
  ['En8nqJqCE9D2Bsqetw4p89VgZTh8QK8SfCAn5sSyL4PM', exports.moosePlatformId],
46
+ ['C77bxLHWjnAVeG9HdMxu1gunFnjRCcWUDZYfa7xbacHr', exports.neutralPlatformId],
47
+ ['neutBqYtHqPiu89Yfuk3X3cebgBtyppzSbxJ9tt1eSB', exports.neutralPlatformId],
48
+ ['G6L1NE8tLYYzvMHYHbkHZqPFvfEsiRAsHSvyNQ2hut3o', exports.gauntletPlatformId],
28
49
  ]);
29
50
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,iBAAiB,GAAG,SAAS,CAAC;AAC9B,QAAA,eAAe,GAAa;IACvC,EAAE,EAAE,yBAAiB;IACrB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,gDAAgD;IACvD,qEAAqE;IACrE,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,qCAAqC;CAC/C,CAAC;AAEW,QAAA,eAAe,GAAG,OAAO,CAAC;AAC1B,QAAA,aAAa,GAAa;IACrC,EAAE,EAAE,uBAAe;IACnB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,8CAA8C;IACrD,qEAAqE;IACrE,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,6CAA6C,CAC9C,CAAC;AACW,QAAA,YAAY,GAAG,eAAe,CAAC;AAE/B,QAAA,wBAAwB,GAAwB,IAAI,GAAG,CAAC;IACnE,CAAC,8CAA8C,EAAE,yBAAiB,CAAC;IACnE,CAAC,8CAA8C,EAAE,uBAAe,CAAC;CAClE,CAAC,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,iBAAiB,GAAG,SAAS,CAAC;AAC9B,QAAA,eAAe,GAAa;IACvC,EAAE,EAAE,yBAAiB;IACrB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,gDAAgD;IACvD,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,qCAAqC;CAC/C,CAAC;AAEW,QAAA,eAAe,GAAG,OAAO,CAAC;AAC1B,QAAA,aAAa,GAAa;IACrC,EAAE,EAAE,uBAAe;IACnB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,8CAA8C;IACrD,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,iBAAiB,GAAG,SAAS,CAAC;AAC9B,QAAA,eAAe,GAAa;IACvC,EAAE,EAAE,yBAAiB;IACrB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,gDAAgD;IACvD,OAAO,EAAE,gCAAgC;IACzC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,kBAAkB,GAAG,UAAU,CAAC;AAChC,QAAA,gBAAgB,GAAa;IACxC,EAAE,EAAE,0BAAkB;IACtB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,UAAU,GAAG;IACxB,IAAI,mBAAS,CAAC,6CAA6C,CAAC,EAAE,aAAa;IAC3E,IAAI,mBAAS,CAAC,8CAA8C,CAAC,EAAE,eAAe;IAC9E,IAAI,mBAAS,CAAC,8CAA8C,CAAC,EAAE,eAAe;IAC9E,IAAI,mBAAS,CAAC,8CAA8C,CAAC,EAAE,eAAe;CAC/E,CAAC;AAEW,QAAA,YAAY,GAAG,eAAe,CAAC;AAE/B,QAAA,wBAAwB,GAAwB,IAAI,GAAG,CAAC;IACnE,CAAC,8CAA8C,EAAE,yBAAiB,CAAC;IACnE,CAAC,8CAA8C,EAAE,uBAAe,CAAC;IACjE,CAAC,8CAA8C,EAAE,yBAAiB,CAAC;IACnE,CAAC,6CAA6C,EAAE,yBAAiB,CAAC;IAClE,CAAC,8CAA8C,EAAE,0BAAkB,CAAC;CACrE,CAAC,CAAC"}
@@ -23,7 +23,7 @@ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/token
23
23
  const stakingFetcher_1 = require("../goosefx/stakingFetcher");
24
24
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
25
25
  const client = (0, clients_1.getClientSolana)();
26
- const depositAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.vaultDepositorStruct, constants_2.vaultsPid, (0, filters_1.vaultDepositorFilter)(owner));
26
+ const depositAccounts = (yield Promise.all(constants_2.vaultsPids.map((vaultsPid) => (0, solana_1.getParsedProgramAccounts)(client, structs_1.vaultDepositorStruct, vaultsPid, (0, filters_1.vaultDepositorFilter)(owner))))).flat();
27
27
  if (depositAccounts.length === 0)
28
28
  return [];
29
29
  const vaultsInfo = yield cache.getItems(depositAccounts.map((deposit) => deposit.vault.toString()), { prefix: constants_2.prefixVaults, networkId: portfolio_core_1.NetworkId.solana });
@@ -1 +1 @@
1
- {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AAGpC,kDAAmE;AACnE,2CAAsD;AACtD,iDAAsD;AACtD,+CAA8D;AAC9D,uCAAiD;AACjD,uCAAiD;AACjD,qGAA6E;AAC7E,8DAAsD;AAGtD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,eAAe,GAAG,MAAM,IAAA,iCAAwB,EACpD,MAAM,EACN,8BAAoB,EACpB,qBAAS,EACT,IAAA,8BAAoB,EAAC,KAAK,CAAC,CAC5B,CAAC;IAEF,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE5C,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,QAAQ,CACrC,eAAe,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,EAC1D,EAAE,MAAM,EAAE,wBAAY,EAAE,SAAS,EAAE,0BAAS,CAAC,MAAM,EAAE,CACtD,CAAC;IACF,MAAM,SAAS,GAA2B,IAAI,GAAG,EAAE,CAAC;IACpD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,SAAS;YAAE,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC5D,CAAC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CAAC"}
1
+ {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AAGpC,kDAAmE;AACnE,2CAAuD;AACvD,iDAAsD;AACtD,+CAA8D;AAC9D,uCAAiD;AACjD,uCAAiD;AACjD,qGAA6E;AAC7E,8DAAsD;AAGtD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,eAAe,GAAG,CACtB,MAAM,OAAO,CAAC,GAAG,CACf,sBAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAC3B,IAAA,iCAAwB,EACtB,MAAM,EACN,8BAAoB,EACpB,SAAS,EACT,IAAA,8BAAoB,EAAC,KAAK,CAAC,CAC5B,CACF,CACF,CACF,CAAC,IAAI,EAAE,CAAC;IAET,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE5C,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,QAAQ,CACrC,eAAe,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,EAC1D,EAAE,MAAM,EAAE,wBAAY,EAAE,SAAS,EAAE,0BAAS,CAAC,MAAM,EAAE,CACtD,CAAC;IACF,MAAM,SAAS,GAA2B,IAAI,GAAG,EAAE,CAAC;IACpD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,SAAS;YAAE,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,cAAc,CAC5C,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE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cher_1 = __importDefault(require("./depositsFetcher"));
9
9
  const vaultsJob_1 = __importDefault(require("./vaultsJob"));
10
- exports.platforms = [constants_1.circuitPlatform, constants_1.moosePlatform];
10
+ exports.platforms = [
11
+ constants_1.circuitPlatform,
12
+ constants_1.moosePlatform,
13
+ constants_1.neutralPlatform,
14
+ constants_1.gauntletPlatform,
15
+ ];
11
16
  exports.jobs = [vaultsJob_1.default];
12
17
  exports.fetchers = [depositsFetcher_1.default];
13
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAA6D;AAC7D,wEAAgD;AAChD,4DAAoC;AAEvB,QAAA,SAAS,GAAe,CAAC,2BAAe,EAAE,yBAAa,CAAC,CAAC;AACzD,QAAA,IAAI,GAAU,CAAC,mBAAS,CAAC,CAAC;AAC1B,QAAA,QAAQ,GAAc,CAAC,yBAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAKqB;AACrB,wEAAgD;AAChD,4DAAoC;AAEvB,QAAA,SAAS,GAAe;IACnC,2BAAe;IACf,yBAAa;IACb,2BAAe;IACf,4BAAgB;CACjB,CAAC;AACW,QAAA,IAAI,GAAU,CAAC,mBAAS,CAAC,CAAC;AAC1B,QAAA,QAAQ,GAAc,CAAC,yBAAe,CAAC,CAAC"}
@@ -19,7 +19,7 @@ const structs_1 = require("./structs");
19
19
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
20
20
  const client = (0, clients_1.getClientSolana)();
21
21
  const [vaults, spotMarkets] = yield Promise.all([
22
- (0, solana_1.getParsedProgramAccounts)(client, structs_1.vaultStruct, constants_2.vaultsPid, filters_1.vaultFilter),
22
+ (yield Promise.all(constants_2.vaultsPids.map((vaultsPid) => (0, solana_1.getParsedProgramAccounts)(client, structs_1.vaultStruct, vaultsPid, filters_1.vaultFilter)))).flat(),
23
23
  cache.getItem(constants_1.keySpotMarkets, {
24
24
  prefix: constants_1.platformId,
25
25
  networkId: portfolio_core_1.NetworkId.solana,
@@ -1 +1 @@
1
- {"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/vaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA+E;AAC/E,kDAI4B;AAC5B,2CAAgF;AAChF,uCAAwC;AACxC,uCAAwC;AAIxC,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC9C,IAAA,iCAAwB,EAAC,MAAM,EAAE,qBAAW,EAAE,qBAAS,EAAE,qBAAW,CAAC;QACrE,KAAK,CAAC,OAAO,CAAuB,0BAAc,EAAE;YAClD,MAAM,EAAE,sBAAe;YACvB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC;KACH,CAAC,CAAC;IAEH,IAAI,CAAC,WAAW;QAAE,OAAO;IAEzB,MAAM,WAAW,GAAG,EAAE,CAAC;IACvB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,IAAA,wBAAe,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CACjC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,WAAW,KAAK,KAAK,CAAC,eAAe,CACjD,CAAC;QACF,IAAI,CAAC,UAAU;YAAE,SAAS;QAE1B,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACxC,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC;QAChC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACvC,MAAM,eAAe,GAAG,oCAAwB,CAAC,GAAG,CAClD,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CACzB,CAAC;QACF,IAAI,CAAC,eAAe;YAAE,SAAS;QAE/B,WAAW,CAAC,IAAI,CAAC;YACf,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;SACrE,CAAC,CAAC;IACL,CAAC;IAED,MAAM,KAAK,CAAC,QAAQ,CAAY,WAAW,EAAE;QAC3C,MAAM,EAAE,wBAAY;QACpB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,sBAAsB;IACvC,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift-market-maker-vault/vaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA+E;AAC/E,kDAAgE;AAChE,2CAIqB;AACrB,uCAAwC;AACxC,uCAAwC;AAIxC,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC9C,CACE,MAAM,OAAO,CAAC,GAAG,CACf,sBAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAC3B,IAAA,iC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AAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,sBAAsB;IACvC,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -54,30 +54,30 @@ function sushiV3PairToUniV2(pair) {
54
54
  }
55
55
  function getV3PairsAddresses(url, length = 300) {
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
- const query = (0, graphql_request_1.gql) `
58
- {
59
- pools(
60
- orderBy: totalValueLockedUSD
61
- first: ${length}
62
- orderDirection: desc
63
- where: { volumeUSD_not: "0", liquidity_not: "0" }
64
- ) {
65
- id
66
- token0Price
67
- token1Price
68
- liquidity
69
- token0 {
70
- id
71
- totalSupply
72
- decimals
73
- }
74
- token1 {
75
- id
76
- totalSupply
77
- decimals
78
- }
79
- }
80
- }
57
+ const query = (0, graphql_request_1.gql) `
58
+ {
59
+ pools(
60
+ orderBy: totalValueLockedUSD
61
+ first: ${length}
62
+ orderDirection: desc
63
+ where: { volumeUSD_not: "0", liquidity_not: "0" }
64
+ ) {
65
+ id
66
+ token0Price
67
+ token1Price
68
+ liquidity
69
+ token0 {
70
+ id
71
+ totalSupply
72
+ decimals
73
+ }
74
+ token1 {
75
+ id
76
+ totalSupply
77
+ decimals
78
+ }
79
+ }
80
+ }
81
81
  `;
82
82
  const res = yield (0, graphql_request_1.default)(url, query);
83
83
  const pools = res.pools;
@@ -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* () {
@@ -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;