eth_gasPrice - XDC Network RPC Method
Get current gas price on XDC Network. Essential for transaction cost estimation for tokenized trade finance (Letters of Credit, Bills of Lading), cross-border payments, and real-world asset tokenization.
Returns the current gas price on XDC Network in wei.
Why XDC Network? Build on the enterprise-grade blockchain for trade finance with 2-second finality and ISO 20022 compliance with ISO 20022 messaging, ITFA membership, Contour Network acquisition, 801M+ transactions, and partnerships with Circle and Deutsche Telekom.
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 tokenized trade finance (Letters of Credit, Bills of Lading), cross-border payments, and real-world asset tokenization
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 XDC Network. Essential for optimizing transaction costs for tokenized trade finance (Letters of Credit, Bills of Lading), cross-border payments, and real-world asset tokenization.
eth_maxPriorityFeePerGas
Get the suggested priority fee (tip) per gas for EIP-1559 transactions on XDC Network. Essential for gas estimation, fee optimization, and time-sensitive transaction pricing.