Native & WASM execution
Runs ZEVM, Voltaire, and Guillotine Mini via Node-API in Node.js or WebAssembly in browsers and workers. Each client owns isolated chain state with no background daemon. Read the architecture
pnpm add tevm viemnpm install tevm viemyarn add tevm viembun add tevm viemimport { createMemoryClient, parseAbi } from 'tevm'
// Zero-config: native Node-API in Node.js (>= 22.12), compiled ZEVM WASM in browsersconst client = createMemoryClient()try { const deployed = await client.tevmDeploy({ bytecode: '0x600a600c600039600a6000f3602a60005260206000f3', })
const result = await client.tevmContract({ address: deployed.createdAddress!, abi: parseAbi(['function answer() view returns (uint256)']), functionName: 'answer', })
console.log(result.data) // 42n} finally { await client.tevmClose()}Native & WASM execution
Runs ZEVM, Voltaire, and Guillotine Mini via Node-API in Node.js or WebAssembly in browsers and workers. Each client owns isolated chain state with no background daemon. Read the architecture
Viem & ethers v6 native
Includes viem public, wallet, and Anvil test actions out of the box, plus TevmProvider for ethers v6 and tree-shakeable transports.
Start with Viem
Lazy mainnet forking
Fork any EVM JSON-RPC endpoint at a pinned block number. Missing accounts, code, and storage load on cache miss; local writes stay in your process. Fork a chain
HTTP, WebSocket & IPC servers
Expose any local client over HTTP POST/batch, WebSocket eth_subscribe, Unix IPC sockets, Express middleware, or Next.js API routes.
Run a server
Direct Solidity imports
Import .sol files as typed TypeScript modules in Vite, Rollup, esbuild, Webpack, Rspack, and Bun, with NatSpec hover via @tevm/ts-plugin.
Set up the bundler
Opcode tracing, console.log & MCP
Capture native debug_traceCall opcode traces, stream Solidity console.log messages, and give AI coding agents isolated EVM sessions via @tevm/mcp.
Explore tracing & MCP