New answers tagged

0

SOLVED with 1 simple code: nonce: txCount = '0x' + (await web3.eth.getTransactionCount(account) + 0).toString(16) and for the 2nd transaction nonce: txCount = '0x' + (await web3.eth.getTransactionCount(account) + 1).toString(16)


1

The problem is that the second time that you call web3.eth.getTransactionCount, your first transaction has not been mined yet. Therefore, txCount and txCount2 are exactly the same number (same nonce). You either have to wait for the first transaction to be mined or increment txCount by yourself before sending the 2nd transaction.


Top 50 recent answers are included