Encrypt Single Value
Demonstrates accepting a single encrypted user input with proof validation - the essential pattern for all FHEVM applications.
What You'll Learn
- Using
FHE.fromExternal() to validate encrypted inputs
- Input proof binding to contract AND user address
- Client-side encryption with fhevmjs
- Permission management patterns (correct vs wrong)
Key Pattern
Client-Side Usage
Common Pitfalls
❌ Missing permissions - User can't decrypt without FHE.allow()
❌ Wrong proof binding - Proof must match contract AND user address
❌ Wrong parameter order - Handle first, then proof
Quick Start