Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Unit tests for our "hand-rolled" transactions as they are used in the "direct" chain component.
Synopsis
- spec :: Spec
- propHasValidAuxData :: Tx -> Property
- propIsSubsetOf :: (Show a, Ord a) => Set a -> Set a -> Property
- propIsSubmapOf :: (Show k, Show v, Ord k, Eq v) => Map k v -> Map k v -> Property
- genBlueprintTxWithUTxO :: Gen (UTxO, Tx)
- genMetadata :: Gen TxMetadataInEra
- getAuxMetadata :: Tx -> Map Word64 Metadatum
- prop_interestingBlueprintTx :: Property
- generateCommitUTxOs :: [Party] -> Gen (Map TxIn (TxOut CtxUTxO, UTxO))
- genAbortableOutputs :: [Party] -> Gen ([(TxIn, TxOut CtxUTxO)], [(TxIn, TxOut CtxUTxO, UTxO)])
Documentation
propHasValidAuxData :: Tx -> Property Source #
Check auxiliary data of a transaction against pparams
and whether the aux
data hash is consistent.
propIsSubsetOf :: (Show a, Ord a) => Set a -> Set a -> Property Source #
Check whether one set isSubsetOf
of another with nice counter examples.
propIsSubmapOf :: (Show k, Show v, Ord k, Eq v) => Map k v -> Map k v -> Property Source #
Check whether one map isSubmapOf
of another with nice counter examples.
genBlueprintTxWithUTxO :: Gen (UTxO, Tx) Source #
genMetadata :: Gen TxMetadataInEra Source #
getAuxMetadata :: Tx -> Map Word64 Metadatum Source #
prop_interestingBlueprintTx :: Property Source #
generateCommitUTxOs :: [Party] -> Gen (Map TxIn (TxOut CtxUTxO, UTxO)) Source #
Generate a UTXO representing commit outputs for a given list of Party
.
NOTE: Uses testPolicyId
for the datum.
NOTE: We don't generate empty commits and it is used only at one place so perhaps move it?
FIXME: This function is very complicated and it's hard to understand it after a while
genAbortableOutputs :: [Party] -> Gen ([(TxIn, TxOut CtxUTxO)], [(TxIn, TxOut CtxUTxO, UTxO)]) Source #