cast-codesize - Get the runtime bytecode size of a contract.
cast codesize
[options] address
Get the runtime bytecode size of a contract.
The contract (address) can be an ENS name or an address.
-B
block
--block
block
The block height you want to query at.
Can be a block number, or any of the tags: earliest
, finalized
, safe
, latest
or pending
.
{{#include ../common/rpc-url-option.md}}
{{#include common-options.md}}
- Get the runtime bytecode size of the WETH contract.
cast codesize 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2