This question already has an answer here:

I'd like to batch generate a large number of transactions for one account and sign them in a more secure environment.
Ideally I would create a queue of unsigned transactions (here in my understanding I need to add a nonce), then my "signer" process which has no direct connection to an ethereum node would sign them, and put the resulting raw transactions in the "ready for propagation" queue.
Problem is how to get the correct nonces. Ethereum allows up to 64 pending transactions but apparently web3.eth.getTransactionCount(.., "pending"); does not work and then I have an number of raw transaction in the queue.
And than if any of transactions bounces, the whole queue's nonces will be invalid
So how would I keep track on current nonce? Or is my workflow flawed and unfeasible?

marked as duplicate by Ismael, norganna, eth Apr 4 '18 at 6:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


One solution would be to get the nonce at the first transaction and increment it for every batched transaction.

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