Skip to content

Phala-Network/ethereum-circulation-squid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4b8fccd · Jan 15, 2025

History

7 Commits
May 9, 2024
Jan 12, 2025
Jan 12, 2025
Jan 13, 2025
Jan 15, 2025
Feb 28, 2024
Feb 28, 2024
Jan 13, 2025
Feb 28, 2024
May 10, 2024
Jan 12, 2025
Jan 13, 2025
Feb 28, 2024
Feb 28, 2024
Jan 13, 2025
May 10, 2024
Jan 12, 2025
Feb 28, 2024
May 10, 2024
May 10, 2024

Repository files navigation

ERC20 indexing template

A squid template indexing ERC20 transfers. The squid fetches the historical Transfer event, decodes and persists to a Transfer table. A new entry is created in the Account table for each address that has interacted with the contract so that one can query the transfer history for each EVM address.

Dependencies: NodeJS v16 or newer, Git, Docker.

Setup

  • Install Squid CLI:
npm i -g @subsquid/cli
  • Update the CONTRACT_ADDRESS and CONTRACT_DEPLOYED_AT in .env. By default, the USDC contract is indexed
  • Inspect the list of the available archives with sqd archives:ls and choose the network if necessary Set the RPC_ENDPOINT env variable to a chain node RPC URL. Use secrets when deploying the squid to Subsquid Cloud.

Run

npm ci
# start a local Postgres
sqd up
# build the squid
sqd build
# start both the squid processor and the GraphQL server
sqd run .

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

You can also start squid services one by one:

sqd process
sqd serve

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published