eth_chainId
Returns the chain ID used for signing replay-protected transactions (EIP-155).
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”QUANTITY — The current chain ID.
Request
Section titled “Request”curl -X POST https://eth-mainnet.blockreq.com/v1/rpc/public \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'Response
Section titled “Response”{ "jsonrpc": "2.0", "id": 1, "result": "0x1"}
0x1= 1 (Ethereum Mainnet)
Common Chain IDs
Section titled “Common Chain IDs”| Network | Chain ID (Hex) | Chain ID (Dec) |
|---|---|---|
| Ethereum | 0x1 | 1 |
| BSC | 0x38 | 56 |
| Arbitrum One | 0xa4b1 | 42161 |
| Base | 0x2105 | 8453 |
RU Cost
Section titled “RU Cost”| Method | Cost |
|---|---|
| eth_chainId | 0 RU (free) |