Skip to content
Back to skills

Tevm Account Management

ASecurity

Get and set account state including balances, nonces, and storage. Use when manipulating EVM state for testing.

  • 9 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 10, 2026
businesstypescriptnodetesting

Works with

  • cli

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add cyotee/indexedex --skill tevm-account-management --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tevm Account Management?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tevm Account Management
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cyotee-tevm-account-management/badge)](https://www.skillsdirectory.com/skills/cyotee-tevm-account-management)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tevm-account-management
description: Get and set account state including balances, nonces, and storage. Use when manipulating EVM state for testing.
---

# Account Management

## getAccountHandler

Get current account state:

```typescript
import { getAccountHandler } from 'tevm/actions'

const account = await getAccountHandler(node)({
  address: '0x...',
  blockTag: 'latest',
  returnStorage: true
})
```

**Returns:**
```typescript
{
  address: Address
  nonce: bigint
  balance: bigint
  deployedBytecode: Hex
  storageRoot: Hex
  codeHash: Hex
  isContract: boolean
  isEmpty: boolean
  storage?: { [key: Hex]: Hex }
}
```

## setAccountHandler

Modify account state:

```typescript
import { setAccountHandler } from 'tevm/actions'

// Set balance
await setAccountHandler(node)({
  address: '0x...',
  balance: parseEther('100')
})

// Deploy contract code
await setAccountHandler(node)({
  address: contractAddress,
  deployedBytecode: '0x...',
  state: { '0x0': '0x1' }
})

// Multiple properties
await setAccountHandler(node)({
  address: '0x...',
  nonce: 5n,
  balance: parseEther('10'),
  state: { [slot]: value }
})
```

## Account Impersonation (Fork Mode)

```typescript
// Impersonate an account
node.setImpersonatedAccount('0x123...')

// Now JSON-RPC calls execute as that account
const result = await node.request({
  method: 'eth_sendTransaction',
  params: [{ from: '0x123...', to: '0x456...', ... }]
})

// Stop impersonating
node.setImpersonatedAccount(undefined)
```

## State Snapshots

```typescript
// Take snapshot
const snapshotId = await client.snapshot()

// Make changes
await setAccountHandler(node)({ address: '0x...', balance: 0n })

// Revert to snapshot
await client.revert({ id: snapshotId })
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…