diff --git a/cardano-cli/src/Cardano/CLI/Orphans.hs b/cardano-cli/src/Cardano/CLI/Orphans.hs index acf579f4b0..293552b17e 100644 --- a/cardano-cli/src/Cardano/CLI/Orphans.hs +++ b/cardano-cli/src/Cardano/CLI/Orphans.hs @@ -1,3 +1,6 @@ +{-# LANGUAGE GADTs #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE MultiParamTypeClasses #-} {-# OPTIONS_GHC -Wno-orphans #-} module Cardano.CLI.Orphans @@ -6,6 +9,7 @@ module Cardano.CLI.Orphans where import Cardano.Api +import qualified Cardano.Api.Experimental as Exp import qualified Cardano.Api.Ledger as L import Cardano.Api.Shelley (scriptDataToJsonDetailedSchema) @@ -29,3 +33,8 @@ instance ToJSON HashableScriptData where [ "hash" .= hashScriptDataBytes hsd , "json" .= scriptDataToJsonDetailedSchema hsd ] + +instance Convert Exp.Era MaryEraOnwards where + convert = \case + Exp.BabbageEra -> MaryEraOnwardsBabbage + Exp.ConwayEra -> MaryEraOnwardsConway