DO NOT MERGE
tracing the un-hashed bytes of the script integrity
tracing the un-hashed bytes of the script integrity
)
where
import Debug.Trace (trace)
import Cardano.Crypto.Hash.Class (HashAlgorithm)
import Cardano.Ledger.Address (Addr (..), RewardAcnt (..))
import Cardano.Ledger.Allegra.Core ()
hashScriptIntegrity langViews rdmrs dats =
if nullRedeemers rdmrs && Set.null langViews && nullDats dats
then SNothing
else SJust (hashAnnotated (ScriptIntegrity rdmrs dats langViews))
else trace ("\nLike a rainbow in the dark: " ++ show (originalBytes si)) $ SJust (hashAnnotated si)
where
si = ScriptIntegrity rdmrs dats langViews
-- ===============================================================
-- From the specification, Figure 4 "Functions related to fees"
Co-authored-by: Alexey Kuleshevich <[email protected]>