diff --git a/eth/api_backend.go b/eth/api_backend.go index 2e82fc846fd8..e5bc291032d6 100644 --- a/eth/api_backend.go +++ b/eth/api_backend.go @@ -102,7 +102,7 @@ func (b *EthApiBackend) GetVMEnv(ctx context.Context, msg core.Message, state et privateState = statedb.privateState ) - if !privateState.Exist(*msg.To()) { + if msg.To() != nil && !privateState.Exist(*msg.To()) { privateState = publicState }