cardano-ledger-core-1.23.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe HaskellNone
LanguageHaskell2010

Cardano.Ledger.MempoolTx

Description

Transactions as they are received by the mempool. See MempoolTx for details.

Synopsis

Documentation

data MempoolTx era Source #

A top-level transaction as it is received by the mempool.

A transaction in the mempool and a transaction in a block do not have the same serialization and they have different concerns, therefore they are not interchangeable. New submissions are obtained by decoding their mempool serialization. The constructor is kept internal to prevent accidental wrapping of a transaction taken from a block.

Warning - The UnsafeMkMempoolTx constructor is for codecs, trusted ledger operations, and testing. It must not be used to turn an arbitrary block transaction into a mempool transaction.

Instances

Instances details
(Era era, EncCBOR (MempoolTx era)) ⇒ ToCBOR (MempoolTx era) Source # 
Instance details

Defined in Cardano.Ledger.MempoolTx.Internal

Methods

toCBOR ∷ MempoolTx era → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (MempoolTx era) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [MempoolTx era] → Size Source #

EraTx era ⇒ NFData (MempoolTx era) Source # 
Instance details

Defined in Cardano.Ledger.MempoolTx.Internal

Methods

rnf ∷ MempoolTx era → () #

EraTx era ⇒ Show (MempoolTx era) Source # 
Instance details

Defined in Cardano.Ledger.MempoolTx.Internal

Methods

showsPrec ∷ Int → MempoolTx era → ShowS #

show ∷ MempoolTx era → String #

showList ∷ [MempoolTx era] → ShowS #

EraTx era ⇒ Eq (MempoolTx era) Source # 
Instance details

Defined in Cardano.Ledger.MempoolTx.Internal

Methods

(==) ∷ MempoolTx era → MempoolTx era → Bool #

(/=) ∷ MempoolTx era → MempoolTx era → Bool #

EraTx era ⇒ NoThunks (MempoolTx era) Source # 
Instance details

Defined in Cardano.Ledger.MempoolTx.Internal

unwrapMempoolTx ∷ MempoolTx era → Tx 'TopTx era Source #

Get the transaction that was received by the mempool.

binaryUpgradeMempoolTx ∷ (Era era, Era (PreviousEra era), EncCBOR (MempoolTx (PreviousEra era)), DecCBOR (Annotator (MempoolTx era))) ⇒ MempoolTx (PreviousEra era) → Except DecoderError (MempoolTx era) Source #

Translate a mempool transaction through its binary representation from the previous era to the current one. Block transactions are not upgraded.