BEAM·v0.3.0·MACOS · LINUX·SHA-256 VERIFIED

contract

Inspect deployed contract info, bytecode, ABI, and verified source without explorer API keys.

beam contract inspects deployed EVM contracts by literal address. It does not use explorer API keys.

Usage

$ beam contract info <address>
$ beam contract bytecode <address> [--block <block>]
$ beam contract abi <address>
$ beam contract source <address> [source-path]
$ beam contract export <address> <destination>

<address> must be a literal 0x... EVM address. ENS names, wallet aliases, and token labels are not accepted for contract inspection.

Examples

$ beam --chain ethereum contract info 0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eB48
$ beam --chain ethereum contract bytecode 0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eB48
$ beam --chain ethereum contract abi 0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eB48
$ beam --chain ethereum contract source 0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eB48 FiatTokenProxy.sol
$ beam --chain ethereum contract export 0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eB48 ./usdc-source

Data sources

  • bytecode reads runtime bytecode from the active RPC after verifying the RPC chain id.
  • abi, source, and export read runtime-verified artifacts from Sourcify.
  • info combines active-RPC runtime bytecode with Sourcify verification metadata when available.

Use --rpc <url> to override the active RPC for a single command.

Bytecode blocks

bytecode defaults to latest. You can pass:

  • --block latest
  • --block pending
  • --block safe
  • --block finalized
  • --block <number>

Proxy behavior

Beam always inspects the exact address you pass. It does not automatically switch to a proxy implementation address.

When Sourcify reports proxy information, Beam shows a terminal tip in default output and includes proxy fields in structured output.

Pipeable output

These commands print only the requested artifact in default and compact modes:

  • beam contract bytecode <address>
  • beam contract abi <address>
  • beam contract source <address> <source-path>

Tips and loading indicators go to stderr. Use --format json, --format yaml, or --format markdown when you need structured metadata.

Source lookup

With no source-path, source prints the verified source file list. With a path, Beam first matches the exact Sourcify source key, then a unique basename.

If a source path or export destination begins with -, put -- before it:

$ beam contract source 0x1111111111111111111111111111111111111111 -- -Generated.sol
$ beam contract export 0x1111111111111111111111111111111111111111 -- ./out

Export

export writes the verified Sourcify bundle to a destination directory. The directory may already exist only if it is empty; otherwise Beam creates it.

Source filenames are flattened to portable labels so absolute or traversal-looking Sourcify source keys cannot write outside the export directory.