Skip to content

Commit

Permalink
accounts/abi: brings out the msg defined at require statement in SC f…
Browse files Browse the repository at this point in the history
…unction (ethereum#17328)
  • Loading branch information
gzliudan committed Jan 6, 2025
1 parent 3191a2c commit f827730
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion accounts/abi/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f827730

Please sign in to comment.