EVM
eth_chainId
Summary: Get chainId
Parameters
This method does not accept any parameters
Returns
eth_chainIdResponse string
Hexadecimal representation of the chain ID.
Customize request
Parameter
Value
Request
curl https://linea-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}'
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": "0xe728"
}