EIP155 Namespace, aka EVM Chains - Chains

Author Simon Warta, ligi, Pedro Gomes, Antoine Herzog, Joel Thorstensson
Discussions-To https://github.com/ChainAgnostic/namespaces/pull/2
Status Draft
Type Standard
Created 2019-12-05
Updated 2022-03-27
Requires CAIP-2
Withdrawal reason CAIP-3

CAIP-2

For context, see the CAIP-2 specification.

Rationale

The chain ID defined in EIP155 is the most widely used chain identifier in the Ethereum ecosystem known to the authors. It optimizes for uniqueness and its usage for replay protection has helped it achieve wide adoption. Unique network IDs can be self-registered in the ethereum-lists/chains registry.

Syntax

For reference, The format of reference currently specified in EIP155 is an unsigned integer in decimal representation. Due to length restrictions of the reference field (32 characters), the largest supported CHAIN_ID at time of writing is 99999999999999999999999999999999.

Resolution Method

To resolve a blockchain reference for the EIP155 namespace, make a JSON-RPC request to a blockchain node with method eth_chainId, for example:

// Request
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_chainId",
  "params": []
}

// Response
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "0x1"
}

The response will return a base-16-encoded integer that should be converted to base 10 to format an EIP155-compatible blockchain reference.

Test Cases

This is a list of manually composed examples

# Ethereum mainnet
eip155:1

# Görli
eip155:5

# Auxilium Network Mainnet
eip155:28945486

References

  • EIP155: Ethereum Improvement Proposal specifying generation and validation of ChainIDs
  • ethereum-lists/chains: An open registry for eip155 network operators to claim a unique chainID and self-publish RPC/node information for them.
  • ERC20: Basic [aka Fungible] Token Standard
  • ERC721: Non-Fungible Token Standard

Rights

Copyright and related rights waived via CC0.

Citation

Please cite this document as:

Simon Warta, ligi, Pedro Gomes, Antoine Herzog, Joel Thorstensson, "namespaces/eip155-caip2: EIP155 Namespace, aka EVM Chains - Chains [DRAFT]," Chain Agnostic Namespaces, eip155-caip2, December 2019 / March 2022. [Online serial]. Available: https://github.com/ChainAgnostic/namespaces/eip155-caip2.md