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

Test.Cardano.Ledger.Examples.STSTestUtils

Synopsis

Documentation

initUTxO ∷ ∀ era. (EraTxOut era, PostShelley era) ⇒ Proof era → UTxO era Source #

mkTxDatsEra era ⇒ Data era → TxDats era Source #

someAddr ∷ ∀ era. Era era ⇒ Proof era → Addr (EraCrypto era) Source #

someKeys ∷ ∀ era. Era era ⇒ Proof era → KeyPair 'Payment (EraCrypto era) Source #

someScriptAddr ∷ ∀ era. Scriptic era ⇒ Script era → Addr (EraCrypto era) Source #

testBBODY ∷ (Reflect era, HasCallStack) ⇒ WitRule "BBODY" era → ShelleyBbodyState era → Block (BHeaderView (EraCrypto era)) era → Either (NonEmpty (PredicateFailure (EraRule "BBODY" era))) (ShelleyBbodyState era) → PParams era → Assertion Source #

runLEDGER ∷ ∀ era. (GoodCrypto (EraCrypto era), EraTx era, EraGov era) ⇒ WitRule "LEDGER" era → LedgerState era → PParams era → Tx era → Either (NonEmpty (PredicateFailure (EraRule "LEDGER" era))) (State (EraRule "LEDGER" era)) Source #

testUTXOW ∷ ∀ era. (Reflect era, HasCallStack) ⇒ WitRule "UTXOW" era → UTxO era → PParams era → Tx era → Either (NonEmpty (PredicateFailure (EraRule "UTXOW" era))) (State (EraRule "UTXOW" era)) → Assertion Source #

Use an equality test on the expected and computed [PredicateFailure]

testUTXOWsubset ∷ ∀ era. (Reflect era, HasCallStack) ⇒ WitRule "UTXOW" era → UTxO era → PParams era → Tx era → Either (NonEmpty (PredicateFailure (EraRule "UTXOW" era))) (State (EraRule "UTXOW" era)) → Assertion Source #

Use a subset test on the expected and computed [PredicateFailure]

testUTXOspecialCase ∷ ∀ era. (Reflect era, HasCallStack) ⇒ WitRule "UTXOW" era → UTxO era → PParams era → Tx era → Either (NonEmpty (PredicateFailure (EraRule "UTXOW" era))) (State (EraRule "UTXOW" era)) → Assertion Source #

Use a test where any two (ValidationTagMismatch x y) failures match regardless of x and y

trustMePProof era → BoolTx era → Tx era Source #

alwaysFailsHash ∷ ∀ era. Scriptic era ⇒ NaturalProof era → ScriptHash (EraCrypto era) Source #

alwaysSucceedsHash ∷ ∀ era. Scriptic era ⇒ NaturalProof era → ScriptHash (EraCrypto era) Source #

timelockScriptPostShelley era ⇒ IntProof era → Script era Source #

timelockHash ∷ ∀ era. PostShelley era ⇒ IntProof era → ScriptHash (EraCrypto era) Source #