cardano-ledger-test-9.9.9.9: Testing harness, tests and benchmarks for Shelley style cardano ledgers
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.Constrained.Trace.DrepCertTx

Description

Generate a Simple Tx with 1 inout, 1 output, and 1 DRep related Cert

Synopsis

Documentation

fixOutputEraTxOut era ⇒ Coin → [TxBodyField era] → TraceM era [TxBodyField era] Source #

Fix the first Outputs field in a [TxBodyField], by applying the delta Coin to the first Output in that Outputs field This is used to compensate for certificates which make deposits, and this Coin must come from somewhere, so it is added (subtracted if the Coin is negative) from the first TxOut. In rare occurrences, it is possible that delta might be too negative to subtract from the input in that case discard the trace. Note that in traces of length 150. this happens less than 1% of the time.

drepCertReflect era ⇒ Proof era → TraceM era (Coin, [TxBodyField era]) Source #

Compute a valid Cert, and the change in the stored Deposits from that Cert.

drepCertTxReflect era ⇒ CoinProof era → TraceM era (TxF era) Source #

applyDRepCertActionsReflect era ⇒ Proof era → Tx era → TraceM era () Source #

drepCertTxForTraceReflect era ⇒ CoinProof era → TraceM era (Tx era) Source #

Generate a Tx that can be made into a Trace, because it applies the necessary Actions to update the Env. The Env must contain the Vars that are updated by applyDRepCertActions . It is best to intialize the whole LedgerState to do this.

mainIO () Source #

getppEraGov era ⇒ NewEpochState era → PParams era Source #

showCertsProof era → [TxCert era] → String Source #

certsOfEraTx era ⇒ Tx era → [TxCert era] Source #

hashTxEraTx era ⇒ Proof era → Tx era → Hash (HASH (EraCrypto era)) EraIndependentTxBody Source #

showMap ∷ (Show k, Show v) ⇒ StringMap k v → String Source #

traceMap ∷ (Show k, Show v) ⇒ StringMap k v → a → a Source #