post https://polygon-mainnet-rpc.allthatnode.com:8545/
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.
curl https://polygon-mainnet-archive.allthatnode.com/8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj \
--request POST \
--header "Content-Type: application/json" \
--data '{
"jsonrpc":"2.0",
"id":1,
"method":"eth_getBlockByNumber",
"params":[
"0x1b434",
true
]
}'
Returns
Object
- A block object, or null when no block was found:number
:QUANTITY
- the block number. null when its pending block.hash
:DATA
, 32 Bytes - hash of the block. null when its pending block.parentHash
:DATA
, 32 Bytes - hash of the parent block.nonce
:DATA
, 8 Bytes - hash of the generated proof-of-work. null when its pending block.sha3Uncles
:DATA
, 32 Bytes - SHA3 of the uncles data in the block.logsBloom
:DATA
, 256 Bytes - the bloom filter for the logs of the block. null when its pending block.transactionsRoot
:DATA
, 32 Bytes - the root of the transaction trie of the block.stateRoot
:DATA
, 32 Bytes - the root of the final state trie of the block.receiptsRoot
:DATA
, 32 Bytes - the root of the receipts trie of the block.miner
:DATA
, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.difficulty
:QUANTITY
- integer of the difficulty for this block.totalDifficulty
:QUANTITY
- integer of the total difficulty of the chain until this block.extraData
:DATA
- the "extra data" field of this block.size
:QUANTITY
- integer the size of this block in bytes.gasLimit
:QUANTITY
- the maximum gas allowed in this block.gasUsed
:QUANTITY
- the total used gas by all transactions in this block.timestamp
:QUANTITY
- the unix timestamp for when the block was collated.transactions
:ARRAY
- Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.uncles
:ARRAY
- Array of uncle hashes.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x7",
"extraData": "0xd58301090083626f7286676f312e3133856c696e75780000000000000000000000b30a7b7deed830d85b67044806ccbf4e9170cbc005cdb02f19dd1c171175353f2760f9a6f2e0286b1af5d11fdec71a5f74585ba8360d53d16f86356feea65000",
"gasLimit": "0x1312d00",
"gasUsed": "0x0",
"hash": "0xb80751527f32b3d03a0d66c193e2f6641d571b245ebc262b9edcf567ca9b09e6",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0x0000000000000000000000000000000000000000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": "0x1b434",
"parentHash": "0x40aaea0ba164521d28c980be5e87110f96d742c1e33c95ef095621b12048575f",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x262",
"stateRoot": "0xe049955c797987dfecb6dd415964d82371ccb927e18d321797bc7e8eda0667f0",
"timestamp": "0x5ed60dae",
"totalDifficulty": "0xbed6d",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}