Is the callback of a myContractMethod.sendTransaction(/* ... */) called as soon as the the transaction is sent to the network or once it is mined?

Related posts

Here are some related references I found about this but there seems to be some contradicting information and I also suspect some of it might be deprecated given how much ethereum changes month to month:

  • According to this post ,a .new() transaction is called twice (before and after mining) and other transactions are called once (but when?!)
  • According to this post, all callbacks are called twice (does not seem to be the case for me...)

For sendTransaction, the callback is only called once, immediately and you get the transaction hash.

You are correct, for .new, the callback is called twice, before and after mining, as the post says. And I'll make a comment on the second post to clarify sendTransaction callback.

  • Can we accomplish that using events in solidity(transaction mined event) ?
    – Vivek Sadh
    Aug 7 '18 at 13:24
  • @VivekSadh Question is unclear and you may want to post a new one. (Solidity and mining are fairly disconnected, and there's no transaction mined event in Solidity.)
    – eth
    Aug 12 '18 at 2:41

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.