42

On etherscan:

-->> accounts >> contract accounts >> selecting one contract,

There are two types of transactions mentioned under No Of Transactions:

Normal transactions and Internal transactions.

What is the difference between them and why are the Normal transactions usually much less than Internal transactions?

1
14

Internal transactions, despite the name (which isn't part of the yellowpaper; it's a convention people have settled on) aren't actual transactions, and aren't included directly in the blockchain; they're value transfers that were initiated by executing a contract.

Check these answers as well

  1. TheDAO internal transactions
  2. How to get contract internal transactions
3
  • nicksmac: Are internal transactions the events laid into the logs? Is that what they are? – Thomas Jay Rush Jun 22 '16 at 17:15
  • 1
    @ThomasJayRush its value transfers that were initiated by executing a contract. – niksmac Jun 23 '16 at 1:30
  • @ThomasJayRush no, they are just calls from one contract to another – Ethan Jul 23 '16 at 4:15
13

In the Ethereum protocol there's only transactions and message calls. A transaction is a type of message call.

A transaction may perform other message calls, but these are not transactions (even though blockchain explorers may label them inaccurately as "internal transactions"). These (internal) message calls are not published on the blockchain.

To try illustrating, a transaction in Javascript looks like:

{
  from: ...,
  to: "C1",
  value: ...,
  gas: ...,
  data: ...,
  gasPrice: ...,
  nonce: ...
}

This is what you will see on the blockchain: a "Normal transaction". An "Internal Transaction" is the effects of taking the data part, feeding it to the contract C1, and executing the Ethereum Virtual Machine. The data is what tells C1 that it should call another contract C2: there is no separate {from:C1, to:C2,...} object on the blockchain that's needed.


Contracts calling each other, along with receiving payment, is the reason why "Normal transactions are usually much less than Internal transactions". For example, TheDAO tokens were originally purchased by calling a function on TheDAO and sending ETH with it.

2
  • 1
    When you say "These (internal) message calls are not published on the blockchain", isn't that false since all the data is public and contained in a block, assuming of course the transaction was mined? – mecampbellsoup Dec 14 '17 at 22:52
  • 2
    @mecampbellsoup The internal message calls can be derived since indeed all blockchain data is public, but you also need to execute the EVM as the answer explains. They are not "published" in the sense that most clients do not provide a "lookup" for them. – eth Dec 30 '17 at 13:15
11

An internal transaction is not a real transaction - it has no signature and is not included in the blockchain. It is the result of a contract initiating a value transfer, or calling another contract, typically using the CALL opcode.

2
  • 1
    full list of opcodes is: CREATE, CALL, CALLCODE, DELEGATECALL, SELFDESCTUCT – Nulik Dec 2 '17 at 0:23
  • Why does a contract need to call another contract for a value transfer? Can it not just make the value transfer within itself? – Ini Mar 13 at 14:34
-1

Internal transactions are ETH transfers from smart contracts, there's a good explanation on the different kinds of transfers here: https://docs.alchemyapi.io/alchemy/guides/using-webhooks#address-activity

Also, you can now get notifications for internal transactions using Alchemy https://blog.alchemyapi.io/blog/internal-transactions-notifications

1
  • Welcome to the Ethereum Stack Exchange! A number of you from Alchemy have been posting duplicate answers without answering the question more precisely. Some of the duplicate answers that do not answer the question have been deleted. Some questions may be an opportunity to demonstrate how Alchemy actually helps or solves the question is asking. – eth Apr 1 at 0:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.