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
| Field | Type |
|---|---|
| result | object |
Examples
curl https://triport.io/eth \
-X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer <api-key>' \
-d '{"id":1,"method":"eth_uninstallFilter","params":[],"jsonrpc":"2.0"}'const res = await fetch("https://triport.io/eth", {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
body: JSON.stringify({
"id": 1,
"method": "eth_uninstallFilter",
"params": [],
"jsonrpc": "2.0"
}),
});
const data = await res.json();import requests
resp = requests.post(
"https://triport.io/eth",
headers={"Authorization": "Bearer <api-key>"},
json={"id":1,"method":"eth_uninstallFilter","params":[],"jsonrpc":"2.0"},
)
print(resp.json())Usage
- Transport: HTTP (JSON-RPC).
- Networks: mainnet.
- 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.