Skip to main content

Block

A block containing transactions and metadata. Blocks are the fundamental unit of the blockchain, each building on the previous one.

Schema Definition

type Block {
number: BlockNumber!
hash: BlockHash!
timestamp: Timestamp!
transactionCount: Int!
gasUsed: BigInt!
gasLimit: BigInt!
difficulty: BigInt!
size: Int!
confirmations: Int!
transactions(
first: Int = 10
after: Cursor
where: BlockTransactionFilter
orderBy: BlockTransactionOrderBy
orderDirection: OrderDirection
): BlockTransactionList!
contractsCreated(
first: Int = 10
after: Cursor
where: ContractFilter
orderBy: ContractOrderBy
orderDirection: OrderDirection
): ContractList!
}

Fields

FieldTypeDescription
number
BlockNumber! non-null scalar
Block number (height) representing the position in the blockchain. Genesis block is 0.
hash
BlockHash! non-null scalar
Unique 256-bit hash identifying this block.
timestamp
Timestamp! non-null scalar
Timestamp when this block was mined/validated.
transactionCount
Int! non-null scalar
Number of transactions included in this block.
gasUsed
BigInt! non-null scalar
Total gas consumed by all transactions in this block.
gasLimit
BigInt! non-null scalar
Maximum gas that could be used in this block (block gas limit).
difficulty
BigInt! non-null scalar
Mining difficulty for this block (relevant for pre-merge proof-of-work blocks).
size
Int! non-null scalar
Total size of the block in bytes, including all transaction data.
confirmations
Int! non-null scalar
Number of blocks that have been mined after this one. Higher confirmations indicate greater finality.
transactions
BlockTransactionList! non-null object
Transactions included in this block, paginated.
contractsCreated
ContractList! non-null object
Smart contracts that were deployed in this block, paginated.

transactions Arguments

ArgumentTypeDescription
first
Int scalar
Maximum number of results to return (default: 10, max: 100).
after
Cursor scalar
Cursor for pagination. Pass the endCursor from a previous query to get the next page.
whereFilter criteria for block transactions.
orderByField to sort results by.
orderDirectionSort direction (ascending or descending).

contractsCreated Arguments

ArgumentTypeDescription
first
Int scalar
Maximum number of results to return (default: 10, max: 100).
after
Cursor scalar
Cursor for pagination. Pass the endCursor from a previous query to get the next page.
whereFilter criteria for contracts.
orderByField to sort results by.
orderDirectionSort direction (ascending or descending).

Returned By

block query

Member Of

BlockList object ● Contract object ● IContract interface ● NFTContract object ● Token object ● Transaction object