scaffold-eth-2

Build full-stack Ethereum dApps with Foundry contracts and Next.js frontend hooks.

6|20|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/andresdefi/cryptoskills --skill scaffold-eth-2-andresdefi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scaffold-eth-2
Source: https://github.com/andresdefi/cryptoskills/tree/main/skills/scaffold-eth-2
Command: npx skills add https://github.com/andresdefi/cryptoskills --skill scaffold-eth-2-andresdefi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents trained on pre-2024 data generate outdated Scaffold-ETH 1 code with wrong stacks, wrong hooks, and manual ABI management. This Skill provides current Scaffold-ETH 2 patterns so agents generate working full-stack dApp code with auto-wired contract bindings instead of hallucinated boilerplate. ## Core Features & Use Cases - Custom React Hooks: Generate code using useScaffoldReadContract, useScaffoldWriteContract, useDeployedContractInfo, useScaffoldEventHistory, and useTransactor that resolve ABIs and addresses from deployedContracts.ts automatically. - Three-Phase Build Workflow: Guide projects from local Anvil development through Sepolia testnet to mainnet production with Vercel frontend deployment and Etherscan verification. - External Contract Integration: Add third-party protocols like Uniswap or WETH to externalContracts.ts so SE2 hooks and the debug page treat them like your own contracts. - Use Case: Scaffold a token vendor dApp with an ERC-20 contract, Foundry deploy script, Foundry tests, and a buy/sell Next.js page in a single session. ## Quick Start Create a new Scaffold-ETH 2 project with Foundry, deploy the starter contract locally, and build a Next.js page that reads and writes contract state using SE2 hooks.

Frequently Asked Questions about scaffold-eth-2

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a new Scaffold-ETH 2 project?

Run npx create-eth@latest and the CLI prompts for a project name and framework choice. Foundry is the default; pass the --hardhat flag to use Hardhat instead. Then run yarn chain, yarn deploy, and yarn start in three terminals.

How do SE2 hooks read contract data without an ABI?

SE2 hooks like useScaffoldReadContract take a contractName string and resolve the ABI and address from the auto-generated deployedContracts.ts file. Running yarn deploy regenerates this file after every deployment, so you never pass address and abi directly.

What is the difference between Scaffold-ETH 1 and Scaffold-ETH 2?

SE1 used Create React App with ethers.js and Hardhat, while SE2 uses Next.js 14+ with wagmi, viem, and Foundry by default. The codebases share nothing, so SE1 patterns like useContractReader will not work in SE2.

Can I use Scaffold-ETH 2 with contracts I did not deploy?

Yes, add the contract address and ABI to externalContracts.ts keyed by chain ID. SE2 hooks and the debug page then treat external contracts like Uniswap or WETH exactly like your own deployed contracts.

Why does the debug page show no contracts after deployment?

The debug page reads from deployedContracts.ts, so an empty page means the file was not regenerated or the chain ID does not match your wallet. Run yarn deploy again and confirm scaffold.config.ts targets the correct network.

How do I deploy a Scaffold-ETH 2 app to production?

Deploy contracts to mainnet with forge script using --broadcast and --verify, regenerate bindings with yarn deploy --network mainnet, set targetNetworks to mainnet in scaffold.config.ts, and deploy the Next.js frontend to Vercel with your RPC and WalletConnect environment variables.