The Hifi protocol stores user data and emits events on the blockchain. Querying these data is not quick and easy by default. There are two ways you can go about it:
- Use Multicall to batch multiple constant function calls.
- Source the data from our subgraphs.
We're using the first approach to feed data to the Hifi Interface. The second approach is documented below.
The Graph is a service that indexes events emitted on the blockchain and serves them via a high-throughput GraphQL server. This server is called a "subgraph".
Hifi is deployed on two Ethereum-based networks, as documented in the previous section Network Addresses. We are maintaining a subgraph for each network:
To see the schemas and some example GraphQL queries, head to this GitHub repo: