Install Truebit on Ethereum

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. The Goerli testnet is expected to sunset in early 2024, and Truebit recommends updating your test environment as soon as possible.

Install Prerequisites

1. Download & Install Git

2. Clone the Truebit on Ethereum Git repository.

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

3. Download & Install Docker.

4. Build the Truebit on Ethereum Docker container.

docker pull truebitprotocol/truebit-eth:latest

5. Install hardhat

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

npm install hardhat@"2.20.1"
npx hardhat init

Copy the following file into the directory

Open the file and update the field <YOUR_INFURA_API_KEY> with your API KEY generated at the Prerequisites. 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.

  • After the creation, click on your key

  • Copy the API KEY string

Accessing Truebit on Ethereum Smart Contracts with MetaMask (Optional)

1. Install the MetaMask browser extension.

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

3. Add TRU token contract to each address.

Ethereum Mainnet
Contract: 0xf65B5C5104c4faFD4b709d9D60a185eAE063276c
Decimals: 18

Last updated