eth_getBlockByNumber - Moonriver RPC Method
Retrieve complete block data by block number on Moonriver. Perfect for dApp developers testing on Kusama, early adopters, and teams requiring production-ready experimentation building on the Moonbeam canary network on Kusama for real-world testing of EVM dApps.
Returns information about a block by block number on Moonriver.
Why Moonriver? Build on the Moonbeam canary network on Kusama for real-world testing of EVM dApps with Moonbeam code ships here first, full EVM compatibility on Kusama, 80% fee burn mechanism, and XCM cross-chain messaging.
Use Cases
The eth_getBlockByNumber method is essential for:
- Block explorers - Display complete block information
- Transaction indexers - Process all transactions in a block
- Analytics platforms - Analyze blockchain data for production-grade dApp testing, early feature deployment, and Kusama-based EVM applications
- Timestamp verification - Get block timestamps for time-based logic
Code Examples
Error Handling
| Error Code | Message | Description |
|---|---|---|
| -32602 | Invalid params | Invalid block number or parameter format |
| -32000 | Block not found | Block does not exist |
Related Methods
eth_blockNumber- Get latest block numbereth_getBlockByHash- Get block by hasheth_getTransactionByHash- Get transaction details
eth_blockNumber
Get the current block height on Moonriver. Essential for syncing dApps, monitoring transaction confirmations, and blockchain state tracking.
eth_getBlockByHash
Retrieve complete block data by block hash on Moonriver. Essential for dApp developers testing on Kusama, early adopters, and teams requiring production-ready experimentation building on the Moonbeam canary network on Kusama for real-world testing of EVM dApps.