The method returns an array of logs/block hashes that have occurred since the last poll for the given filter on the Celo network.
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_getFilterChanges",
"params": ["0x1"]
}'
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_getFilterChanges',
params: ['0x1']
};
axios.post(url, payload, {
headers: { 'Content-Type': 'application/json' }
})
.then(response => console.log(response.data))
.catch(error => console.error(error));
pythonimport requests
import json
url = "https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/"
payload = {
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "eth_getFilterChanges",
"params": ["0x1"]
}
response = requests.post(url, headers={"Content-Type": "application/json"}, json=payload)
print(response.json())
response.json
json{
"jsonrpc": "2.0",
"id": "getblock.io",
"result": [
{
"address": "0x765DE816845861e75A25fCA122bb6898B8B1282a",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],
"data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
"blockNumber": "0x1d9f2a8",
"transactionHash": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"
}
]
}