From fc08c9843724f4efb2705f02ad1888a451fde510 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 27 Oct 2023 18:20:42 +0200 Subject: [PATCH] fix: use selector not signature --- crates/evm/core/src/decode.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/evm/core/src/decode.rs b/crates/evm/core/src/decode.rs index 8cd0493d7de1..d490617e5f3c 100644 --- a/crates/evm/core/src/decode.rs +++ b/crates/evm/core/src/decode.rs @@ -191,7 +191,7 @@ pub fn decode_revert( // try to decode a custom error if provided an abi if let Some(abi) = maybe_abi { for abi_error in abi.errors() { - if abi_error.signature()[..SELECTOR_LEN].as_bytes() == &err[..SELECTOR_LEN] { + if abi_error.selector() == err[..SELECTOR_LEN] { // if we don't decode, don't return an error, try to decode as a // string later if let Ok(decoded) = abi_error.abi_decode_input(&err[SELECTOR_LEN..], false)