tests
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Ledger.CardanoSpec

Synopsis

Documentation

spec :: Spec Source #

shouldParseJSONAs :: forall a. (HasCallStack, FromJSON a) => LByteString -> Expectation Source #

roundtripPParams :: PParams LedgerEra -> Property Source #

Test that the PParams To/FromJSON instances to roundtrip.

propDoesNotCollapse :: (Show (t a), Foldable t, Monoid (t a)) => String -> Gen (t a) -> Spec Source #

propRealisticValue :: Value -> Property Source #

A transaction or transaction output can usually only contain a realistic number of native asset entries. This property checks a realistic order of magnitude (100).

propHasEnoughLovelace :: TxOut CtxUTxO -> Property Source #

Check that an output has enough lovelace to cover asset deposits.

propGeneratesGoodTxOut :: TxOut CtxUTxO -> Property Source #

Check that the given TxOut fulfills several requirements and does not use unsupported features. See genTxOut for rationale.