@superfluid-finance/sdk-core
Version:
SDK Core for building with Superfluid Protocol
22 lines • 888 B
JavaScript
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