跳到主要内容

cfx_epochNumber

Returns highest epoch number.

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_epochNumber"
}'

Params

epoch_number optional

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

Result

Schema
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_epochNumber",
"params": [
"0x4350b21"
]
}' \
-H "Content-Type: application/json" \
localhost:12539

Response

"0x4350b21"