net_version - HyperEVM

Example code for the net_version JSON RPC method. Сomplete guide on how to use net_version GetBlock JSON RPC in GetBlock Web3 documentation.

This method returns the current network ID.

Parameters

  • None

Request

cURL
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "net_version",
    "params": [],
    "id": "getblock.io"
}'

Response

response.json
{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": "999"
}

Response Parameters

Field
Type
Description

result

string

Network ID as decimal string.

Network IDs

Network
Network ID

HyperEVM Mainnet

999

HyperEVM Testnet

998

Use Case

The net_version method is essential for:

  • Network identification

  • Legacy compatibility (pre-EIP-155)

  • Wallet connection verification

  • Multi-network support

Error Handling

Error Code
Message
Cause

-32603

Internal error

Node issue.

Web3 Integration

Last updated

Was this helpful?