This squid scrapes indirect calls to the BAYC NFT contract, that is, calls to the contract made by other contracts. The following data is recorded:
- the initiating transaction (hash, height, caller, target contract);
- internal calls to BAYC (transaction, contract that directly calls BAYC, method sighash);
- state diffs (transaction, storage key, diff kind, prev and next states).
See more examples of requesting data with squids on the showcase page of Subsquid documentation.
Dependencies: Node.js, Docker.
# 0. Install @subsquid/cli a.k.a. the sqd command globally
npm i -g @subsquid/cli
# 1. Retrieve the template
sqd init showcase06 -t https://github.com/subsquid-labs/showcase06-all-bayc-call-traces
cd showcase06
# 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.