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

module Cardano.Ledger.Babbage (
  Babbage,
  BabbageEra,
  BabbageTxOut,
  BabbageTxBody,
  AlonzoScript,
  AlonzoTxAuxData,
)
where

import Cardano.Ledger.Alonzo (reapplyAlonzoTx)
import Cardano.Ledger.Alonzo.Scripts (AlonzoScript (..))
import Cardano.Ledger.Alonzo.TxAuxData (AlonzoTxAuxData (..))
import Cardano.Ledger.Babbage.Era (BabbageEra)
import Cardano.Ledger.Babbage.Rules ()
import Cardano.Ledger.Babbage.Transition ()
import Cardano.Ledger.Babbage.Translation ()
import Cardano.Ledger.Babbage.TxBody (BabbageTxBody, BabbageTxOut)
import Cardano.Ledger.Babbage.TxInfo ()
import Cardano.Ledger.Babbage.UTxO ()
import Cardano.Ledger.Shelley.API

type Babbage = BabbageEra

{-# DEPRECATED Babbage "In favor of `BabbageEra`" #-}

-- =====================================================

instance ApplyTx BabbageEra where
  reapplyTx :: forall (m :: * -> *).
MonadError (ApplyTxError BabbageEra) m =>
Globals
-> LedgerEnv BabbageEra
-> MempoolState BabbageEra
-> Validated (Tx BabbageEra)
-> m (MempoolState BabbageEra)
reapplyTx = forall era (m :: * -> *).
(ApplyTx era, MonadError (ApplyTxError era) m) =>
Globals
-> MempoolEnv era
-> MempoolState era
-> Validated (Tx era)
-> m (MempoolState era)
reapplyAlonzoTx

instance ApplyBlock BabbageEra