Introduction
Scaffold-ETH 2 is an open-source toolkit that gives developers a complete starting point for building decentralized applications on Ethereum. It wires together Hardhat for smart contract development, Next.js for the frontend, and pre-built React hooks so you can go from zero to a working dApp in minutes rather than days.
What Scaffold-ETH 2 Does
- Provides a monorepo with Hardhat and Next.js pre-configured to work together
- Includes custom React hooks (useScaffoldContractRead, useScaffoldContractWrite) for seamless contract interaction
- Auto-generates a debug page that lets you call any contract function from the browser
- Supports hot-reload for both Solidity contracts and the frontend
- Ships with wagmi and viem integrations for wallet connectivity out of the box
Architecture Overview
The project is a Yarn workspaces monorepo with two packages: a Hardhat project that compiles, tests, and deploys Solidity contracts, and a Next.js app that consumes deployed contract ABIs. A shared config keeps chain IDs, RPC endpoints, and deployed addresses in sync. The frontend uses wagmi hooks under the hood, wrapped in scaffold-specific hooks that automatically resolve contract addresses and ABIs from the deploy artifacts.
Self-Hosting & Configuration
- Clone and install with
npx create-eth@latestor fork the GitHub repository directly - Configure target networks in
hardhat.config.tsandscaffold.config.ts - Set deployer private keys via
.envfiles in the Hardhat package - Switch between local Hardhat Network, testnets, and mainnet with a single config change
- Deploy the Next.js frontend to Vercel, Netlify, or any static host
Key Features
- One-command project scaffolding with interactive chain and extension selection
- Block explorer integration for deployed contracts
- Burner wallets for fast local testing without MetaMask
- TypeScript throughout both packages with strict typing
- Extensible via community extensions for subgraphs, IPFS, and more
Comparison with Similar Tools
- Hardhat alone requires manual frontend setup; Scaffold-ETH 2 bundles a production-ready UI
- Foundry is faster for pure Solidity work but lacks an integrated frontend scaffold
- thirdweb offers managed infrastructure; Scaffold-ETH 2 is fully self-hosted and open
- Create React App + ethers needs significant boilerplate; Scaffold-ETH 2 eliminates it
- Truffle provides similar tooling but is built on older patterns; Scaffold-ETH 2 uses modern Next.js and wagmi
FAQ
Q: Do I need to know Solidity to use Scaffold-ETH 2? A: Basic Solidity knowledge helps, but the included sample contracts and debug UI let you experiment interactively while learning.
Q: Can I deploy to chains other than Ethereum mainnet? A: Yes. Any EVM-compatible chain (Polygon, Arbitrum, Optimism, Base) works by adding the network config to Hardhat and scaffold config.
Q: Is this suitable for production dApps? A: It is designed as a prototyping starter, but many teams use it as the foundation for production apps after customizing the frontend and adding proper testing.
Q: How do I add a new smart contract?
A: Create a new .sol file in packages/hardhat/contracts, write a deploy script in deploy/, then run yarn deploy. The frontend picks up the new ABI automatically.