# Simulated Networks by EDR

Description: An explanation of the networks simulated by EDR

Note: This document was authored using MDX

  Source: https://github.com/NomicFoundation/hardhat-website/tree/main/src/content/docs/docs/explanations/edr-simulated-networks.mdx

  Components used in this page:
    - <Run cmd="..."/>: Runs a command in the terminal with npm/pnpm/yarn.
    - :::tip: A helpful tip callout block. Supports custom title `:::tip[Title]` and icon `:::tip{icon="name"}` syntax.

import Run from "@hh/Run.astro";

Hardhat can simulate Ethereum and Layer 2 blockchains locally, a feature powered by Nomic Foundation's [Ethereum Development Runtime](https://github.com/NomicFoundation/edr), or EDR.

This document explains how network simulations work. For a full list of features, check out the [reference documentation](/docs/reference/edr-simulated-networks).

## What are simulated networks?

Simulated networks are in-process blockchains that run entirely on your local machine.

Unlike connecting to a remote node through JSON-RPC, simulated networks give you complete control over the blockchain state, block production, and transaction execution. They're faster and free to use.

The only difference between a blockchain simulated by EDR and a production one is that EDR requires no consensus mechanism or peer-to-peer network, as it's run by a single process each time.

When you call `await network.create()` with a Network Config of type `edr-simulated`, Hardhat creates a new, independent blockchain simulation. Each simulation is isolated, so you can create multiple simulations simultaneously without them interfering with each other.

## How to use simulated networks

You can use simulated networks in two ways:

### In-process simulations

When you run your tests or scripts, Hardhat automatically creates an in-process simulated network. For example:

```ts
import { network } from "hardhat";

const connection = await network.create();
```

This creates a new blockchain simulation based on the Network Config specified in your configuration file or via the `--network` flag.

:::tip
To learn more about network management, read [this explanation](/docs/explanations/network-management).
:::

### Standalone node

You can also run a simulated network as a standalone process that exposes a JSON-RPC interface over HTTP:

<Run command="hardhat node" />

This starts a local node at `http://127.0.0.1:8545` that you can connect to with wallets, applications, Hardhat, or other tools.
