Skip to main content

parse_eip155_chain_id

Function parse_eip155_chain_id 

Source
pub fn parse_eip155_chain_id(chain: &str) -> Result<u64, Eip155ChainIdError>
Expand description

The chain id of an eip155 CAIP-2 identifier, whose reference must be the chain id in canonical decimal form: no sign, no leading zero.

The backend accepts a chains key only when this parses it, and a client routes a smart contract wallet signature only when it parses the account’s chain, so both sides agree on which chains exist.