Skip to content

Commit

Permalink
fixup! fix(evm): return revert reason when estimateGas fails
Browse files Browse the repository at this point in the history
  • Loading branch information
dessaya committed Sep 20, 2023
1 parent d33b797 commit 8aab0dc
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions packages/chainutil/evmestimategas.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,7 @@ func EVMEstimateGas(ch chain.ChainCore, aliasOutput *isc.AliasOutputWithID, call
if err != nil {
return true, nil, err
}
if res.Receipt.Error != nil {
isOutOfGas, resolvedErr, err := resolveError(ch, res.Receipt.Error)
if err != nil {
return true, res, err
}
if isOutOfGas {
return true, res, nil // increase gas
}
return true, res, resolvedErr // bail out
}
return false, res, nil
return res.Receipt.Error != nil, res, nil
}

// Execute the binary search and hone in on an executable gas limit
Expand Down

0 comments on commit 8aab0dc

Please sign in to comment.