Overview
Depending on your use case, certain event related information may be more actionable or valuable to you. When configuring your webhook destination, you can choose the type of payload you want to receive when your expression matches an event in the streaming blockchain data. The available payload types are as follows:
EVM Payload Types
1. Block
The full block data, including all the transactions within the block, will be sent as the payload.
Example Payload
- EVM JSON Sample
- EVM Type Definition
export interface Block {
baseFeePerGas: string;
difficulty: string;
extraData: string;
gasLimit: string;
gasUsed: string;
hash: string;
logsBloom: string;
miner: string;
mixHash: string;
nonce: string;
number: string;
parentHash: string;
receiptsRoot: string;
sha3Uncles: string;
size: string;
stateRoot: string;
timestamp: string;
totalDifficulty: string;
transactions?: (TransactionsEntity)[] | null;
transactionsRoot: string;
uncles?: (null)[] | null;
}
export interface TransactionsEntity {
accessList?: (AccessListEntity | null)[] | null;
blockHash: string;
blockNumber: string;
chainId: string;
from: string;
gas: string;
gasPrice: string;
hash: string;
input: string;
maxFeePerGas: string;
maxPriorityFeePerGas: string;
nonce: string;
r: string;
s: string;
to: string;
transactionIndex: string;
type: string;
v: string;
value: string;
}
export interface AccessListEntity {
address: string;
storageKeys?: (string)[] | null;
}
2. All Transactions
This payload type returns all of the transactions from the block in which your QuickAlerts expression fires an event.
Example Payload
- EVM JSON Sample
- EVM Type Definition
export interface Transaction {
accessList?: AccessListEntity[] | null;
blockHash: string;
blockNumber: string;
chainId: string;
from: string;
gas: string;
gasPrice: string;
hash: string;
input: string;
maxFeePerGas: string;
maxPriorityFeePerGas: string;
nonce: string;
r: string;
s: string;
to: string;
transactionIndex: string;
type: string;
v: string;
value: string;
}
export interface AccessListEntity {
address: string;
storageKeys?: string[] | null;
}
3. All Receipts
This payload type returns all transaction receipts from the block in which your QuickAlerts expression fires an event.
Example Payload
- EVM JSON Sample
- EVM Type Definition
export interface TransactionReceipt {
blockHash: string;
blockNumber: string;
contractAddress: string;
cumulativeGasUsed: string;
effectiveGasPrice: string;
from: string;
gasUsed: string;
logs?: (LogsEntity | null)[] | null;
logsBloom: string;
status: string;
to: string;
transactionHash: string;
transactionIndex: string;
type: string;
}
export interface LogsEntity {
address: string;
blockHash: string;
blockNumber: string;
data: string;
logIndex: string;
removed: boolean;
topics?: (string)[] | null;
transactionHash: string;
transactionIndex: string;
}
4. Matched Transactions
This payload type returns the transactions matching your QuickAlerts expression.
Example Payload
- EVM JSON Sample
- EVM Type Definition
export interface Transaction {
accessList?: (AccessListEntity)[] | null;
blockHash: string;
blockNumber: string;
chainId: string;
from: string;
gas: string;
gasPrice: string;
hash: string;
input: string;
maxFeePerGas: string;
maxPriorityFeePerGas: string;
nonce: string;
r: string;
s: string;
to: string;
transactionIndex: string;
type: string;
v: string;
value: string;
}
export interface AccessListEntity {
address: string;
storageKeys?: (string)[] | null;
}
5. Matched Receipts
This payload type returns the transaction receipts matching your QuickAlerts expression.
Example Payload
- EVM JSON Sample
- EVM Type Definition
export interface TransactionReceipt {
blockHash: string;
blockNumber: string;
contractAddress: string;
cumulativeGasUsed: string;
effectiveGasPrice: string;
from: string;
gasUsed: string;
logs?: (LogsEntity | null)[] | null;
logsBloom: string;
status: string;
to: string;
transactionHash: string;
transactionIndex: string;
type: string;
}
export interface LogsEntity {
address: string;
blockHash: string;
blockNumber: string;
data: string;
logIndex: string;
removed: boolean;
topics?: (string)[] | null;
transactionHash: string;
transactionIndex: string;
}
6. Matched Transaction Hashes
This payload type returns a comma separated list of transaction hashes matching your QuickAlerts expression.
Example Payload
- EVM JSON Sample
- EVM Type Definition
export type TransactionHashes = string[];
7. Matched Transactions and Receipts
This payload type returns the transactions and transaction receipts matching your QuickAlerts expression.
Example Payload
- EVM JSON Sample
- EVM Type Definition
export interface Root {
matchedReceipts: MatchedReceipt[]
matchedTransactions: MatchedTransaction[]
}
export interface MatchedReceipt {
blockHash: string
blockNumber: string
contractAddress: string
cumulativeGasUsed: string
effectiveGasPrice: string
from: string
gasUsed: string
logs: Log[]
logsBloom: string
status: string
to: string
transactionHash: string
transactionIndex: string
type: string
}
export interface Log {
address: string
blockHash: string
blockNumber: string
data: string
logIndex: string
removed: boolean
topics: string[]
transactionHash: string
transactionIndex: string
}
export interface MatchedTransaction {
accessList: any[]
blockHash: string
blockNumber: string
chainId: string
from: string
gas: string
gasPrice: string
hash: string
input: string
maxFeePerGas: string
maxPriorityFeePerGas: string
nonce: string
r: string
s: string
to: string
transactionIndex: string
type: string
v: string
value: string
}
UTXO Payload Types
1. Block
The full block data, including all the transactions within the block, will be sent as the payload.
Example Payload
- UTXO JSON Sample
- UTXO Type Definition
export interface Block {
block: Block1;
block_number: number;
network: string;
topic: string;
txs?: (TxsEntity)[] | null;
}
export interface Block1 {
bits: string;
confirmations: number;
difficulty: string;
hash: string;
height: number;
merkleRoot: string;
nextBlockHash: string;
nonce: string;
previousBlockHash: string;
size: number;
time: number;
txCount: number;
version: number;
}
export interface TxsEntity {
blockHash: string;
blockHeight: number;
blockTime: number;
confirmations: number;
fees: string;
txid: string;
value: string;
valueIn: string;
vin?: (VoutEntityOrVinEntity)[] | null;
vout?: (VoutEntityOrVinEntity)[] | null;
}
export interface VoutEntityOrVinEntity {
addresses?: (string)[] | null;
isAddress: boolean;
n: number;
value: string;
}
2. All Transactions
This payload type returns all of the transactions from the block in which your QuickAlerts expression fires an event.
Example Payload
- UTXO JSON Sample
- UTXO Type Definition
export interface Transaction {
blockHash: string;
blockHeight: number;
blockTime: number;
confirmations: number;
fees: string;
txid: string;
value: string;
valueIn: string;
vin?: (VoutEntityOrVinEntity)[] | null;
vout?: (VoutEntityOrVinEntity)[] | null;
}
export interface VoutEntityOrVinEntity {
addresses?: (string)[] | null;
isAddress: boolean;
n: number;
value: string;
}
4. Matching Transactions
This payload type returns matching transactions from the block in which your QuickAlerts expression fires an event.
Example Payload
- UTXO JSON Sample
- UTXO Type Definition
export interface Transaction {
blockHash: string;
blockHeight: number;
blockTime: number;
confirmations: number;
fees: string;
txid: string;
value: string;
valueIn: string;
vin?: (VoutEntityOrVinEntity)[] | null;
vout?: (VoutEntityOrVinEntity)[] | null;
}
export interface VoutEntityOrVinEntity {
addresses?: (string)[] | null;
isAddress: boolean;
n: number;
value: string;
}
6. Matched Transaction Hashes
This payload type returns a comma separated list of transaction hashes matching your QuickAlerts expression.
Example Payload
- UTXO JSON Sample
- UTXO Type Definition
export type TransactionHashes = string[];
Summary
By offering a variety of payload types, QuickAlerts provides you with the flexibility to receive the information most relevant to your needs. You can select your preferred payload type during the webhook configuration process, and you can update this selection at any time. Please note: Editing the payload type for a webhook destination will affect all QuickAlerts which use that destination.