module Hydra.Cardano.Api.ExecutionUnits where

import Hydra.Cardano.Api.Prelude

import Cardano.Ledger.Alonzo.Scripts qualified as Ledger

-- * Type Conversions

-- | Convert a cardano-api 'ExecutionUnits' into a cardano-ledger 'ExUnits'
toLedgerExUnits :: ExecutionUnits -> Ledger.ExUnits
toLedgerExUnits :: ExecutionUnits -> ExUnits
toLedgerExUnits = ExecutionUnits -> ExUnits
toAlonzoExUnits

-- | Convert a cardano-ledger 'ExUnits' into a cardano-api 'ExecutionUnits'
fromLedgerExUnits :: Ledger.ExUnits -> ExecutionUnits
fromLedgerExUnits :: ExUnits -> ExecutionUnits
fromLedgerExUnits = ExUnits -> ExecutionUnits
fromAlonzoExUnits