hydra-plutus-0.20.0: Hydra Plutus Contracts
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Contract.Util

Contents

Synopsis

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.

(===) :: 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

data UtilError Source #

Instances

Instances details
Show UtilError Source # 
Instance details

Defined in Hydra.Contract.Util

ToErrorCode UtilError Source # 
Instance details

Defined in Hydra.Contract.Util

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).