Unverified Commit 296a27d1 authored by Marius van der Wijden's avatar Marius van der Wijden Committed by GitHub

accounts/abi/bind: restore error functionality (#21743)

* accounts/abi/bind: restore error functionality

* Update accounts/abi/bind/base.go
Co-authored-by: 's avatarGuillaume Ballet <gballet@gmail.com>
Co-authored-by: 's avatarGuillaume Ballet <gballet@gmail.com>
parent 1a55e20d
......@@ -152,7 +152,10 @@ func (c *BoundContract) Call(opts *CallOpts, results *[]interface{}, method stri
}
} else {
output, err = c.caller.CallContract(ctx, msg, opts.BlockNumber)
if err == nil && len(output) == 0 {
if err != nil {
return err
}
if len(output) == 0 {
// Make sure we have a contract to operate on, and bail out otherwise.
if code, err = c.caller.CodeAt(ctx, c.address, opts.BlockNumber); err != nil {
return err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment