tatum-js
tatum-js copied to clipboard
Gas price in polygon is not enough
Hi, gas price in polygon transactions doesn't have enough gas price. This function https://github.com/tatumio/tatum-js/blob/4d7912ba548db1c3f640ad58d9e6f0a255763318/src/transaction/polygon.ts#L55 returns gas price 69000000000 in wei, in gwei it is 69. But the actual gas price is around 400 Gwei https://polygonscan.com/chart/gasprice. So all our NFT mint Polygon calls are failing with error:
Unexpected error occurred. Reason: Unable to broadcast transaction due to replacement transaction underpriced.
Api https://gasstation-mainnet.matic.network/ responses good with:
{"safeLow":500,"standard":555.5,"fast":700,"fastest":700,"blockTime":2,"blockNumber":23373754}
The function polygonGetGasPriceInWei uses a fast value and changes it to 69, without any logic the value is divided by 10 and bounded between 100 and 30 values. Why you are doing such a computation, please? Why is not just fast value returned?
When only return fast value, it is working.
@samuelsramko what do you think about it, please?