Skip to content

Commit 4c6a9ad

Browse files
s1nablakehhuynh
authored andcommitted
internal/ethapi: add basefee to block overrides (ethereum#25219)
1 parent bde7ac7 commit 4c6a9ad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/ethapi/api.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,7 @@ type BlockOverrides struct {
889889
GasLimit *hexutil.Uint64
890890
Coinbase *common.Address
891891
Random *common.Hash
892+
BaseFee *hexutil.Big
892893
}
893894

894895
// Apply overrides the given header fields into the given block context.
@@ -914,6 +915,9 @@ func (diff *BlockOverrides) Apply(blockCtx *vm.BlockContext) {
914915
if diff.Random != nil {
915916
blockCtx.Random = diff.Random
916917
}
918+
if diff.BaseFee != nil {
919+
blockCtx.BaseFee = diff.BaseFee.ToInt()
920+
}
917921
}
918922

919923
func DoCall(ctx context.Context, b Backend, args TransactionArgs, blockNrOrHash rpc.BlockNumberOrHash, overrides *StateOverride, timeout time.Duration, globalGasCap uint64) (*core.ExecutionResult, error) {

0 commit comments

Comments
 (0)