eth_chainId
Returns the chain ID of the current network.
Parameters
This method doesn't accept any parameters.
Returns
hex encoded unsigned integer
Example request
await provider.request({
method: 'eth_chainId',
params: [],
})
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x1"
}