A modern starter template for building Ethereum dApps with SvelteKit 5, Foundry, and DaisyUI.
Inspired by scaffold-eth-2 but built with the Svelte ecosystem.
- Debug Contracts Page - Interactive auto-generated UI to test all contracts you're developing under
foundry/(read & write) - Wallet Integration - Connect MetaMask or any other browser-injected wallet
- Multi-chain Support - Pre-configured for 10+ networks (Mainnet, Sepolia, Arbitrum, Optimism, Base, Polygon, etc.)
- Type-safe Contracts - Full TypeScript types auto-generated from your Solidity ABIs using wagmi/cli
- Auto-updating Contract Data - When you locally deploy, the frontend automatically gets the new contract addresses and ABIs
- Transaction Feedback - Toast notifications for transaction status
- Real-time Events - Live-updating events table on the debug page
- TanStack Query - Efficient data fetching and caching for contract reads
- Full Contract Hot Reload - Deploy & frontend update on any save of .sol files
- Other features from Scaffold-ETH 2:
- Burner Wallet - Auto-generated throwaway wallet for frictionless local development
- Built-in Block Explorer - Browse blocks, transactions, and addresses on any network
- SvelteKit 5 with DaisyUI for a clean, fast UI
- Foundry for blazing-fast smart contract development and testing
- @wagmi/core + Viem for type-safe Web3 interactions
# Install Foundry (using mise - recommended)
mise install
# Set up foundry/lib/forge-std submodule
git submodule update --init --recursive
# Install dependencies for both foundry and web
pnpm install
# Start local Foundry node (in terminal 1)
pnpm chain
# Deploy contracts + generate `web/src/lib/contracts/deployedContracts.ts` (in terminal 2)
pnpm deploy:anvil
# Start the web dev server (in terminal 3)
pnpm dev
# Open http://localhost:5173Your app is now running with:
- Local Foundry node on
http://localhost:8545 - Contracts deployed via Foundry scripts (see
foundry/broadcast/) - Generated contract deployment/ABI map at
web/src/lib/contracts/deployedContracts.ts
The typical development cycle:
pnpm chain # Start local Anvil node
pnpm deploy:anvil # Deploy contracts & generate types
pnpm dev # Start the frontend dev serverRun tests and checks (as executed in CI):
pnpm test:contracts # Run Foundry tests
pnpm test:web # Run frontend tests (unit + E2E)
pnpm check # Type-check all code
pnpm lint # Lint frontend codeSee package.json for the full list of available commands including deployment to testnets, coverage reports, and more.
This is a starter template - fork it, customize it, make it yours!
Suggestions and PRs welcome.
MIT
- scaffold-eth-2 - The original inspiration
- scaffold-eth-svelte5 - More inspiration for the Svelte part
- @wagmi/core - Framework-agnostic Ethereum library
- viem - TypeScript library for Ethereum
- Foundry - Fast, portable, and modular toolkit for Ethereum
- SvelteKit - The fastest way to build web applications
- DaisyUI - Beautiful, themeable UI components