Skip to content

Commit

Permalink
CallContract should return revert data
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTomoyo committed Jun 7, 2022
1 parent de23cf9 commit 2693bc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions accounts/abi/bind/backends/simulated.go
Expand Up @@ -431,7 +431,7 @@ func (b *SimulatedBackend) CallContract(ctx context.Context, call ethereum.CallM
}
// If the result contains a revert reason, try to unpack and return it.
if len(res.Revert()) > 0 {
return nil, newRevertError(res)
return res.Revert(), newRevertError(res)
}
return res.Return(), res.Err
}
Expand All @@ -448,7 +448,7 @@ func (b *SimulatedBackend) PendingCallContract(ctx context.Context, call ethereu
}
// If the result contains a revert reason, try to unpack and return it.
if len(res.Revert()) > 0 {
return nil, newRevertError(res)
return res.Revert(), newRevertError(res)
}
return res.Return(), res.Err
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
@@ -1,4 +1,4 @@
module github.com/ethereum/go-ethereum
module github.com/0xTomoyo/go-ethereum

go 1.16

Expand Down

0 comments on commit 2693bc8

Please sign in to comment.