0

A common concern for dapps using public blockchains is to check that a submitted transaction was included in a block after some time. And, if not, try to resubmit the same transaction (I mean, using the same nonce, perhaps with a higher gas price). Does anyone have recommendations/existing code to solve this issue? Ideally in Angular or React.

3
  • resubmitting transaction will not help anyhow. You will get an error message, that this transaction was already seen – Nulik Feb 10 at 17:35
  • 2
    If you reuse the nonce and use higher gas price, the old transaction will essentially be replaced. This shouldn't cause any errors – Lauri Peltonen Feb 10 at 17:39
  • Agree, @LauriPeltonen – Suzana Maranhão Moreno Feb 10 at 18:20
1

Have a look at candidate 3 over here. Concurrency patterns for account nonce

This is a pretty important issue for any account that sends a lot of transactions since one underpriced transaction blocks all transactions that follow it.

In any such case, monitor confirmation and have a plan to resolve any stuck transactions.

Hope it helps.

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.