If I send transactions(web3.eth.sendSignedTransaction) to one contract at the same time using 10 different wallet addresses,do I need to manually set the nonce for each transaction? And how to set it?

1 Answer 1


When calling sendSignedTransaction you actually just send the signed transaction so you don't need the nonce for that step, what you need the nonce for is to sign the transaction with web3.eth.accounts.signTransaction(tx, privateKey [, callback]); where the nonce is actually an optional parameter, I would recommend do not set a specific nonce and just let the default kick in.

The default nonce will compute web3.eth.getTransactionCount() so it makes sure you are using the right nonce everytime.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.