跳转至主要内容

Functions Data Sources

更新于
2026年6月26日
Deprecation Notice: Quicknode Functions
Deprecation Notice: Quicknode Functions

Quicknode Functions will be deprecated and will no longer be available soon.

:::

概述

Each function execution receives parameters with two main fields:


  • params.metadata — an object containing metadata about the batch and network.
  • params.data — the dataset itself. The shape of 数据 depends on the selected dataset type and chain client's structure for the given data. We do not modify the structure of the underlying data.

Function Metadata Properties

Functions receive streamlined metadata focused on execution context:

Function Metadata Properties
Property类型描述示例
batch_end_range整数Ending range of batches in a dataset33844813
batch_start_range整数Starting range of batches in a dataset33844813
dataset字符串Type of dataset"block_with_receipts"
网络字符串Relevant blockchain network"b3-mainnet"

Function Parameters Example

{
"params": {
"data": {
// Dataset content structure varies by dataset type
// and maintains the original format from the data source
},
"metadata": {
"batch_end_range": 33844813,
"batch_start_range": 33844813,
"dataset": "block_with_receipts",
"network": "b3-mainnet"
}
}
}

Note: Function metadata contains only essential batch and network information, unlike stream metadata which includes additional configuration and delivery options.

Data Schema Information
Select a blockchain type below to view the relevant data schemas and payload structures specific to that chain type. Each tab contains detailed information about supported dataset types and their JSON specifications.

Dataset Types (EVM)

The data returned is an 数组 of block objects as returned by eth_getBlockByNumber. 该 schema models the structure of individual blocks on a chain, including fields like 哈希, 数字, 非重复值, and other relevant block data.

Additionally, it supports configuration options for re-org handling and batch sizes, allowing for customized data management and retrieval.

Note: Please review the chain specific documentation for the RPC method indicated above for more details about that chain's expected payload shape.

JSON Spec
{
"data": [
{
"gasUsed": "0xd0d11a",
"hash": "0xd964c5deacbea3e3df775ad1ed49744882d95dbdd1ae058b813cece959676820",
"number": "0x125d3e5",
"parentHash": "0xf31bcd75d2bebfe97a9aabae5c644c8d137552d2be3d8ff9f01278624d911011",
"timestamp": "0x65d2444f",
"transactions": [
{
"blockHash": "0xd964c5deacbea3e3df775ad1ed49744882d95dbdd1ae058b813cece959676820",
"blockNumber": "0x125d3e5",
}],
...
}
],
"metadata": {
"dataset": "block",
"end_range": -1,
"network": "ethereum-mainnet",
"stream_id": "f6ad6459-b5ad-4183-b370-1c1388e47e83",
...
}
}

Receipts

The data returned is an 数组 of arrays, each containing receipt objects as returned by eth_getBlockReceipts. 该 Receipts schema corresponds to transaction receipts, focusing solely on transactions and excluding block details. These receipts serve as proof of transaction execution, detailing outcomes and specifics like gas usage.

Note: Please review the chain specific documentation for the RPC method indicated above for more details about that chain's expected payload shape.

JSON Spec
{
"data": [
[
{
"blockHash": "0xd010dbc965455076441782aa97a7aa1f526fe9da73b9af6ad319b87e84703475",
"blockNumber": "0x16263bb",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x2646fc5db",
"from": "0xab4f2fdca7521012edfee6e916778c6dae719bd3",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x82268e2cb7ac9ab32e3a99c68e5c13fbde1ae1f8",
"transactionHash": "0xfd3b28c03c750477a8451aa0fd66dad27ed06065bdcd21b092ebecd14c12649b",
"transactionIndex": "0x0",
"type": "0x0"
},
...
]
"metadata": {
"dataset": "block",
"end_range": -1,
"network": "ethereum-mainnet",
"stream_id": "f6ad6459-b5ad-4183-b370-1c1388e47e83",
...
}
]
}

Block with Receipts

The data returned is an 数组 of objects containing a composite dataset with:


The Block with Receipts schema represents comprehensive details on individual blocks and their transaction receipts. These receipts contain details such as the transaction status (successful or failed), gas utilized, value transferred, logs generated, and more.

