1

I want my dApp to automatically rebroadcast a transaction if after 50 blocks it is still unmined. How can I do this in javascript with web3 1, having all infos about the pending one? (txHash, ecc)

0

You can repeat the transaction, sending transaction with the same nonce. Note that you'd better place a bigger fee on it (10%+). You can also try changing the transaction's original nonce, e.g., incrementing nonce value by one. You can find some additional info here.

0

I found that it can be done by performing web3.eth.sendTransaction again and using the same nonce parameter.

docs

  • 1
    As @Sovan mentioned in his answer it is better to increase your tx fee by 10% by changing your gas parameter in your transaction object. If you are willing to do it in loop, be sure to set the limit so the fee will not accidentially become too high. And also if your answer answers your question accept it by clicking check mark below down vote of your answer. – Roman Frolov Jan 13 '18 at 14:49

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.