Get chains

Fully supported EVM chains exposed by the Core REST API, with the chain id, network name, the protocols deployed on the chain, and the last block fully processed by all realtime service jobs for the chain.

Response Body

application/json

const baseUrl = process.env.CORE_REST_BASE_URL ?? "https://api.morpho.org";const apiKey = process.env.MORPHO_API_KEY ?? "<MORPHO_API_KEY>";const url = new URL(`${baseUrl}/v0/chains`);const response = await fetch(url, {  headers: {    accept: "application/json",    "x-api-key": apiKey,  },});if (!response.ok) throw new Error(await response.text());const body = await response.json();
{
  "data": [
    {
      "chain_id": 1,
      "name": "string",
      "last_indexed_block": "string",
      "supported_protocols": [
        "blue"
      ]
    }
  ]
}