tevmSetAccount
tevmSetAccount(
client
,params
):Promise
<SetAccountResult
<TevmSetAccountError
>>
A tree-shakeable version of the tevmSetAccount
action for viem.
Sets the account in TEVM.
This function allows you to set various properties of an account in TEVM, such as its balance, nonce, contract deployedBytecode, and storage state. It is a powerful tool for setting up test environments and manipulating accounts for advanced scenarios.
Parameters
• client: Client
<TevmTransport
<string
>, undefined
| Chain
, undefined
| Account
, undefined
, undefined
| object
>
The viem client configured with TEVM transport.
• params: SetAccountParams
<boolean
>
Parameters for setting the account.
Returns
Promise
<SetAccountResult
<TevmSetAccountError
>>
The result of setting the account.
Example
See
- SetAccountParams for options reference.
- SetAccountResult for return values reference.
- TEVM Actions Guide