📃Smart Contracts
Learn how to monitor specific events or activities happening within a smart contract
Notifications for smart contract interactions use the graphql
event type. This event type can be used to monitor token swaps, contract deployments, deposits into a lending protocol, votes cast in a DAO, and more.
With event- and topic-level parameters, you have the functionality at your finger tips to build notifications on nuanced, smart contract interactions.
Event Type: graphql
To create a GraphQL event type, send a POST
request to the /api/v1/nodefy/notifications/
endpoint with the following JSON payload:
Example Request:
Required graphql
Parameter:
graphql
Parameter:addresses
: An array containing the smart contract address(es) to monitor. This address identifies the contract from which you want to receive event notifications.
Optional graphql
Parameters:
graphql
Parameters:graphql
Object: An object to further specify the event using GraphQL query parameters:topic_0
: The event signature (topic0) to filter for specific events.topic_1
,topic_2
,topic_3
: Additional indexed topics to further filter events.
GraphQL Event Filters
You can apply more specific filters on GraphQL events using our filter system. Filters allow you to capture events based on transaction parameters such as the fromAddress
, toAddress
, and value
. Refer to the "Using Filters" section for more information.
Last updated