Skip to main content

eth_chainId

Returns the chain ID of the current network.

Parameters (by position)

This method does not accept any parameters.

Result

Chain ID string

hex encoded unsigned integer

Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


Examples

eth_chainId example

Request

{
"params": []
}

Response

"0x1"