All Products

eth_getLogs - Polygon Mainnet


Summary

Returns an array of all logs matching a given filter object.


1. Filter Object

From Block Quantity or Tag

Hex block number, or the tag latest, earliest, pending, finalized or safe

Example: latest

To Block Quantity or Tag

Hex block number, or the tag latest, earliest, pending, finalized or safe

Example: latest

Address Array Address

Contract address (string) or a list of addresses (string[]) from which logs should originate

Example: 0xb59f67a8bff5d8cd03f6ac17265c550ed8f33907

Topics DATA[]

Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options

Example: {topics: ["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}

eth_getLogs response example

Code Example

eth_getLogs curl

Don’t have an Access Key?

Start using this API in your app today.

Get started for free