{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wno-orphans #-}

module Cardano.Ledger.Mary (
  Mary,
  MaryEra,
  ShelleyTx,
  ShelleyTxOut,
  MaryValue,
  MaryTxBody,
)
where

import Cardano.Ledger.Mary.Era (MaryEra)
import Cardano.Ledger.Mary.PParams ()
import Cardano.Ledger.Mary.Rules ()
import Cardano.Ledger.Mary.Scripts ()
import Cardano.Ledger.Mary.Transition ()
import Cardano.Ledger.Mary.Translation ()
import Cardano.Ledger.Mary.TxAuxData ()
import Cardano.Ledger.Mary.TxBody (MaryTxBody)
import Cardano.Ledger.Mary.TxSeq ()
import Cardano.Ledger.Mary.UTxO ()
import Cardano.Ledger.Mary.Value (MaryValue)
import Cardano.Ledger.Shelley.API

type Mary = MaryEra

{-# DEPRECATED Mary "In favor of `MaryEra`" #-}

instance ApplyTx MaryEra where
  applyTxValidation :: ValidationPolicy
-> Globals
-> LedgerEnv MaryEra
-> LedgerState MaryEra
-> Tx MaryEra
-> Either
     (ApplyTxError MaryEra)
     (LedgerState MaryEra, Validated (Tx MaryEra))
applyTxValidation = forall (rule :: Symbol) era.
(STS (EraRule rule era), BaseM (EraRule rule era) ~ ShelleyBase,
 Environment (EraRule rule era) ~ LedgerEnv era,
 State (EraRule rule era) ~ MempoolState era,
 Signal (EraRule rule era) ~ Tx era,
 PredicateFailure (EraRule rule era)
 ~ PredicateFailure (EraRule "LEDGER" era)) =>
ValidationPolicy
-> Globals
-> LedgerEnv era
-> MempoolState era
-> Tx era
-> Either (ApplyTxError era) (MempoolState era, Validated (Tx era))
ruleApplyTxValidation @"LEDGER"

instance ApplyBlock MaryEra