GetBlockByNum

Queries whether a specified block is confirmed,If the block can be obtained, the block is confirmed by the network; if the block cannot be obtained, the block is not confirmed by the network.

This method will use 30 Compute Units.


Parameters

  • num - int32 - The block number

Returns

Field
Type
Description

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": "0000000004870706135c80388d9d9032eec89e9a54446fc70de829680b856138",
	"block_header": {
		"raw_data": {
			"number": 75958022,
			"txTrieRoot": "3bbcc016d586046ec7d2aab1e4f73c69b3d298fc80730e02e2c38fd39bdab367",
			"witness_address": "4104d7c791ace5750943fc8330b4a285b365dcbb42",
			"parentHash": "0000000004870705085da43b30b6f64cd0ea69873c4edb75f71899811ac8f32e",
			"version": 32,
			"timestamp": 1758534147000
		},
		"witness_signature": "9ad58c33c41643def9496f2937cea2905a04fdd7a7ec7edf3f46fa6edf1ebff41d6f0bc122c367db5a6b64e6bdbce6fb010a3c3d3bbacc0f19d1ada066b0c97900"
	}
}
curl https://mainnet.tron.validationcloud.io/v1/<YOUR_API_KEY_HERE>/walletsolidity/getblockbynum \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"num":75957003}'

Last updated

Was this helpful?