What you’ll need
- Fundamental understanding of The Graph and subgraphs.
- Your subgraph project files ready.
- The Graph CLI installed
- A Mobula API key (for authentication)
Walkthrough
Prepare Your Subgraph
Make sure your subgraph is configured for Matchain. Update your
subgraph.yaml file to point to Matchain specific contracts and events. If you don’t have a subgraph, you can clone the Uniswap V2 (MSwap) subgraph template and customize it for Matchain:Setup API Key
Configure your API key with the CLI. You can get your API key from the Dashboard.
Please refer to the authentication section for detailed steps on obtaining your API key.
Best Practices
- Keep your subgraph regularly updated to ensure it remains compatible with the latest Matchain network changes.
- Thoroughly test your subgraph on a testnet before deploying to the mainnet.
- Continuously monitor its performance and optimize queries for greater efficiency.
Troubleshooting
If you encounter issues during deployment:- Review your
subgraph.yamlconfiguration. - Confirm that you’re using the correct network name and Mobula node URLs.
- Ensure your API key is valid and has the required permissions.