Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

eth_chainId

Parameters

None

Returns

chainId - Hexadecimal value as a string representing the integer of the current chain id.

Example

Request

curl https://rpc.adiri.tel \
 -X POST \
 -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":62}'

Result

{
  "id":62,
  "jsonrpc": "2.0",
  "result": "0x7e1"
}

source