Skip to content
On this page

dropTransaction

Remove a transaction from the mempool.

Usage

ts
import { testClient } from './client'

await testClient.dropTransaction({ 
  hash: '0xe58dceb6b20b03965bb678e27d141e151d7d4efc2334c2d6a49b9fac523f7364'
})
ts
import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'

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

Parameters

hash

The hash of the transaction.

ts
await testClient.dropTransaction({
  hash: '0xe58dceb6b20b03965bb678e27d141e151d7d4efc2334c2d6a49b9fac523f7364', 
})

Released under the MIT License.