eth_uninstallFilter - Celo
This method removes a filter created by eth_newFilter or eth_newBlockFilter on the Celo network. Call this method when a filter is no longer needed.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filterId | string | Yes | Filter ID to remove |
Request Example
cURL
bashcurl -X POST https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "eth_uninstallFilter",
"params": ["0x1"]
}'JavaScript (Axios)
javascriptconst axios = require('axios');
const url = 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/';
const payload = {
jsonrpc: '2.0',
id: 'getblock.io',
method: 'eth_uninstallFilter',
params: ['0x1']
};
axios.post(url, payload, {
headers: { 'Content-Type': 'application/json' }
})
.then(response => console.log(response.data))
.catch(error => console.error(error));Python
pythonimport requests
import json
url = "https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/"
payload = {
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "eth_uninstallFilter",
"params": ["0x1"]
}
response = requests.post(url, headers={"Content-Type": "application/json"}, json=payload)
print(response.json())Response Example
Response
json{
"jsonrpc": "2.0",
"id": "getblock.io",
"result": true
}Response Definition
| Field | Type | Description |
|---|---|---|
| result | boolean | true if filter was removed |
Use Cases:
- Clean up unused filters
- Free up server resources
- Proper filter lifecycle management
Error handling
| Error Code | Description |
|---|---|
| -32602 | Invalid filter ID |
| -32603 | Internal error |