diff --git a/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs b/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs index 1b54c503e3..f52e5d1765 100644 --- a/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs +++ b/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs @@ -253,52 +253,6 @@ genHashableScriptData = do Left e -> error $ "genHashableScriptData: " <> show e Right r -> return r - -{-# DEPRECATED genScriptData "Use genHashableScriptData" #-} -genScriptData :: Gen ScriptData -genScriptData = - Gen.recursive - Gen.choice - [ ScriptDataNumber <$> genInteger - , ScriptDataBytes <$> genByteString - ] - -- The Gen.recursive combinator calls these with the size halved - [ ScriptDataConstructor <$> genConstructorInteger - <*> genScriptDataList - , ScriptDataList <$> genScriptDataList - , ScriptDataMap <$> genScriptDataMap - ] - where - genInteger :: Gen Integer - genInteger = Gen.integral - (Range.linear - (-fromIntegral (maxBound :: Word64) :: Integer) - (2 * fromIntegral (maxBound :: Word64) :: Integer)) - - - genConstructorInteger :: Gen Integer - genConstructorInteger = Gen.integral - (Range.linear - 0 -- TODO: Alonzo should be -> (-fromIntegral (maxBound :: Word64) :: Integer) - -- Wrapping bug needs to be fixed in Plutus library - (fromIntegral (maxBound :: Word64) :: Integer)) - - genByteString :: Gen ByteString - genByteString = BS.pack <$> Gen.list (Range.linear 0 64) - (Gen.word8 Range.constantBounded) - - genScriptDataList :: Gen [ScriptData] - genScriptDataList = - Gen.sized $ \sz -> - Gen.list (Range.linear 0 (fromIntegral sz)) genScriptData - - genScriptDataMap :: Gen [(ScriptData, ScriptData)] - genScriptDataMap = - Gen.sized $ \sz -> - Gen.list (Range.linear 0 (fromIntegral sz)) $ - (,) <$> genScriptData <*> genScriptData - - -- ---------------------------------------------------------------------------- -- Script generators for any language, or any language valid in a specific era -- diff --git a/cardano-api/internal/Cardano/Api/Certificate.hs b/cardano-api/internal/Cardano/Api/Certificate.hs index dcdf440200..02047c90b3 100644 --- a/cardano-api/internal/Cardano/Api/Certificate.hs +++ b/cardano-api/internal/Cardano/Api/Certificate.hs @@ -23,7 +23,6 @@ module Cardano.Api.Certificate ( makeStakeAddressDelegationCertificate, makeStakeAddressRegistrationCertificate, makeStakeAddressUnregistrationCertificate, - makeStakeAddressPoolDelegationCertificate, PoolId, -- * Registering stake pools @@ -468,33 +467,6 @@ makeStakeAddressUnregistrationCertificate req = (toShelleyStakeCredential scred) (toShelleyLovelace deposit) -{-# DEPRECATED makeStakeAddressPoolDelegationCertificate "This function is deprecated, please use 'makeStakeAddressDelegationCertificate' instead." #-} -makeStakeAddressPoolDelegationCertificate :: () - => ShelleyBasedEra era - -> StakeCredential - -> PoolId - -> Certificate era -makeStakeAddressPoolDelegationCertificate sbe scred poolId = - case sbe of - ShelleyBasedEraShelley -> - makeStakeAddressDelegationCertificate - (StakeDelegationRequirementsPreConway ShelleyToBabbageEraShelley scred poolId) - ShelleyBasedEraAllegra -> - makeStakeAddressDelegationCertificate - (StakeDelegationRequirementsPreConway ShelleyToBabbageEraAllegra scred poolId) - ShelleyBasedEraMary -> - makeStakeAddressDelegationCertificate - (StakeDelegationRequirementsPreConway ShelleyToBabbageEraMary scred poolId) - ShelleyBasedEraAlonzo -> - makeStakeAddressDelegationCertificate - (StakeDelegationRequirementsPreConway ShelleyToBabbageEraAlonzo scred poolId) - ShelleyBasedEraBabbage -> - makeStakeAddressDelegationCertificate - (StakeDelegationRequirementsPreConway ShelleyToBabbageEraBabbage scred poolId) - ShelleyBasedEraConway -> - makeStakeAddressDelegationCertificate - (StakeDelegationRequirementsConwayOnwards ConwayEraOnwardsConway scred (Ledger.DelegStake $ unStakePoolKeyHash poolId)) - data StakeDelegationRequirements era where StakeDelegationRequirementsConwayOnwards :: ConwayEraOnwards era diff --git a/cardano-api/internal/Cardano/Api/Eras.hs b/cardano-api/internal/Cardano/Api/Eras.hs index 97fe69259f..ec0df77327 100644 --- a/cardano-api/internal/Cardano/Api/Eras.hs +++ b/cardano-api/internal/Cardano/Api/Eras.hs @@ -28,12 +28,6 @@ module Cardano.Api.Eras , inShelleyBasedEraFeatureMaybe , maybeFeatureInShelleyBasedEra - -- * Deprecated aliases - , Byron - , Shelley - , Allegra - , Mary - -- * Shelley-based eras , ShelleyBasedEra(..) , IsShelleyBasedEra(..) @@ -51,8 +45,7 @@ module Cardano.Api.Eras , cardanoEraStyle -- * Data family instances - , AsType(AsByronEra, AsShelleyEra, AsAllegraEra, AsMaryEra, AsAlonzoEra, AsBabbageEra, AsConwayEra, - AsByron, AsShelley, AsAllegra, AsMary, AsAlonzo, AsBabbage, AsConway) + , AsType(AsByronEra, AsShelleyEra, AsAllegraEra, AsMaryEra, AsAlonzoEra, AsBabbageEra, AsConwayEra) -- * Assertions on era , requireShelleyBasedEra diff --git a/cardano-api/internal/Cardano/Api/Eras/Core.hs b/cardano-api/internal/Cardano/Api/Eras/Core.hs index 0d29512907..d88e88e7d9 100644 --- a/cardano-api/internal/Cardano/Api/Eras/Core.hs +++ b/cardano-api/internal/Cardano/Api/Eras/Core.hs @@ -37,12 +37,6 @@ module Cardano.Api.Eras.Core , inShelleyBasedEraFeatureMaybe , maybeFeatureInShelleyBasedEra - -- * Deprecated aliases - , Byron - , Shelley - , Allegra - , Mary - -- * Shelley-based eras , ShelleyBasedEra(..) , IsShelleyBasedEra(..) @@ -59,8 +53,7 @@ module Cardano.Api.Eras.Core , cardanoEraStyle -- * Data family instances - , AsType(AsByronEra, AsShelleyEra, AsAllegraEra, AsMaryEra, AsAlonzoEra, AsBabbageEra, AsConwayEra, - AsByron, AsShelley, AsAllegra, AsMary, AsAlonzo, AsBabbage, AsConway) + , AsType(AsByronEra, AsShelleyEra, AsAllegraEra, AsMaryEra, AsAlonzoEra, AsBabbageEra, AsConwayEra) -- * Assertions on era , requireShelleyBasedEra @@ -205,47 +198,6 @@ inShelleyBasedEraFeatureMaybe :: () inShelleyBasedEraFeatureMaybe era yes = inShelleyBasedEraFeature era Nothing (Just . yes) --- ---------------------------------------------------------------------------- --- Deprecated aliases --- - -type Byron = ByronEra -type Shelley = ShelleyEra -type Allegra = AllegraEra -type Mary = MaryEra - -{-# DEPRECATED Byron "Use 'ByronEra' or 'ByronAddr' as appropriate" #-} -{-# DEPRECATED Shelley "Use 'ShelleyEra' or 'ShelleyAddr' as appropriate" #-} -{-# DEPRECATED Allegra "Use 'AllegraEra' instead" #-} -{-# DEPRECATED Mary "Use 'MaryEra' instead" #-} - -pattern AsByron :: AsType ByronEra -pattern AsByron = AsByronEra - -pattern AsShelley :: AsType ShelleyEra -pattern AsShelley = AsShelleyEra - -pattern AsAllegra :: AsType AllegraEra -pattern AsAllegra = AsAllegraEra - -pattern AsMary :: AsType MaryEra -pattern AsMary = AsMaryEra - - -pattern AsAlonzo :: AsType AlonzoEra -pattern AsAlonzo = AsAlonzoEra - -pattern AsBabbage :: AsType BabbageEra -pattern AsBabbage = AsBabbageEra - -pattern AsConway :: AsType ConwayEra -pattern AsConway = AsConwayEra - -{-# DEPRECATED AsByron "Use 'AsByronEra' instead" #-} -{-# DEPRECATED AsShelley "Use 'AsShelleyEra' instead" #-} -{-# DEPRECATED AsAllegra "Use 'AsAllegraEra' instead" #-} -{-# DEPRECATED AsMary "Use 'AsMaryEra' instead" #-} - -- ---------------------------------------------------------------------------- -- Value level representation for Cardano eras -- diff --git a/cardano-api/internal/Cardano/Api/Fees.hs b/cardano-api/internal/Cardano/Api/Fees.hs index 881c571774..d415dd9b7a 100644 --- a/cardano-api/internal/Cardano/Api/Fees.hs +++ b/cardano-api/internal/Cardano/Api/Fees.hs @@ -93,10 +93,9 @@ import Prettyprinter import Prettyprinter.Render.String {- HLINT ignore "Redundant return" -} - --- ---------------------------------------------------------------------------- --- Transaction fees --- +--- ---------------------------------------------------------------------------- +--- Transaction fees +--- -- | For a concrete fully-constructed transaction, determine the minimum fee -- that it needs to pay. @@ -123,7 +122,6 @@ transactionFee txFeeFixed txFeePerByte tx = {-# DEPRECATED transactionFee "Use 'evaluateTransactionFee' instead" #-} - --TODO: in the Byron case the per-byte is non-integral, would need different -- parameters. e.g. a new data type for fee params, Byron vs Shelley diff --git a/cardano-api/internal/Cardano/Api/Query/Expr.hs b/cardano-api/internal/Cardano/Api/Query/Expr.hs index e417048cf4..c9905a117b 100644 --- a/cardano-api/internal/Cardano/Api/Query/Expr.hs +++ b/cardano-api/internal/Cardano/Api/Query/Expr.hs @@ -14,7 +14,6 @@ module Cardano.Api.Query.Expr , queryGenesisParameters , queryPoolDistribution , queryPoolState - , queryPparams , queryProtocolParameters , queryProtocolParametersUpdate , queryProtocolState @@ -126,14 +125,6 @@ queryPoolState :: () queryPoolState eraInMode sbe mPoolIds = queryExpr $ QueryInEra eraInMode $ QueryInShelleyBasedEra sbe $ QueryPoolState mPoolIds -queryPparams :: () - => EraInMode era mode - -> ShelleyBasedEra era - -> LocalStateQueryExpr block point (QueryInMode mode) r IO (Either UnsupportedNtcVersionError (Either EraMismatch (L.PParams (ShelleyLedgerEra era)))) -queryPparams eraInMode sbe = - queryExpr $ QueryInEra eraInMode $ QueryInShelleyBasedEra sbe QueryProtocolParameters -{-# DEPRECATED queryPparams "Use queryProtocolParameters instead" #-} - queryProtocolParameters :: () => EraInMode era mode -> ShelleyBasedEra era diff --git a/cardano-api/internal/Cardano/Api/ScriptData.hs b/cardano-api/internal/Cardano/Api/ScriptData.hs index 558249f948..3c7f20480d 100644 --- a/cardano-api/internal/Cardano/Api/ScriptData.hs +++ b/cardano-api/internal/Cardano/Api/ScriptData.hs @@ -15,9 +15,6 @@ module Cardano.Api.ScriptData ( unsafeHashableScriptData, ScriptData(..), - -- * Script data hashes - hashScriptData, - -- * Validating metadata validateScriptData, ScriptDataRangeError (..), @@ -177,10 +174,6 @@ hashScriptDataBytes :: HashableScriptData -> Hash ScriptData hashScriptDataBytes = ScriptDataHash . Alonzo.hashData . (toAlonzoData :: HashableScriptData -> Alonzo.Data StandardAlonzo) -{-# DEPRECATED hashScriptData "Use hashScriptDataBytes" #-} -hashScriptData :: HashableScriptData -> Hash ScriptData -hashScriptData = hashScriptDataBytes - -- ---------------------------------------------------------------------------- -- Conversion functions -- diff --git a/cardano-api/internal/Cardano/Api/SerialiseRaw.hs b/cardano-api/internal/Cardano/Api/SerialiseRaw.hs index 8079cb1d49..7e3b79f03f 100644 --- a/cardano-api/internal/Cardano/Api/SerialiseRaw.hs +++ b/cardano-api/internal/Cardano/Api/SerialiseRaw.hs @@ -9,7 +9,6 @@ module Cardano.Api.SerialiseRaw , SerialiseAsRawBytesError(..) , serialiseToRawBytesHex , deserialiseFromRawBytesHex - , eitherDeserialiseFromRawBytes , serialiseToRawBytesHexText ) where @@ -37,10 +36,6 @@ class (HasTypeProxy a, Typeable a) => SerialiseAsRawBytes a where deserialiseFromRawBytes :: AsType a -> ByteString -> Either SerialiseAsRawBytesError a -eitherDeserialiseFromRawBytes :: SerialiseAsRawBytes a => AsType a -> ByteString -> Either SerialiseAsRawBytesError a -eitherDeserialiseFromRawBytes = deserialiseFromRawBytes -{-# DEPRECATED eitherDeserialiseFromRawBytes "Use deserialiseFromRawBytes instead" #-} - serialiseToRawBytesHex :: SerialiseAsRawBytes a => a -> ByteString serialiseToRawBytesHex = Base16.encode . serialiseToRawBytes diff --git a/cardano-api/internal/Cardano/Api/TxBody.hs b/cardano-api/internal/Cardano/Api/TxBody.hs index c81d6efe06..dfd5499ab5 100644 --- a/cardano-api/internal/Cardano/Api/TxBody.hs +++ b/cardano-api/internal/Cardano/Api/TxBody.hs @@ -27,7 +27,6 @@ module Cardano.Api.TxBody ( parseTxId, -- * Transaction bodies TxBody(.., TxBody), - makeTransactionBody, createTransactionBody, createAndValidateTransactionBody, TxBodyContent(..), @@ -2677,14 +2676,6 @@ createAndValidateTransactionBody = LegacyByronEra -> makeByronTransactionBody ShelleyBasedEra sbe -> makeShelleyTransactionBody sbe -{-# DEPRECATED makeTransactionBody "Use createAndValidateTransactionBody." #-} -makeTransactionBody :: forall era. - IsCardanoEra era - => TxBodyContent BuildTx era - -> Either TxBodyError (TxBody era) -makeTransactionBody = createAndValidateTransactionBody - - pattern TxBody :: TxBodyContent ViewTx era -> TxBody era pattern TxBody txbodycontent <- (getTxBodyContent -> txbodycontent) {-# COMPLETE TxBody #-} diff --git a/cardano-api/src/Cardano/Api.hs b/cardano-api/src/Cardano/Api.hs index 956b210c13..b7af9505a4 100644 --- a/cardano-api/src/Cardano/Api.hs +++ b/cardano-api/src/Cardano/Api.hs @@ -506,7 +506,6 @@ module Cardano.Api ( getScriptData, unsafeHashableScriptData, ScriptData(..), - hashScriptData, -- ** Validation ScriptDataRangeError (..), @@ -914,7 +913,6 @@ module Cardano.Api ( queryGenesisParameters, queryPoolDistribution, queryPoolState, - queryPparams, queryProtocolParameters, queryProtocolParametersUpdate, queryProtocolState,