eth_gasPrice - Sonic RPC Method
Get current gas price on Sonic. Essential for transaction cost estimation for ultra-fast DeFi, high-frequency trading dApps, and performance-critical applications.
Returns the current gas price on Sonic in wei.
Why Sonic? Build on the world's fastest EVM chain with 720ms finality, $1.2B+ TVL, and 1,534% growth since launch with 720ms transaction finality, 10K TPS, 90% fee sharing via FeeM, Fantom heritage with Andre Cronje leadership.
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 ultra-fast DeFi, high-frequency trading dApps, and performance-critical applications
Code Examples
Error Handling
| Error Code | Message | Description |
|---|---|---|
| -32603 | Internal error | Node error |
Related Methods
eth_maxPriorityFeePerGas- Get priority fee (EIP-1559)eth_feeHistory- Get historical fee dataeth_estimateGas- Estimate gas needed
eth_estimateGas
Estimate gas required for transactions on Sonic. Essential for optimizing transaction costs for ultra-fast DeFi, high-frequency trading dApps, and performance-critical applications.
eth_maxPriorityFeePerGas
Get the suggested priority fee (tip) per gas for EIP-1559 transactions on Sonic. Essential for gas estimation, fee optimization, and time-sensitive transaction pricing.