🤫
The PrivateGHO token enhances the GHO stablecoin with a privacy preserving layer of encryption. The token offers users the ability to hold the token with private balances and transfer hidden amounts.
- Solidity: Smart contracts
- Hyperlane: Cross chain bridge from evm to fhEVM
- fhEVM: Fully Homomorphic Ethereum Virtual Machine for PrivateGHO transactions
- TFHE Solidity Library: Enabling encryption within smart contracts
- Next.js: User interface
- ConnectKit: Wallet login and network interaction
Install docker
Install pnpm
Before being able to run any command, you need to create a .env
file and set a BIP-39 compatible mnemonic as an
environment variable. You can follow the example in .env.example
. If you don't already have a mnemonic, you can use
this website to generate one.
Then, proceed with installing dependencies:
pnpm install
Start a local fhevm docker container that inlcudes everything needed to deploy FHE encrypted smart contracts
# In one terminal, keep it opened
# The node logs are printed
pnpm fhevm:start
To stop:
pnpm fhevm:stop
Compile the smart contracts with Hardhat:
pnpm compile
Compile the smart contracts and generate TypeChain bindings:
pnpm typechain
From the mnemonic in .env file, list all the derived Ethereum adresses:
pnpm task:accounts
In order to interact with the blockchain, one need some coins. This command will give coins to the first address derived from the mnemonic in .env file.
pnpm fhevm:faucet
To get the first derived address from mnemonic
pnpm task:getEthereumAddress
Deploy PrivateGHO contracts
pnpm deploy:contracts
Enter frontend folder and install dependencies
Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
This project is licensed under MIT.