net_version

Returns the current network id.

Parameters

  • No parameters are needed.
curl https://ethereum-mainnet-archive.allthatnode.com/8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj \
--request POST \
--header "Content-Type: application/json" \
--data '{
    "jsonrpc":"2.0",
    "id":1,
    "method":"net_version",
    "params":[]
}'

Returns

  • String - The current network id.
{"jsonrpc":"2.0","id":1,"result":"1"}

Try Yourself

Language
Click Try It! to start a request and see the response here!