Logo
Back to Hub

FHE Random Number Generation

Encrypted random number generation - dice rolling, ranges, and gaming patterns

Basics
Documentation

FHEVM Hardhat Template

A Hardhat-based template for developing Fully Homomorphic Encryption (FHE) enabled Solidity smart contracts using the FHEVM protocol by Zama.

Quick Start

For detailed instructions see: FHEVM Hardhat Quick Start Tutorial

Prerequisites

  • Node.js: Version 20 or higher
  • npm or yarn/pnpm: Package manager

Installation

  1. Install dependencies

    Loading...
  2. Set up environment variables

    Loading...
  3. Compile and test

    Loading...
  4. Deploy to local network

    Loading...
  5. Deploy to Sepolia Testnet

    Loading...
  6. Test on Sepolia Testnet

    Loading...

šŸ“ Project Structure

fhevm-hardhat-template/
ā”œā”€ā”€ contracts/           # Smart contract source files
│   └── FHECounter.sol   # Example FHE counter contract
ā”œā”€ā”€ deploy/              # Deployment scripts
ā”œā”€ā”€ tasks/               # Hardhat custom tasks
ā”œā”€ā”€ test/                # Test files
ā”œā”€ā”€ hardhat.config.ts    # Hardhat configuration
└── package.json         # Dependencies and scripts

šŸ“œ Available Scripts

| Script | Description | | ------------------ | ------------------------ | | npm run compile | Compile all contracts | | npm run test | Run all tests | | npm run coverage | Generate coverage report | | npm run lint | Run linting checks | | npm run clean | Clean build artifacts |

šŸ“š Documentation

šŸ“„ License

This project is licensed under the BSD-3-Clause-Clear License. See the LICENSE file for details.

šŸ†˜ Support


Built with ā¤ļø by the Zama team

Loading...