listLatestBlocks Query
Parameters
block
integer
REQUIRED
The number of blocks you want to fetch
Returns
data
object
The data object which contains the following fields:
blocks
object
The blocks object which contains the following fields:
nodes
array
An array containing individual block records.
id
string
The unique identifier of a block
transactions
array
An array containing the transactions within the block
id
string
The unique identifier of a transaction
inputAssetIds
array
An array of asset IDs used as inputs in the transaction
inputs
array
An array containing the inputs used in the transaction
__typename
string
The specific type of input or output in the transaction
owner
string
The address that owned the input in the transaction
utxoId
string
The unique identifier for the unspent transaction output (UTXO) related to the input
amount
string
The amount of the asset involved in the transaction
assetId
string
The unique identifier of the asset involved in the transaction
outputs
array
An array of outputs, representing where the transaction sends value
__typename
string
The specific type of input or output in the transaction
inputIndex
string
The index of the input that this contract output is associated with
balanceRoot
string
The root hash representing the contracts balance state
stateRoot
string
The root hash representing the contracts overall state
to
string
The address which recieved the transaction
amount
string
The amount of the asset involved in the transaction
assetId
string
The unique identifier of the asset involved in the transaction
Request
1curl --location 'https://docs-demo.fuel-mainnet.quiknode.pro/v1/graphql' \2--header 'Accept: application/json' \3--header 'Content-Type: application/json' \4--data '{5"query": "query LatestBlocks { blocks(last: 5) { nodes { id transactions { id inputAssetIds inputs { __typename ... on InputCoin { owner utxoId amount assetId } ... on InputContract { utxoId contractId } ... on InputMessage { sender recipient amount data } } outputs { __typename ... on CoinOutput { to amount assetId } ... on ContractOutput { inputIndex balanceRoot stateRoot } ... on ChangeOutput { to amount assetId } ... on VariableOutput { to amount assetId } ... on ContractCreated { contract stateRoot } } } } } }"6}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free