tevmGetAccount
tevmGetAccount(
client
,params
):Promise
<GetAccountResult
<TevmGetAccountError
>>
A tree-shakeable version of the tevmGetAccount
action for viem.
Retrieves the account information from TEVM.
This function allows you to retrieve information about an account, including its address and optionally its contract storage.
The returnStorage
parameter determines whether the contract storage should be returned. Note that it only returns the storage that is cached in the VM.
In fork mode, if the storage hasn’t been cached yet, it will not be returned. This defaults to false
.
Be aware that returning storage can be very expensive if a contract has a lot of storage.
Parameters
• client: Client
<TevmTransport
<string
>, undefined
| Chain
, undefined
| Account
, undefined
, undefined
| object
>
The viem client configured with TEVM transport.
• params: GetAccountParams
<boolean
>
Parameters for retrieving the account information.
Returns
Promise
<GetAccountResult
<TevmGetAccountError
>>
The account information.
Example
See
- GetAccountParams for options reference.
- GetAccountResult for return values reference.
- TEVM Actions Guide