Installation — evmstate
Skip to content

Installation

Installing the package

Install @polareth/evmstate using your preferred package manager:

# Using npm
npm install @polareth/evmstate
 
# Using pnpm
pnpm add @polareth/evmstate
 
# Using yarn
yarn add @polareth/evmstate

RPC provider requirements

@polareth/evmstate needs an Ethereum RPC provider that supports the debug namespace methods:

  • debug_traceTransaction: For analyzing single transactions
  • debug_traceBlock: For watching state changes across blocks

Compatible RPC providers include:

  • Self-hosted nodes with debug namespace enabled (Geth, Erigon)
  • Some specialized services like Alchemy or QuickNode (may require higher tier plans)

Example initialization

example.ts
import { traceState } from "@polareth/evmstate";
 
// Basic usage with abi
const trace = await traceState({
  client,
  from: "0x111...",
  to: "0x222...",
  abi: abi,
  functionName: "setBalance",
  args: ["0x333...", 100n],
});

Next steps