viem

Provide a type-safe TypeScript interface for Ethereum RPC actions.

Updated Sep 29, 2025
One-click install
npx skills add https://github.com/cyotee/manamesh --skill viem-cyotee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: viem
Source: https://github.com/cyotee/manamesh/tree/main/.opencode/skills/viem
Command: npx skills add https://github.com/cyotee/manamesh --skill viem-cyotee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

viem provides a type-safe, ergonomic way to interact with Ethereum from TypeScript, eliminating boilerplate and manual RPC handling.

Core Features & Use Cases

  • Typed clients and transports (Public, Wallet, Test) with multiple transports (HTTP, WebSocket, Custom, Fallback).
  • Rich RPC actions for common Ethereum operations (getBalance, getBlock, getBlockNumber, getTransaction, getTransactionReceipt, getLogs, readContract, writeContract, deployContract, simulateContract, multicall, etc.) with strong typing and chain support.
  • Real-world use: build a dApp that reads on-chain data and submits transactions with compile-time type safety and auto-completion.

Quick Start

Install viem and create a public client connected to an Ethereum node to begin querying the network.

Frequently Asked Questions about viem

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

FAQPage Schema
How do I get type-safe Ethereum contract interactions in TypeScript?

You can achieve type-safe Ethereum contract interactions in TypeScript by using a TypeScript-first library that provides typed clients for RPC actions like readContract and writeContract. This eliminates manual boilerplate and ensures compile-time auto-completion.

What is the best way to query Ethereum balances and logs across multiple chains?

The best way to query Ethereum balances and logs across multiple chains is to use a typed client supporting multiple transports like HTTP and WebSocket. It provides rich RPC actions such as getBalance and getLogs with strong typing.

Can I use WebSocket and fallback transports for Ethereum RPC calls in a dApp?

Yes, you can use WebSocket and fallback transports for Ethereum RPC calls in a dApp. Typed clients support multiple transport configurations including HTTP, WebSocket, Custom, and Fallback to ensure reliable network access.

How do I simulate and deploy Ethereum smart contracts using TypeScript?

To simulate and deploy Ethereum smart contracts using TypeScript, utilize a type-safe interface offering RPC actions like deployContract and simulateContract. This allows developers to test and execute transactions with reliable type checking.

Does a typed TypeScript Ethereum library eliminate manual RPC handling?

Yes, a typed TypeScript Ethereum library eliminates manual RPC handling by providing ergonomic clients and transports. It handles RPC actions automatically, allowing developers to focus on dApp logic without managing underlying request boilerplate.