evm_get_gas_price
Fetch current gas prices for a specified EVM chain, returning legacy or EIP-1559 fee data so you can estimate transaction costs and set appropriate fees before sending.
Instructions
Get current gas price for optimal transaction pricing on any EVM chain.
Returns current gas pricing information in both legacy format (gasPrice) and EIP-1559 format (baseFeePerGas + maxPriorityFeePerGas) depending on chain support.
CRITICAL RULES:
EIP-1559 chains return base fee + priority fee structure
Legacy chains return single gasPrice value
Gas prices fluctuate constantly (poll frequently for accuracy)
Higher gas price = faster confirmation (competitive fee market)
Gas price returned in wei (divide by 1e9 for gwei)
PARAMETERS:
chain: EVM chain to query gas prices (required)
Each chain has different gas price ranges
Ethereum: typically highest gas costs
L2s (Arbitrum, Base): 10-50x cheaper
Sidechains (Polygon, BSC): very low gas costs
EXAMPLES: ✅ Check Ethereum gas price: {chain: "ethereum"}
✅ Compare Polygon fees: {chain: "polygon"}
✅ Get BSC gas price: {chain: "bsc"}
❌ Invalid - typo in chain name: {chain: "etherum"}
❌ Invalid - mainnet name: {chain: "ethereum-mainnet"}
SUPPORTED EVM CHAINS (7 networks): • ethereum (Sepolia) - EIP-1559 enabled, ~12s blocks, moderate gas costs • polygon (Amoy) - Low fees, fast finality (~2s), layer 2 • avalanche (Fuji C-Chain) - Sub-second finality, dynamic fees • bsc (BNB Testnet) - 3s blocks, low gas costs, Binance ecosystem • arbitrum (Sepolia) - Optimistic rollup, low fees, Ethereum security • base (Sepolia) - Coinbase layer 2, EIP-1559, low fees • worldchain (World Sepolia) - World Network testnet, EIP-1559
CRITICAL GAS CONSIDERATIONS:
Ethereum: High gas costs, use gas oracle for timing
Polygon/BSC: Very low gas, safe for frequent transactions
Arbitrum/Base: L2 optimizations, ~10-50x cheaper than Ethereum
Avalanche: Dynamic fees, can spike during congestion
Always check gas price before executing transactions
TESTNET TOKENS: All chains use testnet tokens with NO REAL VALUE. Faucets available for all supported networks.
OUTPUT STRUCTURE (EIP-1559 chains): • success: Boolean indicating operation success • chain: Queried chain identifier • eip1559: Boolean indicating EIP-1559 support • baseFeePerGas: Base fee in wei (burned) • maxPriorityFeePerGas: Suggested tip in wei (to validators) • maxFeePerGas: Maximum total fee willing to pay • gasPrice: Legacy format (baseFee + priorityFee) for compatibility • gasPriceGwei: Human-readable gas price in gwei • executionTime: Time taken in milliseconds
OUTPUT STRUCTURE (Legacy chains): • success: Boolean indicating operation success • chain: Queried chain identifier • eip1559: false • gasPrice: Current gas price in wei • gasPriceGwei: Human-readable gas price in gwei • executionTime: Time taken in milliseconds
COMMON MISTAKES:
Using stale gas prices (should poll before each transaction)
Not converting wei to gwei for display
Assuming same gas costs across all chains
Setting gas price too low (transaction may not confirm)
Forgetting gas price spikes during network congestion
USE CASES:
Determine optimal transaction timing
Calculate transaction cost estimates
Monitor network congestion via gas prices
Compare chain costs for multi-chain applications
Set appropriate gas limits for transactions
GAS PRICE STRATEGIES:
Standard: Use returned maxFeePerGas (normal confirmation)
Fast: Multiply maxPriorityFeePerGas by 1.2-1.5 (faster confirmation)
Slow: Use minimum maxPriorityFeePerGas (slower but cheaper)
Instant: Multiply maxPriorityFeePerGas by 2+ (next block)
Running on Linux.
LINUX-SPECIFIC NOTES:
Package manager: apt (Ubuntu/Debian), yum (RHEL/CentOS), or pacman (Arch)
Python 3 is typically 'python3' command
GNU tools are standard
Use 'xdg-open' command to open files/applications
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chain": "<chain>"
},
"name": "evm_get_gas_price"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | EVM chain to query |