scaffold-eth-2

Build full-stack Ethereum dApps with Foundry contracts, Next.js frontend, and auto-wired React hooks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve? AI agents trained on pre-2024 data generate outdated Scaffold-ETH 1 code and manually wire contract ABIs and addresses, producing broken dApp boilerplate. This Skill provides current Scaffold-ETH 2 patterns so contract deployments automatically propagate ABIs and addresses to the frontend without manual configuration. ## Core Features & Use Cases - Custom React Hooks: Use useScaffoldReadContract, useScaffoldWriteContract, useDeployedContractInfo, useScaffoldEventHistory, and useTransactor to interact with contracts by name instead of raw ABI and address. - Contract Hot Reload: Run yarn deploy to recompile Solidity, redeploy, and regenerate deployedContracts.ts so the Next.js frontend picks up changes automatically. - Auto-Generated Debug Page: Test every public read and write function on deployed contracts directly from the browser at /debug without writing frontend code. - Use Case: Scaffold a token vendor dApp by writing the Solidity contracts, running yarn chain, yarn deploy, and yarn start, then building a buy/sell UI in under 50 lines of JSX using SE2 hooks and components. ## Quick Start Create a new Scaffold-ETH 2 project with Foundry, deploy the starter contract to a local chain, and build a frontend 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 follow the CLI prompts for project name and framework. 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 I read and write contract state in Scaffold-ETH 2?

Use useScaffoldReadContract with contractName and functionName for reads, and useScaffoldWriteContract for transactions. Both hooks resolve the ABI and address from deployedContracts.ts automatically, so you never pass address or abi directly.

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

Scaffold-ETH 2 is a complete rewrite using Next.js, wagmi, viem, and Foundry, while SE1 used Create React App, ethers.js, and Hardhat. SE1 hooks like useContractReader do not exist in SE2 and SE1 code will not work.

How do I interact with external contracts like Uniswap in Scaffold-ETH 2?

Add the contract address and ABI to packages/nextjs/contracts/externalContracts.ts, keyed by chain ID. SE2 hooks and the debug page then treat external contracts exactly like your own deployed contracts.

Why does my Scaffold-ETH 2 frontend show contract not found?

The contract was not deployed to the connected chain or deployedContracts.ts was not regenerated. Run yarn deploy again, confirm scaffold.config.ts targets the correct chain, and verify your wallet is on the same network.

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

Deploy contracts to mainnet with yarn deploy --network mainnet, verify them on Etherscan, set targetNetworks to mainnet in scaffold.config.ts, and deploy the Next.js frontend to Vercel with Alchemy and WalletConnect environment variables configured.