tevmMine
tevmMine(
client
,params
?):Promise
<MineResult
>
A tree-shakeable version of the tevmMine
action for viem.
Mines blocks in TEVM.
This function allows you to mine blocks in the TEVM, which is necessary for updating the canonical head state. The result of mining includes an array of block hashes of the mined blocks.
You can customize the mining process with the blockCount
and interval
parameters:
blockCount
: The number of blocks to mine. Defaults to 1.interval
: The interval between block timestamps in seconds. Defaults to 1.
Parameters
• client: Client
<TevmTransport
<string
>, undefined
| Chain
, undefined
| Account
, undefined
, undefined
| object
>
The viem client configured with TEVM transport.
• params?: MineParams
<boolean
>
Optional parameters for mining blocks.
Returns
Promise
<MineResult
>
The result of mining blocks, including an array of block hashes.
Example
See
- MineParams for options reference.
- MineResult for return values reference.
- TEVM Actions Guide