Skip to main content

Setting Up Network

Preparation

Before you start, ensure you have the necessary tools and dependencies installed on your system. Follow the steps mentioned in the prerequisites section here.

Clone the Project Repository and Setup

Once Go and Docker are installed, clone the hands-on-fhevm repository from GitHub:

  1. Open a terminal and navigate to the directory where you want to clone the repository.

  2. Run the following command:

    git clone https://github.com/airchains-network/hands-on-fhevm.git
  3. Navigate to the project directory:

    cd hands-on-fhevm
  4. Install dependencies:

    npm install
  5. Create a .env file:

    cp .env.example .env

Setting Up the FHEVM Network using Docker

This section will guide you through setting up your fhevm network using Docker.

Spin Up the Network

Start the network and the fhevm-service (along with generating the necessary keys) by running:

make run-full

Fund Accounts

Fund the required accounts with:

npm run fund

Deploy the Essential Core Contracts

Deploy the core contracts by executing:

npm run core

Stop the Network

When you need to stop the network and all running containers, use:

make stop-full

What's Next?

Your fhevm-network is now ready to use. Proceed to Compiling and Deploying your smart contracts.