accounts/abi: display name in "method/event not found" error (#25512)

This commit is contained in:
Daniel Liu 2025-01-14 10:56:14 +08:00
parent 78a35f1dc3
commit 08fedbb503

View file

@ -95,7 +95,7 @@ func (abi ABI) getArguments(name string, data []byte) (Arguments, error) {
args = event.Inputs
}
if args == nil {
return nil, errors.New("abi: could not locate named method or event")
return nil, fmt.Errorf("abi: could not locate named method or event: %s", name)
}
return args, nil
}