Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsJul 28, 2026·3 min de lecture

Scaffold-ETH 2 — Full-Stack Ethereum Development Starter Kit

A modern toolkit for rapidly prototyping and deploying Solidity smart contracts with a Next.js frontend, Hardhat backend, and pre-built React hooks for wallet and contract interaction.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Scaffold-ETH 2
Commande d'installation directe
npx -y tokrepo@latest install d76b5d38-8a60-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

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@latest or fork the GitHub repository directly
  • Configure target networks in hardhat.config.ts and scaffold.config.ts
  • Set deployer private keys via .env files 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.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires