From ethskills
Orchestrates Ethereum dApp builds with Scaffold-ETH 2's three-phase system: local fork for contracts/UI, live network deployment, IPFS/Vercel production.
npx claudepluginhub austintgriffith/ethskills --plugin ethskillsThis skill uses the workspace's default tool permissions.
**SE2 has specific patterns you must follow.** Generic "build a dApp" advice won't work. SE2 auto-generates `deployedContracts.ts` — DON'T edit it. Use Scaffold hooks, NOT raw wagmi. External contracts go in `externalContracts.ts` BEFORE building the frontend.
Guides Ethereum dApp production deployment: Foundry fork setup, IPFS/Vercel deploys, ENS subdomains, checklists. For Scaffold-ETH 2 and similar frontends.
Builds production-ready Web3 apps, smart contracts in Solidity/Rust/Vyper, and decentralized systems for DeFi, NFTs, DAOs across Ethereum L2s, Solana, Cosmos.
Builds production-ready Web3 applications, smart contracts, and decentralized systems. Implements DeFi protocols, NFT platforms, DAOs, and enterprise blockchain integrations.
Share bugs, ideas, or general feedback.
SE2 has specific patterns you must follow. Generic "build a dApp" advice won't work. SE2 auto-generates deployedContracts.ts — DON'T edit it. Use Scaffold hooks, NOT raw wagmi. External contracts go in externalContracts.ts BEFORE building the frontend.
There are three phases. Never skip or combine them. Contracts → Frontend → Production. Each has validation gates.
| Phase | Environment | What Happens |
|---|---|---|
| Phase 1 | Local fork | Contracts + UI on localhost. Iterate fast. |
| Phase 2 | Live network + local UI | Deploy contracts to mainnet/L2. Test with real state. Polish UI. |
| Phase 3 | Production | Deploy frontend to IPFS/Vercel. Final QA. |
npx create-eth@latest my-dapp
cd my-dapp && yarn install
yarn fork --network base # Terminal 1: fork of real chain (or mainnet, your target chain)
yarn deploy # Terminal 2: deploy contracts
Always fork, never
yarn chain.yarn forkdoes everythingyarn chaindoes AND gives you real protocol state — Uniswap, USDC, Aave, whale balances, everything already deployed (verified addresses:addresses/SKILL.md).yarn chaingives you an empty chain that tempts you into writing mock contracts you don't need. Don't mock what already exists onchain — just fork it.
Critical steps:
packages/foundry/contracts/ (or packages/hardhat/contracts/)packages/nextjs/contracts/externalContracts.ts — BEFORE Phase 1.2Validate: yarn deploy succeeds. deployedContracts.ts auto-generated. Tests pass.
yarn fork --network base # Terminal 1: fork of real chain (has Uniswap, USDC, etc.)
yarn deploy --watch # Terminal 2: auto-redeploy on changes
yarn start # Terminal 3: Next.js at localhost:3000
USE SCAFFOLD HOOKS, NOT RAW WAGMI:
// Read
const { data } = useScaffoldReadContract({
contractName: "YourContract",
functionName: "balanceOf",
args: [address],
watch: true,
});
// Write
const { writeContractAsync, isMining } = useScaffoldWriteContract("YourContract");
await writeContractAsync({
functionName: "swap",
args: [tokenIn, tokenOut, amount],
onBlockConfirmation: (receipt) => console.log("Done!", receipt),
});
// Events
const { data: events } = useScaffoldEventHistory({
contractName: "YourContract",
eventName: "SwapExecuted",
fromBlock: 0n,
watch: true,
});
Any token interaction shows ONE button at a time:
Never show Approve and Execute simultaneously.
formatEther() / formatUnits() for display, parseEther() / parseUnits() for contractsisLoading, isMining on all async operationsValidate: Full user journey works with real wallet on localhost. All edge cases handled.
Before touching Phase 2, read this. AI agents are the #1 source of leaked credentials on GitHub. Bots scrape repos in real-time and exploit leaked secrets within seconds.
This means ALL secrets — not just wallet private keys:
https://base-mainnet.g.alchemy.com/v2/YOUR_KEY⚠️ Common SE2 Trap: scaffold.config.ts
rpcOverrides and alchemyApiKey in scaffold.config.ts are committed to Git. NEVER paste API keys directly into this file. Use environment variables:
// ❌ WRONG — key committed to public repo
rpcOverrides: {
[chains.base.id]: "https://base-mainnet.g.alchemy.com/v2/8GVG8WjDs-LEAKED",
},
// ✅ RIGHT — key stays in .env.local
rpcOverrides: {
[chains.base.id]: process.env.NEXT_PUBLIC_BASE_RPC || "https://mainnet.base.org",
},
Before every git add or git commit:
# Check for leaked secrets
git diff --cached --name-only | grep -iE '\.env|key|secret|private'
grep -rn "0x[a-fA-F0-9]\{64\}" packages/ --include="*.ts" --include="*.js" --include="*.sol"
# Check for hardcoded API keys in config files
grep -rn "g.alchemy.com/v2/[A-Za-z0-9]" packages/ --include="*.ts" --include="*.js"
grep -rn "infura.io/v3/[A-Za-z0-9]" packages/ --include="*.ts" --include="*.js"
# If ANYTHING matches, STOP. Move the secret to .env and add .env to .gitignore.
Your .gitignore MUST include:
.env
.env.*
*.key
broadcast/
cache/
node_modules/
SE2 handles deployer keys by default — yarn generate creates a .env with the deployer key, and .gitignore excludes it. Don't override this pattern. Don't copy keys into scripts, config files, or deploy logs. This includes RPC keys, API keys, and any credential — not just wallet keys.
See wallets/SKILL.md for full key safety guide, what to do if you've already leaked a key, and safe patterns for deployment.
scaffold.config.ts: targetNetworks: [mainnet] (or your L2)yarn generate → yarn account → send real ETHyarn deploy --network mainnetyarn verify --network mainnet
Design rule: NO LLM SLOP. No generic purple gradients. Make it unique.
Validate: Contracts verified on block explorer. Full journey works with real contracts.
burnerWalletMode: "localNetworksOnly" in scaffold.config.ts (prevents burner wallet on prod)IPFS — use BGIPFS for decentralized deploys (fetch that skill for full details). It's built into SE2 — no setup needed:
yarn ipfs
# → https://{CID}.ipfs.community.bgipfs.com/
Note: IPFS only works with static content — no server-side rendering, API endpoints, or functions.
Vercel:
yarn vercel
Phase 3 bug → go back to Phase 2 (fix with local UI + prod contracts) Phase 2 contract bug → go back to Phase 1 (fix locally, write regression test, redeploy) Never hack around bugs in production.
packages/
├── foundry/contracts/ # Solidity contracts
├── foundry/script/ # Deploy scripts
├── foundry/test/ # Tests
└── nextjs/
├── app/ # Pages
├── components/ # React components
├── contracts/
│ ├── deployedContracts.ts # AUTO-GENERATED (don't edit)
│ └── externalContracts.ts # YOUR external contracts (edit this)
├── hooks/scaffold-eth/ # USE THESE hooks
└── scaffold.config.ts # Main config