Skip to main content
The execution commands inspect what the EVM does with calls, transactions, and blocks. Use these commands when you want to answer execution-client questions such as:
  • what return data and gas estimate would this call produce?
  • what call tree did this mined transaction execute?
  • which accounts and storage slots changed while executing this block?

Simulate

Run an eth_call and eth_estimateGas against a selected block state.

Replay Tx

Replay one transaction with the debug call tracer.

State Diff

Trace a block and summarize changed accounts and storage slots.

Prerequisites

execution simulate uses the standard eth namespace:
execution replay-tx and execution state-diff use debug tracing methods. Enable the debug namespace:
Rex connects to the local execution RPC endpoint at http://127.0.0.1:8545 (localhost:8545) by default:
Use the global --rpc <URL> flag to target a different endpoint.

Block Selectors

Execution commands that accept --block support:
  • decimal block numbers such as 12345
  • 0x-prefixed block numbers such as 0x3039
  • 32-byte block hashes
  • tags: latest, safe, finalized, and earliest
For block hashes, state-diff uses debug_traceBlockByHash. For number and tag selectors, it uses debug_traceBlockByNumber.