From 486d4cae735730d4c429fbec2d0c89be782cca93 Mon Sep 17 00:00:00 2001 From: Daniel Liu <139250065@qq.com> Date: Wed, 8 Oct 2025 12:31:36 +0800 Subject: [PATCH] internal/ethapi: add basefee to block overrides #25219 (#1583) Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com> --- internal/ethapi/api.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 0e63fd4d08..e8e81c5f7c 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -589,6 +589,7 @@ type BlockOverrides struct { GasLimit *hexutil.Uint64 Coinbase *common.Address Random *common.Hash + BaseFee *hexutil.Big } // Apply overrides the given header fields into the given block context. @@ -614,6 +615,9 @@ func (diff *BlockOverrides) Apply(blockCtx *vm.BlockContext) { if diff.Random != nil { blockCtx.Random = diff.Random } + if diff.BaseFee != nil { + blockCtx.BaseFee = diff.BaseFee.ToInt() + } } func (s *BlockChainAPI) GetBlockSignersByHash(ctx context.Context, blockHash common.Hash) ([]common.Address, error) {