跳到主要内容

eth_blockNumber

Returns the number of most recent block.

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

Result

Schema
type : string
Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$

Example

Request

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

Response

"0x43f3b6a"