Debugging solidity smart contracts is a pain and takes a lot of time. I made a small user script which decodes the calldata to function names from the Etherscan trace for Kovan testnet. It comes handy when you need to debug some transactions real quick. You’ll get to know which function was the culprit, and if you need more info, you can always fire up good old truffle debug.

You can find the script with usage instructions on GitHub: ethereum-debugging-helper

The debugging helper comes along with a python script that extracts ABI, ByteCode and function hashes from the build files that solidity compiler generates for your solidity smart contracts.

You can see the debugging helper in action in below pics.

Open any transaction on kovan.etherscan.io and Click on tools & utilities > parity trace.

Click on Show Details button generated by the userscript.

The script expands all the show more blocks and decodes the call data to show the function called in human-readable form.

The helper not only decodes the function that was directly called but also subsequent external function calls that the smart contract made.

Along with the debugging helper, I am also releasing the boilerplate that I use for all my solidity projects. You can grab it too on Github: solidity-boilerplate

It has a few node modules added as dev-dependencies, truffle config with default contracts, travis config, and solcover config.

I hope these small tools will save your crucial time which you can then spend on improving your solidity smart contract or petting your cat.