Developer Tools
Viem
Build with Viem on RISE
Viem is a TypeScript interface for Ethereum that provides low-level stateless primitives for interacting with Ethereum. It's lightweight, modular, and type-safe.
Why Viem?
- Type-safe: First-class TypeScript support with inferred types
- Lightweight: Tree-shakeable with minimal dependencies
- Fast: Optimized for performance
- Modular: Only import what you need
- Modern: Built with latest JavaScript features
Quick Start
npm install viemBasic Setup
import { createPublicClient, http } from 'viem'
import { riseTestnet } from 'viem/chains'
// Create a public client
const client = createPublicClient({
chain: riseTestnet,
transport: http()
})
// Get the latest block number
const blockNumber = await client.getBlockNumber()
console.log('Current block:', blockNumber)Next Steps
Get Started
Set up your first Viem project
Read Contracts
Query blockchain data and contract state
Write Contracts
Send transactions and interact with contracts