API Reference

eth_getBlockByNumber - Merlin

Returns information about a block by block number.

Parameters

  • QUANTITY|TAG - Integer of a block number, or the string "earliest", "latest" or "pending", as in the default block parameter.
  • Boolean - If true it returns the full transaction objects, if false only the hashes of the transactions.
params: ["0x0", true];

Returns

See eth_getBlockByHash.

Example

Request

curl --location --request POST 'https://merlin-mainnet.unifra.io/v1/your-api-key' \ --header 'Content-Type: application/json' \ --data-raw '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x1", true],"id":0}'

Result

{ "jsonrpc": "2.0", "id": 0, "result": { "parentHash": "0xea4def0dc30142977f21d44649a8bcdf4ba8c1bc6817fa1935de32629d109e40", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "miner": "0xf73d921aa8f2dbe77adca8466127b392ede89dc9", "stateRoot": "0x08b8e4d01660898fc75445d2cb6a17cdafe56ce738d403b68f34ee7bc358a5f5", "transactionsRoot": "0x6185ccd517e752248139b0ee84b35ee2d3715b83b45cbfeef6dcdf6d85c74cc6", "receiptsRoot": "0xec86c90b6ea4bea54aa5639e1e0b51f0938504a523c2424993416ad3ba4b5a24", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "difficulty": "0x0", "totalDifficulty": "0x0", "size": "0x267", "number": "0x1", "gasLimit": "0x1c9c380", "gasUsed": "0x5208", "timestamp": "0x65bce888", "extraData": "0x", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "hash": "0x9b58a44e96fde767d91026811e765b16fc5b137bbc3c5455c346d42ada0f8b8d", "transactions": [ "0xba4304eb48dbe0582e51576db33d1be7186cf6c192d47abeb7ee58956f7b8868" ], "uncles": [] } }
Path Params
string
required
Body Params
string
Defaults to 2.0
string
Defaults to eth_getBlockByNumber
params
array of strings
params
int32
Defaults to 0
Responses

Language
Choose an example:
application/json