1.0.5 • Published 8 months ago
forge-stack-tracer v1.0.5
forge-stack-tracer
CLI tool that converts your Foundry test output into interactive stack traces!
✨ Powered by Swiss-Knife.xyz Calldata Decoder to decode even the unverified contracts!
Installation
npm i -g forge-stack-tracer
Usage
Simply pipe the forge tests result into fst
.
forge test --mt test_case -vvvv | fst
To delete the ./out/_fst
folder, run:
fst clean
Output
The package generates a static html file in your current foundry project, at: ./out/_fst/fst-{timestamp}.html
Options
You can also pass an extra argument to specify the output html file name & path:
forge test --mt test_case -vvvv | fst temp/fst.html
Development
Install Dependencies
pnpm i
Overview
./src/
contains the react code, which gets compiled into a single html file:dist/index.html
.- This html file acts as a template.
src/bin/index.ts
script allows to use this template and generate new static html files for any given foundry tests output.
Running locally
pnpm run build
to build intodist
folder- Install the package locally:
npm install -g .
- Make the script executeable:
chmod +x dist/index.js
(have to do it each time after build)