1

Prerequisites

We recommend installing nvm (Node Version Manager) first and then install Node.js with nvm.

Install Node.js:

nvm install node

Install pnpm:

npm install -g pnpm
2

Setting up your environment

  1. Clone the template project:
git clone https://github.com/Inco-fhevm/inco-lite-template.git
cd inco-lite-template
  1. Install dependencies:
pnpm install
  1. Set up .env file. You can use the values below, taken from the README:
# 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"

If you don’t have a mnemonic, you can generate one using this website or use our default test accounts. We recommend using RPC providers instead of public endpoints for better log access.

  1. Compile contracts:
pnpm hardhat compile
  1. Run tests:
pnpm hardhat test --network anvil

Next Step

Now that you have deployed and tested the contract, let’s understand how it works.