Note: Please review the chain specific documentation for the RPC method indicated above for more details about that chain's expected payload shape.

JSON Spec
{
"data": [
{
"block": {
"baseFeePerGas": "0xfd069ed",
"blobGasUsed": "0x120000",
"parentBeaconBlockRoot": "0x1a623c846de9af135b2bf3902e72dfb4d3922c6af5f2463af72080048c11f4bf",
"parentHash": "0x590857a38b05fead84006130b330716de40d87d054266d2c2589fb6c4d7ac4b0",
"size": "0x260c9",
"stateRoot": "0x56f5424f549df97b940ceceaa17e7f606676bbf4951ba81e0e2cc41dcb59887e",
"timestamp": "0x68ada7e3",
"transactions": [
{
"blockHash": "0xd010dbc965455076441782aa97a7aa1f526fe9da73b9af6ad319b87e84703475",
"blockNumber": "0x16263bb",
"from": "0xab4f2fdca7521012edfee6e916778c6dae719bd3",
"gas": "0x186a0",
...
},
...
]
}
}
]
}

日志

The data returned is an 数组 of arrays of log objects, as they appear within the 日志 array in transaction receipts. The 日志 data schema corresponds to event logs generated by smart contract transactions, documenting significant events, function calls, or other relevant activities occurring within smart contracts. This data is associated with the eth_getLogs JSON-RPC method, providing insights on smart contract interactions per block.

Note: Please review the chain specific documentation for the RPC method indicated above for more details about that chain's expected payload shape.

JSON Spec
{
"data": [
[
[
{
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000d4bc53434c5e12cb41381a556c3c47e1a86e80e3",
"0x00000000000000000000000011b815efb8f581194ae79006d24e0d814b7697f6"
],
"data": "0x0000000000000000000000000000000000000000000000144cb0059dd91ec491",
"blockNumber": "0x16263be",
"transactionHash": "0x4cda2112bfb02ff07b3a88eced7e5f972ea2827bdcab448ae07d6330d62b30a2",
"transactionIndex": "0x0",
"blockHash": "0xb0587a2035660384c0a2f31bc2977f2dc60408618f67be97149d14b5fbc0741b",
"logIndex": "0x0",
"removed": false
},
...
]
]
]
}

交易

The data returned is an 数组 of arrays of transaction objects, as they appear in the 交易 array of block data. The 交易 data schema narrows data down to focus on transaction details, similar to each transaction object you would get when using the eth_getTransactionByHash method. It utilizes transaction hashes, returned from a method like eth_getBlockByNumber, to loop over each transaction hash and return its transaction object. This makes it easy to look up detailed transaction information.

Note: Please review the chain specific documentation for the RPC method indicated above for more details about that chain's expected payload shape.

JSON Spec
{
"data": [
[
{
"blockHash": "0xb0587a2035660384c0a2f31bc2977f2dc60408618f67be97149d14b5fbc0741b",
"blockNumber": "0x16263be",
"from": "0xd1fa51f2db23a9fa9d7bb8437b89fb2e70c60cb7",
"gas": "0x62b01",
"gasPrice": "0x121f68f4",
"accessList": [
{
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"storageKeys": [
"0x4407b7e3a4d56c18eef645ef52b0e5371965ec86a7c46343194da25177be0647",
"0x0cb865ff1951c90111975d77bc75fa8312f25b08bb19b908f6b9c43691ac0caf"
]
},
]
...
}
]
]
}

Traces (debug_traceBlock)

The data returned is an 数组 of arrays of trace data as returned by debug_traceBlock. 该 Traces (debug_trace) data source provides a granular, step-by-step look at transaction executions, including internal calls and state changes, which is critical for debugging and optimizing smart contracts.

Note: Please review the chain specific documentation for the RPC method indicated above for more details about that chain's expected payload shape.

