What are internal transactions in Ethereum? Message calls, traces and how to get them

GoldRush TeamUpdated 13 min read

Internal transactions are calls and ETH transfers made by contracts while a transaction runs. Why they aren't in the transaction list, and how to trace them.

An internal transaction is a call, or a transfer of ETH, that a smart contract makes while it runs: a router forwarding your ETH to the WETH contract, a vault paying out a withdrawal, a multisig sending funds. Only the outer transaction, the one an account signed, is stored in the block. The calls it sets off inside the EVM are not separate transactions: they have no hash or signature of their own, and you see them only by replaying, or tracing, the transaction.

This guide covers the three kinds of Ethereum transaction, what an internal transaction actually is, why it isn't in the transaction list, how explorers and nodes recover it, who pays its gas, and code to trace one yourself or fetch it from the GoldRush Transaction API.

The three kinds of Ethereum transaction

Ethereum has two kinds of account: externally owned accounts (EOAs), controlled by a private key, and contract accounts, controlled by their code. (The Ethereum accounts guide covers both in depth.) Value and calls move between them in three ways:

From → to What happens Where you see it
EOA → EOA A plain transfer of the native token, such as sending 0.15 ETH to a friend. No code runs. Often called an external transaction. The block's transaction list
EOA → contract A signed transaction that calls a contract function, named in the transaction's data field. The block's transaction list, plus any events it logs
Contract → contract A message call one contract makes to another (or to an EOA) while the transaction runs. This is an internal transaction. Only in a trace of the outer transaction

An EOA-to-contract example: to let a DEX spend your USDT, you send the token contract a transaction whose data encodes approve(spender, amount). Sending tokens to a friend is also a contract call, transfer(to, amount) on the token contract, not an EOA-to-EOA transfer, even though it looks like one in a wallet.

A contract-to-contract example: when you swap on Uniswap, you sign one transaction to the router. The router then calls the WETH contract, the pool and the token contracts. Those calls are the internal transactions.

Think of EOAs as people and contracts as businesses: an internal transaction is one business paying or instructing another while it serves your order.

Every transaction starts with an account that holds a private key. Contracts never act on their own; they run only when a transaction reaches them. Two newer patterns keep that rule but change who the "user" is:

  • With an ERC-4337 smart account, a bundler's EOA sends the transaction to the EntryPoint contract, and the smart account's transfers and calls happen inside it, as internal transactions.
  • With EIP-7702, an EOA can delegate to contract code. It still signs and sends its own transactions, but calls to its address now run that code, so they can set off internal transactions from the EOA's address.

What an internal transaction is

Inside the EVM, contracts talk to each other with message calls. Each one has a sender, a recipient, an amount of ETH (possibly zero), input data and a gas allowance, much like a transaction, but it is created by an opcode rather than signed by a key. The opcodes are:

  • CALL: call another account, optionally sending ETH. This is the usual internal transaction.
  • STATICCALL: a read-only call that can't change state or send ETH, such as checking a token balance.
  • DELEGATECALL: run another contract's code in the caller's own context, with its storage and balance. Proxies and smart accounts use it. It moves no ETH.
  • CREATE and CREATE2: deploy a new contract, optionally funding it.
  • SELFDESTRUCT: send a contract's remaining ETH to an address. Since the Cancun upgrade (EIP-6780) it deletes the contract only when called in the same transaction that created it.

