Skip to content

feat: add BytecodeLocked::original_bytecode#1037

Merged
rakita merged 1 commit intobluealloy:mainfrom
DaniPopes:original-bytecode
Feb 1, 2024
Merged

feat: add BytecodeLocked::original_bytecode#1037
rakita merged 1 commit intobluealloy:mainfrom
DaniPopes:original-bytecode

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

2 participants