# `Cartouche.Chain`
[🔗](https://github.com/zenhive/cartouche/blob/main/lib/cartouche/chain.ex#L1)

Chain registry and chain-id parsing helpers.

## API Functions
| Function | Arity | Description | Param Kinds |
| --- | --- | --- | --- |
| `parse_id` | 1 | Parse an Ethereum chain id from either a numeric id or a known chain name. | `chain_id: value` |

# `parse_id`

```elixir
@spec parse_id(atom() | integer()) :: integer() | no_return()
```

Parses a chain id, which can be given as an integer or an atom of a known network.

## Examples

    iex> Cartouche.Chain.parse_id(5)
    5

    iex> Cartouche.Chain.parse_id(:unichain)
    130

---

*Consult [api-reference.md](api-reference.md) for complete listing*
