fix(script): preserve exit reason in failed revert decode#13985
fix(script): preserve exit reason in failed revert decode#13985ArshLabs wants to merge 3 commits intofoundry-rs:masterfrom
Conversation
|
@DaniPopes @mattsse @grandizzy @zerosnacks @onbjerg @0xrusowsky quick bump when you have a moment. |
|
Hi @ArshLabs, would you mind adding / updating the snapshot tests to assert the new output change? |
|
Thanks for the review, pushed updates. Removed the unnecessary clone in execute.rs. Re-ran the related CLI tests:
|
Motivation
failed script output in
PreSimulationState::show_jsonandPreSimulationState::show_tracesdecodes revert bytes withstatus = None.when revert bytes are empty or opaque, this can hide the real halt reason and show generic output.
Solution
thread
exit_reasonthroughScriptResultfromRawCallResult, then pass it intoRevertDecoder::decodein both script failure rendering paths.this keeps current behavior for decoded revert payloads and improves fallback output for cases like
OutOfGas.PR Checklist