People use "internal transaction" in two senses. Block explorers and most APIs mean the narrow one: internal transfers, the calls that moved ETH (or the chain's native token). Tracers mean every call. The example swap below has 14 internal calls, and only one of them moved ETH.

Internal transactions vs normal transactions

Normal (external) transaction Internal transaction
Started by An account with a private key, which signs it Contract code, during a transaction
Own hash Yes No; it belongs to the outer transaction's hash
Stored in block Yes, in the transaction list, with a receipt No; only its effects (balances, storage, logs) are
Gas Paid by the sender Paid from the outer transaction's gas
If it fails The whole transaction reverts (the fee is still paid) Its own changes revert; the caller can carry on or revert too
How you find it Any node, eth_getTransactionByHash Tracing: debug_traceTransaction, trace_*, or an indexer

Why they aren't in the transaction list

A block records the signed transactions and, in each receipt, the status, gas used and logs (events) the transaction emitted. It does not record the calls in between. A token transfer usually leaves a Transfer event, so you can see it in the logs. A plain ETH transfer from a contract emits no event unless the contract chooses to, so the receipt shows nothing at all. The ETH arrives in the recipient's balance with no record in the receipt.

To see the calls, a node re-executes the transaction against the state of its block and records each call as it runs. That is a trace. Tracing a transaction from any but the latest blocks needs an archive node (or one that still holds the state for that block), and it costs the node real work, which is why many RPC plans charge extra for it or leave it out.

There are two common trace APIs:

  • debug_traceTransaction (Geth, Reth, Erigon, Nethermind). With { "tracer": "callTracer" } (the Geth built-in call tracer) it returns the call tree: each frame has type, from, to, value, gas, gasUsed, input, output, any error, and its child calls.
  • trace_transaction and the other trace_* methods (Erigon, Nethermind, Reth; not Geth). They return a flat list of calls, each with a traceAddress giving its place in the tree.

What is an RPC node explains archive nodes and the debug and trace namespaces.

How block explorers show them

Explorers such as Etherscan trace every transaction as they index it and keep the results. An address page lists them on a separate Internal Transactions tab, apart from normal transactions and token transfers, and a transaction page shows the internal transfers it made. That is why an address can receive ETH that never shows up under its normal transactions: it came from a contract, as an internal transaction.

Trace a transaction yourself

This walks the call tree of one transaction, the Uniswap swap of 0.71 ETH for RAI in Ethereum block 21,731,383, and picks out the calls that moved ETH.

Prerequisites: Node.js 22 (the version this ran on; 18 or later has the fetch it uses), viem for formatting ETH amounts, and RPC_URL set to an Ethereum node that serves debug_traceTransaction. The script uses import and top-level await, so save it as trace.mjs and run node trace.mjs:

npm install viem@2.58.4
import { formatEther } from "viem"; // Any Ethereum node that serves debug_traceTransaction (Geth, Reth, Erigon, Nethermind and most providers' archive plans).const RPC_URL = process.env.RPC_URL;const TX = "0x6f9dfc919bc3cc9184c5fe3876c80d9f2f3803faab1e055c7feb8f1900be0a84"; async function rpc(method, params) {    const res = await fetch(RPC_URL, {        method: "POST",        headers: { "Content-Type": "application/json" },        body: JSON.stringify({ jsonrpc: "2.0", id: 1, method, params }),    });    const body = await res.json();    if (body.error) throw new Error(`${method}: ${body.error.message}`);    return body.result;} // callTracer returns the top-level call with nested `calls`. Flatten it, depth first, the order the calls ran.function flatten(frame, depth = 0, out = []) {    out.push({        depth,        type: frame.type,        from: frame.from,        to: frame.to,        value: BigInt(frame.value ?? "0x0"),        error: frame.error,    });    for (const child of frame.calls ?? []) flatten(child, depth + 1, out);    return out;} const root = await rpc("debug_traceTransaction", [TX, { tracer: "callTracer" }]);const internal = flatten(root).slice(1); // the first frame is the transaction itself console.log(`${internal.length} internal calls`);for (const c of internal) {    console.log(        `${"  ".repeat(c.depth - 1)}${c.type} ${c.from.slice(0, 10)} -> ${c.to.slice(0, 10)}${c.error ? ` (${c.error})` : ""}`    );} // A DELEGATECALL reports its parent's value but moves no ETH, so leave it out of value transfers.const moves = internal.filter((c) => c.value > 0n && c.type !== "DELEGATECALL");for (const m of moves) console.log(`ETH moved: ${m.from} -> ${m.to}: ${formatEther(m.value)} ETH`);

It printed this on 21 November 2026:

14 internal callsCALL 0x66a9893c -> 0xc02aaa39CALL 0x66a9893c -> 0xc02aaa39STATICCALL 0x66a9893c -> 0xc575bd12STATICCALL 0x66a9893c -> 0x4de8c605STATICCALL 0x66a9893c -> 0xc02aaa39CALL 0x66a9893c -> 0x4de8c605  CALL 0x4de8c605 -> 0xc575bd12  STATICCALL 0x4de8c605 -> 0xc02aaa39  STATICCALL 0x4de8c605 -> 0xc575bd12STATICCALL 0x66a9893c -> 0xc575bd12STATICCALL 0x66a9893c -> 0xc575bd12CALL 0x66a9893c -> 0xc575bd12STATICCALL 0x66a9893c -> 0xc575bd12CALL 0x66a9893c -> 0xc575bd12ETH moved: 0x66a9893cc07d91d95644aedd05d03f95e1dba8af -> 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2: 0.71 ETH

Read it top down. The user's EOA sent 0.71 ETH to the Universal Router (0x66a9…). The router deposited it into WETH (0xc02a…, the one internal transfer of ETH), transferred the WETH to the Uniswap V2 pool (0x4de8…), read balances and reserves with STATICCALLs, and called the pool's swap, which in turn called the RAI token (0xc575…) to pay out. The rest are token transfers and balance checks, which the receipt shows only as Deposit, Transfer, Sync and Swap events.

Get internal transactions with the GoldRush Transaction API

Running trace calls yourself means an archive node and a loop over every transaction. The GoldRush Foundational API has traced them already: add with-internal=true to a transaction request and each item gains an internal_transfers array, one entry per internal transfer of the native token, with from_address, to_address, value in wei and gas_limit, the gas the parent call made available.

This is a separate script, internal.mjs, with the same viem install and Node.js version as above, and your key set as GOLDRUSH_API_KEY:

import { formatEther } from "viem"; const API = "https://api.covalenthq.com/v1";const headers = { Authorization: `Bearer ${process.env.GOLDRUSH_API_KEY}` }; async function getTransaction(chain, txHash) {    const res = await fetch(`${API}/${chain}/transaction_v2/${txHash}/?with-internal=true&no-logs=true`, { headers });    const body = await res.json().catch(() => null); // a missing key's 401 is HTML, not JSON    if (!res.ok || !body || body.error) throw new Error(`${res.status} ${body?.error_message ?? "no JSON body"}`);    return body.data.items[0];} const tx = await getTransaction("eth-mainnet", "0x6f9dfc919bc3cc9184c5fe3876c80d9f2f3803faab1e055c7feb8f1900be0a84"); console.log(    `${tx.from_address} -> ${tx.to_address}: ${formatEther(BigInt(tx.value))} ETH, fee ${formatEther(BigInt(tx.fees_paid))} ETH`);for (const t of tx.internal_transfers ?? []) {    console.log(        `  internal: ${t.from_address} -> ${t.to_address}: ${formatEther(BigInt(t.value))} ETH (gas available ${t.gas_limit})`    );}

For this transaction the API returned the same 0.71 ETH transfer the trace found:

0xb27ed13edefc6ead3791803e5779e65c4c04a245 -> 0x66a9893cc07d91d95644aedd05d03f95e1dba8af: 0.71 ETH, fee 0.000878080975489792 ETH  internal: 0x66a9893cc07d91d95644aedd05d03f95e1dba8af -> 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2: 0.71 ETH (gas available 145131)

You need a GoldRush API key: sign up for the free trial. Get a transaction costs 0.1 per call, and with-internal adds a per-item charge given on that page. Internal transfers are available on select EVM chains; Traces support lists them.

The address endpoints take the same flag, so a wallet's history can include the ETH it received from contracts: Get paginated transactions for address (0.1 per item), Get recent transactions and Get earliest transactions. The guide to getting transaction history for an address on Ethereum walks through paging a full history.

Handle errors from the GoldRush Transaction API

Errors come back in the same envelope as data, with data: null, error: true, the reason in error_message and the HTTP status as a number in error_code. A flag the chain has no data for is answered with a 501. The docs show this body for one, with-state:

{    "data": null,    "error": true,    "error_message": "This chain does not currently support flag: with-state.",    "error_code": 501}

A 501 is a stable answer, so retrying it won't help. Internal transfers exist only on chains with trace data, so check is_internal_tx_supported for the chain on /v1/chains/ and leave with-internal off where it is false. A transaction hash that doesn't exist returns 404 on a chain that supports the flag. Error handling lists every code; failed requests cost no credits.

Who pays gas for internal transactions

The sender of the outer transaction pays for everything, internal calls included. There is no separate fee: each internal call spends gas from the outer transaction's gas limit, and the receipt's gasUsed is the total. That is why a swap costs more gas than a plain transfer (128,762 gas for the example swap against 21,000 for an ETH transfer), and why gas fees are quoted per transaction, not per call. What is gwei explains how that gas is priced.

Two rules shape the gas an internal call gets:

  • The 63/64 rule (EIP-150): a contract can pass a call at most all but one 64th of its remaining gas, so some is always left for the caller to finish. The gas_limit on an internal transfer is the gas its call was given.
  • Failures are local. If an internal call runs out of gas or reverts, its own changes are undone and the caller is told it failed. The caller can carry on, or revert in turn, which undoes the whole transaction. Either way the gas spent is paid. So a transaction can succeed even though one of its internal calls failed: a trace shows that call with an error.

Where internal transactions matter

  • Wallet balances and accounting. ETH a wallet receives from a contract (a withdrawal, a refund, a swap paid out in ETH) is an internal transfer. Without internal transactions, a wallet's ETH balance can't be reconciled from its transaction list, which is why tax and accounting tools need them.
  • DEX, bridge and router flows. The transaction's to_address is often a router, not where the funds ended up. Internal transfers show where the ETH actually went.
  • Smart accounts and multisigs. Transfers from an ERC-4337 smart account or a Safe are calls made by the contract, so they are internal transactions of a transaction someone else (a bundler or an owner) sent.
  • Following funds. Stolen or laundered ETH often passes through contracts. Crypto fund tracing depends on seeing those internal hops.
  • Debugging. A trace shows which call failed and how much gas each step used.

Frequently asked questions

What is an internal transaction in Ethereum?

An internal transaction is a message call, usually one that moves ETH, made by a smart contract while a transaction runs. It is not a separate transaction: it has no signature or hash of its own and is not stored in the block. It belongs to the outer transaction that an externally owned account signed, and it is recovered by tracing that transaction.

Are internal transactions recorded on the blockchain?

Their effects are: the balance and storage changes, and any events they emit, are part of the chain's state and the receipt's logs. The calls themselves are not stored. Nodes reconstruct them by re-executing the transaction with a tracer such as debug_traceTransaction or trace_transaction, and explorers and APIs keep the results.

What is the difference between an external and an internal transaction?

An external transaction is signed by an account with a private key and stored in a block with its own hash. An internal transaction is a call made by contract code during an external transaction. It shares the external transaction's hash and gas, and it can be seen only in a trace.

Do internal transactions cost gas?

Yes, but not separately. The gas each internal call uses comes out of the outer transaction's gas, and the account that sent the outer transaction pays the whole fee.

Why don't I see an incoming ETH transfer in my transaction list?

Because a contract sent it, as an internal transaction. A wallet or explorer that lists only normal transactions won't show it. Look at the address's internal transactions tab on an explorer, or request its history with with-internal=true from the GoldRush transactions endpoints.

How do I get internal transactions for an address?

Trace every transaction that touched the address on an archive node, or use an indexer that has done it. With GoldRush, add with-internal=true to Get paginated transactions for address, and each transaction comes back with its internal_transfers, on the chains listed in Traces support.

Do ERC-20 token transfers count as internal transactions?

Not as explorers use the term. A token transfer changes balances inside the token contract and emits a Transfer event, so it appears under token transfers. Internal transactions are calls, and as most tools list them, transfers of the native token such as ETH. A token transfer made by a contract is still an internal call in a trace.

Next steps

Get new guides by email

New tutorials and best practices for building with blockchain data, sent as they're published.