API Referenceeth_chainIdeth_chainIdReturns the chain ID of the current network.Parameters (by position)This method does not accept any parameters.ResultChain ID stringhex encoded unsigned integerMatch pattern: ^0x(0|[1-9a-f][0-9a-f]*)$Exampleseth_chainId exampleRequest{ "params": []}Response"0x1"RequestCopy ▾Server URL:Send{ "jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1 }