EIP 695: Create `eth_chainId` method for JSON-RPC (DRAFT)

Return to Ethereum ERCs

Note: The following is an excerpt from the official Ethereum site. It is provided here as a convenience and is not authoritative. Refer to the original document as the authoritative reference.

Data sheet for Create method for JSON-RPC

Title	Create method for JSON-RPC
Author	Isaac Ardis, Wei Tang, Fan Torchz
Status	Draft
Created	2017-08-21
Description	http://eips.ethereum.org/EIPS/eip-695
Specification	http://eips.ethereum.org/EIPS/eip-695#Specification
Category	Interface

Simple Summary

Include eth_chainId method in eth_-namespaced JSON-RPC methods.

Abstract

The eth_chainId method should return a single STRING result for an integer value in hexadecimal format, describing the currently configured “Chain Id” value used for signing replay-protected transactions, introduced via EIP 155: Simple replay attack protection | EIP-155]].

Motivation

Currently although we can use net_version RFC1831 - Remote Procedure Call Protocol Specification Version 2 (RPC) call to get the current network ID, there’s no RPC for querying the chain ID. This makes it impossible to determine the current actual blockchain using the RPC.