Initialize a Starknet Substreams Project
In this guide, you'll learn how to initialize a Starknet-based Substreams project. You’ll learn how to set up a simple project to extract raw data or filter events from a smart contract.
Prerequisites
Docker and VS Code installed and up-to-date.
Visit the Getting Started Guide to initialize your development environment.
Step 1: Initialize Your Starknet Substreams Project
Open your development environment and run the following command to initialize your project:
You will be given the option to choose between two Starknet project options. Select the one that best fits your requirements:
starknet-minimal: Creates a simple Substreams that extracts raw data from the block and generates Rust code.
starknet-events: Creates a Substreams that extracts Starknet events using the cached Starknet Foundational Module, filtered by one or more smart contract addresses.
Step 2: Visualize the Data
Create your account here to generate an authentification token (JWT) and pass it as input to:
Run the following command to visualize and itterate on your filtered data model:
Step 3: Customize your Project
After initialization, you can:
Modify your Substreams manifest to include additional filters or configurations.
Implement custom processing logic in Rust based on the filtered data retrieved by the foundational module.
Additional Resources
You may find these additional resources helpful for developing your first EVM application.
Development Container Reference
The Development Container Reference helps you navigate the complete container and its common errors.
GUI Reference
The GUI reference lets you explore all the tools available in the Substreams GUI.
Manifests Reference
The Manifests Reference helps you with editing the substreams.yaml
.
Last updated