Dev Tooling·EVM
Scaffold-ETH 2
Open-source, forkable full-stack toolkit for building dapps on Ethereum. Bundles Next.js + RainbowKit + wagmi + viem on the frontend with Hardhat or Foundry on the contract side, plus typed contract hooks and a Debug Contracts UI.
- 01rapid dapp prototyping
- 02hackathons & demos
- 03full-stack Solidity + Next.js
- 04auto-generated typed hooks
- 05local-first dev with Burner Wallet
- npx create-eth@latest
- yarn install && yarn chain && yarn deploy && yarn start
| Variable | Scope | Description |
|---|---|---|
| NEXT_PUBLIC_ALCHEMY_API_KEY | Client | Alchemy key used by the default RPC config. |
| NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID | Client | WalletConnect Cloud project ID for RainbowKit. |
| DEPLOYER_PRIVATE_KEY | Server | Deployer key used by Hardhat/Foundry deploy scripts. |
Bootstrap a full-stack dapp with `npx create-eth@latest` and select Hardhat or Foundry when prompted. Three-terminal flow: `yarn chain` (local node), `yarn deploy` (compile + deploy with hot reload), `yarn start` (Next.js at :3000). Read on-chain state with the typed hook `useScaffoldReadContract({ contractName: "YourContract", functionName: "greeting" })` and write with `useScaffoldWriteContract`. Use the built-in `/debug` page to call any function. Add an extension at create time with `npx create-eth@latest -e <extension>` (e.g. `ponder`, `subgraph`, `erc-20`).
- ⚑Scaffold-ETH 2 is a yarn workspaces monorepo — using `npm install` at the root breaks resolution; stick to yarn (or pnpm with the right workspace config).
- ⚑The Burner Wallet stores keys in localStorage and is for dev only — never enable it in production builds.
- ⚑Typed contract hooks are generated from `deployedContracts.ts`; if you change a contract and forget `yarn deploy`, the frontend will reference a stale ABI.
- ⚑Default `targetNetworks` in `scaffold.config.ts` includes `hardhat` — remove it before deploying to mainnet or users will see a chain-mismatch warning.
- ⚑`create-eth` extensions can pin older RainbowKit/wagmi majors; bump versions deliberately and re-test wallet connection flows after upgrading.