---
description: trace_replayBlockTransactions RPC Method
---

# trace\_replayBlockTransactions

**Parameters:**

_blockNumber_ - string - string - The block number as a string in hexadecimal format or tags. The supported tag values include **earliest** for the earliest/genesis block, **latest** for the latest mined block, **pending** for the pending state/transactions, **safe** for the most recent secure block, and **finalized** for the most recent secure block accepted by more than 2/3 of validators. **safe** and **finalized** are only supported on Ethereum and Gnosis

_array_ - The type of trace, one or more of:

_vmTrace_ - To get a full trace of the virtual machine's state during the execution of the given of given transaction, including for any subcalls

_trace_ - To get the basic trace of the given transaction

_stateDiff_ - To get information on altered Ethereum state due to execution of the given



**Returns:**

_array_ - The block traces, which have the following fields (please note that all return types are hexadecimal representations of their data type unless otherwise stated):

_output_ - The data which is returned as an output encoded in hexadecimal format

_stateDiff_ - It returns the information on altered Ethereum state due to execution of the given transaction

&#x20;    _trace_ - It is used to retrieve the basic trace of the given information

&#x20;         _action_ - The action to be performed on the receiver id

&#x20;              _from_ - The address of the sender

&#x20;              _callType_ - The type of method such as **call**, **delegatecall**

&#x20;              _gas_ - The gas provided by the sender, encoded as hexadecimal

&#x20;              _input_ - The data sent along with the transaction

&#x20;              _to_ - The address of the receiver

&#x20;              _value_ - The integer of the value sent with this transaction, encoded as hexadecimal

&#x20;         _result_ - The integer of the gas price used encoded as hexadecimal

&#x20;              _gasUsed_ - The total used gas by all transactions in this block encoded as hexadecimal

&#x20;              _output_ - The value returned by the contract call, and it only contains the actual value sent by the RETURN method. If the RETURN method was not executed, the output is empty bytes

&#x20;         _subtraces_ - The traces of contract calls made by the transaction

&#x20;         _traceAddress_ - The list of addresses where the call was executed, the address of the parents, and the order of the current sub call

&#x20;         _type_ - The value of the method such as **call** or **create**

_vmTrace_ - It is used to get a full trace of the virtual machine's state during the execution of the given transaction, including for any sub-calls



**Code Examples:**

```
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "method": "trace_replayBlockTransactions",
  "params": [
    "0xccb93d",
    [
      "trace"
    ]
  ],
  "id": 1,
  "jsonrpc": "2.0"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.ebs.ezat.io/core/api/v1.0/rpc/bsc/mainnet?x-api-key-id=API-KEY-ID&x-api-key=API-KEY", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```
