A missing transaction problems

Hey guys, I am using infura web3.js to transfer exactly the same number of ERC20 coins (say 1 coin )from address A to address B on mainnet, the code did this every 60s for 4 times, but what happens is the last two transactions returns exactly same info and only 3 coins were received, this does not happen every time, but sometimes, when I am transferring same number of ERC20 coins for several times, one of them would miss, who encountered the same problem and could tell me what’s the solution ?

Hello @pretty.zh thank you for joining our community!

It sounds like what could be happening is that a transaction is being submitted before a previous transaction has been accepted by the network and included in a block. In this case, the following transaction could be replacing the previous transaction and the previous transaction is never added to a block. Do you have code to track this condition and manage the nonces for all transactions?

1 Like

I’m not managing the nonces:joy:, really appreciate your help.

Hey @pretty.zh , you can find the help for creating a custom transaction object with the correct nonce here in part 3 of this guide: https://www.dappuniversity.com/articles/web3-js-intro/#3

Thank you very much. it has been very useful to me

1 Like