Setting Up Network
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:
-
Open a terminal and navigate to the directory where you want to clone the repository.
-
Run the following command:
git clone https://github.com/airchains-network/hands-on-fhevm.git
-
Navigate to the project directory:
cd hands-on-fhevm
-
Install dependencies:
npm install
-
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.