Skip to content
On this page

revert

Revert the state of the blockchain at the current block.

Import

ts
import { revert } from 'viem'

Usage

ts
import { revert } from 'viem'
import { testClient } from '.'
 
await revert(testClient, { 
  id: '0x...'
})

Parameters

id

  • Type: "0x${string}"

The snapshot ID.

ts
await revert(testClient, {
  id: '0x...' 
})

Released under the MIT License.