Skip to content
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

feature(writer): add support for external decoded data sources #151

Merged

Conversation

zerosnacks
Copy link
Contributor

@zerosnacks zerosnacks commented Jun 21, 2024

Closes: #14

  • Add nodes_mut for mutability of nodes, required for populating added CallTrace fields
  • Adds decoded.label, decoded.return_data, decoded.call_data, wrapped in the DecodedCallTrace container type.
  • Wraps the raw LogData in a CallLog to accompany it with additional decoded data fields: decoded.name, decoded.params, wrapped in the DecodedCallLog container type.

decoded.contract_name has not been added as a field as it is only used in Foundry's gas report, not in the current trace render.

It is likely that some stylistic updates will be followed up relatively quickly

Related PR: foundry-rs/foundry#8224

@zerosnacks zerosnacks force-pushed the zerosnacks/trace-printer-revm-inspectors branch from fae0f71 to 7984d56 Compare June 21, 2024 15:34
@zerosnacks
Copy link
Contributor Author

zerosnacks commented Jun 21, 2024

Re-marking this as draft until print traces pass again
https://github.com/foundry-rs/foundry/actions/runs/9617990642/job/26530949144?pr=8224

Still, open for feedback

@zerosnacks
Copy link
Contributor Author

Formatting has been fixed, Foundry tests are now passing: foundry-rs/foundry#8224

@zerosnacks zerosnacks marked this pull request as ready for review June 24, 2024 14:18
@DaniPopes
Copy link
Member

DaniPopes commented Jun 24, 2024

Can you add tests here too? Using expect!, with also decoded fields

@zerosnacks
Copy link
Contributor Author

zerosnacks commented Jun 24, 2024

Can you add tests here too? Using expect!, with also decoded fields

Added, please note that it shows the application of patches, not necessarily the full decoding as implemented in Foundry

src/tracing/types.rs Outdated Show resolved Hide resolved
src/tracing/types.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pending @DaniPopes

src/tracing/types.rs Show resolved Hide resolved
src/tracing/types.rs Outdated Show resolved Hide resolved
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mattsse mattsse merged commit bc01e05 into paradigmxyz:main Jun 27, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upstream trace pretty-printer from Foundry
3 participants