0.1.0 โ€ข Published 29 days ago

fhevm-contracts v0.1.0

Weekly downloads
-
License
BSD-3-Clause
Repository
-
Last release
29 days ago

fhEVM Contracts

fhEVM contracts is a library for encrypted smart contract development on fhEVM.

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.20;

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

contract MyERC20 is EncryptedERC20 {
  constructor() EncryptedERC20("MyToken", "MYTOKEN") {
    _mint(1000000, msg.sender);
  }
}

Resources

Documentation

Full, comprehensive documentation is available here: https://docs.zama.ai/fhevm.

Citations

To cite fhEVM or the whitepaper in academic papers, please use the following entries:

@Misc{fhEVM,
title={{Private smart contracts on the EVM using homomorphic encryption}},
author={Zama},
year={2023},
note={\url{https://github.com/zama-ai/fhevm}},
}
@techreport{fhEVM,
author = "Morten Dahl, Clรฉment Danjou, Daniel Demmler, Tore Frederiksen, Petar Ivanov,
Marc Joye, Dragos Rotaru, Nigel Smart, Louis Tremblay Thibault
",
title = "Confidential EVM Smart Contracts using Fully Homomorphic Encryption",
institution = "Zama",
year = "2023"
}

Contributing

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

  • Open issues to report bugs and typos, or to suggest new ideas
  • Request to become an official contributor by emailing hello@zama.ai.

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 questions, please contact us at hello@zama.ai.

Support

๐ŸŒŸ If you find this project helpful or interesting, please consider giving it a star on GitHub! Your support helps to grow the community and motivates further development.