跳到主要内容

cfx_getBlockRewardInfo

Returns block reward information in an epoch

curl --request POST \
--url https://main.confluxrpc.com \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"params": ["0x4350b21"],
"method": "cfx_getBlockRewardInfo"
}'

Params

num required

Represents rpc api epoch number param.
oneOf
type : string
Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$

Result

Schema
type : array
  • items[x] object
    type : object
    • author author
      type : string
      Pattern : ^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
    • baseReward baseReward
      type : string
      Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
    • blockHash blockHash
      type : string
      Pattern : ^0x[0-9,a-f,A-F]{64}$
    • totalReward totalReward
      type : string
      Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
    • txFee txFee
      type : string
      Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$

Examples

Request

curl -X POST --data \
'{
"jsonrpc": "2.0",
"id": 1,
"method": "cfx_getBlockRewardInfo",
"params": [
"0x4350b21"
]
}' \
-H "Content-Type: application/json" \
localhost:12539

Response

[
{
"author": "CFXTEST:TYPE.USER:AAMJXDGZ4M84HJVF2S9RMW5UZD4DKH8AA6KRDSH0EP",
"baseReward": "0x1bc0b7812dd38000",
"blockHash": "0x65edf7f1e1ffec4fd0eca4a2a6efb127b11d887dc7ca522ff75e418fda32d160",
"totalReward": "0x1bc297bf33e95087",
"txFee": "0x0"
}
]