Since I am only using Provable (formerly Oraclize) in order to make a cron job, and calling only a function from inside my smart contract (like here), I was wondering if the parameters myid and result were mandatory.

So my question is, if I have no need for external API call results, can I just write this?

function __callback() public {

Of course not, because your contract should inherit from contract usingProvable (formerly usingOraclize) and override this function (the solc 0.4.x version or the solc 0.5.x version).

Hence any such attempt would result with a compilation error.

Of course, you could always edit contract usingProvable itself, but that would be even worse, because Provable's server calls this function, ans so you'd be breaking the API that this server relies on.

Hence any such attempt would result with your contract receiving no updates from the off-chain service.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.