"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GET_POOL_INFO = exports.GET_TOP_POOLS_QUERY = exports.GET_BLOCKS = exports.POOLS_FEE_HISTORY = void 0;
const graphql_request_1 = require("graphql-request");
exports.POOLS_FEE_HISTORY = (0, graphql_request_1.gql) `
  query poolFees($block: Int!) {
    pools(block: { number: $block }) {
      id
      feesUSD
    }
  }
`;
const GET_BLOCKS = (timestamps) => {
    let queryString = 'query blocks {';
    queryString += timestamps.map(timestamp => {
        return `blocks(first: 1, orderBy: timestamp, orderDirection: desc, where: { timestamp_gt: ${timestamp}, timestamp_lt: ${timestamp + 600} }) {
      number
    }`;
    });
    queryString += '}';
    return (0, graphql_request_1.gql) `
    ${queryString}
  `;
};
exports.GET_BLOCKS = GET_BLOCKS;
exports.GET_TOP_POOLS_QUERY = (0, graphql_request_1.gql) `
  query topPools {
    pools(first: 50, orderBy: totalValueLockedUSD, orderDirection: desc, subgraphError: allow) {
      id
      feeTier
      token0 {
        id
      }
      token1 {
        id
      }
    }
  }
`;
exports.GET_POOL_INFO = (0, graphql_request_1.gql) `
  query poolInfo($id: String!) {
    pool(id: $id) {
      id
      feesUSD
      totalValueLockedUSD
    }
  }
`;
//# sourceMappingURL=kyberswap-elastic.pool.subgraph.types.js.map