provable-things / ethereum-api

Provable API for Ethereum smart contracts
https://docs.provable.xyz/#ethereum
MIT License
801 stars 427 forks source link

Rejecting scheduled request #85

Open CharikovAI opened 5 years ago

CharikovAI commented 5 years ago

Using Oracle we can call scheduled functions. But is it possible to cancel scheduled function? I mean, for example, if I scheduled an function that updates something in my contract in 10 minutes but in 5 minutes I changed my mind, I don't need update something. In this case, can I cancel scheduled function?

D-Nice commented 5 years ago

That is currently not possible, and would seem potentially counter-productive, as by way of the standard payment model, you are pre-paying for the callback. This is the first time we have seen this feature request.

If for whatever reason you do wish to reject the results of a subsequent or specific query, you are able to do so via your contract currently, by having a rejectQuery or the like function.

Could you specify any more specific use-case where this may be handy?

CharikovAI commented 5 years ago

@D-Nice thanks for your answer! In my case, I would like to update price either by request or once per hour. So if I already have an updating request in query and the price updated, I have to reject the first request and create new in 1hour. But I agree that with standard payment model, it's counter-productive. Thanks.

D-Nice commented 5 years ago

That appears to be an interesting use-case, we'll keep an eye out if there's any others with similar requests to see if it's something for our roadmap.