net_version RPC Method

Retrieves the network identifier as a decimal string.

Parameters#

None

Result#

string - The network/chain ID expressed as a decimal string.

Code sample#

{
  "jsonrpc": "2.0",
  "method": "net_version",
  "params": [],
  "id": 1
}

Response#

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "10143"
}
Try It