When I call gasPrice and maxFeePerGas I am getting:
var rates = await provider.getFeeData();
ethers.utils.formatUnits(rates.gasPrice, 9); //=15.3399
ethers.utils.formatUnits(rates.maxFeePerGas, 9); //= 30.1798
ethers.utils.formatUnits(rates.maxPriorityFeePerGas, 9); //=1.5
But according to Gas Tracker ( https://etherscan.io/gastracker ) I should be getting:
Low: 14 gwei
Medium: 15 gwei
High: 15 gwei
According to the Internet, gasPrice
is a legacy method and overestimates the gas price. But as you can see above, it seems it produces a gas price that is closest to Gas Tracker.
If in my code I used maxFeePerGas
then wouldn't I be overpaying for gas?
![Get BONUS $200 for FREE! Get BONUS $200 for FREE!](/img/socialgood3.jpg)
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments