From aac8aa35acc2f22e75c23de25924d3c465bac88c Mon Sep 17 00:00:00 2001 From: Gustavo Gama Date: Wed, 29 Jul 2026 09:48:46 +0100 Subject: [PATCH] fix: only override gas settings in executor when set --- chainwrappers/executors.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/chainwrappers/executors.go b/chainwrappers/executors.go index cefa3d7f..585ed167 100644 --- a/chainwrappers/executors.go +++ b/chainwrappers/executors.go @@ -72,8 +72,15 @@ func BuildExecutor( if err != nil { return nil, fmt.Errorf("failed to parse EVM chain metadata for selector %d: %w", rawSelector, err) } - auth.GasPrice = evmChainMetadata.GasPrice - auth.GasLimit = evmChainMetadata.GasLimit + // Only override when the proposal specifies a value; a zero GasLimit forces + // go-ethereum to estimate gas, which calls eth_getCode against the "pending" + // block and fails on chains (e.g. Avalanche Fuji) that no longer support it. + if evmChainMetadata.GasPrice != nil { + auth.GasPrice = evmChainMetadata.GasPrice + } + if evmChainMetadata.GasLimit != 0 { + auth.GasLimit = evmChainMetadata.GasLimit + } return evm.NewExecutor(evmEncoder, client, auth), nil