Giter Club home page Giter Club logo

sol-profiler's Introduction

sol-profiler

npm version Build status dependencies Status devDependencies Status npm npm GitHub LoC Package Quality

sol-profiler lists down the properties of all the contract methods which helps to visualize and review the definition of various contract methods involved at one glance. This is easy to use and user-friendly.

Note: sol-profiler does not ensure/guarantee any kind of security or correctness of any smart-contract.

Features

  • Lists down attributes of contract methods
  • Works with file & directory both
  • Displays user friendly colourful profile on console for single file
  • Also stores generated profile in a folder names profiles in a .txt file named with suffix _Profile
  • Generates & stores profile for each available Solidity file if directory path is passed
  • Supports file import relatively and from node_modules
  • Explicitly marks abstract and fallback functions
  • Explicitly marks library and interface contracts
  • Since Solidity release 0.5.0, Explicit data location for all variables of struct, array or mapping types is now mandatory, so profile also include the data location of parameters defined explicitly.

Install

npm install --global sol-profiler

or

npm install --save-dev sol-profiler

Application

For DApp, one can provide its contract directory path and profile will be stored for each contract which can be referred in future to get the knowledge of the methods defined in various contract.

sol-profiler <dapp/contracts/or/any/directory/path>

It can be used for individual file as:

sol-profiler <solidity/contract/file/path>

It can also be added in the package.json as:

{
  "scripts": {
    "generateProfile": "sol-profiler ./contracts/"
  },
}

Example

We have attached an extensive example i.e. sample.sol. For this, profiler result will be same as in below image :

solp2

Generated profile which get stored in .txt file can be seen here.

VSCode Extension

sol-profiler is also available as Visual Studio Code Extension

Contribution/Suggestions

Any kind of suggestion/feedback/contribution is most welcome!

License

MIT

sol-profiler's People

Contributors

aniket-engg avatar

Watchers

 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.