TxTracker is a mempool manager for MantleTx transactions. It tracks inter-transaction dependencies through shared DependencyIds and produces a priority-ordered list of pending chains of transactions: those with the highest revenue are returned first, breaking ties by how many other transactions depend on them.
Dependencies are resolved eagerly when both transactions are in the pool, and deferred when a parent is not yet present — with the count flushed retroactively the moment the parent arrives.
<aside> ⚠️
The types here are simplified for the example. We should refer to the proper types in the specification.
</aside>
DependencyIdAn immutable, hashable identifier used for both transaction IDs and dependency references (inscription hashes, UTXO note IDs, etc.).
InscriptionAn Op that chains inscription content. Fields:
parent: bytes — the inscription this one descends from (empty bytes = root)inscription: bytes — the content of this inscriptionKey methods:
dependency_id() → Iterator[DependencyId] — yields DependencyId(self.parent): this op depends on the parent inscription.hash() → bytes — returns the inscription content bytes (used as the produced DependencyId).TransferAn Op that consumes UTXO inputs and produces UTXO outputs. Fields:
inputs: List[bytes] — note IDs being spent (each becomes a dependency)outputs: List[bytes] — note IDs being created (each becomes an owned DependencyId)Key methods: