Add a terminate_condition attribute to the job, it's optional and has same type as the condition which is used to decide if a job is executable, terminate_condition decides if a recurring job should be terminated (i.e. stop creating follow up job) when it executed successfully.
If terminate_condition resolves to true or fail to resolve, recurring job will be terminated. Similar to condition resolves to true or fail to resolve, job will be executed.
Test plan
[ ] Unit test
[x] Deploy the contract to localterra or testnet and verify if a DCA job can terminate by the terminate condition.
Summary
Add a
terminate_condition
attribute to the job, it's optional and has same type as thecondition
which is used to decide if a job is executable,terminate_condition
decides if a recurring job should be terminated (i.e. stop creating follow up job) when it executed successfully.If
terminate_condition
resolves to true or fail to resolve, recurring job will be terminated. Similar tocondition
resolves to true or fail to resolve, job will be executed.Test plan