Docs

eth_gasPrice - Moonbase RPC Method

Get current gas price on Moonbase Alpha. Essential for transaction cost estimation for EVM dApp testing, XCM integration validation, and pre-mainnet deployment verification.

Returns the current gas price on Moonbase Alpha in wei.

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_gasPrice method is essential for:

  • Transaction pricing - Set appropriate gas prices
  • Cost estimation - Calculate transaction costs before sending
  • Gas monitoring - Track network congestion
  • DeFi operations - Optimize costs for EVM dApp testing, XCM integration validation, and pre-mainnet deployment verification

Code Examples

Error Handling

Error CodeMessageDescription
-32603Internal errorNode error