Skip to content
On this page

uninstallFilter โ€‹

Destroys a Filter that was created from one of the following Actions:

Usage โ€‹

ts
import { publicClient } from './client'

const filter = await publicClient.createPendingTransactionFilter()
const uninstalled = await publicClient.uninstallFilter({ filter }) 
// true
ts
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'

export const publicClient = createPublicClient({
  chain: mainnet,
  transport: http()
})

Returns โ€‹

boolean

A boolean indicating if the Filter was successfully uninstalled.

Parameters โ€‹

filter โ€‹

A created filter.

ts
const filter = await publicClient.createPendingTransactionFilter()
const uninstalled = await publicClient.uninstallFilter({
  filter, 
})

JSON-RPC Method โ€‹

eth_uninstallFilter

Released under the MIT License.