Learning Paths
Use this page to pick examples by difficulty.
Beginner
EncryptedAgeVerification - FHE comparison (le, ge) for threshold checks without revealing values
EncryptMultipleValues - Store multiple encrypted values with a single proof
EncryptSingleValue - Store one encrypted value and grant permissions
ERC7984Example - Minimal ERC7984 token with confidential mint + transfer
FHEAdd - Add two encrypted values with FHE.add
FHECounter - Encrypted counter using FHE.add and FHE.sub
FHEEq - Compare two encrypted values using FHE.eq
FHEIfThenElse - Conditional selection on encrypted values using FHE.select
FHESub - Subtract two encrypted values with FHE.sub
UserDecryptMultipleValues - User decryption flow for multiple encrypted results
UserDecryptSingleValue - User decryption flow for a single encrypted result
Intermediate
AccessControlGrants - User-controlled FHE.allow() permissions
AntiPatternMissingAllowThis - Missing FHE.allowThis breaks reuse of stored handles
AntiPatternMissingUserAllow - Missing FHE.allow(user) blocks user decryption
AntiPatternViewOnEncrypted - View functions return encrypted handles, not plaintext
ComplianceRules - Combining encrypted compliance checks with FHE.and()
DutchAuction - Dutch auction with descending price and encrypted reserve
ERC7984KycRestricted - OpenZeppelin ERC7984Restricted + public KYC allowlist (revert-based compliance)
ERC7984ObserverAccessExample - ERC7984ObserverAccess for opt-in audit / compliance observers
FHEWordle - Encrypted letter comparison with branch-free feedback
HandleGeneration - Handles are opaque references; FHE ops create derived handles (symbolic execution)
HandleLifecycle - Store encrypted handles and reuse them across calls
IdentityRegistry - Storing encrypted identity attributes (euint8, euint16, ebool)
InputProofsExplained - Input proofs bind encrypted inputs to a contract and sender
PublicDecryptMultipleValues - Public decryption flow for multiple encrypted values
PublicDecryptSingleValue - Public decryption flow for a single encrypted value
SwapERC7984ToERC7984 - ERC7984 → ERC7984 swap using FHE.allowTransient across token contracts (KYC is public)
TransientAccessControl - FHE.allowTransient() for one-transaction permissions between contracts
Advanced
BlindAuction - Sealed-bid auction with encrypted bids and public reveal
CompliantERC20 - FHE.select() for branch-free compliant transfers
ERC7984ERC20WrapperExample - ERC7984ERC20Wrapper (ERC20 ↔ ERC7984) + KYC-gated wrap/unwrap
SwapERC7984ToERC20 - ERC7984 → ERC20 swap using public decryption + FHE.checkSignatures (KYC is public)
VestingWalletConfidentialExample - Confidential vesting (ERC7984) + public KYC gating + factory/clones
Last updated