Coder Social home page Coder Social logo

quickpoc's Introduction

quickpoc

easy POC template generation from the command line

features

from the command line, call quickpoc 0x.. [folder_name] to generate a ready-to-go sandbox for running POCs for the given address against mainnet, including:

  • forge template with name mirroring contract name
  • src/ folder populated with all contracts and libraries
  • test file autogenerated with contract import
  • test setup with contract variable and mainnet forking
  • cd folder_name copied to clipboard to save you 1 extra second

you can run forge test to confirm it's working, then go into tests/POC.t.sol to interact with the contract (saved in storage as c).

install

  1. on a UNIX machine with bash installed, install all dependencies:
  • foundry (follow instructions here)
  • jq (brew install jq)
  • graphviz (brew install graphviz)
  • surya (npm i -g surya)
  • sol2uml (npm i -g sol2uml)
  1. download the quickpoc file from this repo.

  2. set up two environment variables by calling the following from your terminal:

  • export ETH_RPC_URL="..."
  • export ETHERSCAN_API_KEY="..."
  1. you can then run it directly by calling the file (./quickpoc)

  2. more conveniently, install it globally:

  • put it somewhere you won't touch it (usually ~/bin)
  • if this folder isn't already in your path, open your bash run control file (for example, ~/.zshrc) and add the following line: export PATH="$PATH:/Users/path_to_folder_holding_file
  • call chmod +x path_to_file to make the file executable
  • you should then be able to call quickpoc 0x.. from any folder to generate the POC folder within it.

future

  • support non-mainnet networks
  • allow inputting multiple addresses
  • automatically pull all contracts listed on an immunefi page

please submit issues for any additional features you'd like to see :)

thank yous

big thanks to deliriusz for adding graph viz tools, proxy checks, and professionalism.

quickpoc's People

Contributors

deliriusz avatar wuwe1 avatar zobront avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.