Earlier this year we announced Snapshot X, our upcoming on-chain voting framework launching on StarkNet. While building out Snapshot X, we realized that an app on StarkNet would benefit from a richer API layer than querying for data directly from the blockchain. The go-to solution to this on mainnet would have been to use The Graph to index on-chain data. At this time however, The Graph doesn’t support StarkNet so. We set out to build a solution ourselves, Checkpoint.
Checkpoint is a library for indexing data from StarkNet events and making it accessible through GraphQL. It provides similar functionality to The Graph but for StarkNet. Checkpoint performs two main functionalities:
The configuration parameters define the smart contract addresses of interest and the relevant events Checkpoint should be tracking. The Data Writers describe the logic that maps events to data that Checkpoint will store in its database. Checkpoint then exposes the stored data to the public through a GraphQL API.
This diagram shows the flow of data once a Checkpoint instance has started processing StarkNet transactions:
As highlighted in the flow diagram above:
Please join Snapshot’s Discord server here to give the team feedback; this will help us significantly improve the product to cater for your specific needs.