> For the complete documentation index, see [llms.txt](https://docs.nodefy.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nodefy.xyz/our-api-guide/defining-event-types/smart-contracts.md).

# Smart Contracts

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.&#x20;

**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:

```json
{
    "external_user_id": "user123",
    "channel": "EMAIL",
    "notification_name": "Your Mint from Factory Contract",
    "delivery_location": "creator@art.com",
    "event_details": {
        "network": "BASE_MAINNET",
        "event_type": "GRAPHQL",
        "addresses": ["0x60a2...a7c6"],
        "graphql": {
            "topic_2": "0x2a29fb...9a888"
        }
    }
}
```

#### Required `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` 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"](/our-api-guide/using-filters.md) section for more information.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nodefy.xyz/our-api-guide/defining-event-types/smart-contracts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
