> For the complete documentation index, see [llms.txt](https://docs.blocktorch.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blocktorch.xyz/concepts/data-sources/local-forks/setup-managed-hardhat-fork.md).

# Setup managed Hardhat Fork

{% hint style="info" %}

#### What is a managed Hardhat Fork by blocktorch?

Blocktorch managed Hardhat Forks are a zero-setup, private environment for developing and testing smart contracts against production data. With managed Hardhat Forks, you get a private replica of 9 supported EVM mainnets and testnets, with all the developer tooling of the blocktorch platform privately, the latest states, and no performance delays.
{% endhint %}

#### Step 1: Select "Managed Hardhat Fork", give your fork a name, choose which Chain you'd like to fork, optionally choose the server region you want the fork to run on, and press "Save"

{% hint style="info" %}
Give your fork a recognizable name to make your life easier later on, e.g. when looking for the fork in the list of chains to add contracts deployed on this fork. Especially if you deploy multiple forks, they should have distinguishable names
{% endhint %}

<figure><img src="/files/fCIFw4rnTtvqBiPb3hww" alt="" width="563"><figcaption></figcaption></figure>

#### Step 2: Copy the RPC URL to start using it in testing your smart contracts and application

<figure><img src="/files/7TB2X5mfp4kXEalDKJri" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Congratulations, you have successfully added your managed hardhat fork to blocktorch 🥳\
If you now try to [add a smart contract](/concepts/data-sources/smart-contracts.md) to blocktorch that has been deployed on your managed hardhat fork you can see your managed hardhat fork in the list of available chains
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.blocktorch.xyz/concepts/data-sources/local-forks/setup-managed-hardhat-fork.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
