0

How do I create a new transaction that has the same nonce as a previous transaction?

I sent a txn with 4Gwei gas price and I want to cancel it by sending a 0 Eth txn with the same nonce.

I am running geth 1.7.1.

2

Simply pass nonce parameter to sendtransaction. Suppose the transaction you want to cancel has nonce 13. Then try sending a transaction from same account with same nonce.

eth.sendtransaction({from:fromAccount,to:fromAccount, value:web3.toWei(0,"ether") nonce: 13, gasPrice:10000000000})

Note that you need to send the gas price higher than you sent previously. Make it around 10GWei.

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.