From fc8c10476d5a43bd892cafb19b86d20642384c6c Mon Sep 17 00:00:00 2001 From: J Date: Wed, 4 Mar 2026 04:37:47 -0700 Subject: [PATCH] internal/ethapi: add MaxUsedGas field to eth_simulateV1 response (#32789) closes #32741 --- internal/ethapi/simulate.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/ethapi/simulate.go b/internal/ethapi/simulate.go index 325ee6d5bb..63513f8d66 100644 --- a/internal/ethapi/simulate.go +++ b/internal/ethapi/simulate.go @@ -59,6 +59,7 @@ type simCallResult struct { ReturnValue hexutil.Bytes `json:"returnData"` Logs []*types.Log `json:"logs"` GasUsed hexutil.Uint64 `json:"gasUsed"` + MaxUsedGas hexutil.Uint64 `json:"maxUsedGas"` Status hexutil.Uint64 `json:"status"` Error *callError `json:"error,omitempty"` } @@ -323,7 +324,7 @@ func (sim *simulator) processBlock(ctx context.Context, block *simBlock, header, sim.gasRemaining -= result.UsedGas logs := tracer.Logs() - callRes := simCallResult{ReturnValue: result.Return(), Logs: logs, GasUsed: hexutil.Uint64(result.UsedGas)} + callRes := simCallResult{ReturnValue: result.Return(), Logs: logs, GasUsed: hexutil.Uint64(result.UsedGas), MaxUsedGas: hexutil.Uint64(result.MaxUsedGas)} if result.Failed() { callRes.Status = hexutil.Uint64(types.ReceiptStatusFailed) if errors.Is(result.Err, vm.ErrExecutionReverted) {