wagmi-react-read

Fetch Ethereum contract data in React apps using wagmi hooks.

Updated Nov 5, 2025
One-click install
npx skills add https://github.com/cyotee/crane --skill wagmi-react-read
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wagmi-react-read
Source: https://github.com/cyotee/crane/tree/main/.claude/skills/wagmi-react-read
Command: npx skills add https://github.com/cyotee/crane --skill wagmi-react-read

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reading contract data from Ethereum in React apps should be straightforward; useReadContract simplifies fetching on-chain data without boilerplate.

Core Features & Use Cases

  • Read contract data with a single hook in React.
  • Watch and auto-refresh on block updates.
  • Perform multiple reads and configure query options for caching and polling.

Quick Start

Install wagmi in your React project and use useReadContract to fetch a contract function result.

Frequently Asked Questions about wagmi-react-read

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read Ethereum smart contract data in a React app?

To read Ethereum smart contract data in a React app, use the useReadContract hook to fetch on-chain results by passing the ABI, address, and functionName without manual boilerplate.

Can I automatically refetch contract data when new Ethereum blocks are mined?

Yes, you can automatically refetch contract data when new Ethereum blocks are mined by enabling the optional watching feature to auto-refresh on-chain block updates.

Do I need wagmi to fetch on-chain data with useReadContract?

Yes, you need wagmi installed in your React environment to use useReadContract, as it handles the underlying Ethereum data-fetching mechanics and query configurations.

How do I handle multiple reads and caching for smart contract queries?

You can handle multiple reads and configure smart contract query caching by passing optional query options to the hook, allowing control over polling intervals and cache behavior.

What is the best way to target a specific block when reading contract data?

The best way to target a specific block when reading contract data is using the blockTag control parameter, ensuring you query the exact on-chain state at a desired block height.