Skip to main content
Standard Ethereum JSON-RPC API

eth_chainId

Returns the chain ID of the connected network. Linea Mainnet is 0xe708 (59144). Linea Sepolia is 0xe705 (59141).

Parameters

None.

Returns

Hexadecimal value of the chain ID.

Example

Request
curl https://rpc.linea.build \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}'
Example response
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe708"
}

Was this page helpful?