@@ -1085,7 +1085,8 @@ fromAlonzoTxOutDatumHash _ SNothing = TxOutDatumNone
10851085fromAlonzoTxOutDatumHash w (SJust hash) = TxOutDatumHash w $ ScriptDataHash hash
10861086
10871087toBabbageTxOutDatum
1088- :: L. Era (ShelleyLedgerEra era )
1088+ :: HasCallStack
1089+ => L. Era (ShelleyLedgerEra era )
10891090 => TxOutDatum ctx era
10901091 -> Plutus. Datum (ShelleyLedgerEra era )
10911092toBabbageTxOutDatum TxOutDatumNone = Plutus. NoDatum
@@ -2602,7 +2603,7 @@ fromAlonzoTxOutDatum w txdatums = \case
26022603 SNothing -> TxOutDatumNone
26032604 SJust dh
26042605 | Just d <- Map. lookup dh txdatums ->
2605- TxOutSupplementalDatum w (fromAlonzoData d)
2606+ TxOutSupplementalDatum w (fromAlonzoData d) -- TODO
26062607 | otherwise -> TxOutDatumHash w (ScriptDataHash dh)
26072608
26082609fromBabbageTxOut
@@ -2966,6 +2967,7 @@ convScriptData
29662967 -> [TxOut CtxTx era ]
29672968 -> [(ScriptWitnessIndex , AnyScriptWitness era )]
29682969 -> TxBodyScriptData era
2970+ convScriptData _ _ _ = error " XX"
29692971convScriptData sbe txOuts scriptWitnesses =
29702972 caseShelleyToMaryOrAlonzoEraOnwards
29712973 (const TxBodyNoScriptData )
@@ -3007,7 +3009,7 @@ convScriptData sbe txOuts scriptWitnesses =
30073009 ) <-
30083010 scriptWitnesses
30093011 ]
3010- in TxBodyScriptData w datums redeemers
3012+ in TxBodyScriptData w datums redeemers -- TODO
30113013 )
30123014 sbe
30133015
@@ -3289,7 +3291,7 @@ makeShelleyTransactionBody
32893291 sbe
32903292 txbody
32913293 scripts
3292- (TxBodyScriptData AlonzoEraOnwardsAlonzo datums redeemers)
3294+ (TxBodyScriptData AlonzoEraOnwardsAlonzo datums redeemers) -- TODO
32933295 txAuxData
32943296 txScriptValidity
32953297 where
@@ -3417,7 +3419,7 @@ makeShelleyTransactionBody
34173419 sbe
34183420 txbody
34193421 scripts
3420- ( TxBodyScriptData
3422+ ( TxBodyScriptData -- TODO
34213423 AlonzoEraOnwardsBabbage
34223424 datums
34233425 redeemers
@@ -3567,7 +3569,7 @@ makeShelleyTransactionBody
35673569 sbe
35683570 txbody
35693571 scripts
3570- ( TxBodyScriptData
3572+ ( TxBodyScriptData -- TODO
35713573 AlonzoEraOnwardsConway
35723574 datums
35733575 redeemers
@@ -3933,11 +3935,18 @@ getSupplementalDatums eon [] = alonzoEraOnwardsConstraints eon mempty
39333935getSupplementalDatums eon txouts =
39343936 alonzoEraOnwardsConstraints eon $
39353937 L. TxDats $
3936- fromList
3938+ fromList $
39373939 [ (L. hashData ledgerData, ledgerData)
3938- | TxOut _ _ (TxOutSupplementalDatum _ d) _ <- txouts
3940+ | TxOut _ _ datum _ <- txouts
3941+ , Just d <- [getDatum datum]
39393942 , let ledgerData = toAlonzoData d
39403943 ]
3944+ where
3945+ getDatum = \ case
3946+ TxOutDatumNone -> Nothing
3947+ TxOutDatumHash _ _scriptHash -> Nothing -- TODO provide datum here to match with hash
3948+ TxOutSupplementalDatum _ d -> Just d
3949+ TxOutDatumInline _ d -> Just d
39413950
39423951collectTxBodyScriptWitnessRequirements
39433952 :: forall era
@@ -3954,7 +3963,7 @@ collectTxBodyScriptWitnessRequirements
39543963 } =
39553964 obtainAlonzoScriptPurposeConstraints aEon $ do
39563965 let sbe = shelleyBasedEra @ era
3957- supplementaldatums = TxScriptWitnessRequirements mempty mempty (getSupplementalDatums aEon txOuts) mempty
3966+ supplementaldatums = TxScriptWitnessRequirements mempty mempty (getSupplementalDatums aEon txOuts) mempty -- TODO
39583967 txInWits <-
39593968 first TxBodyPlutusScriptDecodeError $
39603969 legacyWitnessToScriptRequirements aEon $
0 commit comments