Portal
Search…
eth_chainId
Returns the chain ID used for transaction signing at the current best block. None is returned if not available
1
web3.eth.getChainId([callback])
Copied!

Returns

Returns chain ID.

Example

1
> web3.eth.getChainId().then(console.log);
2
> 1023
Copied!
Last modified 7mo ago
Copy link