← Ethereum (ethskills)CONTENT HISTORY

Update to Ethereum (ethskills)

Snapshot Oct 24, 2026 · 13:33 UTC · version 0.1.1

Collection source: downloaded plugin package.

WHAT CHANGED

First saved snapshot

No earlier snapshot is available to establish a change.

Save Ethereum (ethskills) and check future changes in Following.

Up to 10 plugins free · no card required.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "description": "How an AI agent plans, builds, and deploys a complete Ethereum dApp. The three-phase build system for Scaffold-ETH 2 projects. Use when building a full application on Ethereum — from contracts to frontend to production deployment on IPFS.",
  "included_files": [],
  "name": "orchestration",
  "skill_md_contents": "---\nname: orchestration\ndescription: How an AI agent plans, builds, and deploys a complete Ethereum dApp. The three-phase build system for Scaffold-ETH 2 projects. Use when building a full application on Ethereum — from contracts to frontend to production deployment on IPFS.\n---\n\n# dApp Orchestration\n\n## What You Probably Got Wrong\n\n**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.\n\n**There are three phases. Never skip or combine them.** Contracts → Frontend → Production. Each has validation gates.\n\n## The Three-Phase Build System\n\n| Phase | Environment | What Happens |\n|-------|-------------|-------------|\n| **Phase 1** | Local fork | Contracts + UI on localhost. Iterate fast. |\n| **Phase 2** | Live network + local UI | Deploy contracts to mainnet/L2. Test with real state. Polish UI. |\n| **Phase 3** | Production | Deploy frontend to IPFS/Vercel. Final QA. |\n\n## Phase 1: Scaffold (Local)\n\n### 1.1 Contracts\n\n```bash\nnpx create-eth@latest my-dapp\ncd my-dapp && yarn install\nyarn fork --network base  # Terminal 1: fork of real chain (or mainnet, your target chain)\nyarn deploy               # Terminal 2: deploy contracts\n```\n\n> **Always fork, never `yarn chain`.** `yarn fork` does everything `yarn chain` does AND gives you real protocol state — Uniswap, USDC, Aave, whale balances, everything already deployed (verified addresses: `addresses/SKILL.md`). `yarn chain` gives 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.\n\n**Critical steps:**\n1. Write contracts in `packages/foundry/contracts/` (or `packages/hardhat/contracts/`)\n2. Write deploy script\n3. Add ALL external contracts to `packages/nextjs/contracts/externalContracts.ts` — BEFORE Phase 1.2\n4. Write tests (≥90% coverage)\n5. Audit contracts before moving to frontend — fetch [audit/SKILL.md](https://ethskills.com/audit/SKILL.md) and run through it\n\n**Validate:** `yarn deploy` succeeds. `deployedContracts.ts` auto-generated. Tests pass.\n\n### 1.2 Frontend\n\n```bash\nyarn fork --network base  # Terminal 1: fork of real chain (has Uniswap, USDC, etc.)\nyarn deploy --watch       # Terminal 2: auto-redeploy on changes\nyarn start                # Terminal 3: Next.js at localhost:3000\n```\n\n**USE SCAFFOLD HOOKS, NOT RAW WAGMI:**\n\n```typescript\n// Read\nconst { data } = useScaffoldReadContract({\n  contractName: \"YourContract\",\n  functionName: \"balanceOf\",\n  args: [address],\n  watch: true,\n});\n\n// Write\nconst { writeContractAsync, isMining } = useScaffoldWriteContract(\"YourContract\");\nawait writeContractAsync({\n  functionName: \"swap\",\n  args: [tokenIn, tokenOut, amount],\n  onBlockConfirmation: (receipt) => console.log(\"Done!\", receipt),\n});\n\n// Events\nconst { data: events } = useScaffoldEventHistory({\n  contractName: \"YourContract\",\n  eventName: \"SwapExecuted\",\n  fromBlock: 0n,\n  watch: true,\n});\n```\n\n### The Three-Button Flow (MANDATORY)\n\nAny token interaction shows ONE button at a time:\n1. **Switch Network** (if wrong chain)\n2. **Approve Token** (if allowance insufficient)\n3. **Execute Action** (only after 1 & 2 satisfied)\n\nNever show Approve and Execute simultaneously.\n\n### UX Rules\n\n- **Human-readable amounts:** `formatEther()` / `formatUnits()` for display, `parseEther()` / `parseUnits()` for contracts\n- **Loading states everywhere:** `isLoading`, `isMining` on all async operations\n- **Disable buttons during pending txs** (blockchains take 5-12s)\n- **Never use infinite approvals** — approve exact amount or 3-5x\n- **Helpful errors:** Parse \"insufficient funds,\" \"user rejected,\" \"execution reverted\" into plain language\n\n**Validate:** Full user journey works with real wallet on localhost. All edge cases handled.\n\n## 🚨 NEVER COMMIT SECRETS TO GIT\n\n**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.\n\n**This means ALL secrets — not just wallet private keys:**\n- **Wallet private keys** — funds drained in seconds\n- **API keys** — Alchemy, Infura, Etherscan, WalletConnect project IDs\n- **RPC URLs with embedded keys** — e.g. `https://base-mainnet.g.alchemy.com/v2/YOUR_KEY`\n- **OAuth tokens, passwords, bearer tokens**\n\n**⚠️ Common SE2 Trap: `scaffold.config.ts`**\n\n`rpcOverrides` and `alchemyApiKey` in `scaffold.config.ts` are committed to Git. **NEVER paste API keys directly into this file.** Use environment variables:\n\n```typescript\n// ❌ WRONG — key committed to public repo\nrpcOverrides: {\n  [chains.base.id]: \"https://base-mainnet.g.alchemy.com/v2/8GVG8WjDs-LEAKED\",\n},\n\n// ✅ RIGHT — key stays in .env.local\nrpcOverrides: {\n  [chains.base.id]: process.env.NEXT_PUBLIC_BASE_RPC || \"https://mainnet.base.org\",\n},\n```\n\n**Before every `git add` or `git commit`:**\n```bash\n# Check for leaked secrets\ngit diff --cached --name-only | grep -iE '\\.env|key|secret|private'\ngrep -rn \"0x[a-fA-F0-9]\\{64\\}\" packages/ --include=\"*.ts\" --include=\"*.js\" --include=\"*.sol\"\n# Check for hardcoded API keys in config files\ngrep -rn \"g.alchemy.com/v2/[A-Za-z0-9]\" packages/ --include=\"*.ts\" --include=\"*.js\"\ngrep -rn \"infura.io/v3/[A-Za-z0-9]\" packages/ --include=\"*.ts\" --include=\"*.js\"\n# If ANYTHING matches, STOP. Move the secret to .env and add .env to .gitignore.\n```\n\n**Your `.gitignore` MUST include:**\n```\n.env\n.env.*\n*.key\nbroadcast/\ncache/\nnode_modules/\n```\n\n**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.\n\nSee `wallets/SKILL.md` for full key safety guide, what to do if you've already leaked a key, and safe patterns for deployment.\n\n## Phase 2: Live Contracts + Local UI\n\n1. Update `scaffold.config.ts`: `targetNetworks: [mainnet]` (or your L2)\n2. Fund deployer: `yarn generate` → `yarn account` → send real ETH\n3. Deploy: `yarn deploy --network mainnet`\n4. Verify immediately after deploy: `yarn verify --network mainnet`\n   - **No block explorer API key needed** — SE2 handles this for you\n   - Run it right after deploy, not later. Don't skip it.\n5. Test with real wallet, small amounts ($1-10)\n6. Polish UI — remove SE2 branding, custom styling\n\n**Design rule:** NO LLM SLOP. No generic purple gradients. Make it unique.\n\n**Validate:** Contracts verified on block explorer. Full journey works with real contracts.\n\n## Phase 3: Production Deploy\n\n### Pre-deploy Checklist\n- `burnerWalletMode: \"localNetworksOnly\"` in scaffold.config.ts (prevents burner wallet on prod)\n- Update metadata (title, description, OG image 1200x630px)\n- Restore any test values to production values\n- Run a full frontend QA audit — fetch [qa/SKILL.md](https://ethskills.com/qa/SKILL.md) and give it to a separate agent before deploying\n\n### Deploy\n\n**IPFS** — use [BGIPFS](https://www.bgipfs.com/SKILL.md) for decentralized deploys (fetch that skill for full details). It's built into SE2 — no setup needed:\n```bash\nyarn ipfs\n# → https://{CID}.ipfs.community.bgipfs.com/\n```\nNote: IPFS only works with static content — no server-side rendering, API endpoints, or functions.\n\n**Vercel:**\n```bash\nyarn vercel\n```\n\n### Production QA\n- [ ] App loads on public URL\n- [ ] Wallet connects, network switching works\n- [ ] Read + write contract operations work\n- [ ] No console errors\n- [ ] Burner wallet NOT showing\n- [ ] OG image works in link previews\n- [ ] Mobile responsive\n- [ ] Tested with MetaMask, Rainbow, WalletConnect\n\n## Phase Transition Rules\n\n**Phase 3 bug → go back to Phase 2** (fix with local UI + prod contracts)\n**Phase 2 contract bug → go back to Phase 1** (fix locally, write regression test, redeploy)\n**Never hack around bugs in production.**\n\n## Key SE2 Directories\n\n```\npackages/\n├── foundry/contracts/          # Solidity contracts\n├── foundry/script/             # Deploy scripts\n├── foundry/test/               # Tests\n└── nextjs/\n    ├── app/                    # Pages\n    ├── components/             # React components\n    ├── contracts/\n    │   ├── deployedContracts.ts   # AUTO-GENERATED (don't edit)\n    │   └── externalContracts.ts   # YOUR external contracts (edit this)\n    ├── hooks/scaffold-eth/     # USE THESE hooks\n    └── scaffold.config.ts      # Main config\n```\n\n## Resources\n\n- **SE2 Docs:** https://docs.scaffoldeth.io/\n- **SE2 Skill:** https://docs.scaffoldeth.io/SKILL.md\n- **UI Components:** https://ui.scaffoldeth.io/\n- **SE2 AGENTS.md:** https://github.com/scaffold-eth/scaffold-eth-2/blob/main/AGENTS.md\n"
}

SHA-256 of public snapshot: 668ec9825fb743faaa6acf9ae0134956c05f4aec4ebe5664ad3d758bbabfb22d