Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 615 Bytes

cast-chain-id.md

File metadata and controls

39 lines (23 loc) · 615 Bytes

cast chain-id

NAME

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

SYNOPSIS

cast chain-id [options]

DESCRIPTION

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

OPTIONS

RPC Options

{{#include ../common/rpc-url-option.md}}

{{#include common-options.md}}

EXAMPLES

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

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

    cast chain-id

SEE ALSO

cast, cast chain