Open vaivanov opened 1 year ago
https://gasstation-testnet.polygon.technology/v2 works well now. What fallback do you want to be added?
Hello,
This API serves as a centralized resource which may experience intermittent downtime. Upon reviewing my backend logs, I observed that the success rate was only 97% at the time of opening this issue. It's worth noting that the GasStation API shouldn't be a requirement for transaction execution. We can obtain information about the expected maxPriorityFeePerGas and maxFeePerGas directly from the network, just as it functions on other chains.
However, a challenge arises when the gas station encounters downtime or delivers rate-limited responses, preventing me from accurately estimating the gas required for transactions.
I propose the following solutions:
Your understanding and consideration of these suggestions would be greatly appreciated.
Thank you.
We are using etherjsv6. We are also seeing the same gas station error on polygon network. This is a showstopper and needs to be fixed.
Error: error encountered with polygon gas station ("https://gasstation.polygon.technology/v2") (request={ }, response={ }, error={ "code": "UNSUPPORTED_OPERATION", "info": { "response": { } }, "operation": "bodyJson" }, code=SERVER_ERROR, version=6.7.1)
If the Polygon Gas Station is down, there isn’t really a reliable way to get the gas price other than running your own gas station of finding another public gas station.
(if you upgrade to the latest version, the error will contain more info on the error from the server)
why does this api always return the same values for different variables? safeLow, standard and fast are always the same, for example:
{"safeLow":{"maxPriorityFee":30,"maxFee":30.000000911},"standard":{"maxPriorityFee":30,"maxFee":30.000000911},"fast":{"maxPriorityFee":30,"maxFee":30.000000911},"estimatedBaseFee":9.11e-7,"blockTime":2,"blockNumber":58464645}
@MatevzKlancar You will have to ask the Polygon team about that. I’m hoping someday this logic is built into the actual nodes though, so we don’t need to rely on gas station services…
Ethers Version
6.7.1
Search Terms
gas, gas station, EIP-1559
Describe the Problem
When I'm trying to call getFeeData on Polygon Mumbai network and gas station doesn't work well at the moment (in example, https://gasstation-testnet.polygon.technology/v2 returns 503 error), I'm getting error "Error: error encountered with polygon gas station". I suggest to implement fallback for this case, or make getGasStationPlugin connection configurable for Polygon based networks.
Code Snippet
Contract ABI
No response
Errors
Environment
Other (please specify)
Environment (Other)
Polygon, Mumbai