EVM
eth_getLogs
Summary: Get logs
This request passes a set of search conditions and returns an array of all logs matching those.
Parameters
filter
object
Returns
eth_getLogsResponse
oneOf
Customize request
RequestCURL
CURL
curl https://linea-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [],
"id": 1
}'
Constraints
The following constraints apply:
To prevent queries from consuming too many resources, eth_getLogs
requests are currently limited by three constraints:
- A maximum of 5,000 parameters can be included in a single request.
- A maximum of 10,000 results can be returned by a single query.
- Query duration must not exceed 10 seconds.
If a query returns too many results or exceeds the max query duration, one of the following errors is returned:
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32005,
"message": "query returned more than 10000 results"
}
}
or
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32005,
"message": "query timeout exceeded"
}
}
If this happens:
- Limit your query to a smaller number of blocks using
fromBlock
andtoBlock
. - If querying for commonly used
topics
, consider limiting to a single smart contractaddress
.