Documentation Index
Fetch the complete documentation index at: https://docs.chainstream.io/llms.txt
Use this file to discover all available pages before exploring further.
本页提供区块链基础设施相关 Cube 的查询示例 — 涵盖区块、交易、智能合约事件与内部 trace 等基础数据。
最新区块(Solana)
query {
Solana {
Blocks(limit: {count: 10}, orderBy: {descending: Block_Time}) {
Block {
Time
Slot
Height
Hash
ParentSlot
TxCount
}
}
}
}
最新区块(Ethereum)
query {
EVM(network: eth) {
Blocks(limit: {count: 10}, orderBy: {descending: Block_Time}) {
Block {
Time
Number
Hash
GasUsed
GasLimit
BaseFee
TxCount
Coinbase
}
}
}
}
按地址查询近期交易(Solana)
query {
Solana {
Transactions(
signer: {is: "WALLET_ADDRESS"}
limit: {count: 20}
orderBy: {descending: Block_Time}
) {
Block { Time Slot }
Transaction {
Signature
Fee
FeePayer
Result { Success }
}
}
}
}
按地址查询近期交易(EVM)
query {
EVM(network: eth) {
Transactions(
fromAddress: {is: "0xWALLET_ADDRESS"}
limit: {count: 20}
orderBy: {descending: Block_Time}
) {
Block { Time Number }
Transaction {
Hash
From
To
Value
Gas
GasPrice
}
}
}
}
事件(仅 EVM)
按合约与 Topic 过滤事件
query {
EVM(network: eth) {
Events(
contractAddress: {is: "0xCONTRACT_ADDRESS"}
limit: {count: 20}
orderBy: {descending: Block_Time}
) {
Block { Time Number }
Transaction { Hash }
Log {
SmartContract
Index
Signature { Name Signature }
Data
}
}
}
}
按事件签名(Topic0)过滤
query {
EVM(network: eth) {
Events(
topic0: {is: "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"}
limit: {count: 10}
orderBy: {descending: Block_Time}
) {
Block { Time }
Transaction { Hash }
Log { SmartContract Index Data }
}
}
}
调用 / Trace(仅 EVM)
对某合约的内部调用
query {
EVM(network: eth) {
Calls(
toAddress: {is: "0xCONTRACT_ADDRESS"}
limit: {count: 20}
orderBy: {descending: Block_Time}
) {
Block { Time Number }
Transaction { Hash }
Call {
From
To
Opcode
Value
Gas
GasUsed
Signature { Name }
}
}
}
}
指令(仅 Solana)
某程序的近期指令
query {
Solana {
Instructions(
programId: {is: "PROGRAM_ADDRESS"}
limit: {count: 20}
orderBy: {descending: Block_Time}
) {
Block { Time Slot }
Transaction { Signature }
Instruction {
Index
Depth
Program { Address Name Method }
Accounts
}
}
}
}
奖励(仅 Solana)
验证者的质押奖励
query {
Solana {
Rewards(
address: {is: "VALIDATOR_ADDRESS"}
limit: {count: 50}
orderBy: {descending: Block_Time}
) {
Block { Time Slot }
Reward {
Address
Amount
AmountInUSD
PostBalance
RewardType
Commission
}
}
}
}
矿工奖励(仅 EVM)
区块奖励构成
query {
EVM(network: eth) {
MinerRewards(
limit: {count: 20}
orderBy: {descending: Block_Time}
) {
Block { Time Number }
Reward {
Miner
TotalReward
TotalRewardInUSD
StaticReward
DynamicReward
TxFees
BurntFees
}
}
}
}
相关文档
数据 Cube
所有 Cube(含 Blocks、Transactions、Events、Calls)的详细字段结构。
链分组
了解 EVM 与 Solana 分别提供哪些 Cube。