accounts/abi/bind/backends/simulated: use builtin error comparison

This commit is contained in:
lightclient 2023-10-16 15:54:12 -06:00
parent 77f1f2ea79
commit abdd35cecc
No known key found for this signature in database
GPG key ID: 75C916AFEE20183E

View file

@ -586,7 +586,7 @@ func (b *SimulatedBackend) EstimateGas(ctx context.Context, call ethereum.CallMs
return 0, err
}
if failed {
if result != nil && result.Err != vm.ErrOutOfGas {
if result != nil && !errors.Is(result.Err, vm.ErrOutOfGas) {
if len(result.Revert()) > 0 {
return 0, newRevertError(result)
}