Skip to content

maxsam4/ethereum-debugging-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ethereum-debugging-helper

This is a tiny script that helps in debugging solidity smart contracts on kovan testnet

extract.py

It is a python script extracts abi, bytecode and function hashes from the build file that solidity compiler generates

Note: For windows, use extract-windows.py

How to use

  1. Copy the script to your project folder such that the build files reside in /build/contracts from the script's location (where truffle config, package,json etc reside in a default structure).
  2. Create an empty directory named "extract".
  3. Install python 2.7.x and pysha3 module using "pip install pysha3".
  4. Compile your contracts using truffle compile or solc directly.
  5. Execute the script and it will create separate abi and bytecode files for all your contracts and a cumulative function hashes file in the extract directory.

Userscript script

It adds a button to kovan vmtrace page that expands all the Show more fields and decodes the calldata to show the function called. It uses functionHashes generated by the python script to decode, so you need to add hashes for your functions to it. You can generate the hashes using the python script.

How to use

  1. Install tampermonkey (chrome) or Greasemonkey (firefox).
  2. Copy the script and paste it as new a script in tampermonkey/greasemonkey.
  3. Add the function hashes extract.py generated to the end of the script.
  4. Open any transaction on kovan.etherscan.io and Click on tools & utilities > parity trace.
  5. Click on show details (just above decoded traces) and see the magic happen.

Screenshots can be found on https://mudit.blog/ethereum-debugging-solidity-boilerplate/

About

This is a tiny script that helps in debugging solidity smart contracts on kovan testnet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages