3

Will nonce increase even when the transaction fail?

For example,

nonce=0 -> tx succeed
nonce=1 -> tx succeed
nonce=2 -> tx fail

Then I want to send a new raw transaction, should I assign nonce as 2 or nonce as 3?

Thank you

1 Answer 1

2

Each transaction from an account must have an incremental nonce, regardless of whether or not the transaction succeeds. The MyCrypto knowledge base provides a good explanation of why Ethereum uses nonces.

1

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.