From d7cd3a0b6fbaca00385e4df8b8f713e0f1395404 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Thu, 6 Jun 2024 19:01:35 +0200 Subject: [PATCH] missed one file --- eth/tracers/api.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eth/tracers/api.go b/eth/tracers/api.go index 86ee254ef0..cf9f470eef 100644 --- a/eth/tracers/api.go +++ b/eth/tracers/api.go @@ -935,6 +935,14 @@ func (api *API) TraceCall(ctx context.Context, args ethapi.TransactionArgs, bloc tx = args.ToTransaction(args.GasPrice == nil) traceConfig *TraceConfig ) + // Lower the basefee to 0 to avoid breaking EVM + // invariants (basefee < feecap). + if msg.GasPrice.Sign() == 0 { + vmctx.BaseFee = new(big.Int) + } + if msg.BlobGasFeeCap != nil && msg.BlobGasFeeCap.BitLen() == 0 { + vmctx.BlobBaseFee = new(big.Int) + } if config != nil { traceConfig = &config.TraceConfig }