Will nonce increase even when the transaction fail?
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?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
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.