rpc
hub
Find Best RPC
Explorer
Gas
Balance
Playground
Cast
Tools
Faucets
Monitor
Connect Wallet
Cast Terminal — Run Foundry Cast Commands Online
Cast Commands
Chain
cast chain-id
Get the chain ID
cast chain
Get the chain name
cast block-number
Get the latest block number
Block
cast block
Get block info
cast find-block
Get block number closest to timestamp
Account
cast balance
Get ETH balance
cast nonce
Get nonce
cast code
Get contract bytecode
cast tx
Get transaction
cast receipt
Get transaction receipt
Contract
cast call
Call a contract
cast storage
Get storage slot
cast interface
Generate interface from ABI
cast implementation
Fetch EIP-1967 implementation
cast proof
Generate storage proof
cast etherscan-source
Get source from Etherscan
Gas
cast gas-price
Get gas price
cast max-fee
Get max fee per gas
cast max-priority-fee
Get max priority fee
cast estimate
Estimate gas cost
Logs
cast logs
Get event logs
ENS
cast resolve-name
ENS forward lookup (name → address)
cast lookup-address
ENS reverse lookup (address → name)
cast namehash
Calculate ENS namehash
Signatures
cast 4byte
Lookup function signature by selector
cast 4byte-decode
Decode function selector
cast 4byte-event
Lookup event signature by topic0
cast sig
Compute function selector
cast sig-event
Compute event topic hash
cast upload-signature
Upload signatures to openchain
Encoding
cast abi-encode
ABI encode data
cast decode-transaction
Decode raw transaction
cast pretty-calldata
Pretty print calldata
cast selectors
Extract selectors from bytecode
cast concat-hex
Concatenate hex strings
cast disassemble
Disassemble bytecode to opcodes
Converters
cast from-wei
Convert wei to ETH
cast to-wei
Convert ETH to wei
cast to-unit
Convert ETH amount to unit
cast to-ascii
Convert hex to ASCII
cast to-utf8
Convert hex to UTF-8
cast from-utf8
Convert UTF-8 to hex
cast to-hex
Convert number to hex
cast to-dec
Convert hex to decimal
cast to-base
Convert number between bases
cast to-bytes32
Right-pad hex to 32 bytes
cast to-hexdata
Normalize to lowercase 0x-prefixed hex
cast to-int256
Convert to hex-encoded int256
cast to-uint256
Convert to hex-encoded uint256
cast from-fixed-point
Convert fixed point to integer
cast to-fixed-point
Convert integer to fixed point
cast format-bytes32-string
Format string to bytes32
cast parse-bytes32-string
Parse string from bytes32
cast parse-bytes32-address
Parse address from bytes32
cast to-check-sum-address
Convert to checksummed address
cast from-bin
Convert binary to hex
cast to-rlp
RLP encode hex data
cast from-rlp
Decode RLP encoded data
Utils
cast keccak
Hash data using Keccak-256
cast hash-zero
Print the zero hash
cast max-int
Print max int value
cast min-int
Print min int value
cast max-uint
Print max uint value
cast create2
Generate CREATE2 address
cast shl
Left shift operation
cast shr
Right shift operation
Cast Reference Docs
RPC URL
Command
cast
block-number
Arguments
Run
CLI
Copy
cast block-number --rpc-url https://eth.drpc.org