# trace_transaction - Tempo RPC Method

Returns all traces for a specific transaction on Tempo.

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

## When to Use This Method

- **Get parity-style transaction trace** - Retrieve the full trace of all internal calls, state changes, and value transfers for merchant settlement, treasury operations, payout automation, and stablecoin-native financial applications
- **Analyze internal calls and state changes** - See every sub-call, delegate call, and contract creation triggered by a transaction on Tempo
- **Audit transaction execution paths** - Follow the exact flow of execution through contracts to verify correctness
- **Track value flows** - Trace how funds move through multiple contracts in a single transaction

## Best Practices

- Parity-style traces are more detailed than the debug namespace equivalent
- Use trace\_replayTransaction for combined trace, vmTrace, and stateDiff output
- Results include both stateDiff and vmTrace sections for comprehensive analysis
- Requires archive node access; not available on standard full nodes

## Request Parameters

- `txHash` (`DATA, required`): 32-byte transaction hash

## Request Example

```json
{
  "jsonrpc": "2.0",
  "method": "trace_transaction",
  "params": ["0x50b1857dce8dbe401e09610534de81655bc508c6765eb30ecefe24148c515c28"],
  "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_transaction",
    "params": ["0x50b1857dce8dbe401e09610534de81655bc508c6765eb30ecefe24148c515c28"],
    "id": 1
  }'
```

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

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

const traces = await provider.send('trace_transaction', [
  '0x50b1857dce8dbe401e09610534de81655bc508c6765eb30ecefe24148c515c28'
]);
console.log('Traces:', traces.length);
for (const trace of traces) {
  console.log(`  ${trace.action.from} -> ${trace.action.to} (${trace.type})`);
}
```

```python
from web3 import Web3

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

traces = w3.provider.make_request('trace_transaction', [
    '0x50b1857dce8dbe401e09610534de81655bc508c6765eb30ecefe24148c515c28'
])
for trace in traces['result']:
    action = trace['action']
    print(f'{action["from"]} -> {action.get("to", "CREATE")} ({trace["type"]})')
```

## Related Methods

- [`trace_get`](https://www.dwellir.com/docs/tempo/trace_get) - Get a specific trace by index
- [`trace_block`](https://www.dwellir.com/docs/tempo/trace_block) - Get all traces in a block
- [`trace_filter`](https://www.dwellir.com/docs/tempo/trace_filter) - Filter traces by criteria
