From 5119a4eb3536489da7eb584a5f43ed7ef31406bc Mon Sep 17 00:00:00 2001 From: Carl Hammann Date: Wed, 18 Oct 2023 18:12:31 +0200 Subject: [PATCH 1/2] Add missing clause to support Plutus V1 in Conway --- cardano-api/internal/Cardano/Api/Script.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cardano-api/internal/Cardano/Api/Script.hs b/cardano-api/internal/Cardano/Api/Script.hs index 008cf6ed06..7f84c1420c 100644 --- a/cardano-api/internal/Cardano/Api/Script.hs +++ b/cardano-api/internal/Cardano/Api/Script.hs @@ -606,6 +606,9 @@ scriptLanguageSupportedInEra era lang = (BabbageEra, PlutusScriptLanguage PlutusScriptV2) -> Just PlutusScriptV2InBabbage + (ConwayEra, PlutusScriptLanguage PlutusScriptV1) -> + Just PlutusScriptV1InConway + (ConwayEra, PlutusScriptLanguage PlutusScriptV2) -> Just PlutusScriptV2InConway From 8b1da6e1e4a7df4366d5f377a2453d06e6ca3853 Mon Sep 17 00:00:00 2001 From: Carl Hammann Date: Wed, 18 Oct 2023 18:13:54 +0200 Subject: [PATCH 2/2] Reorder some lines to fit the general scheme --- cardano-api/internal/Cardano/Api/Script.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cardano-api/internal/Cardano/Api/Script.hs b/cardano-api/internal/Cardano/Api/Script.hs index 7f84c1420c..1b9c9c0c55 100644 --- a/cardano-api/internal/Cardano/Api/Script.hs +++ b/cardano-api/internal/Cardano/Api/Script.hs @@ -642,21 +642,19 @@ eraOfScriptLanguageInEra :: ScriptLanguageInEra lang era eraOfScriptLanguageInEra langInEra = case langInEra of SimpleScriptInShelley -> ShelleyBasedEraShelley - SimpleScriptInAllegra -> ShelleyBasedEraAllegra - SimpleScriptInMary -> ShelleyBasedEraMary - SimpleScriptInAlonzo -> ShelleyBasedEraAlonzo - PlutusScriptV1InAlonzo -> ShelleyBasedEraAlonzo - SimpleScriptInBabbage -> ShelleyBasedEraBabbage SimpleScriptInConway -> ShelleyBasedEraConway + PlutusScriptV1InAlonzo -> ShelleyBasedEraAlonzo PlutusScriptV1InBabbage -> ShelleyBasedEraBabbage PlutusScriptV1InConway -> ShelleyBasedEraConway + PlutusScriptV2InBabbage -> ShelleyBasedEraBabbage PlutusScriptV2InConway -> ShelleyBasedEraConway + PlutusScriptV3InConway -> ShelleyBasedEraConway -- | Given a target era and a script in some language, check if the language is