eth_getGasPrice
Retrieve the current gas price in wei for legacy (non-EIP-1559) transactions on Ethereum networks like mainnet or Sepolia.
Instructions
Get the current gas price in wei for legacy (non-EIP-1559) transactions.
Args:
network (string, optional): Ethereum network to query. Defaults to 'mainnet'.
Returns:
Hexadecimal string representing gas price in wei (e.g., '0x3b9aca00' for 1 Gwei).
Examples:
"Get mainnet gas price": {}
"Get Sepolia gas price": { "network": "sepolia" }
Errors:
InternalError: When Infura API is unavailable or returns an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| network | No | The Ethereum network to query, e.g., 'mainnet' or 'sepolia'. | mainnet |
| response_format | No | Output format: 'json' for structured data, 'markdown' for human-readable. | json |