From fd53d2a71138ac66327dae823ca0e240976b722e Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Fri, 3 Jan 2025 20:07:28 +0800 Subject: [PATCH] accounts/abi: brings out the msg defined at require statement in SC function (#17328) --- accounts/abi/abi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts/abi/abi.go b/accounts/abi/abi.go index 0c68a0a1ee274..ddb6f4f00be7c 100644 --- a/accounts/abi/abi.go +++ b/accounts/abi/abi.go @@ -85,7 +85,7 @@ func (abi ABI) Unpack(v interface{}, name string, output []byte) (err error) { // we need to decide whether we're calling a method or an event if method, ok := abi.Methods[name]; ok { if len(output)%32 != 0 { - return errors.New("abi: improperly formatted output") + return fmt.Errorf("abi: improperly formatted output: %s - Bytes: [%+v]", string(output), output) } return method.Outputs.Unpack(v, output) } else if event, ok := abi.Events[name]; ok {