eth_chainId - Sonic

The eth_chainId method is part of the Sonic JSON-RPC API, specifically designed to return the current network or chain ID. This method is crucial for ensuring the uniqueness of transactions across different Sonic networks, as it helps in preventing replay attacks by distinguishing between transactions intended for different networks. The chain ID was introduced as part of EIP-155 to address the issue of transaction replay attacks across different Sonic networks.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
integer
Defaults to 1
string
Defaults to 2.0
string
Defaults to eth_chainId
Response

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json