From 07cfd58f4ffabc96391bba53d2f464b859be0a6a Mon Sep 17 00:00:00 2001 From: Pablo Lamela Date: Mon, 25 Nov 2024 16:29:14 +0100 Subject: [PATCH] Improve comments --- cardano-api/internal/Cardano/Api/ScriptData.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cardano-api/internal/Cardano/Api/ScriptData.hs b/cardano-api/internal/Cardano/Api/ScriptData.hs index df8ed04b3..8b8c46bc2 100644 --- a/cardano-api/internal/Cardano/Api/ScriptData.hs +++ b/cardano-api/internal/Cardano/Api/ScriptData.hs @@ -259,7 +259,7 @@ fromPlutusData (PlutusAPI.List xs) = fromPlutusData (PlutusAPI.I n) = ScriptDataNumber n fromPlutusData (PlutusAPI.B bs) = ScriptDataBytes bs --- | Friendly script JSON +-- | Create a friendly JSON out of a script friendlyScript :: AlonzoEraOnwardsConstraints era => Script (ShelleyLedgerEra era) -> Aeson.Value friendlyScript script = Aeson.Object $ KeyMap.fromList $ @@ -281,7 +281,7 @@ friendlyScript script = Aeson.Object $ , ("script", Aeson.String $ serializeAsHexText $ plutusBinary plutusScript) ] --- | Friendly dats JSON +-- | Create a friendly JSON out of a datum friendlyDatum :: AlonzoEraOnwardsConstraints era => Alonzo.Data (ShelleyLedgerEra era) -> Aeson.Value friendlyDatum (Alonzo.Data datum) = Aeson.String (T.pack $ show datum)