1. Setting up Hardhat
This guide walks you through setting up your Hardhat environment using Zama's fhEVM Hardhat template.
Step 1: Clone the Hardhat template
Open the repository: Zama fhEVM Hardhat Template
Click "Use this template" to create a new repository under your GitHub account.
Clone the repository you have created to your local environment
Copy the repository URL of your newly created repository.
Open a terminal and run:
git clone <your-new-repo-url>
cd <your-new-repo-name>
Step 2: Configure the environment
Copy the environment configuration template:
cp .env.example .env
Install project dependencies: Depending on your package manager, run one of the following:
# Using npm npm install # Using yarn yarn install # Using pnpm pnpm install
Project structure overview
contracts/
: Write your Solidity smart contracts here.test/
: Place your test scripts for smart contract testing.deploy/
: Deployment scripts for deploying your contracts.hardhat.config.js
: The pre-configured Hardhat setup file for deploying on Sepolia..env
: The environment file that stores sensitive or environment-specific variables such as private keys and API keys.
To learn more about Hardhat, refer to the official Hardhat documentation.
You are now ready to start building your confidential smart contracts with fhEVM!
Last updated
Was this helpful?