eth_chainId - DogeOS

Returns the currently configured chain ID, a value used in replay-protected transaction signing as introduced by EIP-155.

Returns the currently configured chain ID, a value used in replay-protected transaction signing as introduced by EIP-155.

The chain ID returned should always correspond to the information in the current known head block. This ensures that caller of this RPC method can always use the retrieved information to sign transactions built on top of the head.

If the current known head block does not specify a chain ID, the client should treat any calls to eth_chainId as though the method were not supported, and return a suitable error.

You should prefer eth_chainId over net_version, so that you can reliably identify the chain you are communicating with.

PARAMETERS

None

REQUEST

{
  "jsonrpc": "2.0",
  "method": "eth_chainId",
  "id": 83
}

RESPONSE

Result - An integer of the current chain ID.

{
  "jsonrpc": "2.0",
  "id": 83,
  "result": "0x5fdaf3"
}
Path Params
string
required
Body Params
string
required
Defaults to 2.0

The version of the JSON-RPC protocol.

string
required
Defaults to eth_chainId

The name of the method to be called.

params
array
required
length ≤ 0
Defaults to []

A list of parameters to pass to the method.

params*
integer
required
Defaults to 83

A unique identifier for the request.

Responses

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