API Reference

Address Activity Webhook

Get real-time state changes when an address sends/receives ETH or tokens that you track using the Address Activity webhook.

ChainMainnet
Ethereum

Introduction

The Address Activity webhook allows you to track any address like EOA or smart contracts. This provides your app with real-time state changes when a token is transferred between addresses, like ETH, ERC20, ERC721 or ERC1155 transfers.

Types of transfers

There are four main types of transfers that occur on the chain between addresses.

Transfer typeDescription
external native coin(ETH)Top-level transaction transfers.
internal native coin(ETH)Internal Transfers between addresses.
tokenEvent logs for ERC20.
erc721 or erc1155Event logs for ERC721 and ERC1155 transfers.

Example Response

When a provided address (EOA or smart contracts) exists in a transaction, and you may get its assert transfers or relatived transaction, you receive a response from the webhook that looks like this:

{
    "id": "64a636ed247148b19b4ac1d4937b19ba",
    "webhookId": "804ad91e-3400-4462-b9f5-afe8b78ea706",
    "type": "ADDRESS",
    "createdAt": "2023-08-30T11:57:50Z",
    "event": {
        "network": "eth-mainnet",
        "activity": [
            {
                "category": "internal",
                "fromAddress": "0xb67cb505324830dd181498b5b1c8ff7ffe6a49c44f1f02eda1a5214dce56f538",
                "toAddress": "0x1635d18f20c9a6e302931faf61643fed57fbcce3",
                "internalTransaction": {
                    "blockNumber": 18027262,
                    "blockHash": "0x8ab7fa9f37fb3cb19bc6fe43cbc288d64430543fac0325788f3f9638a4982049",
                    "hash": "0xb67cb505324830dd181498b5b1c8ff7ffe6a49c44f1f02eda1a5214dce56f538",
                    "from": "0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
                    "to": "0x1635d18f20c9a6e302931faf61643fed57fbcce3",
                    "input": "0x0902f1ac",
                    "output": "0x0000000000000000000000000000000000000000011b0698ff86e0cecbd5f79100000000000000000000000000000000000000000000000ab82aa8fdac122db10000000000000000000000000000000000000000000000000000000064ef2e07",
                    "gas": "0x1cfb2",
                    "gasUsed": "0x9c8",
                    "type": "STATICCALL",
                    "value": null,
                    "error": null,
                    "revertReason": null,
                    "callLayer": 6,
                    "callStack": 2,
                    "success": true,
                    "revert": false
                }
            },
            {
                "category": "internal",
                "fromAddress": "0xb67cb505324830dd181498b5b1c8ff7ffe6a49c44f1f02eda1a5214dce56f538",
                "toAddress": "0x1635d18f20c9a6e302931faf61643fed57fbcce3",
                "internalTransaction": {
                    "blockNumber": 18027262,
                    "blockHash": "0x8ab7fa9f37fb3cb19bc6fe43cbc288d64430543fac0325788f3f9638a4982049",
                    "hash": "0xb67cb505324830dd181498b5b1c8ff7ffe6a49c44f1f02eda1a5214dce56f538",
                    "from": "0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
                    "to": "0x1635d18f20c9a6e302931faf61643fed57fbcce3",
                    "input": "0x022c0d9f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cca430ef8fb80b0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000",
                    "output": null,
                    "gas": "0x1bb3b",
                    "gasUsed": "0xece2",
                    "type": "CALL",
                    "value": "0x0",
                    "error": null,
                    "revertReason": null,
                    "callLayer": 9,
                    "callStack": 2,
                    "success": true,
                    "revert": false
                }
            }
        ]
    }
}

Field Definitions

Below you can find descriptions for each field of the response.

FieldDescriptionValue
idID of the event.64a636ed247148b19b4ac1d4937b19ba
webhookIdUnique ID of the webhook destination.804ad91e-3400-4462-b9f5-afe8b78ea706
typeWebhook event type.ADDRESS
createdAtTimestamp when the event notification was created.2023-08-30T11:57:50Z
eventActivity object.N/A
networkThe default network for the webhook.eth-mainnet
activityList of transfer events whose from or to address matches the address configured in the Address Activity webhook.N/A
categoryThe data standard.internal
fromAddressTransfer from address.0xb67cb505324830dd181498b5b1c8ff7ffe6a49c44f1f02eda1a5214dce56f538
toAddressTransfer to address.0x1635d18f20c9a6e302931faf61643fed57fbcce3
internalTransactionInternal Transactions that coin transfers between addresses.N/A
blockNumberThe number of the block including this transaction.18027262
blockHashA hash of the block including this transaction.0x8ab7fa9f37fb3cb19bc6fe43cbc288d64430543fac0325788f3f9638a4982049
hashTransaction hash.0xb67cb505324830dd181498b5b1c8ff7ffe6a49c44f1f02eda1a5214dce56f538
fromThe address of the sender.0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad
toThe address of the receiver.0x1635d18f20c9a6e302931faf61643fed57fbcce3
inputThe data is sent along with the transaction.0x022c0d9f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cca430ef8fb80b0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000
outputThe transaction output.null
gasGas provided by the sender.0x1bb3b
gasUsedThe amount of gas used by this specific transaction alone.0xece2
typeCall type of the transaction.CALL
valueAsset transfer value.0x0
errorError message.null
revertReasonThe revert reasonnull
callLayerThe layer of this internal tx(start from 1).9
callStackThe stack of this internal tx(start from 1).2
successEither true (success) or false (failure)true
reverEither true (revet) or false (not revert)false

How to Set Up Address Activity Webhook

  1. Navigate to the Webhook tab in your ZAN Dashboard.
  2. Click the Create New button.
  3. Set a name of the webhook. Then Address template in the dropdown.
  4. Select your Chain in the dropdown. Then choose your Network.
  5. Paste your unique webhook URL into the WEBHOOK URL field.
  6. Add your Address,both single addition and batch addition are supported.
  7. Select all address events that you need to get notifications in Event dropdown.
  8. Test your webhook by clicking the TEST button.
  9. After the test is successful, click Confirm. Your webhook appears in the list.
  10. Check your endpoint to see the responses.

📘

Note:

For more detailed steps on how to set up address activity webhooks, please refer to Create a New Webhook.