I am creating a wrapper for monitoring the transaction of accounts. I am able to trace the transaction which happens between two accounts, whereas if it happens through a smart contract, I cant able to trace it. In etherscan, I can see it in an internal transaction. How to trace the internal transaction in Javascript?


Parity provides a very nice eth_tracetransaction RPC command (and related calls). This is the only way I know to get the traces. "Internal Transactions" are just a smart contract calling into another smart contract. This data is found in the traces. Note, Geth provides traces, but they're not as easy to use as Parity.


The internal transactions can be traced using trace module available in ethereum clients. Other than that, there are more options:

  • Etherscanner is another tool which you can use to find internal transactions.
  • Etherquery uploads all ethereum data to bigquery and it also has mechanism to track internal transactions.
  • Parity-trace_call and Geth-tracers introduce mechanisms which replay the transactions and return those calls which move ethers.

The PR in geth introducing tracers allows anyone to introduce their own custom tracers written in either go or js. You can call those methods in following manner using web3@0.20

var web3 = require('web3');
    method: "debug_traceTransaction",
    params: ['0x3fac854179691e377fc1aa180b71a4033b6bb3bde2a7ef00bc8e78f849ad356e', {}],
    jsonrpc: "2.0",
    id: "2"
}, function (err, result) {

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.