{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -Wno-orphans #-} module Cardano.Ledger.Allegra.Transition (TransitionConfig (..)) where import Cardano.Ledger.Allegra.Era import Cardano.Ledger.Allegra.Translation () import Cardano.Ledger.Crypto import Cardano.Ledger.Genesis (NoGenesis (..)) import Cardano.Ledger.Shelley import Cardano.Ledger.Shelley.Transition import Data.Aeson (FromJSON (..), ToJSON (..)) import Lens.Micro import NoThunks.Class (NoThunks (..)) instance Crypto c => EraTransition (AllegraEra c) where newtype TransitionConfig (AllegraEra c) = AllegraTransitionConfig { forall c. TransitionConfig (AllegraEra c) -> TransitionConfig (ShelleyEra c) atcShelleyTransitionConfig :: TransitionConfig (ShelleyEra c) } deriving (Int -> TransitionConfig (AllegraEra c) -> ShowS forall c. Crypto c => Int -> TransitionConfig (AllegraEra c) -> ShowS forall c. Crypto c => [TransitionConfig (AllegraEra c)] -> ShowS forall c. Crypto c => TransitionConfig (AllegraEra c) -> String forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a showList :: [TransitionConfig (AllegraEra c)] -> ShowS $cshowList :: forall c. Crypto c => [TransitionConfig (AllegraEra c)] -> ShowS show :: TransitionConfig (AllegraEra c) -> String $cshow :: forall c. Crypto c => TransitionConfig (AllegraEra c) -> String showsPrec :: Int -> TransitionConfig (AllegraEra c) -> ShowS $cshowsPrec :: forall c. Crypto c => Int -> TransitionConfig (AllegraEra c) -> ShowS Show, TransitionConfig (AllegraEra c) -> TransitionConfig (AllegraEra c) -> Bool forall c. Crypto c => TransitionConfig (AllegraEra c) -> TransitionConfig (AllegraEra c) -> Bool forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a /= :: TransitionConfig (AllegraEra c) -> TransitionConfig (AllegraEra c) -> Bool $c/= :: forall c. Crypto c => TransitionConfig (AllegraEra c) -> TransitionConfig (AllegraEra c) -> Bool == :: TransitionConfig (AllegraEra c) -> TransitionConfig (AllegraEra c) -> Bool $c== :: forall c. Crypto c => TransitionConfig (AllegraEra c) -> TransitionConfig (AllegraEra c) -> Bool Eq, Context -> TransitionConfig (AllegraEra c) -> IO (Maybe ThunkInfo) Proxy (TransitionConfig (AllegraEra c)) -> String forall c. Crypto c => Context -> TransitionConfig (AllegraEra c) -> IO (Maybe ThunkInfo) forall c. Crypto c => Proxy (TransitionConfig (AllegraEra c)) -> String forall a. (Context -> a -> IO (Maybe ThunkInfo)) -> (Context -> a -> IO (Maybe ThunkInfo)) -> (Proxy a -> String) -> NoThunks a showTypeOf :: Proxy (TransitionConfig (AllegraEra c)) -> String $cshowTypeOf :: forall c. Crypto c => Proxy (TransitionConfig (AllegraEra c)) -> String wNoThunks :: Context -> TransitionConfig (AllegraEra c) -> IO (Maybe ThunkInfo) $cwNoThunks :: forall c. Crypto c => Context -> TransitionConfig (AllegraEra c) -> IO (Maybe ThunkInfo) noThunks :: Context -> TransitionConfig (AllegraEra c) -> IO (Maybe ThunkInfo) $cnoThunks :: forall c. Crypto c => Context -> TransitionConfig (AllegraEra c) -> IO (Maybe ThunkInfo) NoThunks, [TransitionConfig (AllegraEra c)] -> Encoding [TransitionConfig (AllegraEra c)] -> Value TransitionConfig (AllegraEra c) -> Bool TransitionConfig (AllegraEra c) -> Encoding TransitionConfig (AllegraEra c) -> Value forall c. Crypto c => [TransitionConfig (AllegraEra c)] -> Encoding forall c. Crypto c => [TransitionConfig (AllegraEra c)] -> Value forall c. Crypto c => TransitionConfig (AllegraEra c) -> Bool forall c. Crypto c => TransitionConfig (AllegraEra c) -> Encoding forall c. Crypto c => TransitionConfig (AllegraEra c) -> Value forall a. (a -> Value) -> (a -> Encoding) -> ([a] -> Value) -> ([a] -> Encoding) -> (a -> Bool) -> ToJSON a omitField :: TransitionConfig (AllegraEra c) -> Bool $comitField :: forall c. Crypto c => TransitionConfig (AllegraEra c) -> Bool toEncodingList :: [TransitionConfig (AllegraEra c)] -> Encoding $ctoEncodingList :: forall c. Crypto c => [TransitionConfig (AllegraEra c)] -> Encoding toJSONList :: [TransitionConfig (AllegraEra c)] -> Value $ctoJSONList :: forall c. Crypto c => [TransitionConfig (AllegraEra c)] -> Value toEncoding :: TransitionConfig (AllegraEra c) -> Encoding $ctoEncoding :: forall c. Crypto c => TransitionConfig (AllegraEra c) -> Encoding toJSON :: TransitionConfig (AllegraEra c) -> Value $ctoJSON :: forall c. Crypto c => TransitionConfig (AllegraEra c) -> Value ToJSON, Maybe (TransitionConfig (AllegraEra c)) Value -> Parser [TransitionConfig (AllegraEra c)] Value -> Parser (TransitionConfig (AllegraEra c)) forall c. Crypto c => Maybe (TransitionConfig (AllegraEra c)) forall c. Crypto c => Value -> Parser [TransitionConfig (AllegraEra c)] forall c. Crypto c => Value -> Parser (TransitionConfig (AllegraEra c)) forall a. (Value -> Parser a) -> (Value -> Parser [a]) -> Maybe a -> FromJSON a omittedField :: Maybe (TransitionConfig (AllegraEra c)) $comittedField :: forall c. Crypto c => Maybe (TransitionConfig (AllegraEra c)) parseJSONList :: Value -> Parser [TransitionConfig (AllegraEra c)] $cparseJSONList :: forall c. Crypto c => Value -> Parser [TransitionConfig (AllegraEra c)] parseJSON :: Value -> Parser (TransitionConfig (AllegraEra c)) $cparseJSON :: forall c. Crypto c => Value -> Parser (TransitionConfig (AllegraEra c)) FromJSON) mkTransitionConfig :: TranslationContext (AllegraEra c) -> TransitionConfig (PreviousEra (AllegraEra c)) -> TransitionConfig (AllegraEra c) mkTransitionConfig TranslationContext (AllegraEra c) NoGenesis (AllegraEra c) NoGenesis = forall c. TransitionConfig (ShelleyEra c) -> TransitionConfig (AllegraEra c) AllegraTransitionConfig injectIntoTestState :: TransitionConfig (AllegraEra c) -> NewEpochState (AllegraEra c) -> NewEpochState (AllegraEra c) injectIntoTestState = forall era. EraTransition era => TransitionConfig era -> NewEpochState era -> NewEpochState era registerInitialFundsThenStaking tcPreviousEraConfigL :: EraTransition (PreviousEra (AllegraEra c)) => Lens' (TransitionConfig (AllegraEra c)) (TransitionConfig (PreviousEra (AllegraEra c))) tcPreviousEraConfigL = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens forall c. TransitionConfig (AllegraEra c) -> TransitionConfig (ShelleyEra c) atcShelleyTransitionConfig (\TransitionConfig (AllegraEra c) atc TransitionConfig (ShelleyEra c) pc -> TransitionConfig (AllegraEra c) atc {atcShelleyTransitionConfig :: TransitionConfig (ShelleyEra c) atcShelleyTransitionConfig = TransitionConfig (ShelleyEra c) pc}) tcTranslationContextL :: Lens' (TransitionConfig (AllegraEra c)) (TranslationContext (AllegraEra c)) tcTranslationContextL = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens (forall a b. a -> b -> a const forall era. NoGenesis era NoGenesis) (forall a b. a -> b -> a const forall b c a. (b -> c) -> (a -> b) -> a -> c . forall a. a -> a id)