1.0.5 • Published 1 year 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-tracerUsage
Simply pipe the forge tests result into fst.
forge test --mt test_case -vvvv | fst
To delete the ./out/_fst folder, run:
fst cleanOutput
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.htmlDevelopment
Install Dependencies
pnpm iOverview
./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.tsscript allows to use this template and generate new static html files for any given foundry tests output.
Running locally
pnpm run buildto build intodistfolder- Install the package locally:
npm install -g . - Make the script executeable:
chmod +x dist/index.js(have to do it each time after build)