eth_uninstallFilter
Uninstalls a filter with given id on Avalanche C-Chain. Should always be called when watch is no longer needed.
Parameters
QUANTITY
- The filter id
{
"jsonrpc": "2.0",
"method": "eth_uninstallFilter",
"params": [
"0xb"
],
"id": 73
}
Returns
Boolean
- true if the filter was successfully uninstalled, otherwise false.
Implementation Example
- cURL
- JavaScript
curl -X POST https://api-avalanche-mainnet-archive.n.dwellir.com/YOUR_API_KEY/ext/bc/C/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_uninstallFilter",
"params": [
"0xb"
],
"id": 73
}'
const response = await fetch('https://api-avalanche-mainnet-archive.n.dwellir.com/YOUR_API_KEY/ext/bc/C/rpc', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
method: 'eth_uninstallFilter',
params: [
'0xb'
],
id: 73
})
});
const data = await response.json();
console.log(data.result);
Response Example
{
"id": 73,
"jsonrpc": "2.0",
"result": true
}
Note: Always clean up filters when done to free up resources on the Avalanche node.
Need help? Contact our support team or check the Avalanche documentation.