Skip to content

Commit 8c03448

Browse files
authored
test: add test for string error decode (#386)
1 parent cd0b0c4 commit 8c03448

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/tracing/utils.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,12 @@ mod tests {
206206
"Should return None for raw strings"
207207
);
208208
}
209+
210+
// <https://github.com/paradigmxyz/revm-inspectors/pull/353#issuecomment-36146608124>
211+
#[test]
212+
fn decode_string_revert() {
213+
let err = hex!("0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000214661696c656420746f2076657269667920424950333232207369676e617475726500000000000000000000000000000000000000000000000000000000000000");
214+
let reason = maybe_revert_reason(&err[..]).unwrap();
215+
assert_eq!(reason, "Failed to verify BIP322 signature".to_string());
216+
}
209217
}

0 commit comments

Comments
 (0)