TriportRPC

eth_uninstallFilter

Last updated:

`eth_uninstallFilter` deletes a server-side filter that was previously created with `eth_newBlockFilter`, `eth_newFilter`, or `eth_newPendingTransactionFilter`. You pass the filter id returned at creation time and the node drops the filter along with any state it was buffering for you.

Server-side filters are a **stateful** resource. The node keeps a per-filter buffer of changes between your `eth_getFilterChanges` polls, and a filter that is never uninstalled lingers until the node times it out on its own. Always call `eth_uninstallFilter` as soon as you are done polling so you don't leave orphaned filters accumulating on the upstream node.

The call returns a boolean: `true` when the filter existed and was removed, `false` when the id was unknown (already uninstalled, expired, or never valid). Because an unknown id is reported as `false` rather than as an error, this method is safe to call defensively in cleanup paths.

Parameters

This method takes no parameters.

Returns

eth_uninstallFilter return value
FieldType
resultobject

Examples

curl https://<your-endpoint>/ \
  -X POST -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_uninstallFilter","params":[]}'
const res = await fetch("https://<your-endpoint>/", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [],
  "jsonrpc": "2.0"
}),
});
const data = await res.json();
import requests
resp = requests.post("https://<your-endpoint>/", json={"id":1,"method":"eth_uninstallFilter","params":[],"jsonrpc":"2.0"})
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Networks: mainnet.
  3. Credit cost: 1 per call.

FAQ

What does eth_uninstallFilter do?
Removes a previously created server-side filter on Polygon, freeing the resource it held on the node.
How many credits does eth_uninstallFilter cost?
eth_uninstallFilter costs 1 credit(s) per call on Triport by default.
Is eth_uninstallFilter available over WebSocket?
eth_uninstallFilter is an HTTP JSON-RPC method.