Skip to main content

Watchers payloads

When a watcher is triggered, you receive a payload. This response depends on the watcher created. Every payload follows the same structure.

  • projectid : The project id helps in correlating the incoming payload with the specific project it belongs to.
  • event : The type of event that triggered the watcher.
  • data : This is the main section of the payload, providing detailed information about the blockchain event. It invariably contains two key components:
    • transaction: all the relevant details about the transaction that triggered the watcher. It typically encompasses transaction identifiers, sender and receiver addresses, transaction value, gas information, and other crucial data that defines the transaction.
    • receipt: The receipt part of the data gives an overview of the transaction's outcome. It includes information such as the status of the transaction (successful or failed), gas used, logs generated by the transaction, and other details that are part of the transaction's receipt.

This tab details the payload structure when monitoring blockchain addresses. It is used to track activities like transactions involving specific wallet addresses, including incoming and outgoing transfers of native currency.

{
"projectId": "string",
"event": "ADDRESS_ACTIVITY",// or "ADDRESS_RECEIVED_NATIVE_CURRENCY" or "ADDRESS_SENT_NATIVE_CURRENCY"
"data": {
"transaction": {
"hash": "string",
"type": "number",
"accessList": [],
"blockHash": "string",
"blockNumber": "number",
"transactionIndex": "number",
"confirmations": "number",
"from": "string",
"gasPrice": {
"hex": "string",
"raw": "string"
},
"maxPriorityFeePerGas": {
"hex": "string",
"raw": "string"
},
"maxFeePerGas": {
"hex": "string",
"raw": "string"
},
"gasLimit": {
"hex": "string",
"raw": "string"
},
"to": "string",
"value": {
"hex": "string",
"raw": "string"
},
"nonce": "number",
"data": "string",
"r": "string",
"s": "string",
"v": "number",
"creates": null,
"chainId": "number"
},
"receipt": {
"to": "string",
"from": "string",
"contractAddress": null,
"transactionIndex": "number",
"gasUsed": {
"hex": "string",
"raw": "string"
},
"logsBloom": "string",
"blockHash": "string",
"transactionHash": "string",
"logs": [
{
"transactionIndex": "number",
"blockNumber": "number",
"transactionHash": "string",
"address": "string",
"topics": ["string", "string", "string", "string"],
"data": "string",
"logIndex": "number",
"blockHash": "string"
}
],
"blockNumber": "number",
"confirmations": "number",
"cumulativeGasUsed": {
"hex": "string",
"raw": "string"
},
"effectiveGasPrice": {
"hex": "string",
"raw": "string"
},
"status": "number",
"type": "number",
"byzantium": "boolean"
},
"network": "string",
"blockchain": "string"
}
}