{"id":29171946,"url":"https://github.com/zama-ai/fhevm-contracts","last_synced_at":"2026-05-09T16:02:26.321Z","repository":{"id":229864974,"uuid":"730134298","full_name":"zama-ai/fhevm-contracts","owner":"zama-ai","description":"A standard contract library for the fhEVM ecosystem","archived":false,"fork":false,"pushed_at":"2024-04-05T14:50:31.000Z","size":560,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-04-14T11:50:12.869Z","etag":null,"topics":["contracts","fhe","fhevm","solidity","tfhe"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zama-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-12-11T09:27:59.000Z","updated_at":"2024-04-23T14:29:19.908Z","dependencies_parsed_at":"2024-04-05T13:27:42.817Z","dependency_job_id":"45e0fa69-ca3c-451c-8293-9459d869c70b","html_url":"https://github.com/zama-ai/fhevm-contracts","commit_stats":null,"previous_names":["zama-ai/fhevm-contracts"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/zama-ai/fhevm-contracts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zama-ai%2Ffhevm-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zama-ai%2Ffhevm-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zama-ai%2Ffhevm-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zama-ai%2Ffhevm-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zama-ai","download_url":"https://codeload.github.com/zama-ai/fhevm-contracts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zama-ai%2Ffhevm-contracts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262969880,"owners_count":23392530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contracts","fhe","fhevm","solidity","tfhe"],"created_at":"2025-07-01T13:09:08.022Z","updated_at":"2026-05-09T16:02:21.271Z","avatar_url":"https://github.com/zama-ai.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fhEVM Contracts\n\n## Description\n\nfhEVM contracts is a Solidity library for secure smart-contract development using\n[fhEVM](https://github.com/zama-ai/fhevm) and TFHE.\n\n## Getting Started\n\n### Installation\n\nYou can import this repo using your package manager.\n\n```bash\n# Using npm\nnpm install fhevm-contracts\n\n# Using Yarn\nyarn add fhevm-contracts\n\n# Using pnpm\npnpm add fhevm-contracts\n```\n\n### Simple contract\n\nTo write Solidity contracts that use `TFHE` and/or `Gateway`, it is required to set different contract addresses.\n\nFortunately, [the fhevm repo](https://github.com/zama-ai/fhevm), one of this repo's dependencies, exports config files\nthat can be inherited to simplify the process. The config should be the first to be imported in the order of the\ninherited contracts.\n\n#### Using the mock network (for testing)\n\n```solidity\n// SPDX-License-Identifier: BSD-3-Clause-Clear\npragma solidity ^0.8.24;\n\nimport { SepoliaZamaFHEVMConfig } from \"fhevm/config/ZamaFHEVMConfig.sol\";\nimport { ConfidentialERC20 } from \"fhevm-contracts/contracts/token/ERC20/ConfidentialERC20.sol\";\n\ncontract MyERC20 is SepoliaZamaFHEVMConfig, ConfidentialERC20 {\n  constructor() ConfidentialERC20(\"MyToken\", \"MYTOKEN\") {\n    _unsafeMint(1000000, msg.sender);\n  }\n}\n```\n\n#### Using Sepolia\n\n```solidity\n// SPDX-License-Identifier: BSD-3-Clause-Clear\npragma solidity ^0.8.24;\n\nimport { SepoliaZamaFHEVMConfig } from \"fhevm/config/ZamaFHEVMConfig.sol\";\nimport { ConfidentialERC20 } from \"fhevm-contracts/contracts/token/ERC20/ConfidentialERC20.sol\";\n\ncontract MyERC20 is SepoliaZamaFHEVMConfig, ConfidentialERC20 {\n  constructor() ConfidentialERC20(\"MyToken\", \"MYTOKEN\") {\n    _unsafeMint(1000000, msg.sender);\n  }\n}\n```\n\n## Available contracts\n\nThese Solidity templates include governance-related and token-related contracts.\n\n### Finance\n\n- [ConfidentialVestingWallet](./contracts/finance/ConfidentialVestingWallet.sol)\n- [ConfidentialVestingWalletCliff](./contracts/finance/ConfidentialVestingWalletCliff.sol)\n\n### Token\n\n- [ConfidentialERC20](./contracts/token/ERC20/ConfidentialERC20.sol)\n- [ConfidentialERC20Mintable](./contracts/token/ERC20/extensions/ConfidentialERC20Mintable.sol)\n- [ConfidentialERC20WithErrors](./contracts/token/ERC20/extensions/ConfidentialERC20WithErrors.sol)\n- [ConfidentialERC20WithErrorsMintable](./contracts/token/ERC20/extensions/ConfidentialERC20WithErrorsMintable.sol)\n- [ConfidentialERC20Wrapped](./contracts/token/ERC20/ConfidentialERC20Wrapped.sol)\n- [ConfidentialWETH](./contracts/token/ERC20/ConfidentialWETH.sol)\n\n### Governance\n\n- [ConfidentialERC20Votes](./contracts/governance/ConfidentialERC20Votes.sol)\n- [ConfidentialGovernorAlpha](./contracts/governance/ConfidentialGovernorAlpha.sol)\n\n### Utils\n\n- [EncryptedErrors](./contracts/utils/EncryptedErrors.sol)\n\n## Contributing\n\nThere are two ways to contribute to the Zama fhEVM contracts:\n\n- [Open issues](https://github.com/zama-ai/fhevm-contracts/issues/new/choose) to report bugs and typos, or to suggest\n  new ideas.\n- Request to become an official contributor by emailing hello@zama.ai.\n\nBecoming an approved contributor involves signing our Contributor License Agreement (CLA). Only approved contributors\ncan send pull requests, so please make sure to get in touch before you do.\n\n### License\n\n\u003e [!CAUTION] Smart contracts are a nascent technology that carry a high level of technical risk and uncertainty. You are\n\u003e solely responsible for any use of the fhEVM Contracts and you assume all risks associated with any such use.\n\nThis software is distributed under the **BSD-3-Clause-Clear** license. If you have any question about the license,\nplease contact us at hello@zama.ai.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzama-ai%2Ffhevm-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzama-ai%2Ffhevm-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzama-ai%2Ffhevm-contracts/lists"}