> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rhinestone.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Supported chains

> Learn what chains our services are deployed on

export const ChainsTable = ({chains}) => <table className="min-w-full">
    <thead>
      <tr className="border-b border-gray-200 dark:border-gray-700">
        <th className="text-left py-2 pr-4 font-semibold">Name</th>
        <th className="text-right py-2 pr-4 font-semibold">Chain ID</th>
        <th className="text-left py-2 font-semibold">Tokens</th>
      </tr>
    </thead>
    <tbody>
      {chains.map(chain => <tr key={chain.chainId} className="border-b border-gray-100 dark:border-gray-800">
          <td className="py-2 pr-4">{chain.name}</td>
          <td className="py-2 pr-4 text-right">{chain.chainId}</td>
          <td className="py-2">{chain.supportedTokens === 'all' ? 'All' : chain.supportedTokens?.map(t => t.symbol).join(', ') || '-'}</td>
        </tr>)}
    </tbody>
  </table>;

export const IntentChains = () => {
  const [chains, setChains] = React.useState([]);
  const [loading, setLoading] = React.useState(true);
  const [error, setError] = React.useState(null);
  React.useEffect(() => {
    fetch("https://v1.orchestrator.rhinestone.dev/chains").then(res => {
      if (!res.ok) throw new Error('Failed to fetch chains');
      return res.json();
    }).then(data => {
      const chainsArray = Object.entries(data).map(([chainId, chain]) => ({
        ...chain,
        chainId: parseInt(chainId, 10)
      })).sort((a, b) => a.chainId - b.chainId);
      setChains(chainsArray);
      setLoading(false);
    }).catch(err => {
      setError(err.message);
      setLoading(false);
    });
  }, []);
  if (loading) {
    return <div className="text-gray-500 dark:text-gray-400 py-4">Loading chains...</div>;
  }
  if (error) {
    return <div className="text-red-500 dark:text-red-400 py-4">Error loading chains: {error}</div>;
  }
  const mainnets = chains.filter(chain => !chain.testnet);
  const testnets = chains.filter(chain => chain.testnet);
  return <>
      <h3>Mainnet</h3>
      <ChainsTable chains={mainnets} />
      <h3>Testnet</h3>
      <ChainsTable chains={testnets} />
    </>;
};

<IntentChains />

<Info>
  See the [Address Book](/home/resources/address-book) for the contract and
  module addresses deployed on these chains.
</Info>
