Skip to content

Commit

Permalink
Add some haddock
Browse files Browse the repository at this point in the history
  • Loading branch information
v0d1ch authored and ch1bo committed Jan 13, 2023
1 parent 0d35d10 commit fedcb8c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hydra-plutus/src/Hydra/Contract/Head.hs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ checkCollectCom ctx@ScriptContext{scriptContextTxInfo = txInfo} (contestationPer
isHeadOutput txOut = txOutAddress txOut == headAddress
{-# INLINEABLE checkCollectCom #-}

-- | Try to find the commit datum in the input and
-- if it is there return the commited utxo
commitDatum :: TxInfo -> TxOut -> Maybe Commit
commitDatum txInfo input = do
let datum = findTxOutDatum txInfo input
Expand Down Expand Up @@ -498,6 +500,7 @@ hashTxOuts =
sha2_256 . foldMap (Builtins.serialiseData . toBuiltinData)
{-# INLINEABLE hashTxOuts #-}

-- | Check if 'TxOut' contains the PT token.
hasPT :: CurrencySymbol -> TxOut -> Bool
hasPT headCurrencySymbol txOut =
let pts = findParticipationTokens headCurrencySymbol (txOutValue txOut)
Expand Down

0 comments on commit fedcb8c

Please sign in to comment.