⚡ We welcome businesses to test our enterprise-grade service

Method: POST net_version

dropdown

方法 GETH RPC net_version 例如 Ethereum (ETH)

POST net_version

返回DEVP2P网络ID(例如,Mainnet 1,Goerli 5)。

Parameters

-

Request

curl --location --request POST 'https://geth.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "net_version",
"params": [],
"id": "getblock.io"}'


Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "1"
}