> ## Documentation Index
> Fetch the complete documentation index at: https://rexrex.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Simulate Execution

> Run `eth_call` and `eth_estimateGas` for a manual call or existing transaction.

Use `execution simulate` to execute a call request locally against the selected block state.

The command does not submit a transaction. It calls `eth_call` for return data and `eth_estimateGas` for a gas estimate.

## Manual Call

```sh theme={null}
rex execution simulate \
  --to 0x0000000000000000000000000000000000000000 \
  --data 0x \
  --value 0
```

## Simulate from a Transaction

You can convert an existing transaction into an `eth_call` request:

```sh theme={null}
rex execution simulate \
  --tx 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
  --block latest
```

This fetches the transaction with `eth_getTransactionByHash`, copies its call fields, and executes them through `eth_call`.

## Example Output

```text theme={null}
EXECUTION SIMULATE

Source:       manual call
Block:        latest
From:         -
To:           0x0000000000000000000000000000000000000000
Value:        0 wei
Input bytes:  0
Output bytes: 0
Gas estimate: 21000

Return data:
  0x
```

## Field Notes

* `--block` chooses the state context for `eth_call` and `eth_estimateGas`.
* `--tx` is a convenience for building the call request. It is not a historical transaction replay.
* Use [Replay Tx](/docs/execution/replay-tx) when you need the actual call tree for a mined transaction.
* Use `--full-output` if the return data is long and you want the complete hex value.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.