Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

What is Tevm Node?

Conceptually similar to Anvil/Hardhat but with more powerful TypeScript-native interop. Tevm is backed by ZEVM packages but is not the native ZEVM CLI client — see Runtime Model and ZEVM and the ZEVM docs.

What Makes Tevm Unique?

  • Cross-Platform Compatibility — Same code works everywhere JavaScript runs, including the browser, with zero native dependencies
  • Fine-grained EVM Control — Access execution at any level, from high-level transactions to individual opcodes and debug traces
  • Enhanced User Experience — Instantaneous gas estimation, optimistic UI, fork-backed reads, account impersonation, transaction simulation
  • Type-safe Interactions — Full TypeScript across the API, powered by abitype
  • Direct Solidity Imports — Write Solidity that interops with TypeScript via the Tevm Bundler
  • Development Node Compatibilitytevm_*, eth_*, debug_*, txpool_*, engine_*, anvil_*, hardhat_*, ganache_*, evm_* JSON-RPC methods

Universal JavaScript Compatibility

Runs in every JavaScript runtime:

  • Node.js — local dev, testing, CI/CD
  • Browser — advanced dApps with offline capability and real-time simulation
  • Any JS Runtime — Deno, Bun, Edge Functions, or any modern JS environment

Integration With Popular Libraries

Tevm works with viem, wagmi, and ethers:

viem
import { createMemoryClient, http } from "tevm";
 
const client = createMemoryClient();
 
const balance = await client.getBalance({ address: "0x..." });
const blockNumber = await client.getBlockNumber();
 
await client.tevmMine({ blocks: 1 });
await client.tevmSetAccount({
  address: "0x...",
  balance: 100000000000000000n,
});

How Tevm Compares

FeatureTevmAnvilHardhatGanache
LanguageJavaScript/WasmRustJavaScript/RustJavaScript
Browser Compatible
Minimal Dependencies
Mainnet Forking
EVM Event Hooks
Custom Precompiles
viem IntegrationNativeSomeMinimalMinimal
ethers IntegrationNativeMinimalMinimalSome
DebuggingAdvancedAdvancedAdvancedBasic
TypeScript SupportFullLimitedFullFull
Serverless Compatible
Optimized forking performance

Library Compatibility

LibrarySupport LevelNotes
viemNativeFirst-class native integration with all viem features
ethers.jsFullBoth v5 and v6 via EIP-1193 provider
web3.jsFullVia EIP-1193 provider
wagmiFullWorks as a wagmi connector
thirdwebFullCompatible with thirdweb's SDK
PonderFullCan be used to do advanced tracing in ponder handlers and import contracts into ponder config
ZEVMNativeTevm's VM, transaction, receipt, txpool, common, RLP, trie, and utility facades are backed by @evmts/zevm packages
Legacy low-level consumersCompatibleSeveral Tevm low-level APIs keep familiar shapes for migration, but new docs and integrations should target Tevm and ZEVM-backed packages
Any EIP-1193 libraryFullStandard provider interface

Next: Why JS? · Architecture Overview · Create a Tevm Node