Skip to main content

Quick start guide

Get up and running with the FHEVM Bootcamp in less than 10 minutes.

Prerequisites

Before you begin, verify you have the required tools installed:
RequirementVersion
Node.js20+
Git2.40+
Verify your setup:
node --version   # v20.x or higher
git --version    # 2.40+
If you don’t have Node.js 20+, download it from nodejs.org

Setup (3 minutes)

1

Clone the repository

git clone https://github.com/Himess/fhevm-bootcamp.git
cd fhevm-bootcamp
2

Install dependencies

npm install
This will install all required packages including:
  • @fhevm/solidity - FHE Solidity library
  • @fhevm/hardhat-plugin - Hardhat integration
  • hardhat - Development framework
3

Compile contracts

npx hardhat compile
Expected output:
Generating typings for: 35 artifacts in dir: types for target: ethers-v6
Successfully generated 70 typings!
Compiled 35 Solidity files successfully

Run tests (2 minutes)

All 328 tests run locally in mock FHE mode—no testnet connection needed:
npm test
Expected output:
  SimpleStorage
    ✓ should store and retrieve a value
    ✓ should emit ValueChanged event
  ...

  328 passing (Xs)
To run tests with gas reporting:
npm run test:gas

Deploy to Sepolia (5 minutes)

Optional: Deploy contracts to Ethereum Sepolia testnet.
1

Configure environment

Copy the example environment file:
cp .env.example .env
Edit .env and add your private key:
.env
PRIVATE_KEY=your_private_key_without_0x_prefix
SEPOLIA_RPC_URL=https://ethereum-sepolia-rpc.publicnode.com
You need Sepolia ETH. Get some from the Alchemy Sepolia Faucet
2

Deploy contracts

npm run deploy:sepolia
Expected output:
============================================================
FHEVM Bootcamp - Sepolia Deployment
============================================================
Deployer: 0xYourAddress
Balance: 0.5 ETH

[Module 00] Deploying SimpleStorage...
  deployed: 0x...

[Module 02] Deploying HelloFHEVM...
  deployed: 0x...

...
Total: 11/11 deployed
3

Verify on Etherscan (optional)

npx hardhat verify --network sepolia <CONTRACT_ADDRESS>

Explore the curriculum

The bootcamp has 20 modules across 4 weeks. Start based on your experience:

New to Solidity

Start with Module 00: Prerequisites & Solidity Review in modules/00-prerequisites/

Know Solidity, new to FHE

Start with Module 01: Introduction to FHE in modules/01-intro-to-fhe/

Know FHE basics

Start with Module 04: Operations in modules/04-operations/

Want to build apps

Start with Module 11: Confidential ERC-20 in modules/11-project-erc20/

Module structure

Each module folder contains:
modules/XX-module-name/
  README.md        # Overview and learning objectives
  lesson.md        # Full lesson content
  slides/slides.md # Presentation slides (Marp format)
  exercise.md      # Hands-on exercises
  quiz.md          # Knowledge check
Matching contracts live in contracts/, tests in test/, exercises in exercises/, and solutions in solutions/.

Key commands

CommandDescription
npm testRun all 328 tests (mock FHE mode)
npm run test:gasRun tests with gas usage report
npm run compileCompile all Solidity contracts
npm run cleanRemove artifacts, cache, types
npm run buildClean + compile from scratch
npm run deploy:localDeploy to local Hardhat network
npm run deploy:sepoliaDeploy to Ethereum Sepolia testnet
npm run lintLint Solidity files
npm run formatCheck formatting
npm run format:fixAuto-fix formatting

Docker (alternative setup)

If you prefer a containerized environment, no local Node.js installation needed:
# Run all tests (one command)
docker compose up

# Run with build output visible
docker compose up --build

# Run interactively
docker compose run --rm bootcamp sh
Inside the container you can run any command:
npx hardhat compile
npm test
npm run deploy:sepolia   # after configuring .env

Key resources

ResourcePath
Cheatsheetresources/CHEATSHEET.md
Common pitfallsresources/COMMON_PITFALLS.md
Gas guideresources/GAS_GUIDE.md
Security checklistresources/SECURITY_CHECKLIST.md
Glossaryresources/GLOSSARY.md
Full syllabuscurriculum/SYLLABUS.md
Instructor guidecurriculum/INSTRUCTOR_GUIDE.md

Troubleshooting

Delete node_modules/ and package-lock.json, then run npm install again:
rm -rf node_modules package-lock.json
npm install
Run npm run clean then npm run compile:
npm run clean
npm run compile
Increase mocha timeout:
npx hardhat test --timeout 60000
Check that:
  1. Your .env has the correct PRIVATE_KEY (without 0x prefix)
  2. You have Sepolia ETH in your account
  3. Your RPC URL is valid
Regenerate type bindings:
npm run build

Next steps

Full installation guide

Detailed setup instructions and environment configuration

Curriculum overview

Explore the complete 4-week program
Join the Zama Community to connect with other learners and get help from the community.

Build docs developers (and LLMs) love