Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/fuseio/fuse-docs/llms.txt

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

Querying historical blockchain data directly from an RPC node is slow and cumbersome. The Graph solves this with subgraphs — open APIs that index on-chain events and expose them through a standard GraphQL interface. Fuse maintains several pre-deployed subgraphs covering NFTs, block data, the Voltage DEX, and both directions of the Ethereum AMB bridge.

Available Fuse subgraphs

SubgraphDescription
fuse-nftAll NFTs minted and transferred on the Fuse Network
fuse-blocksBlock-level details of the Fuse Network
voltage-dexVoltage DEX on-chain trading data: pairs, swaps, liquidity
fuse-ethereum-ambBridge events for the Fuse → Ethereum AMB bridge
etherem-fuse-ambBridge events for the Ethereum → Fuse AMB bridge
The Graph’s smart contracts and indexing infrastructure run on Arbitrum One, even though the subgraphs index data from the Fuse Network.

Query a subgraph

Every subgraph on The Graph’s decentralized network has a query URL in the following format:
https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/[subgraph-id]
To get your API key, go to Subgraph Studio, connect your wallet, and open the API Keys menu at the top of the page.

Example: query recent Voltage DEX swaps

The following GraphQL query fetches the five most recent token swaps on Voltage DEX, ordered by descending timestamp:
{
  swaps(first: 5, orderBy: timestamp, orderDirection: desc) {
    id
    timestamp
    pair {
      token0 {
        symbol
      }
      token1 {
        symbol
      }
    }
    amount0In
    amount1Out
    amountUSD
  }
}
Send this query to the voltage-dex subgraph endpoint using fetch or any GraphQL client:
const axios = require("axios");

const graphqlQuery = `{
  swaps(first: 5, orderBy: timestamp, orderDirection: desc) {
    id
    timestamp
    pair {
      token0 { symbol }
      token1 { symbol }
    }
    amount0In
    amount1Out
    amountUSD
  }
}`;

const queryUrl =
  "https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/B4BGk9itvmRXzzNRAzBWwQARHRt3ZvLz11aWNVsZPT4";

const response = await axios.post(queryUrl, { query: graphqlQuery });
console.log(response.data.data.swaps);
Replace [api-key] with your API key from Subgraph Studio.

Publish your own subgraph

If the pre-deployed subgraphs do not cover your contract’s events, you can publish a custom subgraph to The Graph’s decentralized network.
1

Install the Graph CLI

npm install -g @graphprotocol/graph-cli
2

Create a subgraph in Subgraph Studio

Go to Subgraph Studio, connect your wallet, and click Create a Subgraph. Use Title Case for the name (for example, “My Contract Fuse”) — the name cannot be changed after creation.
3

Initialise the subgraph locally

Copy the graph init command from your subgraph’s page in Subgraph Studio:
graph init --studio <SUBGRAPH_SLUG>
The CLI prompts for network, contract address, and ABI. If your contract is verified on the Fuse Explorer, the CLI will fetch the ABI automatically.
4

Build and deploy

Authenticate with your deploy key, then build and deploy:
graph codegen
graph build
graph auth --studio <DEPLOY_KEY>
graph deploy --studio <SUBGRAPH_SLUG>
You will be prompted for a version label such as v0.0.1.
5

Publish to the decentralized network

Once your subgraph is tested in the Studio playground, click Publish on your subgraph’s page to make it available on the decentralized network. Curating your own subgraph with at least 3,000 GRT is recommended to ensure indexers pick it up promptly.
All developers receive 100,000 free queries per month on The Graph’s decentralized network. Beyond that, queries are billed at $4 per 100,000 requests.

Additional resources

Build docs developers (and LLMs) love