curl --request POST \
--url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getFilterLogs",
"id": 1,
"params": [
"0x5a6b7c"
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": [
{
"removed": true,
"logIndex": "<string>",
"transactionIndex": "<string>",
"transactionHash": "<string>",
"blockHash": "<string>",
"blockNumber": "<string>",
"address": "<string>",
"data": "<string>",
"topics": [
"<string>"
]
}
]
}
curl --request POST \
--url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getFilterLogs",
"id": 1,
"params": [
"0x5a6b7c"
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": [
{
"removed": true,
"logIndex": "<string>",
"transactionIndex": "<string>",
"transactionHash": "<string>",
"blockHash": "<string>",
"blockNumber": "<string>",
"address": "<string>",
"data": "<string>",
"topics": [
"<string>"
]
}
]
}
eth_getFilterLogs
retrieves all logs matching a previously created filter. This method is essential for applications that need to fetch historical log data based on specific criteria.
eth_getFilterLogs
in this page, first create a new filter using one of the following:Then use the fresh filter ID as the parameter for eth_getFilterChanges
.filterId
— the ID of the filter for which logs are being fetched. This ID is returned by filter creation methods such as eth_newBlockFilter
, or eth_newFilter
. For this example, a random value "0x5a6b7c"
is used.result
— an array of log objects. Each log object contains details such as whether the log was removed (due to a chain reorganization), log index, transaction index, transaction hash, block hash, block number, address from which the log originated, data contained in the log, and topics associated with the log.eth_getFilterLogs
method is essential for:
All logs matching the filter
The response is of type object
.
Was this page helpful?