What you’ll need
- Basic knowledge of The Graph and subgraphs.
- Your subgraph project files
- The Graph CLI installed
- A Mobula API key (for authentication)
Walkthrough
1
Prepare Your Subgraph
Set up your subgraph for Shibarium. Update your
subgraph.yaml
file to reference Shibarium’s specific contracts and events. If you don’t have a subgraph, you can clone the Uniswap V2 (ShibaSwap) subgraph template and adapt it for Shibarium:2
Install Dependencies
Make sure you have The Graph CLI installed:
3
Build Your Subgraph
Compile your subgraph before deployment:
4
Create the Subgraph
Use the following command to deploy your subgraph:
5
Deploy to Mobula's Shibarium Node
Use the following command to deploy your subgraph:
6
Authenticate
Upon request, provide your Mobula API key for authentication. For additional guidance on acquiring and utilizing your API key, see the authentication section.
7
Monitor Deployment
After deployment, you’ll receive a URL to monitor your subgraph’s indexing progress and status.
Best Practices
- Keep your subgraph up to date to ensure it aligns with the latest Shibarium network changes.
- Conduct comprehensive testing on a testnet before mainnet deployment.
- Continuously monitor performance and fine-tune queries for maximum efficiency.
Troubleshooting
If you encounter deployment problems:- Double-check your
subgraph.yaml
configuration. - Verify that the network name and Mobula node URLs are correct.
- Make sure your API key is valid and properly authorized.