Trace to test converter
Turn a failing fuzzer trace into a Foundry test that reproduces it.
Runs in your browser
Failing trace
Paste the call sequence the fuzzer printed when it broke a property.
Options
Used for the commented-out import and deployment.
Forge only runs functions whose name starts with test.
Echidna's text output or Medusa's JSON — both are recognised automatically.
No test yet
Paste a trace and you get a Foundry test that replays the same calls, in the same order, from the same senders.
Supported trace formats
Both are tried in turn — Echidna's line format first, then Medusa's JSON.
Echidna text format
function(arg1, arg2) from: 0x... deposit(1000) from: 0x10000 withdraw(500) from: 0x10000
Medusa JSON format
{
"calls": [
{"function": "deposit", "args": ["1000"], "from": "0x..."},
{"function": "withdraw", "args": ["500"], "from": "0x..."}
]
}After generating the test
- Uncomment the contract import and deployment
- Adjust any hardcoded addresses or values
- Add assertions to verify the bug
- Run with
forge test -vvvv