workflowstacks
ai-agent

Wagmi: Simplify Ethereum Apps

Get reactive primitives for Ethereum apps with wagmi, ideal for dapp founders, with 6.7k+ GitHub stars
6,733 stars1,418 forksTypeScriptHealth Score 9/10Updated 7/29/2026100% free · open source
What it does

Wagmi provides a set of reactive primitives to build Ethereum applications, simplifying the process of interacting with the Ethereum blockchain

Install / run
npm install wagmi
When to use it
  • When building a dApp that requires real-time updates from the Ethereum blockchain
  • When needing to simplify complex Ethereum smart contract interactions
  • When creating an application that requires robust error handling for Ethereum transactions
Quick start
  1. 1Import wagmi in your project: `import { createClient } from 'wagmi';`
  2. 2Create a wagmi client: `const client = createClient({ provider: 'https://mainnet.infura.io/v3/YOUR_PROJECT_ID' });`
  3. 3Use the `useAccount` hook to get the current account: `import { useAccount } from 'wagmi'; const { address } = useAccount();`
  4. 4Use the `useBalance` hook to get the current balance: `import { useBalance } from 'wagmi'; const { data: balance } = useBalance({ address });`
  5. 5Subscribe to blockchain events using `useBlockNumber`: `import { useBlockNumber } from 'wagmi'; const { data: blockNumber } = useBlockNumber();`
Ready-to-paste prompt
Get the current Ethereum block number: `import { createClient } from 'wagmi'; const client = createClient({ provider: 'https://mainnet.infura.io/v3/YOUR_PROJECT_ID' }); client.getBlockNumber().then((blockNumber) => console.log(blockNumber));`
Heads up: Make sure to replace `YOUR_PROJECT_ID` with your actual Infura project ID, as the Infura API requires a valid project ID to function correctly
Saves to your device

Topics

dapp
ethereum
hooks
react
typescript
viem
vue
wagmi
web3
How Wagmi: Simplify Ethereum Apps works
Codeflow
Free to inspect

Wagmi: Simplify Ethereum Apps is a very large TypeScript project (~88k lines across 1122 code files, plus 31 test files). Setup is light: installs like a normal app. Reading the code is optional. Last commit this month, MIT license, has a test suite.

Size
Very large codebase
~88k lines · 1122 code files · days to read — use, don't read
Setup
One-command install
Installs like a normal app. Reading the code is optional.
Runs on
Node.js
No API keys detected
TypeScript 99%Vue 1%
Where to start reading
  1. 1
    package.json
    Dependencies and the commands it exposes
What's in each folder
packages/Sub-packages / plugins1150 files
site/Frontend / UI610 files
playgrounds/Folder109 files
scripts/Helper scripts8 files
.github/CI / automation (GitHub Actions)18 files
.changeset/Tool / agent settings3 files
.vscode/Editor / agent settings3 files
.agents/Tool / agent settings2 files
READMEHas testsDocumentedCI checksMIT licenseUpdated this month
Quick Actions
Details
Creator
wevm
Language
TypeScript
Category
ai-agent
Published
11/23/2021

Are you the creator of this tool? Claim your listing → and earn 85% of every sale.