# trace_replayBlockTransactions - Tempo RPC Method

Replays all transactions in a block on Tempo and returns the requested traces.

This method requires an archive node. It is not available on full nodes.

## When to Use This Method

- **Replay all transactions in a block** - Get vmTrace, stateDiff, and trace for every transaction in a block on Tempo
- **Comprehensive block-level execution analysis** - Audit exactly how each transaction in a block modified state for merchant settlement, treasury operations, payout automation, and stablecoin-native financial applications
- **Audit entire block execution** - Verify that all transactions in a block executed as expected
- **Historical block replay** - Re-execute blocks at any point in Tempo chain history

## Best Practices

- Very resource-intensive; each transaction is fully traced with all requested types
- Limit to small blocks or use specific tracer types to reduce response size
- Request only the trace types you actually need to minimize overhead
- Requires archive node access; not available on standard full nodes

## Request Parameters

- `blockNumber` (`QUANTITY|TAG, required`): Block number in hex or tag
- `traceTypes` (`Array, required`): Trace types: ["trace"], ["vmTrace"], ["stateDiff"], or combinations

## Request Example

```json
{
  "jsonrpc": "2.0",
  "method": "trace_replayBlockTransactions",
  "params": ["latest", ["trace"]],
  "id": 1
}
```

## Response Fields

This method returns no documented fields.

## Successful Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {}
}
```

## Code Examples

cURL
JavaScript
Python

```bash
curl -X POST https://api-tempo-mainnet.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "trace_replayBlockTransactions",
    "params": ["latest", ["trace"]],
    "id": 1
  }'
```

```javascript
import { JsonRpcProvider } from 'ethers';

const provider = new JsonRpcProvider('https://api-tempo-mainnet.n.dwellir.com/YOUR_API_KEY');

const results = await provider.send('trace_replayBlockTransactions', [
  'latest',
  ['trace']
]);
console.log('Transactions replayed:', results.length);
for (const result of results.slice(0, 3)) {
  console.log(`  Tx ${result.transactionHash}: ${result.trace.length} traces`);
}
```

```python
from web3 import Web3

w3 = Web3(Web3.HTTPProvider('https://api-tempo-mainnet.n.dwellir.com/YOUR_API_KEY'))

results = w3.provider.make_request('trace_replayBlockTransactions', [
    'latest',
    ['trace']
])
for tx in results['result'][:3]:
    print(f'Tx {tx["transactionHash"]}: {len(tx["trace"])} traces')
```

## Related Methods

- [`trace_replayTransaction`](https://www.dwellir.com/docs/tempo/trace_replayTransaction) - Replay a single transaction
- [`trace_block`](https://www.dwellir.com/docs/tempo/trace_block) - Get traces without replay
- [`trace_filter`](https://www.dwellir.com/docs/tempo/trace_filter) - Filter traces by criteria
