From e966600f8eeebe57e81bde4d9b7879a69ca8422e 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 a8e21f2927..3caf7e18c2 100644 --- a/cardano-api/internal/Cardano/Api/Script.hs +++ b/cardano-api/internal/Cardano/Api/Script.hs @@ -766,7 +766,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)) _ _ )