Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mobula.io/llms.txt

Use this file to discover all available pages before exploring further.

Deploying a subgraph on Metis using Mobula’s infrastructure is a straightforward process. This guide will walk you through the steps to get your subgraph up and running on the Metis network.

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

Ensure your subgraph is configured for Metis. Update your subgraph.yaml file to reference Metis-specific contracts and events. If you don’t have a subgraph, you can clone the Uniswap V2 (NetSwap) subgraph template and modify it for Metis:
git clone https://github.com/MobulaFi/univ2-subgraph-metis
2

Install Dependencies

Make sure you have The Graph CLI installed:
npm install -g @graphprotocol/graph-cli
3

Build Your Subgraph

Compile your subgraph before deployment:
graph codegen && graph build
4

Create the Subgraph

Use the following command to deploy your subgraph:
graph create --node https://subgraph.mobula.io:8020
5

Deploy to Mobula's Metis Node

Use the following command to deploy your subgraph:
graph deploy --node https://subgraph.mobula.io:8020 --ipfs https://subgraph.mobula.io:5001 --network metis
6

Authenticate

When prompted, provide your Mobula API key for authentication. Refer to the authentication section for more details on obtaining and using your API key.
7

Monitor Deployment

After deployment, you’ll receive a URL to monitor your subgraph’s indexing progress and status.

Best Practices

  • Regularly update your subgraph to ensure compatibility with the latest Metis network changes.
  • Test your subgraph thoroughly on a testnet before deploying to mainnet.
  • Monitor your subgraph’s performance and optimize queries for efficiency.

Troubleshooting

If you encounter issues during deployment:
  • Double-check your subgraph.yaml configuration.
  • Ensure you’re using the correct network name and Mobula node URLs.
  • Verify your API key is valid and has the necessary permissions.
Need Assistance? Our support team is ready to help you with any questions or deployment challenges.

Support

Telegram

Support

Slack

Support

Discord

Email Support

Email