Skip to content

Installation

A simple guide to setup on your local dev environment

FHEVM smart contracts are written in Solidity, just like standard Ethereum contracts, but run on an FHE-enabled EVM that supports Fully Homomorphic Encryption. This guide helps you set up everything you need to build and test confidential smart contracts locally.

Prerequisites

  • A basic understanding of Solidity library and Ethereum
  • Node.js & npm
  • Hardhat (Development Framework)
  • FHEVM SDK & Hardhat Plugin
  • Infura API Key: Sign up at infura.io for Sepolia RPC access

Install a Node.js LTS version

Ensure that Node.js is installed on your machine.

Download and install the recommended LTS (Long-Term Support) version from the official website.

Use an even-numbered version (e.g., v18.x, v20.x)

Hardhat does not support odd-numbered Node.js versions. If you're using one (e.g., v21.x, v23.x), Hardhat will display a persistent warning message and may behave unexpectedly.

To verify your installation:

node -v
npm -v

Installation Knowledge Check

Test your understanding of the FHEVM development setup!

Question 1 of 4Node.js Setup

Which Node.js versions are recommended for Hardhat development?