Skip to content
On this page

stopImpersonatingAccount

Stop impersonating an account after having previously used impersonateAccount.

Usage

ts
import { testClient } from './client'

await testClient.stopImpersonatingAccount({ 
  address: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC'
})
ts
import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'

export const testClient = createTestClient({
  chain: foundry,
  mode: 'anvil',
  transport: http(), 
})

Parameters

address

The address of the target account.

ts
await testClient.stopImpersonatingAccount({
  address: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC', 
})

Released under the MIT License.