Get Contract Event Logs logo

Catalog action EVM Onchain

Fetch recent event logs emitted by an EVM contract without any gas cost. Returns up to 25 most-recent matching events decoded against the supplied event ABI, searching back up to ~3.5 days on L2s. Ideal for: populating test-workflow event pickers, inspecting recent on-chain activity, replaying an event for dry runs.

At a Glance

FieldValue
Action IDevm-get-logs
CategoryEVM Onchain
ConnectorNot required
Requires gasNo
Funds movementNone declared
Tagsblockchain, evm, read, logs, events, query

Payload Schema

FieldTypeRequiredDescription
chainIdnumberYesChain ID (1=Ethereum, 137=Polygon, 56=BSC, 8453=Base, etc.)
contractAddressstringNoOptional contract address to filter logs. If omitted, returns any log matching the event signature.
eventAbiobjectYesThe event ABI to decode logs against. Must be a single event definition.
limitnumberNoMax number of recent logs to return (newest first). Default 5, max 25.
maxBlocksBacknumberNoHow many blocks back to search at most. Default 150000 (~3.5 days on Base/L2). Capped at 250000 to stay within RPC and proxy timeout budgets.

Result Schema

FieldTypeRequiredDescription
logsarrayYesMatching logs, newest first. Empty array if none found.
latestBlocknumberNoThe chain's latest block at fetch time.
searchedBlocksnumberNoHow many blocks were actually searched before returning.
partialResultsbooleanNoTrue when the search hit the server-side deadline or chunk cap before completing the full range. Callers should treat results as incomplete — consider narrowing the event or contract filter.

Examples

json
{ "type": "evm-get-logs", "payload": { "chainId": 8453, "eventAbi": {} }, "children": []}

Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.

Ask a question... ⌘I