Given the results from a JSON-RPC call (calling a Parity Archive Node), is there any way to tell if a transaction is an Internal Transaction other than looking at the Gas Used in the Transaction Receipt and assuming that all Internal Transactions will not have a Gas Used of 21,000?

Here's an example Transaction that is an Internal Transaction:

curl --data '{"method":"eth_getTransactionByHash","params":["0xc10dc94647a1b79ba475a388b4a5f264e6a2d56f6586579cf635672162be545b"],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

And the output:


An "internal transaction" isn't really a transaction. It would be better referred to as a call. Referring to it as a transaction is a terminological fudge that arose when people tried to make Ethereum block explorers using a paradigm inherited from bitcoin.

An "internal transaction" does not have a transaction hash, a signature, a nonce etc, except to the extent that those are inherited from the actual transaction that it is part of.

The transaction in your example is not an "internal transaction". If it was, it wouldn't have a transaction hash.

  • Thanks for this explanation, I haven't read anything this concise in all the documentation. To modify my question slightly, this transaction here is shown as having an "Internal Transaction", or message call. It must be the transaction that the real message call will inherit a transaction hash/nonce/signature from. Is there any forensic evidence that this transaction is different from an external transaction other than the gas used? Jan 8 '18 at 13:43
  • What you're linking to is an external transaction, not a call (aka "internal transaction"). It makes a call, which you can see by clicking on the "Internal transactions" tab. Jan 10 '18 at 0:04

From my continued investigation, it seems that the best way to determine if a message is called (also referred to as a contract transaction/internal transaction) is to determine if there is code within the Addresses of the involved parties. Using a Parity Archive node, this involves using get_EthCode and seeing if there is anything present (other than a default value of 0x) in the returned String.

Get_EthCode is documented here: https://paritytech.github.io/wiki/JSONRPC-eth-module#eth_getcode

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.