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.
- Monitoring Addresses
- Monitoring smart contracts
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"
}
}
In this tab, you'll find the payload structure related to monitoring smart contracts. This includes a variety of events like token transfers, minting, and approvals in ERC20, ERC721, and ERC1155 contracts, as well as custom events defined in your smart contracts.
- EVENT TRANSFER
- EVENT MINT
- EVENT APPROVAL
- ERC721 EVENT TRANSFER
- ERC1155 EVENT TRANSFER SINGLE
- ERC1155 EVENT TRANSFER BATCH
{
"projectId": "string",
"event": "ERC721_EVENT_TRANSFER",
"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",
"transfer": {
"to": "string",
"from": "string",
"tokenId": {
"hex": "string",
"raw": "string"
},
"contractAddress": "string"
}
}
}
{
projectId: "string",
event: "EVENT_MINT",
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",
mint: {
to: "string", // Receiver of the new minted tokens
value: {
// Amount minted
type: "string", // Type associated to the hex value
hex: "string", // Value expressed as "type" in hexadecimal
},
contractAddress: "string",
},
},
}
{
projectId: "string",
event: "EVENT_APPROVAL",
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",
approval: {
owner: "string",
spender: "string",
value: {
// Amount minted
type: "string", // Type associated to the hex value
hex: "string", // Value expressed as "type" in hexadecimal
},
contractAddress: "string",
},
},
}
{
"projectId": "string",
"event": "ERC721_EVENT_TRANSFER",
"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",
"transfer": {
"to": "string",
"from": "string",
"tokenId": {
"hex": "string",
"raw": "string"
},
"contractAddress": "string"
}
}
}
{
"projectId": "string",
"event": "ERC1155_EVENT_TRANSFER_SINGLE",
"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",
"transferSingle": {
"operator": "string",
"to": "string",
"from": "string",
"id": {
"hex": "string",
"raw": "string"
},
"value": {
"hex": "string",
"raw": "string"
},
"contractAddress": "string"
}
}
}
{
"projectId": "string",
"event": "ERC1155_EVENT_TRANSFER_BATCH",
"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",
"transferSingle": {
"operator": "string",
"to": "string",
"from": "string",
"ids": [
{
"hex": "string",
"raw": "string",
"formatted": "string",
"decimal": "number"
}
],
"contractAddress": "string"
}
}
}