GetNetworkId


Returns the CHAIN_ID of the specified network. This is represented as a String.

See table below for the CHAIN_ID for different chains:

Chain(s)CHAIN_ID
Zilliqa mainnet1
Developer testnet333

NOTE: CHAIN_ID from 2 to 9 are reserved for Zilliqa Core use.

Example Request

curl -d '{
"id": "1",
"jsonrpc": "2.0",
"method": "GetNetworkId",
"params": [""]
}' -H "Content-Type: application/json" -X POST "https://api.zilliqa.com/"

Example Response

{
"id": "1",
"jsonrpc": "2.0",
"result": "1"
}

HTTP Request

Chain(s)URL(s)
Zilliqa mainnethttps://api.zilliqa.com/
Developer testnethttps://dev-api.zilliqa.com/
Local testnethttp://localhost:4201/
Isolated serverhttp://localhost:5555/

Arguments

ParameterTypeRequiredDescription
idstringRequired"1"
jsonrpcstringRequired"2.0"
methodstringRequired"GetNetworkId"
paramsstringRequiredEmpty string ""