fhEVM
WebsiteLibrariesProduct & ServicesDevelopersSupport
0.6
0.6
  • Welcome to fhEVM
  • White paper
  • Getting Started
    • Overview
    • Quick Start
      • Remix
        • 1. Setting up Remix
        • 2. Connect your wallet to Remix
        • 3. Deploying ConfidentialERC20
        • 4. Interacting with the contract
      • Hardhat
        • Prerequisites
        • 1. Setting up Hardhat
        • 2. Writing contracts
        • 3. Testing in mocked mode
        • 4. Deploying the contract
        • 5. Interacting with the contract
  • Tutorials
    • See all tutorials
  • Smart contract
    • Key features
    • Configuration
    • FhEVM contracts
    • Supported types
    • Operations on encrypted types
    • Access Control List
      • ACL examples
    • Encrypted Inputs
    • Decryption
      • Decryption
      • Decryption in depth
      • Re-encryption
    • If sentences
    • Branching in FHE
    • AsEbool, asEuintXX, asEaddress and asEbytesXX operations
    • Generate random numbers
    • Error handling
    • Gas estimation
    • Debug decrypt
    • Using Foundry
  • Frontend
    • Setup
    • Build a web application
    • Using React.js
    • Using Next.js
    • Using Vue.js
    • Using Node or Typescript
    • Using the CLI
    • Common webpack errors
  • Explanations
    • Architectural overview
    • FHE on blockchain
    • fhEVM components
    • Encryption, decryption, re-encryption, and computation
  • References
    • Table of all addresses
    • Smart contracts - fhEVM API
    • Frontend - fhevmjs lib
    • Repositories
  • Developer
    • Contributing
    • Development roadmap
    • Release note
    • Feature request
    • Bug report
    • Status
Powered by GitBook

Libraries

  • TFHE-rs
  • Concrete
  • Concrete ML
  • fhEVM

Developers

  • Blog
  • Documentation
  • Github
  • FHE resources

Company

  • About
  • Introduction to FHE
  • Media
  • Careers
On this page
  • Step 1: Clone the Hardhat template
  • Step 2: Configure the environment
  • Project structure overview

Was this helpful?

Export as PDF
  1. Getting Started
  2. Quick Start
  3. Hardhat

1. Setting up Hardhat

PreviousPrerequisitesNext2. Writing contracts

Last updated 3 months ago

Was this helpful?

This guide walks you through setting up your Hardhat environment using Zama's fhEVM Hardhat template.

Step 1: Clone the Hardhat template

  1. Open the repository:

  2. Click "Use this template" to create a new repository under your GitHub account.

  3. Clone the repository you have created to your local environment

  4. Copy the repository URL of your newly created repository.

  5. Open a terminal and run:

git clone <your-new-repo-url>
cd <your-new-repo-name>

Step 2: Configure the environment

  1. Copy the environment configuration template:

    cp .env.example .env
  2. 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.


You are now ready to start building your confidential smart contracts with fhEVM!

To learn more about Hardhat, refer to the .

official Hardhat documentation
Zama fhEVM Hardhat Template