* docs: rename tfhe to fhe * docs: renaming all function names in the docs and library names * docs: update all mentions of TFHE * docs: tfhe-rs stays the same * docs: tfhe-rs stays the same * docs: rename repo * docs: fix renaming after merge conflicts * docs: resolve issues
5.9 KiB
See all tutorials
Solidity smart contracts templates - fhevm-contracts
The fhevm-contracts repository provides a comprehensive collection of secure, pre-tested Solidity templates optimized for fhevm development. These templates leverage the FHE library to enable encrypted computations while maintaining security and extensibility.
The library includes templates for common use cases like tokens and governance, allowing developers to quickly build confidential smart contracts with battle-tested components. For detailed implementation guidance and best practices, refer to the contracts standard library guide.
Token
- ConfidentialERC20: Standard ERC20 with encryption.
- ConfidentialERC20Mintable: ERC20 with minting capabilities.
- ConfidentialERC20WithErrors: ERC20 with integrated error handling.
- ConfidentialERC20WithErrorsMintable: ERC20 with both minting and error handling.
Governance
- ConfidentialERC20Votes: Confidential ERC20 governance token implementation. It is based on Comp.sol.
- ConfidentialGovernorAlpha: A governance contract for managing proposals and votes. It is based on GovernorAlpha.sol.
Utils
- EncryptedErrors: Provides error management utilities for encrypted contracts.
Code examples on GitHub
- Blind Auction: A smart contract for conducting blind auctions where bids are encrypted and the winning bid remains private.
- Decentralized ID: A blockchain-based identity management system using smart contracts to store and manage encrypted personal data.
- FheWordle: A privacy-preserving implementation of the popular word game Wordle where players guess a secret encrypted word through encrypted letter comparisons.
- Cipherbomb: A multiplayer game where players must defuse an encrypted bomb by guessing the correct sequence of numbers.
- Voting example: Suffragium is a secure, privacy-preserving voting system that combines zero-knowledge proofs (ZKP) and Fully Homomorphic Encryption (FHE) to create a trustless and tamper-resistant voting platform.
Frontend examples
- Cipherbomb UI: A multiplayer game where players must defuse an encrypted bomb by guessing the correct sequence of numbers.
Blog tutorials
Video tutorials
- How to do Confidential Transactions Directly on Ethereum? - Nov 2024
- Zama - FHE on Ethereum (Presentation at The Zama CoFHE Shop during EthCC 7) - Jul 2024
{% hint style="success" %} Zama 5-Question Developer Survey
We want to hear from you! Take 1 minute to share your thoughts and helping us enhance our documentation and libraries. 👉 Click here to participate. {% endhint %}
Legacy - Not compatible with latest fhevm
- Build an Encrypted Wordle Game Onchain using FHE and fhevm - February 2024
- Programmable Privacy and Onchain Compliance using Homomorphic Encryption - November 2023
- Confidential DAO Voting Using Homomorphic Encryption - October 2023
- On-chain Blind Auctions Using Homomorphic Encryption and the fhevm - July 2023
- Confidential ERC-20 Tokens Using Homomorphic Encryption and the fhevm - June 2023
- Using asynchronous decryption in Solidity contracts with fhevm - April 2024
- Accelerate your code testing and get code coverage using fhevm mocks - January 2024
- Use the CMUX operator on fhevm - October 2023
- [Video tutorial] How to Write Confidential Smart Contracts Using fhevm - October 2023
- Workshop during ETHcc: Homomorphic Encryption in the EVM - July 2023