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. Proof era → Addr Source #

someKeys ∷ ∀ era. Proof era → KeyPair 'Payment Source #

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

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

runLEDGER ∷ ∀ 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 Source #

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

timelockScriptPostShelley era ⇒ IntProof era → Script era Source #

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