GetBlockById
Query block by ID (block hash) (Confirmed state).
This method will use 30
Compute Units.
Parameters
value
- String - The block ID
Returns
blockID
string
block hash
block_header.raw_data.timestamp
int64
block timestamp
block_header.raw_data.txTrieRoot
string
the root of transaction merkle tree
block_header.raw_data.parentHash
string
parent block hash
block_header.raw_data.number
int64
block number
block_header.raw_data.witness_id
int64
super representative id
block_header.raw_data.witness_address
string
super representative address
block_header.raw_data.version
int32
version
block_header.raw_data.accountStateRoot
string
the root of account state tree
block_header.witness_signature
string
the signature of SR
transactions
Transaction[]
Transaction information in the block, please refer to gettransactionbyid for the content contained in each transaction
// Result
{
"blockID": "000000000487073bbb35501d882bd1656d487af0241fa251db821739e7597d61",
"block_header": {
"raw_data": {
"number": 75958075,
"txTrieRoot": "043c9f3c73165fb91d57498e8926e97e3b158cfa42a5432af017091276e79ff9",
"witness_address": "411c8163d2a981b90481dcc8ca34c0f837b3305bc6",
"parentHash": "000000000487073a2a88e074342beaa1355e72e84a88f18398368f58120a3127",
"version": 32,
"timestamp": 1758534306000
},
"witness_signature": "005342a355f3d132261b137c9914d3e893ba296ab12fcc4b55648f4c6b01503b58198b6d3e7f1481f176aab67e2bece9acec260c49d000981873008d1dfe7bfe00"
}
}
curl https://mainnet.tron.validationcloud.io/v1/<YOUR_API_KEY_HERE>/walletsolidity/getblockbyid \
-X POST \
-H "Content-Type: application/json" \
-d '{"value":"000000000487030b928c1fde590788cd03920a68177d565661fec5a8c2897a2a"}'
Last updated
Was this helpful?