Git Product home page Git Product logo

ethereum-debugging-helper's Introduction

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/

ethereum-debugging-helper's People

Contributors

maxsam4 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.