https://github.com/subsquid-labs/file-store-csv-example
Minimalistic squid storing data to CSV files
https://github.com/subsquid-labs/file-store-csv-example
blockchain blockchain-indexer csv etl indexing parquet sqd subsquid typescript web3
Last synced: about 4 hours ago
JSON representation
Minimalistic squid storing data to CSV files
- Host: GitHub
- URL: https://github.com/subsquid-labs/file-store-csv-example
- Owner: subsquid-labs
- License: mit
- Created: 2023-03-09T12:36:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-06-16T15:52:49.000Z (15 days ago)
- Last Synced: 2026-06-16T17:26:59.978Z (15 days ago)
- Topics: blockchain, blockchain-indexer, csv, etl, indexing, parquet, sqd, subsquid, typescript, web3
- Language: TypeScript
- Homepage: https://docs.sqd.dev/en/sdk
- Size: 106 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A squid that saves USDC Transfers to TSV files
This tiny blockchain indexer scrapes `Transfer` events emitted by the [USDC contract](https://etherscan.io/address/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48) and saves the data in a file-based dataset in a local folder `./data`. It is built with the [Subsquid framework](https://sqd.dev), hence the term "squid".
The squid uses [`@subsquid/file-store`](https://docs.sqd.dev/en/sdk) and [`@subsquid/file-store-csv`](https://docs.sqd.dev/en/sdk) packages to store the dataset. A less common _tab separated values_ (TSV) format was chosen to highlight the flexibility of the CSV writing subsystem.
Dependencies: NodeJS, [Squid CLI](https://docs.sqd.dev/en/sdk).
To see it in action, spin up a *processor*, a process that ingests the data from the Ethereum Archive:
```bash
git clone https://github.com/subsquid-labs/file-store-csv-example
cd file-store-csv-example/
npm i
sqd process
```
You should see a `./data` folder populated with indexer data appear in a bit:
```bash
$ tree ./data/
./data/
├── 0000000000-0007242369
│ └── transfers.tsv
├── 0007242370-0007638609
│ └── transfers.tsv
...
└── status.txt
```