JSON Spec
{
"data": [
[
{
"txHash": "0x4cda2112bfb02ff07b3a88eced7e5f972ea2827bdcab448ae07d6330d62b30a2",
"result": {
"from": "0xd1fa51f2db23a9fa9d7bb8437b89fb2e70c60cb7",
"gas": "0x62b01",
"gasUsed": "0x4514e",
"to": "0xd4bc53434c5e12cb41381a556c3c47e1a86e80e3",
"input": "0x2b8e11b815efb8f581194ae79006d24e0d814b7697f6c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2dac17f958d2ee523a2206206994597c13d831ec701f4fd107afd10847b040a9b58b8144cb0ffd8bf95feff06",
"calls": [
{
"from": "0xd4bc53434c5e12cb41381a556c3c47e1a86e80e3",
"gas": "0x4d23e",
"gasUsed": "0x30ba3",
"to": "0x11b815efb8f581194ae79006d24e0d814b7697f6",
"input": "0x3c8a7d8d000000000000000000000000d4bc53434c5e12cb41381a556c3c47e1a86e80e3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd107afffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd10840000000000000000000000000000000000000000000000040a9b58000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000062000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000001f41af0",
"output": "0x0000000000000000000000000000000000000000000000144cb0059dd91ec491000000000000000000000000000000000000000000000000000000bf95fe129e",
"calls": [
{
"from": "0x11b815efb8f581194ae79006d24e0d814b7697f6",
"gas": "0x233a2",
"gasUsed": "0x216",
"to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"input": "0x70a0823100000000000000000000000011b815efb8f581194ae79006d24e0d814b7697f6",
"output": "0x000000000000000000000000000000000000000000000080345e162ea2af791c",
"type": "STATICCALL"
},
...
]
}
...
]
}
}
]
]
}

Traces (trace_block)

The data returned is an 数组 of arrays of trace data as returned by trace_block. 该 Traces (trace_block) data source provides a granular, step-by-step look at transaction executions, including internal calls and state changes, which is critical for debugging and optimizing smart contracts. This data source is based off the trace_block 以及 trace_transaction RPC methods and is served by Erigon blockchain node clients.

Note: Please review the chain specific documentation for the RPC method indicated above for more details about that chain's expected payload shape.

JSON Spec
{
"data": [
[
{
"action": {
"from": "0xd1fa51f2db23a9fa9d7bb8437b89fb2e70c60cb7",
"callType": "call",
"gas": "0x4e7a9",
"input": "0x2b8e11b815efb8f581194ae79006d24e0d814b7697f6c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2dac17f958d2ee523a2206206994597c13d831ec701f4fd107afd10847b040a9b58b8144cb0ffd8bf95feff06",
"to": "0xd4bc53434c5e12cb41381a556c3c47e1a86e80e3",
"value": "0x7"
},
"blockHash": "0xb0587a2035660384c0a2f31bc2977f2dc60408618f67be97149d14b5fbc0741b",
"blockNumber": 23225278,
"result": {
"gasUsed": "0x30df6",
"output": "0x"
},
"subtraces": 1,
"traceAddress": [],
"transactionHash": "0x4cda2112bfb02ff07b3a88eced7e5f972ea2827bdcab448ae07d6330d62b30a2",
"transactionPosition": 0,
"type": "call"
},
...
]
]
}

Block with Receipts + debug_traces

The data returned is an 数组 of objects containing a composite dataset with:


  • 收据
  • traces (from debug_traceBlock)

If you want to retrieve an all-in-one data source for backfilling historical blockchain data, a data schema like Block with Receipts and debug_trace can retrieve block and transaction receipts, along with step-by-step transaction execution traces and internal transactions. This data source uses the eth_getBlockByNumber, eth_getBlockReceipts, and debug_traceBlock RPC methods.

Note: Please review the chain specific documentation for the RPC method indicated above for more details about that chain's expected payload shape.

