Command-line indexer for Allo (v1) events. Built for Gitcoin's December 2023 hackathon (presentation). Companion to gs-log.
- accepts events as JSON on stdin for easy composition: file, network, direct pipe from gs-log, etc
- outputs SQL (Postgres dialect)
Download the binary for your platform from Releases.
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
Running tests in watch mode:
# start db for integration tesnts
$ docker-compose up -d
$ cargo watch --watch src --ignore snapshots --clear -x test
Work in progress. Event support:
- ProjectCreated
- MetadataUpdated
- OwnerAdded
- OwnerRemoved
- RoundCreated
- NewProjectApplication
- MatchAmountUpdated
- RoundMetaPtrUpdated
- ApplicationMetaPtrUpdated
- ProjectsMetaPtrUpdated
- ApplicationStatusesUpdated
- VotingContractCreatedV1
- VotingContractCreated
- Voted
- PayoutContractCreated
- ApplicationInReviewUpdated