DOCUMENTATION
import DisplayOptions from "../../reference/common/display-optionsx"; import RpcUrlOption from "../../reference/common/rpc-url-optionx"; import CommonOptions from "./common-optionsx";
cast block
NAME
cast-block - Get information about a block.
SYNOPSIS
cast block
[options] [block]
DESCRIPTION
Get information about a block.
The specified block can be a block number, or any of the tags: earliest
, finalized
, safe
, latest
or pending
. Default to latest
.
OPTIONS
-f
field
--field
field
If specified, only get the given field of the block.
RPC Options
<RpcUrlOption /> <CommonOptions />EXAMPLES
-
Get the latest block:
cast block
-
Get the
finalized
block:cast block finalized
-
Get the hash of the latest block:
cast block latest -f hash