Docs

eth_getBalance - Astar RPC Method

Query account balance on Astar. Essential for wallet applications and cross-chain DeFi, multi-VM smart contracts, and XCM-enabled interoperability with Ethereum and Cosmos on Polkadot's leading dApp hub supporting EVM, WASM, and upcoming PolkaVM environments.

Returns the balance of a given address on Astar.

Why Astar? Build on Polkadot's leading dApp hub supporting EVM, WASM, and upcoming PolkaVM environments with EVM + WASM + PolkaVM support, Build2Earn developer rewards, dApp Staking, and Soneium cross-layer integration.

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 cross-chain DeFi, multi-VM smart contracts, and XCM-enabled interoperability with Ethereum and Cosmos
  • Account monitoring - Track balance changes over time

Code Examples

Error Handling

Error CodeMessageDescription
-32602Invalid paramsInvalid address format or block parameter
-32000Execution errorNode execution error