post https://base-mainnet.unifra.io/v1/
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: ["0x1b4", true];
Returns
Example
Request
curl --request POST \
--url https://base-testnet.unifra.io/v1/{your-api-key} \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": [
"0x1122",
true
],
"id": 0
}
'
Result
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"baseFeePerGas": "0x31",
"difficulty": "0x0",
"extraData": "0x",
"gasLimit": "0x17d7840",
"gasUsed": "0x0",
"hash": "0xa9a70707be543a1fe6d08804a5e77ab185a9a41b9b45d18f08c3f17b5599ced0",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0x4200000000000000000000000000000000000011",
"mixHash": "0x794e6ed1444bbed62f320124f0508031354bccba600e57481290772c8a62bd5e",
"nonce": "0x0000000000000000",
"number": "0x1122",
"parentHash": "0xce1d96b557543da19d8eca8f0f0e3b9a3d93659fba6319956a8978810d501f13",
"receiptsRoot": "0x3fd774ff8fe515813d7a8f9d3748e58e857bc002823a458a93be90a3bc2e0894",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x363",
"stateRoot": "0xb889e4390e6e83cd22b17b2ba30ee352a31fd91687edb5ee08e9ac7fd3f30196",
"timestamp": "0x63d98f54",
"totalDifficulty": "0x0",
"transactions": [
{
"blockHash": "0xa9a70707be543a1fe6d08804a5e77ab185a9a41b9b45d18f08c3f17b5599ced0",
"blockNumber": "0x1122",
"from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001",
"gas": "0x8f0d180",
"gasPrice": "0x0",
"hash": "0x1894fee15b17bc5a0f576749a78117f315c65a8ccd49385f96a9fd4278922e69",
"input": "0x015d8eb900000000000000000000000000000000000000000000000000000000008059c40000000000000000000000000000000000000000000000000000000063d98f540000000000000000000000000000000000000000000000000000000000000134649b75278cb5a6e1dbbd5f695091da7e417a930291eb4ba6abb2d30eb3b6948600000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d679b567db6187c0c8323fa982cfb88b74dbcc7000000000000000000000000000000000000000000000000000000000000083400000000000000000000000000000000000000000000000000000000000f4240",
"nonce": "0x0",
"to": "0x4200000000000000000000000000000000000015",
"transactionIndex": "0x0",
"value": "0x0",
"type": "0x7e",
"v": "0x0",
"r": "0x0",
"s": "0x0",
"sourceHash": "0xd2f18810f51e05d5aede4f7f97801df71e853776430510b1d32f090c2e6f4d80",
"mint": "0x0",
"isSystemTx": true
}
],
"transactionsRoot": "0x28abb938b41135fc42a2722a8b029725f827e16a001615cac923ee5a1d19b8ea",
"uncles": []
}
}
The below parameter inputs do not work, please reference the section above instead.