scaffold-eth-2

Installation
SKILL.md

Scaffold-ETH 2

Full-stack Ethereum dApp development framework. Monorepo with Foundry (or Hardhat) for contracts and Next.js for the frontend. Ships custom React hooks that auto-wire contract ABIs and addresses from deployment artifacts -- no manual ABI imports, no address management. Includes an auto-generated debug page that gives you read/write UI for every public function on every deployed contract.

What You Probably Got Wrong

Agents trained on pre-2024 data generate Scaffold-ETH 1 code. SE2 is a complete rewrite -- different stack, different hooks, different project structure. Every pattern below is SE2-specific.

  • SE2 is NOT SE1 -- SE1 used Create React App + ethers.js + Hardhat. SE2 uses Next.js 14+ + wagmi + viem + Foundry (default). The codebases share nothing. If you see useContractReader or scaffold-eth/hooks, that is SE1 and will not work.
  • Foundry is the default, not Hardhat -- npx create-eth@latest defaults to Foundry. Hardhat is available via --hardhat flag but Foundry is the recommended path. Do not assume Hardhat unless the user explicitly chose it.
  • Hooks read from deployedContracts.ts, not raw ABI + address -- SE2 hooks take contractName as a string (e.g., "YourContract"). The hook resolves the ABI and address from the auto-generated deployedContracts.ts file. Never pass address and abi directly to SE2 hooks.
  • The debug page reads AND writes -- It auto-generates a UI for ALL public/external functions on every deployed contract. You can call view functions and send transactions directly from the browser. This is not just a read-only viewer.
  • You do NOT need to write frontend boilerplate -- SE2 hooks handle wallet connection, transaction lifecycle, error display, and loading states. A complete contract interaction is 5-10 lines of JSX. Do not recreate wagmi provider setup or wallet connect logic.
  • yarn deploy regenerates deployedContracts.ts -- Every time you deploy, the contract addresses and ABIs are written to packages/nextjs/contracts/deployedContracts.ts. The frontend picks up changes on next page load (hot reload in dev).
  • externalContracts.ts is for contracts you did NOT deploy -- To interact with Uniswap, Aave, or any already-deployed protocol, add the ABI and address to externalContracts.ts. SE2 hooks then treat them the same as your own contracts.

Quick Start

Create a New Project

Installs
1
First Seen
Aug 4, 2026
scaffold-eth-2 — justaname-id/cryptoskills