bee
bee copied to clipboard
fix(transaction): implement EIP-1559 compliant fee calculation
Checklist
- [x] I have read the coding guide.
- [ ] My change requires a documentation update, and I have done it.
- [ ] I have added tests to cover my changes.
- [x] I have filled out the description and linked the related issues.
Description
This PR refactors the gas cost estimation to be fully EIP-1559 compliant. The previous implementation relied on the outdated legacy SuggestGasPrice method, which provided inaccurate estimates for the required gas funds.
-
suggestedFeeAndTipis modified - This function calculates an estimated transaction cost by using the latest block's baseFee and a suggested tip (
SuggestGasTipCap). - the estimation uses a buffered baseFee plus the tip (
gasFeeCap = (2 * baseFee) + gasTipCap) -
SuggestGasPriceis removed fromsuggestedFeeAndTip