Internal transactions, also known as β€œsubcalls” or β€œcontract calls,” represent interactions between smart contracts during the execution of a blockchain transaction.

These transactions can be accessed using the `debug_traceTransaction` method in an Ethereum-compatible RPC interface.

## Using "debug_traceTransaction"

The `debug_traceTransaction` method provides detailed information about all opcodes executed during the transaction. While this is comprehensive, it may be excessive if you only need internal transactions. By passing the parameter `{ "tracer": "callTracer" }` , you can limit the output to only the internal transactions.

### Example Request

Below is an example of how to retrieve internal transactions using the `debug_traceTransaction` method with the `callTracer` parameter:

ο»Ώ

**Key Fields in the Response**

  • `from`: The address initiating the internal transaction.

  • `to`: The recipient address of the internal transaction.

  • `gas`: The gas allocated for the internal transaction.

  • `gasUsed`: The gas used by the internal transaction.

  • `value`: The amount of Ether (or equivalent) transferred.

  • `type`: The type of call (e.g., CALL, DELEGATECALL).

## Good to Know

  • Debug and Trace methods may require access to [Archival Data](πŸ”—ο»Ώ)ο»Ώ

  • The `callTracer` is efficient for extracting internal transactions but may still be resource-intensive for large transactions.

  • A `Timeout` flag may be required in your request.

  • Find the list of supported blockchains [HERE](πŸ”—ο»Ώ).

  • Find more about available authentication methods [HERE](πŸ”—ο»Ώ).