Skip to content

Commit

Permalink
Improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
palas committed Nov 25, 2024
1 parent 9b3bdc0 commit 07cfd58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cardano-api/internal/Cardano/Api/ScriptData.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 $
Expand All @@ -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)
Expand Down

0 comments on commit 07cfd58

Please sign in to comment.