Ethereum Transaction Nonces and Replacement Tracking
Learn how Ethereum account nonces order transactions, why replacement transactions share a nonce, and how to model pending and confirmed records.

Overview
When translating these concepts into an integration, keep the scope described by the wallet history api with the result. The examples in wallet transaction history and smart contract event logs show how the same distinction affects neighbouring data questions.
A sender nonce orders transactions from an externally owned account. It is useful for replacement tracking, but it is not a global transaction identifier. Always pair it with the sender and network.
One sequence per sending account
Confirmed transactions consume the sender sequence. Pending views can include transactions that have not become canonical. Replacements can compete for the same sender nonce with different hashes and fees. A contract log index, a transaction index within a block and an account nonce describe different sequences and must not share one database field.
Worked example: two hashes, one intent
A sender broadcasts hash A with nonce 42, then a higher-fee replacement B with nonce 42. A pending monitor may observe both. If B is included, treating both hashes as settled payments double-counts the action. Keep observations for A and B, but derive settlement from the included canonical transaction and its receipt.
Design the replacement relationship
Use transaction hash for individual transaction identity, and chain plus sender plus nonce for a replacement group where applicable. Preserve whether a record was observed pending, included, displaced or unresolved. Do not infer that a missing pending transaction was cancelled: peers can have different pending pools, and absence alone does not identify the eventual winner.
A practical acceptance test
Feed two pending hashes with the same chain, sender and nonce, followed by inclusion of the second hash. Assert that both observations remain inspectable but only the accepted execution contributes settled movements. Add another sender using the same nonce and verify that it is not grouped into the replacement relationship.
Questions about the topic
Frequently asked questions
Can different accounts use nonce 42?
Yes. Nonces are scoped to the sending account and chain.
Is a replacement guaranteed to be included?
No. Submission and replacement policies do not guarantee inclusion.
Standards & technical documentation
