Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- hydraHeadV1 :: BuiltinByteString
- hasST :: CurrencySymbol -> Value -> Bool
- mustBurnAllHeadTokens :: Value -> CurrencySymbol -> [Party] -> Bool
- mustBurnST :: Value -> CurrencySymbol -> Bool
- mustNotMintOrBurn :: TxInfo -> Bool
- (===) :: Value -> Value -> Bool
- data UtilError = MintingOrBurningIsForbidden
- scriptOutputsAt :: ScriptHash -> TxInfo -> [(OutputDatum, Value)]
- valueLockedBy :: TxInfo -> ScriptHash -> Value
- findTxInByTxOutRef :: TxOutRef -> TxInfo -> Maybe TxInInfo
Documentation
hydraHeadV1 :: BuiltinByteString Source #
hasST :: CurrencySymbol -> Value -> Bool Source #
Checks that the output contains the state token (ST) with the head
CurrencySymbol
and TokenName
of hydraHeadV1
mustBurnAllHeadTokens :: Value -> CurrencySymbol -> [Party] -> Bool Source #
Checks all tokens related to some specific CurrencySymbol
.
This checks both PTs and ST are burnt.
mustBurnST :: Value -> CurrencySymbol -> Bool Source #
Checks if the state token (ST) for list of parties containing specific
CurrencySymbol
are burnt.
mustNotMintOrBurn :: TxInfo -> Bool Source #
(===) :: Value -> Value -> Bool infix 4 Source #
Checks for exact equality between two serialized values.
Equality on value is very memory intensive as it's defined on associative
lists and AssocMap
equality is implemented. Instead we can be more strict and
require EXACTLY the same value and compare using the serialised bytes.
Errors
scriptOutputsAt :: ScriptHash -> TxInfo -> [(OutputDatum, Value)] Source #
Get the list of TxOut
outputs of the pending transaction at
a given script address.
valueLockedBy :: TxInfo -> ScriptHash -> Value Source #
Get the total value locked by the given validator in this transaction.
findTxInByTxOutRef :: TxOutRef -> TxInfo -> Maybe TxInInfo Source #
Given a UTXO reference and a transaction (TxInfo
), resolve it to one of the transaction's inputs (TxInInfo
).