Skip to content

eth_chainId

Defined in EIP-695

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

Returns

string

A hexadecimal string representation of the integer chain ID.

Example

"0x1" // Ethereum Mainnet
"0x14a34" // Base Sepolia (84532)
"0x14a33" // Base Mainnet (84531)

Errors

This method does not typically return errors.