Skip to content
Merged
Changes from all commits
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
6 changes: 4 additions & 2 deletions evm-adapters/src/sputnik/cheatcodes/cheatcode_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,9 +647,11 @@ impl<'a, 'b, B: Backend, P: PrecompileSet> CheatcodeStackExecutor<'a, 'b, B, P>
Err(err) => return evm_error(&err.to_string()),
};

// get the hex string & decode it
// get the hex string
let output = unsafe { std::str::from_utf8_unchecked(&output) };
let decoded = match hex::decode(&output.trim()[2..]) {
let output = output.strip_prefix("0x").unwrap_or(output);
//decode hex
let decoded = match hex::decode(output) {
Ok(res) => res,
Err(err) => return evm_error(&err.to_string()),
};
Expand Down