Skip to content

zama-ai/fhevm-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fhEVM Contracts

Description

fhEVM contracts is a Solidity library for secure smart-contract development using fhEVM and TFHE.

Getting Started

Installation

# Using npm
npm install fhevm-contracts

# Using Yarn
yarn add fhevm-contracts

# Using pnpm
pnpm add fhevm-contracts

A Simple Example

// SPDX-License-Identifier: BSD-3-Clause-Clear

pragma solidity ^0.8.24;

import "fhevm/lib/TFHE.sol";
import "fhevm-contracts/contracts/token/ERC20/EncryptedERC20.sol";

contract MyERC20 is EncryptedERC20 {
  constructor() EncryptedERC20("MyToken", "MYTOKEN") {
    TFHE.setFHEVM(FHEVMConfig.defaultConfig());
    _unsafeMint(1000000, msg.sender);
  }
}

Resources

Documentation

The full documentation is available here.

Contributing

There are two ways to contribute to the Zama fhEVM contracts:

Becoming an approved contributor involves signing our Contributor License Agreement (CLA). Only approved contributors can send pull requests, so please make sure to get in touch before you do.

License

This software is distributed under the BSD-3-Clause-Clear license. If you have any question about the license, please contact us at [email protected].