I have a design where contract A is calling contract B, which then calls Oraclize a few times, and then sends the results back to contract A. The Oraclize calls could end up taking upwards of 30 minutes in certain cases.

Can I have contract B send the result back to contract A via a return value to the initial function call, even if it takes 30+ minutes to evaluate? Or do I have to use a callback function?

In other words, do Solidity functions time out?

1 Answer 1


The function in B that request the oraclize query will finish after making the query. Oraclize will call the callback function later. When that happens, the callback in B needs to implement the steps to send the response to A.

  • To play devil's advocate, beware that in certain instances, namely due to an ugly block re-org, an Oraclize callback may in fact re-sorted EARLIER than the actual query it resulted from. So beware of that scenario and design contracts with that in mind.
    – DenisM
    Apr 13, 2018 at 15:24

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.