Skip to content

OpenZeppelin/openzeppelin-confidential-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

184 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenZeppelin Confidential Contracts

Coverage Status License Docs

An experimental library for developing on the Zama fhEVM

Overview

This library contains contracts and utilities that utilize the novel features of the Zama fhEVM coprocessor. Contracts take advantage of the FHE (Fully Homomorphic Encryption) capabilities of the coprocessor to perform confidential transactions. See the documentation and the Zama documentation for more details.

Installation

Hardhat (npm)

$ npm install @openzeppelin/confidential-contracts

→ Installs the latest audited release

Usage

Once installed, you can use the contracts in the library by importing them:

pragma solidity ^0.8.27;

import {ERC7984} from "@openzeppelin/confidential-contracts/token/ERC7984/ERC7984.sol";

abstract contract MyToken is ERC7984 {
    constructor() ERC7984("MyToken", "MTN", "<CONTRACT-URI>") {
    }
}

Note

All contracts built using confidentiality must set the coprocessor configuration. This can be done by inheriting a config file such as ZamaEthereumConfig.

Warning

Developing contracts for confidentiality requires extreme care--many functions do not revert on failure as they would in normal contracts.

Contribute

OpenZeppelin Confidential Contracts exists thanks to its contributors. There are many ways you can participate and help build high quality software. Check out the contribution guide! This repository follows the same engineering guidelines as OpenZeppelin Contracts.

License

Each contract file should have its own license specified. In the absence of any specific license information, the file is released under the MIT License.

Legal

Your use of this Project is governed by the terms found at www.openzeppelin.com/tos (the "Terms").