88{-# LANGUAGE TypeApplications #-}
99{-# LANGUAGE TypeOperators #-}
1010
11- module Test.Cardano.Ledger.Babbage.TxInfoSpec (txInfoSpecV2 , spec ) where
11+ module Test.Cardano.Ledger.Babbage.TxInfoSpec (txInfoSpec , spec ) where
1212
1313import Cardano.Ledger.Address (Addr (.. ))
1414import Cardano.Ledger.Alonzo.Plutus.Context (
@@ -35,7 +35,7 @@ import Cardano.Ledger.Credential (StakeReference (..))
3535import Cardano.Ledger.Hashes (unsafeMakeSafeHash )
3636import Cardano.Ledger.Mary.Value (MaryValue )
3737import Cardano.Ledger.Plutus.Data (Data (.. ), Datum (.. ), dataToBinaryData )
38- import Cardano.Ledger.Plutus.Language (Language (.. ), SLanguage (.. ))
38+ import Cardano.Ledger.Plutus.Language (Language (.. ), SLanguage (.. ), plutusLanguage )
3939import Cardano.Ledger.State (UTxO (.. ))
4040import Cardano.Ledger.TxIn (TxId (.. ), TxIn (.. ), mkTxInPartial )
4141import Cardano.Slotting.EpochInfo (EpochInfo , fixedEpochInfo )
@@ -314,7 +314,7 @@ txInfoSpecV1 =
314314 (txBare shelleyInput inlineDatumOutput)
315315 (inject $ InlineDatumsNotSupported @ era (TxOutFromOutput minBound ))
316316
317- txInfoSpecV2 ::
317+ txInfoSpec ::
318318 forall era l .
319319 ( EraTx era
320320 , EraPlutusTxInfo l era
@@ -327,7 +327,7 @@ txInfoSpecV2 ::
327327 ) =>
328328 SLanguage l ->
329329 Spec
330- txInfoSpecV2 lang =
330+ txInfoSpec lang =
331331 describe (show lang) $ do
332332 it " translation error on byron txout" $
333333 expectTranslationError @ era
@@ -344,11 +344,13 @@ txInfoSpecV2 lang =
344344 lang
345345 (txBare unknownInput shelleyOutput)
346346 (inject $ AlonzoContextError $ TranslationLogicMissingInput @ era unknownInput)
347- it " use reference input starting in Babbage" $
348- successfulTranslation @ era
349- lang
350- (txRefInput shelleyInput)
351- hasReferenceInput
347+ -- This test will fail in PlutusV3 because of ReferenceInputsNotDisjointFromInputs
348+ when (plutusLanguage lang == PlutusV2 ) $
349+ it " use reference input starting in Babbage" $
350+ successfulTranslation @ era
351+ lang
352+ (txRefInput shelleyInput)
353+ hasReferenceInput
352354 it " use inline datum in input" $
353355 successfulTranslation @ era
354356 lang
@@ -389,7 +391,7 @@ spec ::
389391spec =
390392 describe " txInfo translation" $ do
391393 txInfoSpecV1 @ era
392- txInfoSpecV2 @ era SPlutusV2
394+ txInfoSpec @ era SPlutusV2
393395
394396genesisId :: TxId
395397genesisId = TxId (unsafeMakeSafeHash (mkDummyHash (0 :: Int )))
0 commit comments