Internal transactions
Records of calls, asset transfers, and other operations during smart contract execution — queryable through node APIs, but not separate on-chain transactions.
Internal transactions record calls, asset transfers, staking, resource delegation, and other operations during smart contract execution. They are not separate on-chain transactions. When the node has saved these records, they can be retrieved from the internal_transactions field returned by the transaction information API.
This page covers what produces internal transactions, what their data fields look like, and how to query them.
Prerequisites
What produces an internal transaction
Common asset-transfer scenarios that produce internal transactions during smart contract execution include:
- Contract-to-account TRX transfers (e.g.,
address.transfer(amount)) - Contract-to-contract TRX transfers (e.g., calling another contract with a
value) - TRC-10 transfers triggered by the contract
- Activation transfers (a transfer to an unactivated address triggers account creation)
A single outer transaction can produce zero, one, or many internal transactions, depending on the contract logic.
TRC-20 transfers and internal transactionsTRC-20 token transfers are not internal transactions in this sense. TRC-20 is implemented entirely in contract storage — there is no native asset move. To track TRC-20 movement, parse the
Transferevent log emitted by the TRC-20 contract.
Structure
Each internal transaction has these fields:
| Proto # | Field | Description |
|---|---|---|
| 1 | hash | Unique identifier derived from the parent transaction and execution path so each child call has its own ID |
| 2 | caller_address | The address that initiated the operation |
| 3 | transferTo_address | The recipient |
| 4 | callValueInfo[] | Amounts associated with the operation, each containing callValue and tokenId. For asset-transfer records, TRX has an empty tokenId and an amount in sun. For TRC-10 transfers, tokenId identifies the token and the amount is in raw token units; use its precision to calculate the display amount. |
| 5 | note | An operation tag, hex-encoded in node HTTP responses. Decoded values include call (call), create (contract creation), suicide (triggered by SELFDESTRUCT), freezeBalanceV2ForEnergy (staking for Energy), delegateResourceOfEnergy (delegating Energy), and voteWitness (voting), among others. |
| 6 | rejected | true if the parent transaction reverted |
| 7 | extra | Optional free-form string with extra context (set by the VM in specific code paths; often empty) |
If the parent transaction reverts, all its internal transactions have rejected = true, and the corresponding asset transfers do not take effect. If the node has saved these records, they remain available for investigating the failure.
Where to find internal transactions
Query the parent transaction's information by passing its transaction ID to wallet/gettransactioninfobyid:
BASE_URL=https://api.trongrid.io # example — replace with any TRON node (TronGrid, third-party, or self-hosted)
POST ${BASE_URL}/wallet/gettransactioninfobyid
{ "value": "<txid>" }If the node has saved internal transaction records for that transaction, the response includes an internal_transactions array. Its fields are described in the table above.
For end-user display, TronScan shows internal transactions as a sub-list inside the parent transaction page.
Internal transactions are not recorded by defaultBy default, java-tron does not save internal transaction records. To retain ordinary
call,create, andsuiciderecords on a self-hosted FullNode, setvm.saveInternalTx = trueinconfig.confand restart the node. This setting applies only to transactions processed after the restart and does not backfill existing history. To retain extended records for Stake 2.0, voting, and similar operations, also enablevm.saveFeaturedInternalTx. Whether a hosted RPC returns internal transactions depends on the service provider's node configuration.
Comparison to Ethereum internal transactions
TRON's internal transactions are conceptually similar to Ethereum's internal transactions / traces: both can be used to inspect calls and asset transfers during contract execution, rather than representing independently signed on-chain transactions. The main differences are:
| Aspect | TRON | Ethereum |
|---|---|---|
| Native asset transfers | TRX and TRC-10 | ETH only |
| Where they appear | internal_transactions array in transaction information, if saved by the node | Reconstructed from debug_traceTransaction |
| Token transfers (TRC-20 / ERC-20) | Track via event logs | Track via event logs |
APIs
| API | Description |
|---|---|
wallet/gettransactioninfobyid | Transaction information, including internal_transactions if the node has saved these records |
wallet/triggerconstantcontract | Simulate a contract call without on-chain effects |
Related resources
- Transactions — Top-level transaction structure and lifecycle
- Signature validation — How transaction signatures are verified
- Parsing smart-contract transactions — Parse contract transfers for deposit crediting
- Listening to events — Track TRC-20 token movement
Updated 5 days ago