@@ -1074,7 +1074,8 @@ fromAlonzoTxOutDatumHash _ SNothing = TxOutDatumNone
1074
1074
fromAlonzoTxOutDatumHash w (SJust hash) = TxOutDatumHash w $ ScriptDataHash hash
1075
1075
1076
1076
toBabbageTxOutDatum
1077
- :: L. Era (ShelleyLedgerEra era )
1077
+ :: HasCallStack
1078
+ => L. Era (ShelleyLedgerEra era )
1078
1079
=> TxOutDatum ctx era
1079
1080
-> Plutus. Datum (ShelleyLedgerEra era )
1080
1081
toBabbageTxOutDatum TxOutDatumNone = Plutus. NoDatum
@@ -2590,7 +2591,7 @@ fromAlonzoTxOutDatum w txdatums = \case
2590
2591
SNothing -> TxOutDatumNone
2591
2592
SJust dh
2592
2593
| Just d <- Map. lookup dh txdatums ->
2593
- TxOutSupplementalDatum w (fromAlonzoData d)
2594
+ TxOutSupplementalDatum w (fromAlonzoData d) -- TODO
2594
2595
| otherwise -> TxOutDatumHash w (ScriptDataHash dh)
2595
2596
2596
2597
fromBabbageTxOut
@@ -2952,6 +2953,7 @@ convScriptData
2952
2953
-> [TxOut CtxTx era ]
2953
2954
-> [(ScriptWitnessIndex , AnyScriptWitness era )]
2954
2955
-> TxBodyScriptData era
2956
+ convScriptData _ _ _ = error " XX"
2955
2957
convScriptData sbe txOuts scriptWitnesses =
2956
2958
caseShelleyToMaryOrAlonzoEraOnwards
2957
2959
(const TxBodyNoScriptData )
@@ -2993,7 +2995,7 @@ convScriptData sbe txOuts scriptWitnesses =
2993
2995
) <-
2994
2996
scriptWitnesses
2995
2997
]
2996
- in TxBodyScriptData w datums redeemers
2998
+ in TxBodyScriptData w datums redeemers -- TODO
2997
2999
)
2998
3000
sbe
2999
3001
@@ -3250,7 +3252,7 @@ makeShelleyTransactionBody
3250
3252
sbe
3251
3253
txbody
3252
3254
scripts
3253
- (TxBodyScriptData AlonzoEraOnwardsAlonzo datums redeemers)
3255
+ (TxBodyScriptData AlonzoEraOnwardsAlonzo datums redeemers) -- TODO
3254
3256
txAuxData
3255
3257
txScriptValidity
3256
3258
where
@@ -3367,7 +3369,7 @@ makeShelleyTransactionBody
3367
3369
sbe
3368
3370
txbody
3369
3371
scripts
3370
- ( TxBodyScriptData
3372
+ ( TxBodyScriptData -- TODO
3371
3373
AlonzoEraOnwardsBabbage
3372
3374
datums
3373
3375
redeemers
@@ -3507,7 +3509,7 @@ makeShelleyTransactionBody
3507
3509
sbe
3508
3510
txbody
3509
3511
scripts
3510
- ( TxBodyScriptData
3512
+ ( TxBodyScriptData -- TODO
3511
3513
AlonzoEraOnwardsConway
3512
3514
datums
3513
3515
redeemers
@@ -3868,11 +3870,18 @@ getSupplementalDatums eon [] = alonzoEraOnwardsConstraints eon mempty
3868
3870
getSupplementalDatums eon txouts =
3869
3871
alonzoEraOnwardsConstraints eon $
3870
3872
L. TxDats $
3871
- fromList
3873
+ fromList $
3872
3874
[ (L. hashData ledgerData, ledgerData)
3873
- | TxOut _ _ (TxOutSupplementalDatum _ d) _ <- txouts
3875
+ | TxOut _ _ datum _ <- txouts
3876
+ , Just d <- [getDatum datum]
3874
3877
, let ledgerData = toAlonzoData d
3875
3878
]
3879
+ where
3880
+ getDatum = \ case
3881
+ TxOutDatumNone -> Nothing
3882
+ TxOutDatumHash _ _scriptHash -> Nothing -- TODO provide datum here to match with hash
3883
+ TxOutSupplementalDatum _ d -> Just d
3884
+ TxOutDatumInline _ d -> Just d
3876
3885
3877
3886
collectTxBodyScriptWitnessRequirements
3878
3887
:: forall era
@@ -3889,7 +3898,7 @@ collectTxBodyScriptWitnessRequirements
3889
3898
} =
3890
3899
obtainAlonzoScriptPurposeConstraints aEon $ do
3891
3900
let sbe = shelleyBasedEra @ era
3892
- supplementaldatums = TxScriptWitnessRequirements mempty mempty (getSupplementalDatums aEon txOuts) mempty
3901
+ supplementaldatums = TxScriptWitnessRequirements mempty mempty (getSupplementalDatums aEon txOuts) mempty -- TODO
3893
3902
txInWits <-
3894
3903
first TxBodyPlutusScriptDecodeError $
3895
3904
legacyWitnessToScriptRequirements aEon $
0 commit comments