eth_chainId RPC Method

Retrieves the network's chain identifier.

Parameters#

None

Result#

string - The network's chain identifier, hex-encoded.

Code sample#

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

Response#

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x279b"
}
Try It