Autotask reports succèss, but transaction actually failed

I have an Autotask that calls a contract daily; however, I run it manually due to some problems with Autotask. Nevertheless, it usually works but this time it failed.

  1. Clicked "Run autotask now"
  2. Autotask reports success
  3. The transaction actually failed due to Out of Gas error.
  4. Ran the transaction via Metamask, increased gasLimit to 1M. Succeeded.

There are two problems. First, Autotask is reporting success when it actually failed. I won't get an alert nor email about this problem. Second, is it computing the gasLimit perhaps too perfectly? I'd like to bump up the gas estimate by some percentage.

Hey @suranap! The Autotask should be set up so it sends the tx and then the Relayer takes care of getting it mined, which can take a long time. In other words, the Autotask goes as far as submitting the tx, and in that regard, it succeeded. But that doesn't remove the fact that you don't get alerted if the tx then reverts.

We plan to add Relayer notifications in the future, so you can get alerted when a tx reverts, is cancelled, is taking too long, etc. In the meantime, you can set that up manually using a Sentinel. You can create a Sentinel that monitors txs to your contract sent from your relayer, where status == "failed".

As for the gasLimit calculation, that's being handled by ethers or web3.js, depending which library you're using. A workaround is to either hardcode gasLimit in the tx, or manually run an estimateGas and then pad it with an extra 10-20%.

I run it manually due to some problems with Autotask

Mind expanding on this? I'm curious what problems you're running into.

Thanks for your answer above.

Mind expanding on this? I'm curious what problems you're running into.

Scheduling for autotasks is not flexible enough. We need to fire some transactions daily at a specific time, and to fire once on a specific date/time. I saw that richer scheduling was planned for autotask. Looking forward to that.