Deploying a subgraph on Arbitrum Nova with Mobula’s infrastructure is a simple process. This guide will take you through the steps to get your subgraph running on the Arbitrum Nova network.

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

1

Prepare Your Subgraph

Make sure your subgraph is configured for Arbitrum Nova. Update your subgraph.yaml file to point to Arbitrum Nova’s specific contracts and events. If you don’t have a subgraph, you can clone the Uniswap V2 (RPCSwap) subgraph template and customize it for Arbitrum Nova:

git clone https://github.com/MobulaFi/univ2-subgraph-arbitrumnova
2

Install Dependencies

Make sure you have The Graph CLI installed:

npm install -g @graphprotocol/graph-cli
3

Install Mobula CLI

Install our CLI tool using npm:

npm i mobula-cli
4

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.

mob apikey set
5

Build Your Subgraph

Compile your subgraph before deployment:

graph codegen && graph build
6

Deploy your subgraph

Deploy your subgraph using the Mobula CLI:

mob deploy -n subgraphName
7

Monitor Deployment

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

Best Practices

  • Keep your subgraph regularly updated to ensure it remains compatible with the latest Arbitrum Nova 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.yaml configuration.
  • Confirm that you’re using the correct network name and Mobula node URLs.
  • Ensure your API key is valid and has the required permissions.

Need help? Our support team is available to assist with any questions or deployment challenges you may face.