Skip to content

subsquid-labs/file-store-json-example

Repository files navigation

A squid that saves USDC Transfers to JSONL files

This tiny blockchain indexer scrapes Transfer events emitted by the USDC contract and saves the data in a file-based dataset in a local folder ./data. It is built with the Subsquid framework, hence the term "squid".

The squid uses @subsquid/file-store and @subsquid/file-store-json packages to store the dataset. It outputs its data in the JSONL format instead of the plain JSON array used by default.

Dependencies: NodeJS, Squid CLI.

To see it in action, spin up a processor, a process that ingests the data from the Ethereum Archive:

$ git clone https://github.com/subsquid-labs/file-store-json-example
$ cd file-store-json-example/
$ npm i
$ sqd process

You should see a ./data folder populated with indexer data appear in a bit:

$ tree ./data/
./data/
├── 0000000000-0007242369
│   └── transfers.jsonl
├── 0007242370-0007638609
│   └── transfers.jsonl
...
└── status.txt

About

Minimalistic squid storing data to JSON files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published