Creator Blockchain
WebsiteExplorerBridgeGithubTwitter
  • The Origin of Creator Chain
  • Introduction
    • Introduction Creator
    • About Superchain
    • Quick start
    • Creator Rewards Program
    • Creator Network Ambassador Program
  • General Info
    • Network Details
    • Add Creator
    • Contract Addresses
    • Bridge to Creator
    • Roadmap
  • Developer Resources
    • Testnet Faucets
    • Block Explorers
    • Data Indexers
    • Node Operators
    • Oracles
    • Tooling
    • Brand kit
  • Ecosystem
    • Ecosystem in Motion
      • Community
      • DEFI
      • Gaming
      • Infrastructure
      • NFT
  • Links
    • Website
    • Bridge
    • Explorer
    • Twitter
    • Discord
    • Telegram
Powered by GitBook
On this page
  • Discover essential tools for integrating and querying blockchain data.
  • SubQuery - Example Project for Creator Testnet
  • Start
  • Editing your SubQuery project
  • Run your project
  • Query your project
  • Publish your project
  1. Developer Resources

Data Indexers

Data Tools for Blockchain Integration

PreviousBlock ExplorersNextNode Operators

Last updated 3 months ago

Discover essential tools for integrating and querying blockchain data.

Our official Data indexer from Subquery :

SubQuery - Example Project for Creator Testnet

Start

First, install SubQuery CLI globally on your terminal by using NPM npm install -g @subql/cli

You can either clone this GitHub repo, or use the subql CLI to bootstrap a clean project in the network of your choosing by running subql init and following the prompts.

Don't forget to install dependencies with npm install or yarn install!

Editing your SubQuery project

Although this is a working example SubQuery project, you can edit the SubQuery project by changing the following files:

  • The project manifest in project.ts defines the key project configuration and mapping handler filters

  • The GraphQL Schema (schema.graphql) defines the shape of the resulting data that you are using SubQuery to index

  • The Mapping functions in src/mappings/ directory are typescript functions that handle transformation logic

Run your project

If you get stuck, find out how to get help below.

The simplest way to run your project is by running yarn dev or npm run-script dev. This does all of the following:

  1. yarn codegen - Generates types from the GraphQL schema definition and contract ABIs and saves them in the /src/types directory. This must be done after each change to the schema.graphql file or the contract ABIs

  2. yarn build - Builds and packages the SubQuery project into the /dist directory

Query your project

For this project, you can try to query with the following GraphQL code to get a taste of how it works.

{
  query {
    transfers(first: 5, orderBy: VALUE_DESC) {
      totalCount
      nodes {
        id
        blockHeight
        from
        to
        value
        contractAddress
      }
    }
  }
  approvals(first: 5, orderBy: BLOCK_HEIGHT_DESC) {
    nodes {
      id
      blockHeight
      owner
      spender
      value
      contractAddress
    }
  }
}

You can explore the different possible queries and entities to help you with GraphQL using the documentation draw on the right.

Publish your project

SubQuery is open-source, meaning you have the freedom to run it in the following three ways:

is a fast, flexible, and reliable open-source data indexer that provides you with custom APIs for your web3 project across all of our supported networks. To learn about how to get started with SubQuery, .

This SubQuery project indexes all transfers and approval events for the (0xB0517790d29753429D63eFe95be5879EDc8c3311) on Creator Testnet

SubQuery supports various layer-1 blockchain networks and provides as well as for each of them.

docker-compose pull && docker-compose up - Runs a Docker container with an indexer, PostgeSQL DB, and a query service. This requires and running locally. The configuration for this container is set from your docker-compose.yml

You can observe the three services start, and once all are running (it may take a few minutes on your first start), please open your browser and head to - you should see a GraphQL playground showing with the schemas ready to query. or .

Locally on your own computer (or a cloud provider of your choosing),

By publishing it to our enterprise-level , where we'll host your SubQuery project in production ready services for mission critical data with zero-downtime blue/green deployments. We even have a generous free tier.

By publishing it to the decentralised , the most open, performant, reliable, and scalable data service for dApp developers. The SubQuery Network indexes and services data to the global community in an incentivised and verifiable way

SubQuery
visit our docs
USDT
dedicated quick start guides
detailed technical documentation
Docker to be installed
http://localhost:3000
Read the docs for more information
explore the possible service configuration for running SubQuery
view the instructions on how to run SubQuery Locally
Managed Service
Find out how
SubQuery Network
https://github.com/subquery/ethereum-subql-starter/tree/main/Creator/creator-testnet-starter
Page cover image