> For the complete documentation index, see [llms.txt](https://corpus-core.gitbook.io/specification-colibri-stateless/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://corpus-core.gitbook.io/specification-colibri-stateless/specifications/ethereum/colibri-rpc-methods/colibri_simulatetransaction.md).

# colibri\_simulateTransaction

Simulates a Transaction before signing it. The input arguments are the same as eth\_call, but the result represents the events created when executing the transaction.

## EthSimulationInputParam

Decoded input/output parameter for ABI decoding

The Type is defined in [src/chains/eth/ssz/verify\_data\_types.h](https://github.com/corpus-core/colibri-stateless/blob/v2.0.2/src/chains/eth/ssz/verify_data_types.h#L260).

```python
class EthSimulationInputParam(Container):
    name  : String[256]  # parameter name (e.g. "src","wad")
    type  : String[256]  # parameter type (e.g. "address", "uint256")
    value : String[1024] # parameter value as string (e.g. "0xe2e2...", "299")
```

## EthSimulationLogRaw

Container type for decoded ABI input/output parameters Raw log data (same structure as ETH\_RECEIPT\_DATA\_LOG)

The Type is defined in [src/chains/eth/ssz/verify\_data\_types.h](https://github.com/corpus-core/colibri-stateless/blob/v2.0.2/src/chains/eth/ssz/verify_data_types.h#L269).

```python
class EthSimulationLogRaw(Container):
    address : Address           # contract address that emitted the log
    data    : Bytes[1073741824] # event data
    topics  : List [bytes32, 8] # event topics
```

## EthSimulationLog

Container type for raw log data (without ABI decoding) Enhanced log entry for simulation result (Tenderly format).

The Type is defined in [src/chains/eth/ssz/verify\_data\_types.h](https://github.com/corpus-core/colibri-stateless/blob/v2.0.2/src/chains/eth/ssz/verify_data_types.h#L278).

```python
class EthSimulationLog(Container):
    _optmask  : Uint16                              # optional fields mask for future extensions
    anonymous : Boolean                             # whether the event is anonymous (ABI decoding)
    inputs    : List [EthSimulationInputParam, 256] # decoded event inputs (ABI decoding)
    name      : String[256]                         # event name (ABI decoding)
    raw       : EthSimulationLogRaw                 # raw log data
```

**Referenced Types**

* [EthSimulationInputParam](#ethsimulationinputparam)
* [EthSimulationLogRaw](#ethsimulationlograw)

## EthSimulationTrace

Container type for enhanced simulation log entries with ABI decoding Trace entry for simulation result (Tenderly format).

The Type is defined in [src/chains/eth/ssz/verify\_data\_types.h](https://github.com/corpus-core/colibri-stateless/blob/v2.0.2/src/chains/eth/ssz/verify_data_types.h#L289).

```python
class EthSimulationTrace(Container):
    _optmask      : Uint32                              # optional fields mask
    decodedInput  : List [EthSimulationInputParam, 256] # decoded input parameters (ABI decoding)
    decodedOutput : List [EthSimulationInputParam, 256] # decoded output parameters (ABI decoding)
    from          : Address                             # caller address
    gas           : Uint64                              # gas limit (will be rendered as hex)
    gasUsed       : Uint64                              # gas used (will be rendered as hex)
    input         : Bytes[1073741824]                   # call input data
    method        : String[256]                         # method name (ABI decoding, e.g. "approve")
    output        : Bytes[1073741824]                   # call output data
    subtraces     : Uint32                              # number of subtraces
    to            : Address                             # target address
    traceAddress  : List [uint32Def, 256]               # trace address path (e.g. [0])
    type          : String[32]                          # trace type ("CALL", "CREATE", etc.)
    value         : Uint256                             # ETH value (will be rendered as hex)
```

**Referenced Types**

* [EthSimulationInputParam](#ethsimulationinputparam)

## EthSimulationStorageChange

Container type for execution trace entries in simulation results Storage slot change in a simulation state diff.

The Type is defined in [src/chains/eth/ssz/verify\_data\_types.h](https://github.com/corpus-core/colibri-stateless/blob/v2.0.2/src/chains/eth/ssz/verify_data_types.h#L309).

```python
class EthSimulationStorageChange(Container):
    _optmask      : Uint8           # bit 4 controls slotSource visibility
    slot          : ByteVector [32] # storage key
    previousValue : ByteVector [32] # value before the transaction
    newValue      : ByteVector [32] # value after the transaction
    slotSource    : Bytes[1024]     # keccak preimage of the slot key (when available)
```

## EthSimulationValueChange

Container type for a single storage change slot + previousValue + newValue slotSource field (i=4) Balance or nonce value change pair.

The Type is defined in [src/chains/eth/ssz/verify\_data\_types.h](https://github.com/corpus-core/colibri-stateless/blob/v2.0.2/src/chains/eth/ssz/verify_data_types.h#L323).

```python
class EthSimulationValueChange(Container):
    previousValue : Bytes[32] # value before the transaction
    newValue      : Bytes[32] # value after the transaction
```

## EthSimulationAccountChange

Container type for a balance/nonce value change Per-account state diff in a simulation result.

The Type is defined in [src/chains/eth/ssz/verify\_data\_types.h](https://github.com/corpus-core/colibri-stateless/blob/v2.0.2/src/chains/eth/ssz/verify_data_types.h#L331).

```python
class EthSimulationAccountChange(Container):
    _optmask : Uint8                                    # controls visibility of storage, nonce, balance
    address  : Address                                  # account address
    storage  : List [EthSimulationStorageChange, 65536] # changed storage slots
    nonce    : EthSimulationValueChange                 # nonce change (if modified)
    balance  : EthSimulationValueChange                 # balance change (if modified)
```

**Referenced Types**

* [EthSimulationStorageChange](#ethsimulationstoragechange)
* [EthSimulationValueChange](#ethsimulationvaluechange)

## EthSimulationResult

Container type for a per-account state change address field (i=1, always visible) storage field (i=2) nonce field (i=3) balance field (i=4) Main simulation result structure (based on Tenderly format).

The Type is defined in [src/chains/eth/ssz/verify\_data\_types.h](https://github.com/corpus-core/colibri-stateless/blob/v2.0.2/src/chains/eth/ssz/verify_data_types.h#L347).

```python
class EthSimulationResult(Container):
    _optmask          : Uint32                                  # optional fields mask
    blockNumber       : Uint64                                  # block number where simulation was executed
    cumulativeGasUsed : Uint64                                  # cumulative gas used (for simulation: same as gasUsed)
    gasUsed           : Uint64                                  # gas used by the transaction
    logs              : List [EthSimulationLog, 1024]           # emitted logs
    logsBloom         : ByteVector [256]                        # logs bloom filter (future extension)
    status            : Uint8                                   # transaction status (0x1 = success, 0x0 = revert) - Tenderly format
    trace             : List [EthSimulationTrace, 4096]         # execution trace (future extension)
    type              : Uint8                                   # transaction type
    returnValue       : Bytes[1073741824]                       # return value of the call
    stateChanges      : List [EthSimulationAccountChange, 1024] # per-account state diffs (Tenderly format)
```

**Referenced Types**

* [EthSimulationLog](#ethsimulationlog)
* [EthSimulationTrace](#ethsimulationtrace)
* [EthSimulationAccountChange](#ethsimulationaccountchange)
