1Shot API icon

1Shot API

Interact with EVM blockchains via 1Shot API

Contract Event → Create

AI-generated

Overview

This node operation creates a new contract event definition on an EVM blockchain using the 1Shot API. It allows users to specify details such as the blockchain network (chain ID), the contract address to monitor, a human-readable name and description for the event, and the exact event name as defined in the contract's ABI. This is useful for monitoring specific events emitted by smart contracts, enabling automation workflows to react to blockchain events in real-time.

Use Case Examples

  1. Creating a contract event to monitor token transfers on the Ethereum mainnet by specifying the chain ID, contract address of the token, and the 'Transfer' event name.
  2. Defining a custom event on a private blockchain to trigger notifications or further processing when the event occurs.

Properties

Name Meaning
Chain Name or ID The blockchain network to monitor, specified by name or ID.
Contract Address The address of the smart contract to monitor for events.
Name A human-readable name for the event definition.
Description A description explaining what the event represents.
Event Name The exact name of the event as defined in the contract ABI.

Output

JSON

  • json - The JSON response containing details of the created contract event.

Dependencies

  • 1Shot API with OAuth2 authentication

Troubleshooting

  • Ensure the chain ID or name is valid and supported by the 1Shot API.
  • Verify the contract address is correct and deployed on the specified chain.
  • The event name must exactly match the event defined in the contract ABI, including case sensitivity.
  • Authentication errors may occur if the OAuth2 credentials are not properly configured or expired.
  • Network or API errors may require retrying or checking the 1Shot API status.

Links

Discussion