Skip to content

BoundContract Call no longer returning correct solidity error #21739

@yazzaoui

Description

@yazzaoui

Hello,

#21091 has changed the behavior of the Call method in accounts/abi/bind/base.go

The correct contract error from CallContract is no longer returned, and Unpack is called even though CallContract has failed, which I think is a mistake.

And some third-party apps using abigen are relying on the old behavior, so would be great to have the correct contract error message back.

Expected behaviour

If the contract invocation has failed (due to require or else), return the correct associated error message

Actual behaviour

If the contract invocation has failed (due to require or else) "abi: attempting to unmarshall an empty string while arguments are expected" is returned

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions