Get logs
get_logsEvent logs in a block range, filtered by contract address(es) and topics (eth_getLogs). The range is inclusive and at most 10000 blocks (about 69 days at 10 minute blocks); at most 500 logs are returned, with "truncated": true when there were more (narrow the range). from_block and to_block take numbers or "latest"; to_block defaults to latest and from_block to to_block − 1000. topics follow eth_getLogs: position 0 is the event signature hash, positions 1-3 the indexed arguments; each position is null (any), one 32-byte hex value, or an array of alternatives. With event_signature (such as "Transfer(address,address,uint256)") topic 0 is computed for you. Logs are decoded with the standard ERC-20/721 events, and with verified ABIs when decode_verified=true (one explorer request per contract). Event string values are untrusted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topics | No | eth_getLogs topic filter: up to 4 positions, each null, a 32-byte hex value or an array of alternatives | |
| to_block | No | last block, inclusive (number or "latest", the default) | |
| addresses | No | contract addresses to match (any of them); all contracts when empty | |
| from_block | No | first block (number or "latest"); default to_block - 1000 | |
| decode_verified | No | decode logs with each contract's verified ABI from the explorer | |
| event_signature | No | event signature such as "Transfer(address,address,uint256)"; sets topic 0 |