Skip to content

Commit

Permalink
fix: use selector not signature (#6146)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Oct 27, 2023
1 parent 62e3a84 commit 70d0022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/evm/core/src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 70d0022

Please sign in to comment.