diff --git a/arbitrum/apibackend.go b/arbitrum/apibackend.go index 4d5c308dc8..ce4dea0951 100644 --- a/arbitrum/apibackend.go +++ b/arbitrum/apibackend.go @@ -504,7 +504,13 @@ func (a *APIBackend) GetEVM(ctx context.Context, msg *core.Message, state *state vmConfig = a.BlockChain().GetVMConfig() } txContext := core.NewEVMTxContext(msg) - return vm.NewEVM(*blockCtx, txContext, state, a.BlockChain().Config(), *vmConfig), vmError + var context vm.BlockContext + if blockCtx != nil { + context = *blockCtx + } else { + context = core.NewEVMBlockContext(header, a.BlockChain(), nil) + } + return vm.NewEVM(context, txContext, state, a.BlockChain().Config(), *vmConfig), vmError } func (a *APIBackend) SubscribeChainEvent(ch chan<- core.ChainEvent) event.Subscription {