Skip to content

ligulfzhou/farcaster-indexer

Repository files navigation

Farcaster Indexer(WIP)

This is a Rust version of Farcaster-Indexer by gskril which listens for messages from a Farcaster Hub and inserts relevant data into a postgres database.

How to run

Clone this repo

git clone https://github.com/ligulfzhou/farcaster-indexer

Run the latest database migrations

cd migration
export DATABASE_URL=postgresql://username:password@localhost/farcaster
cargo run

Generate sea-orm entity

sea-orm-cli generate entity -u postgresql://username:password@localhost/farcaster -o entity/src

Run the indexer

cd indexer;

# Recommended to get the full state. You only need to run this once.
# Streaming will start after the backfill is complete.
cargo run backfill

# Ignores backfill and start streaming from the latest recorded event.
# You should run this after one initial backfill.
cargo run index

About

farcaster indexer with rust(WIP)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published