EXAMPLES
When providing a RPC endpoint URL:
cast chain --rpc-url https://eth.llamarpc.com
ethlive
Works with -r too:
cast chain -r https://polygon-rpc.com
polygon
cast chain --rpc-url https://eth.llamarpc.com
cast chain -r https://polygon-rpc.com
cast-chain - Get the symbolic name of the current chain.
cast chain
[options]
Get the symbolic chain name from the RPC endpoint we are connected to.
--rpc-url
url
The RPC endpoint. Accepts a URL or an existing alias in the [rpc_endpoints] table, like mainnet
.
Environment: ETH_RPC_URL
-h
--help
Prints help information.
Get the chain name when talking to $RPC
:
cast chain --rpc-url $RPC
Get the chain name when $ETH_RPC_URL
is set:
cast chain