Set up Foundry
Prerequisites
Option 1: Clone the FHEVM Foundry template (recommended)
1
git clone https://github.com/zama-ai/fhevm-foundry-template
cd fhevm-foundry-template2
forge soldeer install3
forge build
forge test -vvvOption 2: Add forge-fhevm to an existing project
[profile.default]
src = "src"
out = "out"
libs = ["dependencies"]
test = "test"
script = "script"
evm_version = "cancun"
# solc = "0.8.x" # see the template for the version currently tested
[dependencies]
# See the template's foundry.toml for the current versions
forge-std = "..."
"@encrypted-types" = "..."
"@fhevm-solidity" = "..."
forge-fhevm = { git = "https://github.com/zama-ai/forge-fhevm.git", rev = "..." }
[soldeer]
remappings_version = false
recursive_deps = trueVerify the install
Where to go next
Last updated