From 37b615708896dccf3e2f8c1387b6d0a1a35408b4 Mon Sep 17 00:00:00 2001 From: Jordan Millar Date: Wed, 3 Jul 2024 13:58:29 +0200 Subject: [PATCH] Modify ScriptDatum in accordance with CIP-0069 I.E the datum is no longer required in spending scripts --- cardano-api/internal/Cardano/Api/Script.hs | 2 +- cardano-api/internal/Cardano/Api/Tx/Body.hs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cardano-api/internal/Cardano/Api/Script.hs b/cardano-api/internal/Cardano/Api/Script.hs index f909b89ebd..4899dac42e 100644 --- a/cardano-api/internal/Cardano/Api/Script.hs +++ b/cardano-api/internal/Cardano/Api/Script.hs @@ -763,7 +763,7 @@ instance Eq (ScriptWitness witctx era) where type ScriptRedeemer = HashableScriptData data ScriptDatum witctx where - ScriptDatumForTxIn :: HashableScriptData -> ScriptDatum WitCtxTxIn + ScriptDatumForTxIn :: Maybe HashableScriptData -> ScriptDatum WitCtxTxIn InlineScriptDatum :: ScriptDatum WitCtxTxIn NoScriptDatumForMint :: ScriptDatum WitCtxMint NoScriptDatumForStake :: ScriptDatum WitCtxStake diff --git a/cardano-api/internal/Cardano/Api/Tx/Body.hs b/cardano-api/internal/Cardano/Api/Tx/Body.hs index 30bb07d0c0..46f5dd079c 100644 --- a/cardano-api/internal/Cardano/Api/Tx/Body.hs +++ b/cardano-api/internal/Cardano/Api/Tx/Body.hs @@ -2301,7 +2301,7 @@ convScriptData sbe txOuts scriptWitnesses = _ _ _ - (ScriptDatumForTxIn d) + (ScriptDatumForTxIn (Just d)) _ _ ) @@ -2598,7 +2598,7 @@ makeShelleyTransactionBody _ _ _ - (ScriptDatumForTxIn d) + (ScriptDatumForTxIn (Just d)) _ _ ) @@ -2724,7 +2724,7 @@ makeShelleyTransactionBody _ _ _ - (ScriptDatumForTxIn d) + (ScriptDatumForTxIn (Just d)) _ _ ) @@ -2862,7 +2862,7 @@ makeShelleyTransactionBody _ _ _ - (ScriptDatumForTxIn d) + (ScriptDatumForTxIn (Just d)) _ _ )