Skip to content

Commit

Permalink
fix Unpack failed because of tx failed
Browse files Browse the repository at this point in the history
  • Loading branch information
bxq2011hust committed May 15, 2024
1 parent fa09460 commit 03e5629
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions v3/abi/bind/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ func (c *BoundContract) TransactWithResult(opts *TransactOpts, result interface{
if err != nil {
return tx, receipt, err
}
if receipt.Status != types.Success {
return tx, receipt, fmt.Errorf("transact failed, receipt status: %d, message: %s", receipt.Status, receipt.GetErrorMessage())
}
err = c.abi.Unpack(result, method, common.FromHex(receipt.GetOutput()))
if err != nil {
return tx, receipt, err
Expand Down

0 comments on commit 03e5629

Please sign in to comment.