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

# Smart Contract Addresses

export const ContractAddresses = () => {
  const [chains, setChains] = useState(null);
  const [error, setError] = useState(null);
  useEffect(() => {
    const fetchChains = async () => {
      try {
        const response = await fetch('https://li.quest/v1/chains?chainTypes=EVM');
        if (!response.ok) {
          throw new Error(`HTTP error! status: ${response.status}`);
        }
        const jsonData = await response.json();
        setChains(jsonData.chains);
      } catch (err) {
        setError(err.message);
      }
    };
    fetchChains();
  }, []);
  const renderChains = chains => <table className="p-3">
      <thead>
        <tr>
          <th></th>
          <th className="text-left"><strong>Chain Name</strong></th>
          <th className="text-left"><strong>Chain ID</strong></th>
          <th><strong>Diamond Address</strong></th>
        </tr>
      </thead>
      <tbody>
        {chains.filter(chain => chain.diamondAddress).sort((a, b) => a.id - b.id).map(chain => <tr key={chain.key}>
            <td>
              <img src={chain.logoURI} alt={chain.name} className="w-3 h-3 rounded-full not-prose" />
            </td>
            <td><strong>{chain.name}</strong></td>
            <td><code>{chain.id}</code></td>
            <td><code>{chain.diamondAddress}</code></td>
          </tr>)}
      </tbody>
    </table>;
  if (error) return <div>Error: {error}</div>; else if (chains) return renderChains(chains); else return <div>Loading...</div>;
};

<Note>
  The LI.FI Diamond entryway contract address is `0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE` on most supported networks. Please note, on some networks the address is different. You can find the ABI on [Github](https://github.com/lifinance/lifi-contract-types/blob/main/dist/diamond.json).
</Note>

<ContractAddresses />

More information and open-source code for each facet contract can be found on our [GitHub](https://github.com/lifinance/contracts/blob/main/docs/README.md).

Contract address of each facet and deployment information can be found in our [GitHub repo](https://github.com/lifinance/contracts/tree/main/deployments).
