Migration from The Graph
Migrating from The Graph to SendBlocks is a simple process that requires only a few changes to your existing subgraph. The following guide will walk you through the process of migrating your subgraph from The Graph to SendBlocks.
Step 1: Install the SendBlocks CLI
The first step in migrating your subgraph is to install the SendBlocks CLI. You can do this by running the following command:
npm install --global sendblocks-cli
Step 2: Create a New SendBlocks Subgraph
Create a new SendBlocks subgraph by running the following command:
sb-cli init <PROJECT_NAME>
This will create a new directory with the specified project name.
Step 3: Import Your Existing Schema File
Copy the schema file from your existing subgraph into the newly created project directory and rename it to schema.graphql
.
Step 4: Create Mappings
In SendBlocks subgraphs, each mapping files contains the mapping logic for a specific data source (i.e., contract). Create a new mapping file for each data source in your subgraph and place them in the project directory.
Updated 18 days ago