Single Execution Task
Sometimes, you might want to have Gelato call your function only once. If so, you can make use of the SingleExec
module which automatically cancels the task for you after one execution.
The task will still be canceled if the execution reverts on-chain
Here is how you can enable SingleExec
when creating your task across the various task creation methods.
Gelato Automate UI
Open up the Advanced Settings panel when creating a new task and select Single execution task:
Gelato Automate SDK
Set singleExec
flag to true
when calling createTask
.
Smart Contract
Include SingleExec
module in ModuleData.modules
. Check out the full code here.
Last updated