I have an autotask that occasionally sets too low of a gasLimit, causing the txn to fail due to running out of gas. Example failed transaction
Code snippet:
let tx = await checkpointerContract.connect(signer).checkpointGaugesOfTypesAboveRelativeWeight(typesToCheckpoint, CHECKPOINTING_THRESHOLD, {value: ethers.utils.parseEther(MAX_ETH_TO_BRIDGE)});
As you can see, I'm not manually setting the gas limit. I suppose under the hood an RPC node is queried for an estimated cost and gasLimit is set to (1+alfa) * estimate
with alfa = 0.1
or something.
Questions:
- What is the value of
alfa
? - Can I set the value of
alfa
?
I know I can do this manually with estimateGas
but was hoping a more elegant/native solution might exist?