UNPKG

@superfluid-finance/sdk-core

Version:
22 lines 888 B
import { SubgraphQueryHandler, } from "../../subgraphQueryHandler"; import { TokenStatisticsDocument, } from "./tokenStatistics.generated"; export class TokenStatisticQueryHandler extends SubgraphQueryHandler { constructor() { super(...arguments); this.getAddressFieldKeysFromFilter = () => ({ accountKeys: [], tokenKeys: ["id", "token"], }); this.getRelevantAddressesFromResultCore = (result) => ({ tokens: [result.id], accounts: [], }); this.mapFromSubgraphResponse = (response) => response.tokenStatistics.map((x) => ({ ...x, updatedAtBlockNumber: Number(x.updatedAtBlockNumber), updatedAtTimestamp: Number(x.updatedAtTimestamp), })); this.requestDocument = TokenStatisticsDocument; } } //# sourceMappingURL=tokenStatistic.js.map