-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(forge/script): decode execution traces when --json
is enabled
#10109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat(forge/script): decode execution traces when --json
is enabled
#10109
Conversation
crates/script/src/execute.rs
Outdated
decode_trace_arena(trace, decoder).await?; | ||
} | ||
|
||
let result_with_decoded_traces = &ScriptResult { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a #[derive(Clone)]
to ScriptResult
, clone it and then modify result.traces
directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, changed in 8f6d3b9.
Thanks, just one nit. Sorry for the late review. |
Signed-off-by: 0xpanoramix <[email protected]>
Signed-off-by: 0xpanoramix <[email protected]>
Signed-off-by: 0xpanoramix <[email protected]>
Signed-off-by: 0xpanoramix <[email protected]>
Signed-off-by: 0xpanoramix <[email protected]>
Signed-off-by: 0xpanoramix <[email protected]>
5390c66
to
a2cc43b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! pending final check by @DaniPopes
Motivation
This PR resolves #10019.
More precisely, it ensures that the execution traces are decoded when the
--json
flag is enabled for theforge script
command.With those changes, the command prints all the decoded values and not just
null
.Solution
I forced the decoding of the traces after the execution has completed, right before the result object is encoded in JSON and printing to the stdout.
Note: I updated the existing CLI test.
PR Checklist