eth_chainId

window.bw.eth.chainId

The chainId of the network you are currently connected to, returned as a hexadecimal string.

const chainId = window.bw.eth.chainId;
console.log(chainId);
// "0x1"
// hexidecimal representation of Ethereum Mainnet

Last updated