Skip to content

bard/gs-index

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gs-index

Command-line indexer for Allo (v1) events. Built for Gitcoin's December 2023 hackathon (presentation). Companion to gs-log.

Features

  • accepts events as JSON on stdin for easy composition: file, network, direct pipe from gs-log, etc
  • outputs SQL (Postgres dialect)

Download

Download the binary for your platform from Releases.

Examples

Index historical data into a local database:

$ cat event_log.ndjson | gs-index | psql mydb

Index historical plus live data into a local database:

$ gs-log --chains 58008:origin..ongoing | gs-index | psql mydb

Index historical plus live data and keep a log to easily resume in case of interruption:

$ gs-log --chains 58008:origin..ongoing | \
  tee -a event_ndjson.log | \
  gs-index | \
  psql mydb
# ... later ...
$ cat event_ndjson | \
  gs-log --resume | \
  tee -a event_ndjson.log | \
  gs-index | \
  psql mydb

Development

Running tests in watch mode:

# start db for integration tesnts
$ docker-compose up -d
$ cargo watch --watch src --ignore snapshots --clear -x test

Status

Work in progress. Event support:

  • ProjectCreated
  • MetadataUpdated
  • OwnerAdded
  • OwnerRemoved
  • RoundCreated
  • NewProjectApplication
  • MatchAmountUpdated
  • RoundMetaPtrUpdated
  • ApplicationMetaPtrUpdated
  • ProjectsMetaPtrUpdated
  • ApplicationStatusesUpdated
  • VotingContractCreatedV1
  • VotingContractCreated
  • Voted
  • PayoutContractCreated
  • ApplicationInReviewUpdated

About

Composable command-line blockchain indexer for Gitcoin's Grants Stack

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages