cfx_getBlockByHash
Returns block with given hash.
- 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": ["0x0000000000000000000000000000000000000000000000000000000000000000",false],
"method": "cfx_getBlockByHash"
}'
Params
block_hash required
Schema
type : string
Pattern :
^0x[0-9,a-f,A-F]{64}$
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 :