Skip to main content

Introduction

This tutorial shows you how to detect and stream ERC-20 contract deployments in real time using The Neighborhood’s indexing infrastructure. Basically we are going to track new token creations. Unlike event-based pipelines, this example scans the entire chain for contract creation transactions and identifies which of these deployments implement the ERC-20 interface.
Note: The output of this pipeline can be used to trigger another pipeline that filters only the token transfers for these deployed tokens, creating a complete token tracking system.

Prerequisites

You’ll need:
  • A Neighborhood API key. To get access, sign up at accounts.indexing.co or email [email protected]
  • Basic understanding of EVM transactions and contract bytecode
  • curl or Postman
  • A webhook, database endpoint, or another supported delivery method

What You’ll Build

A pipeline that:
  • Scans every block for contract creation traces
  • Detects contracts implementing the ERC-20 standard (using function selectors)
  • Streams structured deployment data to a destination of your choice
Delivery: Choose where the data should go: your database, a webhook, a Kafka topic - you name it! You can find the full list of supported destinations in our adapter directory.

Step 1: Add the Transformation Logic

This transformation inspects each transaction trace within a block. If a contract is deployed and its bytecode contains known ERC-20 method selectors, it emits a record with the deployment details.
You can also download the code here

Step 2: Create the Transformation

Use the following API request to create your transformation in The Neighborhood:

Step 3: Create the Pipeline

Since this pipeline scans all contract deployments, no filter step is required. Create the pipeline with:

Step 4: Test the Stream

You can test the transformation logic against block 8925894 on Base, which contains a known ERC-20 deployment:
Run this test with our Test endpoint:

Wrap-Up

You’ve now set up a real-time pipeline for detecting ERC-20 contract deployments on The Neighborhood. To go further, chain this output into a second pipeline that filters and streams token transfers for these newly deployed tokens. Need help or want to go further?