Skip to content

Commit

Permalink
fix(cast run): print custom error when revert (foundry-rs#8620)
Browse files Browse the repository at this point in the history
fix(cast run): print custom revert

Co-authored-by: Matthias Seitz <[email protected]>
  • Loading branch information
cuiweixie and mattsse authored Aug 8, 2024
1 parent 5ee33c8 commit b574cdf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/cheatcodes/src/test/expect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ pub(crate) fn handle_expect_revert(
Ok(success_return())
} else {
let stringify = |data: &[u8]| {
if let Ok(s) = String::abi_decode(data, false) {
if let Ok(s) = String::abi_decode(data, true) {
return s;
}
if data.is_ascii() {
Expand Down
2 changes: 1 addition & 1 deletion crates/evm/core/src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ impl RevertDecoder {
}

// ABI-encoded `string`.
if let Ok(s) = String::abi_decode(err, false) {
if let Ok(s) = String::abi_decode(err, true) {
return Some(s);
}

Expand Down

0 comments on commit b574cdf

Please sign in to comment.