Step-by-step guide for deploying a subgraph on zkSync using The Graph for efficient blockchain data indexing and querying.
Setting up a subgraph on zkSync with Mobula’s infrastructure is an easy process. This tutorial will guide you through each step to get your subgraph operational on the zkSync network.
Prepare Your Subgraph
Configure your subgraph for zkSync. Adjust your subgraph.yaml
file to reference zkSync-specific contracts and events. If you don’t have a subgraph yet, you can clone the Uniswap V2 (zkSwap) subgraph template and tailor it for zkSync:
Install Dependencies
Make sure you have The Graph CLI installed:
Build Your Subgraph
Compile your subgraph before deployment:
Create the Subgraph
Use the following command to deploy your subgraph:
Deploy to Mobula's zkSync Node
Use the following command to deploy your subgraph:
Authenticate
When requested, input your Mobula API key for authentication. Check the authentication section for detailed instructions on obtaining and using your API key.
Monitor Deployment
After deployment, you’ll receive a URL to monitor your subgraph’s indexing progress and status.
If you face issues during deployment:
subgraph.yaml
file carefully.Need help? Our support team is here to assist with any questions or deployment difficulties.