From 1a2baf0037883bf654e150e14ef4d4795d3f23f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Garamv=C3=B6lgyi?= Date: Tue, 22 Jul 2025 16:40:53 +0200 Subject: [PATCH] fix: consider floor gas in eth_estimateGas (#1225) --- accounts/abi/bind/backends/simulated.go | 2 +- internal/ethapi/api.go | 2 +- params/version.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/accounts/abi/bind/backends/simulated.go b/accounts/abi/bind/backends/simulated.go index a4f51d425b..435d8a67ff 100644 --- a/accounts/abi/bind/backends/simulated.go +++ b/accounts/abi/bind/backends/simulated.go @@ -538,7 +538,7 @@ func (b *SimulatedBackend) EstimateGas(ctx context.Context, call ethereum.CallMs b.pendingState.RevertToSnapshot(snapshot) if err != nil { - if errors.Is(err, core.ErrIntrinsicGas) { + if errors.Is(err, core.ErrIntrinsicGas) || errors.Is(err, core.ErrFloorDataGas) { return true, nil, nil // Special case, raise gas limit } return true, nil, err // Bail out diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 7763f76abe..8f24f2f709 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1199,7 +1199,7 @@ func DoEstimateGas(ctx context.Context, b Backend, args TransactionArgs, blockNr result, err := DoCall(ctx, b, args, blockNrOrHash, nil, 0, gasCap) if err != nil { - if errors.Is(err, core.ErrIntrinsicGas) { + if errors.Is(err, core.ErrIntrinsicGas) || errors.Is(err, core.ErrFloorDataGas) { return true, nil, nil // Special case, raise gas limit } return true, nil, err // Bail out diff --git a/params/version.go b/params/version.go index cafb96053c..fb301e5197 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 5 // Major version component of the current release VersionMinor = 8 // Minor version component of the current release - VersionPatch = 72 // Patch version component of the current release + VersionPatch = 73 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string )