For the complete documentation index, see llms.txt. This page is also available as Markdown.

eth_getBlockByNumber

POST https://mainnet.valuechain.xyz

Returns information about a block by number or tag.

Accepted tags: earliest, latest, safe, finalized, pending. safe and finalized return the same block and typically lag latest by one slot. See block tags.

Parameters

Name
Type
Required
Description

block

quantity or tag

Yes

Hex block number, or earliest, latest, safe, finalized, or pending.

hydrated

boolean

Yes

If true, return full transactions; if false, return transaction hashes.

Result

Block (object or null): Block object, or null if the block is unknown.

Example

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "number": "0xd81e9f",
    "hash": "0x565381ec3a896e084662587ed4eba8f3b6745ffeff7b1d7b672b4b1bb724f3b5",
    "transactions": [
      "0xb269e14e09977c2969efcabd2eabbef7aeb8196780a53fce6dc5b7605169b10d"
    ],
    "gasUsed": "0x5208",
    "baseFeePerGas": "0xf4240"
  }
}

Code examples

cURL

JavaScript

Python

Last updated