eth
eth_gasPrice
Returns the current gas price in wei. This value is determined by the node based on recent block gas prices and represents a suggested gas price for legacy (non-EIP-1559) transactions.
Returns the current gas price in wei. This value is determined by the node based on recent block gas prices and represents a suggested gas price for legacy (non-EIP-1559) transactions.
Parameters
None.
Returns
string -- The current gas price in wei as a hexadecimal string.
Example
curl -s -X POST https://rpc.pulsechain.box \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": 1
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x3b9aca00"
}
TRY IT
Notes
- The result is denominated in wei (1 PLS = 10^18 wei).
0x3b9aca00is 1 Gwei (1,000,000,000 wei), a common base gas price on PulseChain.- For EIP-1559 transactions, consider using
eth_maxPriorityFeePerGasand the base fee from the latest block header instead. - The returned value is a suggestion; actual gas prices may vary depending on network congestion.
