# trace_call - Tempo RPC Method

Traces a call without creating a transaction on Tempo, returning the trace output.

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

## When to Use This Method

- **Trace simulated execution of multiple calls** - Preview internal calls before committing a transaction on Tempo
- **Pre-execution analysis** - Test contract interactions without spending gas for merchant settlement, treasury operations, payout automation, and stablecoin-native financial applications
- **Batch trace simulations** - Execute several calls sequentially where each can depend on prior state changes
- **Contract interaction analysis** - Understand how multiple contracts interact through a simulated execution chain

## Best Practices

- Similar to debug\_traceCall but supports multiple calls in one request
- Each call has its own trace configuration for fine-grained control
- Use for batch simulation analysis of dependent call sequences
- Requires archive node access for historical block tracing

## Request Parameters

- `callObject` (`Object, required`): Transaction call object (from, to, gas, value, data)
- `traceTypes` (`Array, required`): Trace types: ["trace"], ["vmTrace"], ["stateDiff"], or combinations
- `blockNumber` (`QUANTITY|TAG, optional`): Block number or tag (default: latest)

## Request Example

```json
{
  "jsonrpc": "2.0",
  "method": "trace_call",
  "params": [
    {
      "to": "0x0bd34b0a5be345c9bf7a147eb698e993511180cb",
      "data": "0x70a082310000000000000000000000000bd34b0a5be345c9bf7a147eb698e993511180cb"
    },
    ["trace"],
    "latest"
  ],
  "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_call",
    "params": [
      {"to": "0x0bd34b0a5be345c9bf7a147eb698e993511180cb", "data": "0x70a082310000000000000000000000000bd34b0a5be345c9bf7a147eb698e993511180cb"},
      ["trace"],
      "latest"
    ],
    "id": 1
  }'
```

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

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

const result = await provider.send('trace_call', [
  {
    to: '0x0bd34b0a5be345c9bf7a147eb698e993511180cb',
    data: '0x70a082310000000000000000000000000bd34b0a5be345c9bf7a147eb698e993511180cb'
  },
  ['trace'],
  'latest'
]);
console.log('Trace output:', result.trace);
console.log('VM trace:', result.vmTrace);
```

```python
from web3 import Web3

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

result = w3.provider.make_request('trace_call', [
    {
        'to': '0x0bd34b0a5be345c9bf7a147eb698e993511180cb',
        'data': '0x70a082310000000000000000000000000bd34b0a5be345c9bf7a147eb698e993511180cb'
    },
    ['trace'],
    'latest'
])
print(f'Trace: {result["result"]["trace"]}')
```

## Related Methods

- [`trace_filter`](https://www.dwellir.com/docs/tempo/trace_filter) - Filter traces by criteria
- [`eth_call`](https://www.dwellir.com/docs/tempo/eth_call) - Execute call without trace
- [`trace_transaction`](https://www.dwellir.com/docs/tempo/trace_transaction) - Trace a specific transaction
