eth_maxPriorityFeePerGas
Returns the current recommended priority fee per gas on Flow EVM Gateway for EIP-1559 transactions.
Use Cases#
- EIP-1559 transactions - Set appropriate priority fees
- Transaction acceleration - Calculate tips for faster inclusion
- Gas optimization - Balance speed vs cost for consumer NFTs (NBA Top Shot, Disney Pinnacle), gaming dApps, and hybrid Cadence-EVM applications
Parameters#
This method accepts no parameters.
Request#
{
"jsonrpc": "2.0",
"method": "eth_maxPriorityFeePerGas",
"params": [],
"id": 1
}
Code Examples#
- cURL
- JavaScript
- Python
curl -X POST https://api-flow-evm-gateway-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_maxPriorityFeePerGas",
"params": [],
"id": 1
}'
import { JsonRpcProvider, formatUnits } from 'ethers';
const provider = new JsonRpcProvider('https://api-flow-evm-gateway-mainnet.n.dwellir.com/YOUR_API_KEY');
const feeData = await provider.getFeeData();
console.log('Max Priority Fee:', formatUnits(feeData.maxPriorityFeePerGas, 'gwei'), 'Gwei');
console.log('Max Fee Per Gas:', formatUnits(feeData.maxFeePerGas, 'gwei'), 'Gwei');
from web3 import Web3
w3 = Web3(Web3.HTTPProvider('https://api-flow-evm-gateway-mainnet.n.dwellir.com/YOUR_API_KEY'))
priority_fee = w3.eth.max_priority_fee
print(f'Max Priority Fee: {w3.from_wei(priority_fee, "gwei")} Gwei')
Related Methods#
eth_gasPrice- Get legacy gas priceeth_feeHistory- Get historical fee data