Skip to main content
POST
eth_getBlockByHash
curl --request POST \
  --url https://rpc.testnet.tempo.xyz/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0x1c3830dd03a362ba82e82017a5f4e361c12fc43b64a1e4ebd2902f0c313cad7e",
    false
  ],
  "id": 1
}
'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": {}
}
Tempo API method that returns information about a block specified by its hash. This method can return full transaction objects or just transaction hashes depending on the second parameter. Tempo blocks include additional fields not found in standard Ethereum blocks: mainBlockGeneralGasLimit, sharedGasLimit, and timestampMillisPart for sub-second precision.

Parameters

  • blockHash — the hash of the block to retrieve
  • fullTransactions — if true, returns full transaction objects; if false, returns only transaction hashes

Response

  • result — a block object, or null if no block was found:
    • number — the block number
    • hash — the block hash
    • parentHash — hash of the parent block
    • timestamp — block timestamp in seconds
    • timestampMillisPart — sub-second timestamp (0-999 ms), Tempo-specific
    • transactions — array of transaction objects or hashes
    • Additional Tempo fields for payment lanes gas limits

eth_getBlockByHash code examples

const Web3 = require("web3");
const NODE_URL = "CHAINSTACK_NODE_URL";
const web3 = new Web3(NODE_URL);

async function getBlockByHash() {
  const block = await web3.eth.getBlock("0x1c3830dd03a362ba82e82017a5f4e361c12fc43b64a1e4ebd2902f0c313cad7e");
  console.log(block);
}

getBlockByHash()

Body

application/json
jsonrpc
string
default:2.0
method
string
default:eth_getBlockByHash
params
any[]

Block hash and boolean for full transactions

id
integer
default:1

Response

200 - application/json

The block information

jsonrpc
string
id
integer
result
object

Block object or null if not found