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!
npm i -g forge-stack-tracer
Simply pipe the forge tests result into fst
.
forge test --mt test_case -vvvv | fst
To delete the ./out/_fst
folder, run:
fst clean
The package generates a static html file in your current foundry project, at: ./out/_fst/fst-{timestamp}.html
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
pnpm i
./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.
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)