eth_chainId
Returns the chain ID of the current network.
Parameters:
None
Returned Value:
INTEGER
- value as a string representing the integer of the current chain id.
{
"id":0,
"jsonrpc": "2.0",
"result": "0x128" // 296
}
curl https://mainnet.hedera.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":0}'
curl https://testnet.hedera.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":0}'