Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(cast): add contract creation bytecodes to traces #8941

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

CodeSandwich
Copy link
Contributor

Motivation

Closes #8906.

Solution

Prints the contract creation bytecodes in the trace when --verbose is passed to cast run.

I'm not sure if there are tests for this parts of the code, so I haven't added or changed any.

Formatting was a big mystery to me, I did my best manually, but I don't understand what's the correct approach. I haven't found any guide in .md files, but there is a rustfmt.toml file and the code seems formatted, but running cargo fmt alters dozens of files across the whole project, which apparently are not automatically formatted.

@DaniPopes
Copy link
Member

You need to use nightly to format code 'cargo +nightly fmt'

@CodeSandwich
Copy link
Contributor Author

It works as expected, thanks! It's actually even pointed out in CONTRIBUTING.md. Miraculously the PR is correctly formatted.

Copy link
Member

@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.

lgtm

@DaniPopes DaniPopes merged commit df2203c into foundry-rs:master Sep 24, 2024
21 checks passed
@CodeSandwich CodeSandwich deleted the traces_bytecodes branch September 24, 2024 13:20
rplusq pushed a commit to rplusq/foundry that referenced this pull request Sep 25, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(cast): display creation code in the cast run trace with verbosity flag set
3 participants