This guide explains how to use the fhEVM Contracts standard library. This library provides secure, extensible, and pre-tested Solidity templates designed for developing smart contracts on fhEVM using the TFHE library.
The fhEVM Contracts standard library streamlines the development of confidential smart contracts by providing templates and utilities for tokens, governance, and error management. These contracts have been rigorously tested by Zama's engineers and are designed to accelerate development while enhancing security.
Install the library using your preferred package manager:
When testing your contracts locally, you can use the SepoliaZamaFHEVMConfig
which provides a mock configuration for local development and testing. This allows you to test your contracts without needing to connect to a real network:
When deploying to Sepolia, you can use the SepoliaZamaFHEVMConfig
which provides the correct configuration for the Sepolia testnet:
When inheriting from configuration contracts, the order of inheritance is critical. Since constructors are evaluated from left to right in Solidity, you must inherit the configuration contract first to ensure proper initialization.
✅ Correct Order:
❌ Wrong order:
For a list of all available contracts see the page See all tutorials