Skip to Content
docs

Aave V4 Supported Chains

Chains are the blockchain networks where Aave V4 is deployed.

Chain Data Structure

Chain data provides information about blockchain networks supported by Aave V4, including:

  • Identification: name, chain ID, icon URL
  • Configuration: explorer URL, whether it is a testnet
  • Native token details: native token metadata, wrapped token address, and gateway

The following TypeScript interface illustrates the core Chain type:

interface Chain {
  __typename: "Chain";
  chainId: ChainId;
  name: string;
  icon: string;
  rpcUrl: string;
  explorerUrl: string;
  isTestnet: boolean;
  isFork: boolean;
  nativeAsset: NativeAsset | null;
  // Deprecated: use nativeAsset
  nativeWrappedToken: EvmAddress;
  nativeInfo: TokenInfo;
  nativeGateway: EvmAddress;
  signatureGateway: EvmAddress;
}

Listing Supported Chains

Discover all blockchain networks supported by Aave V4.

Use the useChains hook in React, the chains action in TypeScript, or the chains query in GraphQL to fetch a list of supported chains.

import { type ChainsRequest, useChains } from "@aave/react";

function ChainsList({ request }: { request: ChainsRequest }) {
  const { data, loading, error } = useChains(request);

  if (loading) return <div>Loading…</div>;

  if (error) return <div>Error: {error.message}</div>;

  return (
    <div>
      {data.map((chain) => (
        <div key={chain.chainId}>
          <h3>{chain.name}</h3>
          <p>Chain ID: {chain.chainId}</p>
        </div>
      ))}
    </div>
  );
}

See below for examples of ChainsRequest objects in React and query variables in GraphQL.

import { ChainsFilter, type ChainsRequest } from "@aave/react";

const request: ChainsRequest = {
  query: { filter: ChainsFilter.ALL },
};

In React and TypeScript, ChainsFilter is one of:

  • ChainsFilter.ALL: all chains
  • ChainsFilter.MAINNET_ONLY: mainnets only
  • ChainsFilter.TESTNET_ONLY: testnets only

Fetching a Single Chain

Get detailed information about a specific blockchain network by its chain ID.

Use the useChain hook in React, the chain action in TypeScript, or the chain query in GraphQL to fetch a specific chain.

import { type ChainRequest, useChain } from "@aave/react";

function ChainDetails({ request }: { request: ChainRequest }) {
  const { data, loading, error } = useChain(request);

  if (loading) return <div>Loading…</div>;

  if (error) return <div>Error: {error.message}</div>;

  if (!data) return <div>Chain not found</div>;

  return (
    <div>
      <h3>{data.name}</h3>
      <p>Chain ID: {data.chainId}</p>
    </div>
  );
}

See below for an example of a ChainRequest object in React and query variables in GraphQL.

Example
import { chainId, type ChainRequest } from "@aave/react";

const request: ChainRequest = {
  chainId: chainId(1),
};