Skip to main content
Version: v. 1

Probe chain-id

NAME​

probe-chain-id - Get the Ethereum chain ID.

SYNOPSIS​

probe chain-id [options]

DESCRIPTION​

Get the Ethereum chain ID from the RPC endpoint we are connected to.

OPTIONS​

RPC Options​

--rpc-url url
The RPC endpoint. Accepts a URL or an existing alias in the [rpc_endpoints] table, like mainnet. Environment: ETH_RPC_URL

Common Options​

-h
--help
Prints help information.

EXAMPLES​

  1. Get the chain ID when talking to $RPC:

    probe chain-id --rpc-url $RPC
  2. Get the chain ID when $ETH_RPC_URL is set:

    probe chain-id

SEE ALSO​

probe, probe chain