1Shot API icon

1Shot API

Interact with EVM blockchains via 1Shot API

Contract Event → Search

AI-generated

Overview

This node operation searches for contract events on an EVM blockchain using the 1Shot API. It allows filtering events by specifying the contract event ID, block range (start and end blocks), and indexed event parameters (topics). This is useful for monitoring specific events emitted by smart contracts within a defined block range, such as tracking token transfers or contract state changes.

Use Case Examples

  1. Search for a specific contract event by its ID within a block range to monitor token transfers.
  2. Filter contract events by indexed parameters like 'from' or 'to' addresses to track specific user interactions.

Properties

Name Meaning
Contract Event Name or ID The identifier of the contract event to search for, chosen from a list or specified via expression.
Start Block The starting block number from which to begin the event search.
End Block The ending block number up to which to search for events.
Topics Indexed event parameters used to filter the search results by name-value pairs.

Output

JSON

  • json - The JSON response containing the search results of contract events matching the criteria.

Dependencies

  • Requires an API key credential for the 1Shot API to authenticate requests.

Troubleshooting

  • Common errors include invalid contract event ID or block range, which may result in empty or error responses.
  • Ensure the API key credential is correctly configured and has permissions to access contract event data.
  • If filtering by topics, ensure the topic names and values are correctly specified to avoid no results.

Links

Discussion