Skip to content

Prajjawalk/LFGHO-fhEVM

Repository files navigation

PrivateGHO | GHO shh

🤫

Overview

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.

Stack

  • 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

Usage

fhEVM Contracts

Pre Requisites

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 fhevm

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

Compile the smart contracts with Hardhat:

pnpm compile

TypeChain

Compile the smart contracts and generate TypeChain bindings:

pnpm typechain

List accounts

From the mnemonic in .env file, list all the derived Ethereum adresses:

pnpm task:accounts

Get some native coins

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

Deploy PrivateGHO contracts

pnpm deploy:contracts

Frontend

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.

License

This project is licensed under MIT.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages