cfx_getBlockByBlockNumber
Returns block with given block number.
- CURL
curl --request POST \
--url https://main.confluxrpc.com \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"params": ["0x0",false],
"method": "cfx_getBlockByBlockNumber"
}'
Params
block_number required
Schema
type : string
Pattern :
^0x([1-9a-f][0-9a-f]{0,15}|0)$include_txs required
Schema
type : boolean
Result
Schema
type : object
adaptive adaptive
type : booleanbaseFeePerGas baseFeePerGas
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,63}|0)$blame blame
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,15}|0)$blockNumber blockNumber
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,63}|0)$custom custom
type : arrayitems[x]Bytestype : stringPattern :^0x[0-9a-f]*$
deferredLogsBloomHash deferredLogsBloomHash
type : stringPattern :^0x[0-9,a-f,A-F]{64}$deferredReceiptsRoot deferredReceiptsRoot
type : stringPattern :^0x[0-9,a-f,A-F]{64}$deferredStateRoot deferredStateRoot
type : stringPattern :^0x[0-9,a-f,A-F]{64}$difficulty difficulty
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,63}|0)$epochNumber epochNumber
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,63}|0)$gasLimit gasLimit
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,63}|0)$gasUsed gasUsed
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,63}|0)$hash hash
type : stringPattern :^0x[0-9,a-f,A-F]{64}$height height
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,63}|0)$miner miner
type : stringPattern :^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$nonce nonce
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,63}|0)$parentHash parentHash
type : stringPattern :^0x[0-9,a-f,A-F]{64}$posReference posReference
type : stringPattern :^0x[0-9,a-f,A-F]{64}$powQuality powQuality
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,63}|0)$refereeHashes refereeHashes
type : arrayitems[x]H256type : stringPattern :^0x[0-9,a-f,A-F]{64}$
size size
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,63}|0)$timestamp timestamp
type : stringPattern :^0x([1-9a-f][0-9a-f]{0,63}|0)$transactions transactions
oneOf- (H256,...)[]
- (Transaction,...)[]
type : arrayitems[x]H256type : stringPattern :^0x[0-9,a-f,A-F]{64}$
type : arrayitems[x]Transactiontype