Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add RPC eth_chainId for querying the current blockchain chain ID #6329
Currently although we can use
The same RPC endpoint is also about to be merged for ETC's
Currently although we can use `net_version` 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. An ETH/ETC client can accidentally connect to an ETC/ETH RPC endpoint without knowing it unless it tries to sign a transaction or it fetch a transaction that is known to have signed with a chain ID. This has since caused trouble for application developers, such as MetaMask, to add multi-chain support. The same RPC endpoint is also about to be merged for ETC's go-ethereum: ethereumproject/go-ethereum#336
It looks like @sorpaas hasn'signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement at the following URL: https://cla.parity.io
Once you've signed, plesae reply to this thread with
Parity Technologies CLA Bot
tomusdrw left a comment
A small grumble regarding types.
Also this pollutes
I used a bigint in hexadecimal because that's in line with the rest of the