eth_chainId
Method
- JSON-RPC method name:
eth_chainId - JSON-RPC version:
2.0
Parameters
This method does not accept any parameters.
Result
- Name:
Chain ID - Type:
string
Result schema
{
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x([1-9a-f]+[0-9a-f]*|0)$"
}
Errors
This method may return JSON-RPC standard errors (e.g. -32600, -32601, -32602, -32603) as well as application-specific errors.
TODO: Document method-specific error codes and conditions.