To use the eth_getBlockByNumber method on the C-Chain, ensure that the end of your URL includes ext/bc/C/rpc.
Parameters
- blockNumber/tagstringREQUIRED
The block number in hexadecimal format or the string latest, earliest, pending, safe or finalized
- transaction detail flagbooleanREQUIRED
The method returns the full transaction objects when this value is true otherwise, it returns only the hashes of the transactions
Returns
- resultobject
The result containing details of the block
- baseFeePerGasstring
The base fee per gas in the block, in hexadecimal
- blockExtraDatastring
Extra data included in the block
- blockGasCoststring
The gas cost of the block, in hexadecimal
- difficultystring
The difficulty of the block, in hexadecimal
- extDataGasUsedstring
Gas used for external data in the block
- extDataHashstring
Hash of the external data in the block
- extraDatastring
Extra data field of the block
- gasLimitstring
The gas limit for the block, in hexadecimal
- gasUsedstring
The total gas used by transactions in the block
- hashstring
The hash of the block
- logsBloomstring
The bloom filter for the logs in the block
- minerstring
The address of the miner who mined the block
- mixHashstring
The mix hash used for the block
- noncestring
The block nonce
- numberstring
The block number in hexadecimal
- parentHashstring
The hash of the parent block
- receiptsRootstring
The root hash of the receipts trie
- sha3Unclesstring
The SHA3 hash of the uncles list
- sizestring
The size of the block, in hexadecimal
- stateRootstring
The root hash of the state trie after this block
- timestampstring
The timestamp of the block, in hexadecimal
- totalDifficultystring
The total difficulty of the chain up to this block
- transactionsarray
The list of transactions in the block
- transactionsRootstring
The root hash of the transactions trie
- unclesarray
The list of uncle blocks included in this block
- blobGasUsedstring
The total amount of blob gas used by transactions in the block, in hexadecimal. May be omitted for historical blocks
- excessBlobGasstring
The excess blob gas for the block, used to calculate the blob base fee, in hexadecimal. May be omitted for historical blocks
- parentBeaconBlockRootstring
The root of the parent beacon block. May be omitted for historical blocks
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"baseFeePerGas": "0x5d21dba00",6"blockExtraData": "0x",7"blockGasCost": "0x0",8"difficulty": "0x1",9"extDataGasUsed": "0x0",10"extDataHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",11"extraData": "0x00000000000000000000000000000000000000000000aa0f000000000001aaa40000000000000000000000000003bcee0000000000000000000000000000000000000000000000000000000000000000",12"gasLimit": "0x7a1200",13"gasUsed": "0x3bcee",14"hash": "0x6d2a190a9de70d4e4c65c8b565a921d190a88a4c78ab734a91b7f75cb2acf78f",15"logsBloom": "0x000200000000000800000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000080000000000000000000000000000800000000080000000000200000000000000000008000000000000000000030200100000000000000000100000000000000000000000000000000000080000000004000000000800804000000000000000000000000000000000000000400000000000000000000000020000000000004000000000000000000000020000200000000000a0000000000000000000000000000000000000000000000000000000000000000020",16"miner": "0x0100000000000000000000000000000000000000",17"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",18"nonce": "0x0000000000000000",19"number": "0xc5043f",20"parentHash": "0xee5a94c31519b60f9febe230763298012c1dafcf6e9100f58324d80b300eea42",21"receiptsRoot": "0xc22dab50385f71fb817aa982f7ce3a1d9744d833307e935cf0d94f542988389a",22"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",23"size": "0x36d",24"stateRoot": "0x93db51fc6dff70170fb41b8b94055d471555cdaf0300243d077c6e869d3abc71",25"timestamp": "0x65095043",26"totalDifficulty": "0xc5043f",27"transactions": [28"0x85e61127a40be5e599fc7c8c8a4b2cf935a8c387f44a9691d42078e4398da20c"29],30"transactionsRoot": "0xcadc9dcd98c1a2117e3c2182ac56e4a6ac4ab1eb30cb982577b1ff5b3da5e21f",31"uncles": []32}33}
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"baseFeePerGas": "0x5d21dba00",6"blockExtraData": "0x",7"blockGasCost": "0x0",8"difficulty": "0x1",9"extDataGasUsed": "0x0",10"extDataHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",11"extraData": "0x00000000000000000000000000000000000000000000aa0f000000000001aaa40000000000000000000000000003bcee0000000000000000000000000000000000000000000000000000000000000000",12"gasLimit": "0x7a1200",13"gasUsed": "0x3bcee",14"hash": "0x6d2a190a9de70d4e4c65c8b565a921d190a88a4c78ab734a91b7f75cb2acf78f",15"logsBloom": "0x000200000000000800000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000080000000000000000000000000000800000000080000000000200000000000000000008000000000000000000030200100000000000000000100000000000000000000000000000000000080000000004000000000800804000000000000000000000000000000000000000400000000000000000000000020000000000004000000000000000000000020000200000000000a0000000000000000000000000000000000000000000000000000000000000000020",16"miner": "0x0100000000000000000000000000000000000000",17"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",18"nonce": "0x0000000000000000",19"number": "0xc5043f",20"parentHash": "0xee5a94c31519b60f9febe230763298012c1dafcf6e9100f58324d80b300eea42",21"receiptsRoot": "0xc22dab50385f71fb817aa982f7ce3a1d9744d833307e935cf0d94f542988389a",22"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",23"size": "0x36d",24"stateRoot": "0x93db51fc6dff70170fb41b8b94055d471555cdaf0300243d077c6e869d3abc71",25"timestamp": "0x65095043",26"totalDifficulty": "0xc5043f",27"transactions": [28"0x85e61127a40be5e599fc7c8c8a4b2cf935a8c387f44a9691d42078e4398da20c"29],30"transactionsRoot": "0xcadc9dcd98c1a2117e3c2182ac56e4a6ac4ab1eb30cb982577b1ff5b3da5e21f",31"uncles": []32}33}