Skip to content

What is Tevm Node?

Tevm Node is a full Ethereum execution environment that runs natively in JavaScript. It provides the complete functionality of an Ethereum node without requiring any blockchain client installation.

Conceptually, it works very similar to Anvil and Hardhat but with more powerful TypeScript native interop.

What Makes Tevm Unique?

Unlike traditional development environments like Hardhat or Anvil, Tevm Node offers several distinct advantages:

  • Cross-Platform Compatibility — The same code works everywhere JavaScript runs, with zero native dependencies including your applications in the browser
  • Fine-grained EVM Control — Access the execution environment at any level of detail, from high-level transactions to individual EVM opcodes
  • Enhanced User Experience — Enable advanced features like instantaneous gas estimation, optimistic UI updates, and sophisticated transaction simulation
  • Type-safe Interactions — Full TypeScript support throughout the entire API surface powered by abitype
  • Direct Solidity Imports — The powerful ability to write solidity code that interops with your TypeScript code in a typesafe way via the Tevm Bundler

Universal JavaScript Compatibility

Tevm's key innovation is bringing the Ethereum execution environment to every JavaScript runtime:

Node.js

For local development, testing, and CI/CD pipelines

Browser

For advanced dApps with offline capability and real-time simulation

Any JS Runtime

Works in Deno, Bun, Edge Functions, or any modern JavaScript environment

Integration With Popular Libraries

Tevm works with the libraries you already know and love including viem wagmi and ethers:

viem
import { createMemoryClient, http } from "tevm";
 
const client = createMemoryClient();
 
// Use standard viem actions
const balance = await client.getBalance({ address: "0x..." });
const blockNumber = await client.getBlockNumber();
 
// Plus Tevm-specific actions
await client.tevmMine({ blocks: 1 });
await client.tevmSetAccount({
  address: "0x...",
  balance: 100000000000000000n, // 0.1 ETH
});

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
ethereumjsNativeImplements the same interfaces as Ethereumjs. Ethereumjs users can take advantage of Tevm StateManager to get Tevm like features such as forking in ethereumjs
Any EIP-1193 libraryFullStandard provider interface

Next Steps

Why JavaScript for Ethereum?

Understand the unique advantages of running Ethereum in JavaScript environments

Architecture Overview

Dive into Tevm's technical design and component structure

Get started building with Tevm in your own applications