Skip to content

GetAccountHandler

GetAccountHandler: (params) => Promise<GetAccountResult>

Gets the state of a specific Ethereum address. This handler is for use with a low-level TEVM TevmNode, unlike tevmGetAccount.

Example

import { createClient } from 'tevm'
import { getAccountHandler } from 'tevm/actions'
const client = createClient()
const getAccount = getAccountHandler(client)
const res = await getAccount({ address: '0x123...' })
console.log(res.deployedBytecode)
console.log(res.nonce)
console.log(res.balance)

Parameters

params: GetAccountParams

Returns

Promise<GetAccountResult>

Defined in

packages/actions/src/GetAccount/GetAccountHandlerType.ts:21