It seems that ABI is used by web3.js to only make sense of the function calls and storage values, are there any simple means to make sense of Ethereum tx given ABI?

For example, given ABI, is there an easy way, perhaps via web3.js, to make sense of this tx?


Tools could be written and explorers could add functionality to make it easier to understand transactions. Having the ABI and source code will help present a clearer picture.

Here is a manual process for now for tx 0x833bcb0e5b2a3f8e9b6670d7199b9c43d8e7295d76fd3111ef0701671a642c76

The first 4 bytes of the input data in the tx specifies which function is invoked. https://www.4byte.directory/signatures/?bytes4_signature=0x4636a159 suggests it is newPhoneToAddr(address,uint256). The next 32 bytes in the input are then the address, and the 32 bytes after is the uint256 parameter to newPhoneToAddr(address,uint256). This sounds like the transaction registered a phone number to an address. The source code to the contract would help to ascertain further details.

  • Thanks. This makes sense and it looks like it's possible to be added as a part of web3.js providing something like getTransaction(hash, abi)? Or am I missing something?
    – uzyn
    Aug 31 '16 at 5:27
  • 1
    That could be possible if you're just looking for what was the initial function invoked and the parameters.
    – eth
    Aug 31 '16 at 6:45
  • That sounds like the reverse of myContract.myFunction.getData(param1, param2). Aug 31 '16 at 12:22

You can use https://github.com/ConsenSys/abi-decoder

its a tool that does exactly that, you provide an ABI then a transaction and you get everything decoded and parsed in return

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.