curl --request POST \
--url https://rpc.testnet.tempo.xyz/ \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_uninstallFilter",
"params": [
"0x..."
],
"id": 1
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": true
}curl --request POST \
--url https://rpc.testnet.tempo.xyz/ \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_uninstallFilter",
"params": [
"0x..."
],
"id": 1
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": true
}eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter. Filters should be uninstalled when no longer needed to free server resources.
filterId — the filter ID to uninstallresult — true if the filter was successfully uninstalled, false otherwiseeth_uninstallFilter code examplesconst ethers = require('ethers');
const NODE_URL = "CHAINSTACK_NODE_URL";
const provider = new ethers.JsonRpcProvider(NODE_URL);
const filterLifecycle = async () => {
// Create a block filter
const filterId = await provider.send("eth_newBlockFilter", []);
console.log(`Created block filter: ${filterId}`);
// Use the filter
const blocks = await provider.send("eth_getFilterChanges", [filterId]);
console.log(`Got ${blocks.length} new blocks`);
// Uninstall when done
const uninstalled = await provider.send("eth_uninstallFilter", [filterId]);
console.log(`Filter uninstalled: ${uninstalled}`);
// Trying to use it again will fail
try {
await provider.send("eth_getFilterChanges", [filterId]);
} catch (e) {
console.log("Filter no longer exists (expected)");
}
};
filterLifecycle();
Was this page helpful?