The Grants Stack Indexer is a tool that indexes blockchain events generated by Allo contracts and serves the data over HTTP in JSON format. The data is organized in a specific structure that enables easy access to different parts of the protocol. The indexer is built using Chainsauce and is designed to work with any EVM-compatible chain.
The indexer data is used by Grants Stack to show stats and allocate matching funds.
Access indexed data through this URL: https://grants-stack-indexer.gitcoin.co/data/
The indexed data follows this structure:
/{chainId}/rounds.json
/{chainId}/prices.json
/{chainId}/projects.json
/{chainId}/rounds/{roundId}/projects.json
/{chainId}/rounds/{roundId}/projects/{projectId}/votes.json
/{chainId}/rounds/{roundId}/projects/{projectId}/contributors.json
/{chainId}/rounds/{roundId}/applications.json
/{chainId}/rounds/{roundId}/applications/{applicationIndex}/votes.json
/{chainId}/rounds/{roundId}/votes.json
/{chainId}/rounds/{roundId}/contributors.json
Indexed chains are defined in config.ts.
Copy .env.example
to .env
, review and optionally customize it.
To pick chains to index, set INDEXED_CHAINS
to a comma-separated list of chain identifiers. Chain identifiers can be found in src/config.ts
.
npm install
npm run dev
npm install
npm run build
npm run start
Or use the provided Dockerfile
.
To only index data without tracking new events nor starting a server, provide the --run-once
option:
npm run build
npm run start:run-once