Docs

eth_gasPrice - Base RPC Method

Get current gas price on Base. Essential for transaction cost estimation for consumer dApps, SocialFi, NFT marketplaces, and merchant payment integrations.

Returns the current gas price on Base in wei.

Why Base? Build on Coinbase's L2 with 54% of L2 market revenue and direct access to 110M+ Coinbase users with $8B+ TVL, $0.08 gas fees, built-in Coinbase distribution, and seamless fiat rails.

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 consumer dApps, SocialFi, NFT marketplaces, and merchant payment integrations

Code Examples

Error Handling

Error CodeMessageDescription
-32603Internal errorNode error