Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zobront/quickpoc
easy POC template generation from the command line
https://github.com/zobront/quickpoc
Last synced: about 2 months ago
JSON representation
easy POC template generation from the command line
- Host: GitHub
- URL: https://github.com/zobront/quickpoc
- Owner: zobront
- Created: 2022-12-20T18:50:08.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-10T19:13:50.000Z (about 1 year ago)
- Last Synced: 2024-08-04T01:02:09.637Z (5 months ago)
- Language: Shell
- Homepage:
- Size: 34.2 KB
- Stars: 314
- Watchers: 5
- Forks: 52
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-foundry - Quick POC - easy POC template generation from the command line. (Tools)
README
# 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 secondyou 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
on a unix machine with bash installed, make sure you have all dependencies:
- foundry ([follow instructions here](https://github.com/foundry-rs/foundry))
- jq (`brew install jq`)clone this repo:
```bash
git clone https://github.com/zobront/quickpoc.git
```set up two environment variables by calling the following from your terminal (or adding to your bash rc file):
```bash
export ETH_RPC_URL="..."
export ETHERSCAN_API_KEY="..."
```save quickpoc to a location you won't move it:
```bash
mkdir ~/.quickpoc && mkdir ~/.quickpoc/bin
cp quickpoc ~/.quickpoc/bin/quickpoc # call from within the cloned repo
```add the path to your bash rc file:
```bash
export PATH="$PATH:/Users/{your_name}/.quickpoc/bin"
```make sure the file is executable:
```bash
chmod +x ~/.quickpoc/bin/quickpoc
```you should then be able to call `quickpoc 0x..` from any folder to generate the POC folder within it.
## thank yous
big thanks to [deliriusz](https://github.com/deliriusz) for adding proxy checks and professionalism. check out his fork [turbopoc](https://github.com/deliriusz/turbopoc) for a more full featured version.