Introduction
Welcome to the fhEVM Examples library. These examples span multiple categories and are designed to help you learn privacy-preserving smart contract patterns step by step.
Start here
Want to browse by topic? See Chapters.
Example map
Auctions
Basic
Handles are opaque references; FHE ops create derived handles (symbolic execution)
Intermediate
Games
Identity
FHE comparison (le, ge) for threshold checks without revealing values
Beginner
OpenZeppelin ERC7984Restricted + public KYC allowlist (revert-based compliance)
Intermediate
ERC7984ObserverAccess for opt-in audit / compliance observers
Intermediate
ERC7984 → ERC20 swap using public decryption + FHE.checkSignatures (KYC is public)
Advanced
ERC7984 → ERC7984 swap using FHE.allowTransient across token contracts (KYC is public)
Intermediate
FHE.allowTransient() for one-transaction permissions between contracts
Intermediate
Confidential vesting (ERC7984) + public KYC gating + factory/clones
Advanced
Last updated