starknet_blockNumber
Returns the block number of the most recent accepted block.
Parameters
None.
Returns
The latest block number.
Example
Replace <YOUR-API-KEY>
with an API key from your MetaMask Developer dashboard.
Request
- curl
curl https://starknet-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"starknet_blockNumber","params":[],"id":0}'
Response
- JSON
{
"jsonrpc": "2.0",
"result": 4504,
"id": 0
}