@@ -1085,7 +1085,8 @@ fromAlonzoTxOutDatumHash _ SNothing = TxOutDatumNone
1085
1085
fromAlonzoTxOutDatumHash w (SJust hash) = TxOutDatumHash w $ ScriptDataHash hash
1086
1086
1087
1087
toBabbageTxOutDatum
1088
- :: L. Era (ShelleyLedgerEra era )
1088
+ :: HasCallStack
1089
+ => L. Era (ShelleyLedgerEra era )
1089
1090
=> TxOutDatum ctx era
1090
1091
-> Plutus. Datum (ShelleyLedgerEra era )
1091
1092
toBabbageTxOutDatum TxOutDatumNone = Plutus. NoDatum
@@ -2602,7 +2603,7 @@ fromAlonzoTxOutDatum w txdatums = \case
2602
2603
SNothing -> TxOutDatumNone
2603
2604
SJust dh
2604
2605
| Just d <- Map. lookup dh txdatums ->
2605
- TxOutSupplementalDatum w (fromAlonzoData d)
2606
+ TxOutSupplementalDatum w (fromAlonzoData d) -- TODO
2606
2607
| otherwise -> TxOutDatumHash w (ScriptDataHash dh)
2607
2608
2608
2609
fromBabbageTxOut
@@ -2966,6 +2967,7 @@ convScriptData
2966
2967
-> [TxOut CtxTx era ]
2967
2968
-> [(ScriptWitnessIndex , AnyScriptWitness era )]
2968
2969
-> TxBodyScriptData era
2970
+ convScriptData _ _ _ = error " XX"
2969
2971
convScriptData sbe txOuts scriptWitnesses =
2970
2972
caseShelleyToMaryOrAlonzoEraOnwards
2971
2973
(const TxBodyNoScriptData )
@@ -3007,7 +3009,7 @@ convScriptData sbe txOuts scriptWitnesses =
3007
3009
) <-
3008
3010
scriptWitnesses
3009
3011
]
3010
- in TxBodyScriptData w datums redeemers
3012
+ in TxBodyScriptData w datums redeemers -- TODO
3011
3013
)
3012
3014
sbe
3013
3015
@@ -3289,7 +3291,7 @@ makeShelleyTransactionBody
3289
3291
sbe
3290
3292
txbody
3291
3293
scripts
3292
- (TxBodyScriptData AlonzoEraOnwardsAlonzo datums redeemers)
3294
+ (TxBodyScriptData AlonzoEraOnwardsAlonzo datums redeemers) -- TODO
3293
3295
txAuxData
3294
3296
txScriptValidity
3295
3297
where
@@ -3417,7 +3419,7 @@ makeShelleyTransactionBody
3417
3419
sbe
3418
3420
txbody
3419
3421
scripts
3420
- ( TxBodyScriptData
3422
+ ( TxBodyScriptData -- TODO
3421
3423
AlonzoEraOnwardsBabbage
3422
3424
datums
3423
3425
redeemers
@@ -3567,7 +3569,7 @@ makeShelleyTransactionBody
3567
3569
sbe
3568
3570
txbody
3569
3571
scripts
3570
- ( TxBodyScriptData
3572
+ ( TxBodyScriptData -- TODO
3571
3573
AlonzoEraOnwardsConway
3572
3574
datums
3573
3575
redeemers
@@ -3933,11 +3935,18 @@ getSupplementalDatums eon [] = alonzoEraOnwardsConstraints eon mempty
3933
3935
getSupplementalDatums eon txouts =
3934
3936
alonzoEraOnwardsConstraints eon $
3935
3937
L. TxDats $
3936
- fromList
3938
+ fromList $
3937
3939
[ (L. hashData ledgerData, ledgerData)
3938
- | TxOut _ _ (TxOutSupplementalDatum _ d) _ <- txouts
3940
+ | TxOut _ _ datum _ <- txouts
3941
+ , Just d <- [getDatum datum]
3939
3942
, let ledgerData = toAlonzoData d
3940
3943
]
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
3941
3950
3942
3951
collectTxBodyScriptWitnessRequirements
3943
3952
:: forall era
@@ -3954,7 +3963,7 @@ collectTxBodyScriptWitnessRequirements
3954
3963
} =
3955
3964
obtainAlonzoScriptPurposeConstraints aEon $ do
3956
3965
let sbe = shelleyBasedEra @ era
3957
- supplementaldatums = TxScriptWitnessRequirements mempty mempty (getSupplementalDatums aEon txOuts) mempty
3966
+ supplementaldatums = TxScriptWitnessRequirements mempty mempty (getSupplementalDatums aEon txOuts) mempty -- TODO
3958
3967
txInWits <-
3959
3968
first TxBodyPlutusScriptDecodeError $
3960
3969
legacyWitnessToScriptRequirements aEon $
0 commit comments