Ftm-data contains an implementation of The graph.
The Graph is an indexing protocol for querying networks like Ethereum and IPFS. Anyone can build and publish open APIs, called subgraphs, making data easily accessible.
We develop a subgraph composed by fantom smart contract. (Ethereum contract here). This image shows us all the contracts with their relations
With the subgraph created, we handle all events emited from this contract and save in our own structure as shown in the following diagram.
After deploy this subgraph in subgraph studio we can test our GraphQL API. For example with this query we can see the top 3 contributions to fantom token.
An the result of this query is
All events are handed by this subgraph, the data is stored and processed on open networks with verifiable integrity. The Graph makes querying this data fast, reliable, and secure.