eth_getBlockByHash - TRON RPC Method
Retrieve complete block data by block hash on TRON. Essential for TRON developers building payment rails, exchanges, and consumer crypto applications building on the TVM-compatible Layer 1 for TRC-20 payments, wallet APIs, and low-cost smart contract execution.
Returns information about a block by hash on TRON.
Why TRON? Build on the TVM-compatible Layer 1 for TRC-20 payments, wallet APIs, and low-cost smart contract execution with TVM compatibility paired with native TRON wallet APIs, DPoS block production, and low-cost transaction flows.
Use Cases
The eth_getBlockByHash method is essential for:
- Block verification - Verify block data using its unique hash
- Chain reorganization handling - Track blocks during reorgs
- Cross-chain bridges - Verify block finality for TRC-20 transfers, wallet operations, and EVM-compatible smart contract integrations
- Deterministic queries - Get consistent block data regardless of chain state
Sample Freshness
Use a recent block hash when you copy these examples into your own tooling. Shared RPC infrastructure can return null if the block is no longer available on the node you are querying, so replace placeholders with a fresh block hash when you test or automate against this method later.
Request Parameters
32-byte block hash
If true, returns full transaction objects; if false, returns transaction hashes
Response Body
Block number
32-byte block hash
32-byte parent block hash
Unix timestamp
Total gas used
Transaction objects or hashes
Code Examples
curl -X POST https://api-tron-mainnet.n.dwellir.com/YOUR_API_KEY/jsonrpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": [
"0x0000000004d4dd2a62243e06966cb322aefec631e1ec0ce68ed3f2482cecccb9",
false
],
"id": 1
}'Error Handling
| Error Code | Message | Description |
|---|---|---|
| -32602 | Invalid params | Invalid block hash format |
| -32000 | Block not found | Block with this hash does not exist |
Related Methods
eth_getBlockByNumber- Get block by numbereth_blockNumber- Get latest block number
eth_getBlockByNumber
Retrieve complete block data by block number on TRON. Perfect for TRON developers building payment rails, exchanges, and consumer crypto applications building on the TVM-compatible Layer 1 for TRC-20 payments, wallet APIs, and low-cost smart contract execution.
eth_getBalance
Query account balance on TRON. Essential for wallet applications and TRC-20 transfers, wallet operations, and EVM-compatible smart contract integrations on the TVM-compatible Layer 1 for TRC-20 payments, wallet APIs, and low-cost smart contract execution.