Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor: remove unsafe code
  • Loading branch information
onbjerg committed Aug 1, 2022
commit 0ace51924bb4208d689ec620bb19627c9e0dc35b
4 changes: 1 addition & 3 deletions evm/src/executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ impl Executor {
backend.insert_account_info(
CHEATCODE_ADDRESS,
revm::AccountInfo {
// Safety: The bytecode is a singular STOP opcode (0x00) and has a length of 1,
// which respects the invariants outlined in REVM.
code: Some(unsafe { Bytecode::new_checked(vec![0u8].into(), 1) }),
code: Some(Bytecode::new_raw(vec![0u8].into()).to_checked()),
..Default::default()
},
);
Expand Down