JSON Spec
{
"data": [
[
{
"action": {
"from": "0xd1fa51f2db23a9fa9d7bb8437b89fb2e70c60cb7",
"callType": "call",
"gas": "0x4e7a9",
"input": "0x2b8e11b815efb8f581194ae79006d24e0d814b7697f6c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2dac17f958d2ee523a2206206994597c13d831ec701f4fd107afd10847b040a9b58b8144cb0ffd8bf95feff06",
"to": "0xd4bc53434c5e12cb41381a556c3c47e1a86e80e3",
"value": "0x7"
},
"blockHash": "0xb0587a2035660384c0a2f31bc2977f2dc60408618f67be97149d14b5fbc0741b",
"blockNumber": 23225278,
"result": {
"gasUsed": "0x30df6",
"output": "0x"
},
"subtraces": 1,
"traceAddress": [],
"transactionHash": "0x4cda2112bfb02ff07b3a88eced7e5f972ea2827bdcab448ae07d6330d62b30a2",
"transactionPosition": 0,
"type": "call"
},
...
]
]
}

Block with Receipts + trace_block

The data returned is an 数组 of objects containing a composite dataset with:


  • 收据
  • traces (from trace_block)

NOTE: This data source is an alternative to the Block with Receipts & debug_trace schema above. It utilizes the trace_transaction RPC method from Erigon, instead of using the debug API from Geth.

If you want to backfill historical blockchain data, a data schema like Block with Receipts and trace_block, is one solution. This data source uses the trace_transaction RPC method to retrieve transaction execution traces and internal transactions along with block and transaction receipt information using eth_getBlockByNumber, eth_getBlockReceipts RPC methods.

Note: Please review the chain specific documentation for the RPC method indicated above for more details about that chain's expected payload shape.

JSON Spec
{
"data": [
{
"block": {
"baseFeePerGas": "0x11d38b33",
"blobGasUsed": "0xa0000",
"difficulty": "0x0",
"excessBlobGas": "0x100000",
"extraData": "0x4275696c6465724e65742028466c617368626f747329",
"gasLimit": "0x2aea515",
...
"transactions": [
{
"blockHash": "0xda7dc0d852bf5fb4d512a4cd57d341ac908794851ce0b7f169f9963c851bb385",
"blockNumber": "0x16263c0",
"from": "0xae2fc483527b8ef99eb5d9b44875f005ba1fae13",
"gas": "0x453e74",
"gasPrice": "0x11d38b33",
"hash": "0x7d3220bd6b43886a3d30262c5b5e5366a16d0597f417e3010bea0a478a3e12e5",
...
"accessList": [
{
"address": "0x041db0b7aa2237c33ea836ad12c3ee8d0afd5e4d",
"storageKeys": [
"0x000000000000000000000000000000000000000000000000000000000000000e",
"0x000000000000000000000000000000000000000000000000000000000000000f",
...
]
},
{
"address": "0x40aabef1aa8f0eec637e0e7d92fbffb2f26a8b7b",
"storageKeys": [
"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc",
"0x000000000000000000000000000000000000000000000000000000000000003a",
...
]
},
...
]
}
...
}
}
]
}

支持的区块链

Block with Receipts交易日志ReceiptsTraces (trace_block)Traces (debug_trace)Block with Receipts + debug_traceBlock with Receipts + trace_block
0g
摘要
Arbitrum
Arbitrum Nova
Avalanche C-Chain
B3
Base
Bera
比特币
比特币现金
爆炸
BNB 智能链
Celo
网络
以太坊
Fantom
Flow
Fraxtal (Select Access Chain)
诺斯替主义
重力
Hedera
Hemi
Hyperliquid EVM
不可变 zkEVM
单射
墨水
日本开放链
凯亚
镜头
Lisk (Select Access Chain)
Linea
Mantle
Mode (Select Access Chain)
Monad
Morph
乐观主义
Peaq
等离子体
Polygon
Polygon zkEVM
Redstone (Select Access Chain)
撒哈拉
滚动
Sei
索拉纳✅ (with Programs)
索尼克
索尼厄姆
索福尼
DATA
Tron
Unichain
瓦纳
Worldchain
Xai
XRP 账本✅ (Ledger)
zkSync
佐拉

Select Access Chains

Fraxtal, Lisk, Mode, and Redstone are Select Access Chains. These networks require a subscription to access. To learn more about Select Access Chains, check out this blog on Introducing Select Access Chains: Your Chain, Your Choice

我们 ❤️ 您的反馈!

如果您对本文档有任何反馈或疑问,请告诉我们。我们非常期待您的反馈!

分享此文档