This is a simple template to show how to use fhevmjs with Vite + React.
npm install
Copy .env.example
to .env
and update the gateway URL, ACL address, and KMS address to match the fhEVM you're using.
npm run dev
The server listens on http://localhost:5173/
npm run build
As an alternative to use the real coprocessor deployed on Sepolia, to help you develop your dApp faster and without needing testnet tokens, you can use a mocked fhevm. Currently, we recommend you to use the ConfidentialERC20
dApp example available on the mockedFrontend
branch of this repository. Follow the README on this branch, and you will be able to deploy exactly the same dApp both on Sepolia as well as on the mocked coprocessor seamlessly.
For more information about fhevmjs, you can read the documentation.