subsquid / squid-astar-example

Small project showcasing the capabilities of the Subsquid SDK. Extracts EVM transactions on Astar and saves into a CSV file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

squid-template

This is a sample squid project to demonstrate its structure and conventions. It tracks all Ethereum.transact calls on Astar and extracts basic information:

  • from address
  • to address
  • Tx input
  • Tx hash
  • Method sighash (first four bytes of the Tx input)
  • Value (if it was one of ERC20 approve, transfer or transferFrom)

The results are saved into a assets/astar-transactions.csv and can later be analyzed by tools such as DuckDB.

For more info consult the docs.

Prerequisites

  • node 16.x
  • docker

Quickly running the sample

# 1. Install dependencies
npm ci

# 2. Compile typescript files
make build

# 3. Start target Postgres database
make up

# 5. Now start the processor. The CSV file should appear in the assets folder
make process

About

Small project showcasing the capabilities of the Subsquid SDK. Extracts EVM transactions on Astar and saves into a CSV file

License:GNU General Public License v3.0


Languages

Language:TypeScript 90.9%Language:JavaScript 3.8%Language:Dockerfile 2.9%Language:Makefile 1.4%Language:Shell 1.0%