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

feat: add BytecodeLocked::original_bytecode #1037

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

DaniPopes
Copy link
Collaborator

@DaniPopes DaniPopes commented Jan 31, 2024

If someone wants a Bytes of the original bytecode they have to copy it with Bytes::copy_from_slice, but we store it already as Bytes so we can use Bytes::slice to avoid copying it.

E.g: https://github.com/foundry-rs/foundry/blob/f11da382d69ee7df32c56290101f6ef5e0cf9317/crates/evm/coverage/src/inspector.rs#L17

@rakita rakita merged commit 8148063 into bluealloy:main Feb 1, 2024
25 checks passed
@DaniPopes DaniPopes deleted the original-bytecode branch February 1, 2024 13:42
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.

None yet

2 participants