POST
/
3997273fc956a67dc6982384500e669e
curl --request POST \
  --url https://ronin-mainnet.core.chainstack.com/3997273fc956a67dc6982384500e669e \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_chainId",
  "params": []
}'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": "<string>"
}

The eth_chainId method is a simple RPC call that returns the chain ID of the currently connected Ronin network. The chain ID is a critical value used in the EIP-155 standard to prevent replay attacks across different Ethereum networks.

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • None

Response

  • result - The chain ID of the current network, returned as a hexadecimal number.

Use case

Knowing the chain ID is essential for developers when signing transactions, as it ensures that signed transactions are only valid on the intended network. This method provides a straightforward way to programmatically determine the network’s chain ID, which is especially useful in applications that operate across multiple Ronin networks.

Body

application/json
id
integer
default:1
jsonrpc
string
default:2.0
method
string
default:eth_chainId
params
any[]

Response

200 - application/json
The chain ID of the current network
jsonrpc
string
id
integer
result
string