Get real-time updates when an specific NFT is transferred from the smart contract that you track using the Specific NFT Activity webhook.
Chain | Mainnet |
---|---|
Ethereum | ✅ |
Introduction
The Specific NFT Activity webhook allows you to track the specific ID in ERC721 and ERC1155 token contracts. This provides your app with real-time state changes when an NFT is transferred between addresses.
Example Response
When an specific ID from the NFT contracts that you are tracking gets transferred, you receive a response from the webhook that looks like this:
{
"id": "1f73d51e371a40b18d16b6b75f96f2d1",
"webhookId": "51a7ad1b-9ace-4da1-8f57-4e95dcb00046",
"type": "SPECIFIC_NFT",
"createdAt": "2023-09-10T14:38:55Z",
"event": {
"network": "eth-mainnet",
"activity": [
{
"category": "erc721",
"fromAddress": "0x2a1c77a684426fe6ced7a3fca5878fed76fdd1a3",
"toAddress": "0xe191c594f62d05da89768461ddeee5a03980d4a5",
"tokenId": "5151",
"amount": "1",
"tokenAddress": "0x60e4d786628fea6478f785a6d7e704777c86a7c6",
"log": {
"blockNumber": 18106623,
"blockHash": "0x759d6b23505aa3091899990d45fb354ea451fd5af536169543c8cdd1bfe8b679",
"transactionHash": "0x08a5221256d8a2769edbb5eab2819f5c19723ccdf57d16b1c07bc6ada03a7f90",
"address": "0x60e4d786628fea6478f785a6d7e704777c86a7c6",
"data": "0x",
"logIndex": "0xc5",
"remove": false,
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000002a1c77a684426fe6ced7a3fca5878fed76fdd1a3",
"0x000000000000000000000000e191c594f62d05da89768461ddeee5a03980d4a5",
"0x000000000000000000000000000000000000000000000000000000000000141f"
],
"timestamp": 1694356727
}
}
]
}
}
Field Definitions
Below you can find descriptions for each field of the response.
Field | Description | Value |
---|---|---|
id | ID of the event. | 1f73d51e371a40b18d16b6b75f96f2d1 |
webhookId | Unique ID of the webhook destination. | 51a7ad1b-9ace-4da1-8f57-4e95dcb00046 |
type | Webhook event type. | SPECIFIC_NFT |
createdAt | Timestamp when the event notification was created. | 2023-09-10T14:38:55Z |
event | Activity object. | N/A |
network | The default network for the webhook. | eth-mainnet |
activity | List of transfer events whose from or to address matches the address configured in the Specific NFT Activity webhook. | N/A |
category | The erc-721 orerc-1155 data standard. | erc721 |
fromAddress | Transfer from address. | 0x2a1c77a684426fe6ced7a3fca5878fed76fdd1a3 |
toAddress | Transfer to address. | 0xe191c594f62d05da89768461ddeee5a03980d4a5 |
tokenId | Raw erc721 or erc1155 token ID. | 5151 |
amount | Transferred value amount. | 1 |
tokenAddress | The erc721 or erc1155 contract address. | 0x60e4d786628fea6478f785a6d7e704777c86a7c6 |
log | Returned log of the NFT Activity event. | N/A |
blockNumber | The number of the block including this transaction. | 18106623 |
blockHash | A hash of the block including this transaction. | 0x759d6b23505aa3091899990d45fb354ea451fd5af536169543c8cdd1bfe8b679 |
transactionHash | Transaction hash. | 0x08a5221256d8a2769edbb5eab2819f5c19723ccdf57d16b1c07bc6ada03a7f90 |
address | Original address of the log. | 0x60e4d786628fea6478f785a6d7e704777c86a7c6 |
data | Non-indexed arguments of the log. | 0x |
logIndex | ID of the event. | 0xc5 |
removed | Transaction is in a chain re-org tag. | false |
topics | An array of zero to four 32 bytes of indexed log arguments. | ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x0000000000000000000000002a1c77a684426fe6ced7a3fca5878fed76fdd1a3", "0x000000000000000000000000e191c594f62d05da89768461ddeee5a03980d4a5", "0x000000000000000000000000000000000000000000000000000000000000141f"] |
timestamp | Block time. | 1694356727 |
How to Set Up Specific NFT Activity Webhooks
- Navigate to the Webhook tab in your ZAN Dashboard.
- Click the Create New button.
- Set a name of the webhook. Then Specific NFT template in the dropdown.
- Select your Chain in the dropdown. Then choose your Network.
- Paste your specific NFT contract address into the Contract Address field.
- Paste your unique webhook URL into the WEBHOOK URL field.
- Select all address events that you need to get notifications in Event dropdown.
- Test your webhook by clicking the TEST button.
- After the test is successful, click Confirm. Your webhook appears in the list.
- Check your endpoint to see the responses.
Note:
For more detailed steps on how to set up specific NFT activity webhooks, please refer to Create a New Webhook.