@polareth/evmstate
Version:
A TypeScript library for tracing, and visualizing EVM state changes with detailed human-readable labeling.
54 lines (35 loc) • 1.69 kB
text/mdx
# API Overview
/evmstate provides three main APIs for analyzing Ethereum state changes:
## traceState
Main function for tracing state changes from a transaction.
```typescript twoslash
import type { TraceStateOptions, TraceStateResult } from "@polareth/evmstate";
// @ts-expect-error - Function implementation is missing
function traceState(options: TraceStateOptions): Promise<TraceStateResult>;
```
Use `traceState` when you need to analyze a single transaction and don't need to reuse configuration.
[API reference →](/api/trace-state)
## Tracer
Class for creating reusable tracing instances with shared configuration.
```typescript twoslash
import type { TraceStateBaseOptions, TraceStateTxParams } from "@polareth/evmstate";
class Tracer {
// @ts-expect-error - Constructor implementation is missing
constructor(options: TraceStateBaseOptions);
// @ts-expect-error - Function implementation is missing
traceState(txOptions: TraceStateTxParams): Promise<TraceStateResult>;
}
```
Use `Tracer` when you need to perform multiple traces with the same configuration.
[API reference →](/api/tracer)
## watchState
Function for monitoring state changes for a specific address.
```typescript twoslash
import type { WatchStateOptions, DeepReadonly, SolcStorageLayout } from "@polareth/evmstate";
// @ts-expect-error - Function implementation is missing
function watchState<TStorageLayout extends DeepReadonly<SolcStorageLayout> | undefined = undefined>(
options: WatchStateOptions<TStorageLayout>
): Promise<() => void>;
```
Use `watchState` to continuously monitor an address for state changes across multiple blocks.
[API reference →](/api/watch-state)