Back to blog
February 13, 2024 · 5 min · SQD Team

Subsquid Testnet: Run your first indexer in 10 minutes or less

Tutorial Testnet Getting Started
Subsquid Testnet: Run your first indexer in 10 minutes or less

This guide walks users through deploying a squid indexer on the Subsquid incentivized testnet. The process emphasizes accessibility, allowing even non-technical users to set up an indexer in under 10 minutes. Participants can earn tSQD tokens based on completed quests and leaderboard rankings.

Prerequisites

Users need:

  • MetaMask wallet
  • Internet connection
  • Node.JS installation
  • Git installation
  • 10-30 minutes of time

Getting Started: Account Setup

The first step involves visiting app.subsquid.io and creating an account using email, Google, or GitHub credentials. Users then proceed through onboarding and switch to the appropriate network through account settings.

Wallet Connection

After onboarding, participants allow MetaMask to add the Arbitrum Goerli network and import the tSQD token. This enables users to verify their token balance within MetaMask and connect their wallet to the dashboard.

System Preparation (Windows)

Before deploying a squid, three components require installation:

Hyper-V: Activate through PowerShell admin mode using the command Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

Docker & Development Tools: Git and Node.JS must be installed beforehand.

Installation Process

The CLI installation begins with npm install --global @subsquid/cli@latest, followed by verification using sqd --version.

Squid Deployment

The deployment involves several key commands:

  1. Initialize the squid: sqd init my-single-proc-squid -t https://github.com/subsquid-quests/single-chain-squid

  2. Retrieve an API key from the dashboard and save it to ./query-gateway/keys

  3. Start Docker containers with sqd up

  4. Prepare the squid:

    • npm ci
    • sqd build
    • sqd migration:apply
  5. Launch indexing: sqd run .

Functionality

The deployed squid tracks all USDC transfers on Ethereum, storing data accessibly and exposing it via GraphQL API. Initial indexing requires 10-15 minutes as the system processes historical data.

Completion & Shutdown

Upon finishing, users execute sqd down to remove containers and prevent unnecessary resource consumption. Points accumulate automatically on the dashboard.

Want to learn more about SQD?