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: Open your terminal
  • Step 2. Install Node.js and a package manager
  • Step 3. Install Git
  • Step 4. Install Foundry
  • Next Steps

Was this helpful?

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

Prerequisites

PreviousHardhatNext1. Setting up Hardhat

Last updated 3 months ago

Was this helpful?

This guide will walk you through installing all necessary dependencies from scratch, preparing you for developing and deploying fhEVM smart contracts using Hardhat.

To use Hardhat to build and deploy confidential smart contract, you need to have the following:

  • Node.js (v20 or later)

  • A package manager: npm, yarn, or pnpm

  • Git for version control

  • Foundry for using the command cast

If you already have these installed, skip ahead to


Step 1: Open your terminal

To run the installation commands, open a terminal:

  • Use your system's built-in terminal (e.g., Terminal on macOS, Command Prompt or PowerShell on Windows, or a Linux shell).

  • Alternatively, use the integrated terminal in a IDE such as .

VS code provide the official for an enhanced development experience with Hardhat.

Step 2. Install Node.js and a package manager

Instead of installing Node.js directly, we recommend using Node Version Manager (nvm), which allows you to manage multiple versions of Node.js:

  1. Install nvm following the recommended tutorials:

  2. Install Node.js using nvm. This installs the latest version of Node.js:

nvm install node
  1. Install pnpm (optional but recommended for better speed and efficiency). After installing Node.js, you automatically have npm, so run:

npm install -g pnpm

Alternatively, you can continue using npm or yarn if you prefer.

Step 3. Install Git

Git is required for managing source code, cloning repositories, and handling version control. Install Git based on your operating system:

  • Linux: Use your distribution's package manager (e.g., sudo apt-get install git on Ubuntu/Debian).

Step 4. Install Foundry

We will need the command cast in our tutorial. This command is available with installing Foundry.

  1. Install Foundry using the official installer:

curl -L https://foundry.paradigm.xyz | bash
  1. Reload your terminal configuration:

source ~/.bashrc  # Linux/WSL
# or
source ~/.zshrc   # macOS/zsh
  1. Run the Foundry installer:

foundryup

This will install all Foundry components, including cast, forge, anvil, and chisel.

To verify the installation, run:

cast --version

Next Steps

Windows: .

macOS: Install via with brew install git or .

You now have all the necessary dependencies installed. Continue to to begin creating and deploying your FHE smart contracts!

1. Setting Up Hardhat.
Visual Studio Code (VS Code)
Hardhat extension
Linux
Windows
Mac OS
Download Git for Windows
Homebrew
download Git
1. Setting Up Hardhat