Search documentation of Cartouche

# Cartouche.Chain (Cartouche v0.1.3)

Copy Markdown View Source

Chain registry and chain-id parsing helpers.

## Summary

### Functions

parse_id(chain_id)

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

## Functions

# parse_id(chain_id)

    @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