# Install Truebit on Ethereum

{% hint style="info" %}
The Getting Started Guide has been updated to provide instructions on testing Truebit v1 using Hardhat and a locally forked Ethereum node. This replaces the previous version of the guide, which referenced the [deprecated Goerli testnet](https://github.com/eth-clients/goerli). The Goerli testnet is expected to sunset in early 2024, and Truebit recommends updating your test environment as soon as possible.
{% endhint %}

## Install Prerequisites

**1. Download & Install** [**Git**](https://git-scm.com/downloads)

**2. Clone the** [**Truebit on Ethereum Git repository**](https://github.com/TruebitProtocol/truebit-eth)**.**

```sh
git clone https://github.com/TruebitProtocol/truebit-eth
```

**3. Download & Install** [**Docker**](https://docs.docker.com/get-docker/)**.**

**4. Build the Truebit on Ethereum Docker container.**

```sh
docker pull truebitprotocol/truebit-eth:latest
```

**5. Install hardhat**

Create a new directory called "v1" and move into it

```bash
npm install hardhat@"2.20.1"
```

```bash
npx hardhat init
```

Copy the following file into the directory

{% file src="/files/ZLNgJYJ0YKaFkoHJvS0J" %}

Open the file and update the field \<YOUR\_INFURA\_API\_KEY> with your API KEY generated at the [Prerequisites](/v1docs/getting-started/master.md#register-on-infura-and-get-the-infura-api-key). Copy the following file into the directory.

Verify the Installed version to validate that the installed version corresponds to the "2.20.1"

```
npx hardhat --version 
```

**6. Register on Infura and get the Infura API Key.**

To fork from Ethereum Mainnet, you need a free Infura account.&#x20;

* Create an Infura account  [Ethereum API | IPFS API & Gateway | ETH Nodes as a Service](https://www.infura.io/)
* Create a New Project and then click on "Create"

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

* After the creation, click on your **key**<br>

<figure><img src="/files/iaKOu56RV9K0d5idJN4k" alt=""><figcaption></figcaption></figure>

* Copy the **API KEY** string

<figure><img src="/files/2oG2JukhuakhlTxQfl9E" alt=""><figcaption></figcaption></figure>

## Accessing Truebit on Ethereum Smart Contracts with MetaMask (Optional)

**1. Install the** [**MetaMask**](https://metamask.io/) **browser extension.**

**2. Import** **account from Docker shared folder (keystore).**

<div align="center"><figure><img src="/files/CozY7XZujMjdNUlIhUR7" alt="" width="278"><figcaption><p>My Accounts -> Import Account</p></figcaption></figure></div>

<figure><img src="/files/BzCc5pyTDfDuM5pA8jfW" alt="" width="278"><figcaption><p>Import Account -> Type Json File</p></figcaption></figure>

<figure><img src="/files/0zkjuljAiIlx1nMNq3ll" alt="" width="375"><figcaption><p>Path to get Keystore</p></figcaption></figure>

**3. Add TRU token contract to each address.**

```
Ethereum Mainnet
Contract: 0xf65B5C5104c4faFD4b709d9D60a185eAE063276c
Decimals: 18
```


---

# Agent Instructions: 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:

```
GET https://docs.truebit.io/v1docs/getting-started/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
