📦 1. Why Foundry?

⚡ Problem with Remix & Hardhat:

In Remix, every tiny code change requires you to manually redeploy the contract and re-test every function via the UI. This is slow, manual, and doesn’t scale.

Hardhat is powerful but relies on JavaScript for tests, which can be a barrier if you only know Solidity.

🎯 Foundry’s Solution:

✅ Key Advantages:


💻 2. Installation & Setup 💻

🛠️ Prerequisites (Especially for Windows Users)

Foundry’s CLI tools don’t work well with Windows PowerShell or CMD.

✅ Solutions:

  1. Install WSL (Windows Subsystem for Linux)Recommended
    • Follow Microsoft’s official WSL setup guide.
    • Install Git, configure your email, etc.
  2. Use Git Bash — A simpler alternative that comes with Git for Windows.

🍎 Mac/Linux Users: You’re good to go!


📥 Installing Foundry

Use the official foundryup installer script.

# Download and run the installer
curl -L <https://foundry.paradigm.xyz> | bash

# Initialize Foundry (installs forge, cast, anvil, chisel)
foundryup

✅ Verify Installation:

forge --version
cast --version
anvil --version
chisel --version

You should see version numbers for all tools.


🏗️ 3. Creating a New Project 🏗️