Skip to content

Inco-fhevm/inco-lite-template

Repository files navigation

Inco Lite - Hardhat Template

This repository provides a complete Hardhat setup for testing reencryption, decryption, and ciphertext formation in smart contracts.

Setup Instructions

Below, we run a local node and a local covalidator (taken from the Docker Compose file), and run Hardhat tests against it.

1. Clone the Repository

git clone <your-repo-url>
cd into_your_repo

2. Install Dependencies

pnpm install

3. Run a local node

The current instructions will run a local node and a local covalidator. If you are using this template against another network, e.g. Base Sepolia, skip this step.

docker compose up

3. Configure Environment Variables

Fill in your own information in the .env file, you can take this as example:

# This should be a private key funded with native tokens.
PRIVATE_KEY_ANVIL="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
PRIVATE_KEY_BASE_SEPOLIA=""

# This should be a seed phrase used to test functionalities with different accounts.  
# You can send funds from the main wallet to this whenever needed.
SEED_PHRASE="garden cage click scene crystal fat message twice rubber club choice cool"

# This should be an RPC URL provided by a proper provider  
# that supports the eth_getLogs() and eth_getFilteredLogs() methods.
LOCAL_CHAIN_RPC_URL="http://localhost:8545"
BASE_SEPOLIA_RPC_URL="https://base-sepolia-rpc.publicnode.com"

4. Compile Smart Contracts

pnpm hardhat compile

5. Run Tests

pnpm hardhat test --network anvil

Or, if running against another network, e.g. Base Sepolia, run

pnpm hardhat test --network baseSepolia

Features

  • End-to-end testing of encryption, reencryption and decryption functionalities.
  • Hardhat-based test framework.
  • Supports reencryption and ciphertext validation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •