eth_gasPrice - Zetachain RPC Method
Get current gas price on Zetachain. Essential for transaction cost estimation for omnichain DeFi, native Bitcoin smart contracts, cross-chain asset management, and unified liquidity aggregation.
Returns the current gas price on Zetachain in wei.
Why Zetachain? Build on the universal omnichain blockchain enabling cross-chain smart contracts across 50+ chains including Bitcoin with native Bitcoin support, 50+ chain interoperability via UNISON, no bridging required, and partnerships with Curve and SushiSwap.
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 omnichain DeFi, native Bitcoin smart contracts, cross-chain asset management, and unified liquidity aggregation
Request Parameters
This method accepts no parameters.
Response Body
Current gas price in wei (hexadecimal)
Code Examples
curl -X POST https://api-zetachain-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": 1
}'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 Zetachain. Essential for optimizing transaction costs for omnichain DeFi, native Bitcoin smart contracts, cross-chain asset management, and unified liquidity aggregation.
eth_maxPriorityFeePerGas
Get the suggested priority fee (tip) per gas for EIP-1559 transactions on Zetachain. Essential for gas estimation, fee optimization, and time-sensitive transaction pricing.