> ## 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 an Indexer (Subgraph) on Zora with The Graph

> Step-by-step guide to deploying a subgraph on Zora using The Graph for enhanced blockchain data indexing and querying.

Setting up a subgraph on Zora with Mobula's infrastructure is an easy process. This tutorial will guide you through each step to get your subgraph operational on the Zora 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

<Steps>
  <Step title="Prepare Your Subgraph">
    Configure your subgraph for Zora. Adjust your `subgraph.yaml` file to reference Zora’s specific contracts and events. If you don't have a subgraph yet, you can clone the Uniswap V2 subgraph template and tailor it for Zora:

    ```bash theme={null}
    git clone https://github.com/MobulaFi/univ2-subgraph-zora
    ```
  </Step>

  <Step title="Install Dependencies">
    Make sure you have The Graph CLI installed:

    ```bash theme={null}
    npm install -g @graphprotocol/graph-cli
    ```
  </Step>

  <Step title="Build Your Subgraph">
    Compile your subgraph before deployment:

    ```bash theme={null}
    graph codegen && graph build
    ```
  </Step>

  <Step title="Create the Subgraph">
    Use the following command to deploy your subgraph:

    ```bash theme={null}
    graph create --node https://subgraph.mobula.io:8020
    ```
  </Step>

  <Step title="Deploy to Mobula's Zora Node">
    Use the following command to deploy your subgraph:

    ```bash theme={null}
    graph deploy --node https://subgraph.mobula.io:8020 --ipfs https://subgraph.mobula.io:5001 --network zora
    ```
  </Step>

  <Step title="Authenticate">
    When requested, input your Mobula API key for authentication. Check the [authentication section](https://docs.mobula.io/indexing-stream/authentification) for detailed instructions on obtaining and using your API key.
  </Step>

  <Step title="Monitor Deployment">
    After deployment, you’ll receive a URL to monitor your subgraph’s indexing progress and status.
  </Step>
</Steps>

### Best Practices

* Ensure your subgraph is consistently updated to stay compatible with the latest Zora network changes.
* Perform thorough testing on a testnet before deploying to the mainnet.
* Regularly monitor its performance and optimize queries for improved efficiency.

### Troubleshooting

If you face issues during deployment:

* Review your `subgraph.yaml` file carefully.
* Ensure the network name and Mobula node URLs are correct.
* Check that your API key is valid and has the appropriate permissions.

Need help? Our support team is here to assist with any questions or deployment difficulties.

<CardGroup>
  <Card title="Support" icon="Telegram" href="https://t.me/mobuladevelopers">Telegram</Card>
  <Card title="Support" icon="Slack" href="https://join.slack.com/t/mobulaapi/shared_invite/zt-29zrrpjnl-I0tyD73sy7zKy8q~KLL3Ug">Slack</Card>
  <Card title="Support" icon="Discord" href="https://discord.gg/JVT7xKm3AD">Discord</Card>
  <Card title="Email Support" icon="envelope" href="mailto:contact@mobulalabs.org">Email</Card>
</CardGroup>
