Context
This is a focused slice of #33 (Cheat sheets). viem and wagmi are the modern EVM frontend stack — but the docs are large and developers waste time hunting the same 10 patterns. A single cheat sheet collects them.
What to build
Add cheat-sheets/viem-wagmi-patterns.md with concise, copy-pasteable snippets for:
viem core:
- Create a public client (read) and a wallet client (write)
- Read a contract (
readContract)
- Write to a contract (
writeContract + waitForTransactionReceipt)
- Watch events (
watchContractEvent)
- Get the current chain, switch chains
- Encode/decode function data
wagmi hooks:
useAccount, useConnect, useDisconnect
useReadContract, useWriteContract
useWatchContractEvent
useSwitchChain, useBalance
Each snippet should be a self-contained TypeScript code block, not a full app. Order from "most-used" to "less-used".
Acceptance criteria
Pointers
Complexity
🟢 Good first issue
Context
This is a focused slice of #33 (Cheat sheets). viem and wagmi are the modern EVM frontend stack — but the docs are large and developers waste time hunting the same 10 patterns. A single cheat sheet collects them.
What to build
Add
cheat-sheets/viem-wagmi-patterns.mdwith concise, copy-pasteable snippets for:viem core:
readContract)writeContract+waitForTransactionReceipt)watchContractEvent)wagmi hooks:
useAccount,useConnect,useDisconnectuseReadContract,useWriteContractuseWatchContractEventuseSwitchChain,useBalanceEach snippet should be a self-contained TypeScript code block, not a full app. Order from "most-used" to "less-used".
Acceptance criteria
cheat-sheets/viem-wagmi-patterns.mdexists and renders cleanlyPointers
Complexity
🟢 Good first issue