Skip to content

Gets all Mint(address,address,uint256) events on Ethereum and measures gas spent on parent txs

License

Notifications You must be signed in to change notification settings

subsquid-labs/showcase04-all-mint-events

Repository files navigation

Showcase squid 04: network-wide capture of Mint(address,address,uint256)

This squid captures all Mint(address,address,uint256) events on Ethereum and scrapes the transactions that caused mints, noting the amount of gas spent on each of them. One contract that emits these events is the USDC token contract; its ABI is used to make a Typescript wrapper that supplies a topic0 constant and an event data decoder.

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 showcase04 -t https://github.com/subsquid-labs/showcase04-all-mint-events
cd showcase04

# 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.

About

Gets all Mint(address,address,uint256) events on Ethereum and measures gas spent on parent txs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published