From abdd35cecccb565ecf1210c0c8aa2a6eb7cb42f9 Mon Sep 17 00:00:00 2001 From: lightclient Date: Mon, 16 Oct 2023 15:54:12 -0600 Subject: [PATCH] accounts/abi/bind/backends/simulated: use builtin error comparison --- accounts/abi/bind/backends/simulated.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts/abi/bind/backends/simulated.go b/accounts/abi/bind/backends/simulated.go index 8549976480..6892668cbe 100644 --- a/accounts/abi/bind/backends/simulated.go +++ b/accounts/abi/bind/backends/simulated.go @@ -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) }