/showcase01-all-usdc-transfers

Gets all USDC Transfer events on Ethereum in real time

Primary LanguageTypeScriptMIT LicenseMIT

Showcase squid 01: USDC transfers in real time

This squid captures all Transfer(address,address,uint256) events emitted by the USDC token contract and keeps up with network updates in real time. See more examples of requesting data with squids on the showcase page of Subsquid documentation.

Dependencies: Node.js, Docker.

Quickstart

# 0. Install @subsquid/cli a.k.a. the sqd command globally
npm i -g @subsquid/cli

# 1. Retrieve the template
sqd init showcase01 -t https://github.com/subsquid-labs/showcase01-all-usdc-transfers
cd showcase01

# 2. Install dependencies
npm ci

# 3. Start a Postgres database container and detach
sqd up

# 4. Build and start the processor
sqd process

# 5. The command above will block the terminal
#    being busy with fetching the chain data, 
#    transforming and storing it in the target database.
#
#    To start the graphql server open the separate terminal
#    and run
sqd serve

A GraphiQL playground will be available at localhost:4350/graphql.