Fuel Quickstart
This 5-minute tutorial shows you how to build a Fuel indexer using Squid SDK. You’ll create a complete blockchain indexer that fetches, decodes, and serves Fuel receipts and transaction data.What you’ll build
Your Fuel indexer (squid) will:- Fetch historical Fuel receipts and transactions from the SQD Network
- Decode Fuel-specific data structures
- Save the data to a local PostgreSQL database
- Start a GraphQL server with a rich API to query the indexed data
This tutorial focuses on Fuel. For other chains, see the EVM
Quickstart or Solana
Quickstart.
Prerequisites
Before you begin, ensure you have:- Node.js v18+ - Download here
- Git - Download here
- Docker - Download here (for running PostgreSQL)
- WSL (Windows only) - Install WSL
Scaffold the indexer project
Create a new Fuel squid project:
The template provides a pre-configured project structure for indexing Fuel
receipts and transactions.
Inspect the project structure
Explore the The processor configuration for Fuel:The data processing and storage logic:
./src folder:Key files explained: -
src/model/ - TypeORM model classes auto-generated
from schema.graphql for database operations - processor.ts - Processor
configuration for data retrieval - main.ts - Main executable containing
processing logicprocessor.ts
main.ts
Install dependencies and build
Install dependencies and build the project:
Verify the build completed successfully by checking for the
lib/ directory.Start the database and processor
The processor continuously fetches data, decodes it, and stores it in PostgreSQL. All logic is defined in Apply database migrations:Then start the processor:
main.ts and is fully customizable.First, start a local PostgreSQL database (the template includes a Docker Compose file):The indexer is now running and will begin processing Fuel blocks.
Start the GraphQL API
Start the GraphQL API to serve the indexed data:
The GraphQL playground is available at
localhost:4350/graphql

