Skip to content

Commit

Permalink
Add temporary orphan instance
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Dec 6, 2024
1 parent 33c318f commit 4f708f2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cardano-cli/src/Cardano/CLI/Orphans.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -Wno-orphans #-}

module Cardano.CLI.Orphans
Expand All @@ -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)

Expand All @@ -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

0 comments on commit 4f708f2

Please sign in to comment.