internal/ethapi: add basefee to block overrides (#25219)

This commit is contained in:
Sina Mahmoodi 2022-07-05 14:48:34 +02:00 committed by GitHub
parent e3c1a7c671
commit cb7f35996d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -889,6 +889,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.
@ -914,6 +915,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 DoCall(ctx context.Context, b Backend, args TransactionArgs, blockNrOrHash rpc.BlockNumberOrHash, overrides *StateOverride, timeout time.Duration, globalGasCap uint64) (*core.ExecutionResult, error) {