eth_getBalance - Moonbase RPC Method
Query account balance on Moonbase Alpha. Essential for wallet applications and EVM dApp testing, XCM integration validation, and pre-mainnet deployment verification on the Moonbeam testnet for risk-free EVM dApp development and deployment testing.
Returns the balance of a given address on Moonbase Alpha.
Why Moonbase? Build on the Moonbeam testnet for risk-free EVM dApp development and deployment testing with free testnet tokens, full EVM compatibility, XCM testing capabilities, and identical feature set to Moonbeam mainnet.
Use Cases
The eth_getBalance method is essential for:
- Wallet applications - Display user balances
- Transaction validation - Check if account has sufficient funds
- DeFi applications - Monitor collateral and liquidity for EVM dApp testing, XCM integration validation, and pre-mainnet deployment verification
- Account monitoring - Track balance changes over time
Code Examples
Error Handling
| Error Code | Message | Description |
|---|---|---|
| -32602 | Invalid params | Invalid address format or block parameter |
| -32000 | Execution error | Node execution error |
Related Methods
eth_getCode- Get contract bytecodeeth_getTransactionCount- Get account nonce
eth_getBlockReceipts
Return every transaction receipt in a block on Moonbase Alpha. Useful for indexers, analytics pipelines, and event backfills across EVM dApp testing, XCM integration validation, and pre-mainnet deployment verification.
eth_getCode
Get contract bytecode on Moonbase Alpha. Essential for verifying smart contracts for EVM dApp testing, XCM integration validation, and pre-mainnet deployment verification.