Why my second ETH transaction failed?

On the Ethereum blockchain, you cannot have a transaction with a nonce of 1 mined before one with a nonce of 0.

What is a nonce?

On the Ethereum network, every transaction has a nonce. The nonce is the number of transactions sent from a given address, and it can only be used once. In cryptography, a nonce is a one-time code selected in a random or pseudo-random manner that is used to securely transmit the main password, preventing replay attacks.

Each time you send a transaction, the nonce value increases by 1. There are rules about what transactions are considered valid transactions, and the nonce is used to enforce some of these rules. Specifically:

  • You cannot have a transaction with a nonce of 1 mined before one with a nonce of 0. 
  • You cannot have a transaction with a nonce of 2 mined if you have not already sent transactions with a nonce of 1 and 0.

Please refer to the following diagram for more details:

Still need help? Contact Us Contact Us