diff --git a/cardano-api/internal/Cardano/Api/ProtocolParameters.hs b/cardano-api/internal/Cardano/Api/ProtocolParameters.hs index e2df32dc92..66cca504eb 100644 --- a/cardano-api/internal/Cardano/Api/ProtocolParameters.hs +++ b/cardano-api/internal/Cardano/Api/ProtocolParameters.hs @@ -1744,8 +1744,7 @@ fromExactlyAlonzoPParams :: (AlonzoEraPParams ledgerera, Ledger.ExactEra Ledger. -> ProtocolParameters fromExactlyAlonzoPParams pp = (fromAlonzoPParams pp) { - protocolParamUTxOCostPerByte = Just . fromShelleyLovelace . unCoinPerWord $ - pp ^. ppCoinsPerUTxOWordL + protocolParamUTxOCostPerByte = Just . unCoinPerWord $ pp ^. ppCoinsPerUTxOWordL } fromBabbagePParams :: BabbageEraPParams ledgerera diff --git a/cardano-api/test/cardano-api-golden/Test/Golden/Cardano/Api/ProtocolParameters.hs b/cardano-api/test/cardano-api-golden/Test/Golden/Cardano/Api/ProtocolParameters.hs index 02f162137e..c65331076b 100644 --- a/cardano-api/test/cardano-api-golden/Test/Golden/Cardano/Api/ProtocolParameters.hs +++ b/cardano-api/test/cardano-api-golden/Test/Golden/Cardano/Api/ProtocolParameters.hs @@ -9,8 +9,8 @@ module Test.Golden.Cardano.Api.ProtocolParameters ) where import Cardano.Api (AnyPlutusScriptVersion (AnyPlutusScriptVersion), CostModel (..), - ExecutionUnits (..), Lovelace (..), PlutusScriptVersion (..), makePraosNonce) -import Cardano.Api.Ledger (EpochInterval (EpochInterval), StandardCrypto) + ExecutionUnits (..), PlutusScriptVersion (..), makePraosNonce) +import Cardano.Api.Ledger (Coin (..), EpochInterval (EpochInterval), StandardCrypto) import Cardano.Api.ProtocolParameters (ExecutionUnitPrices (..), ProtocolParameters (..)) import Cardano.Ledger.Alonzo (AlonzoEra) @@ -60,20 +60,20 @@ goldenProtocolParametersToPParams _ = decodedLegacyCardanoApiProtocolParameters = eitherDecode bytestringLegacyCardanoApiProtocolParameters legacyCardanoApiProtocolParameters :: ProtocolParameters -legacyCardanoApiProtocolParameters = ProtocolParameters { protocolParamUTxOCostPerByte = Just $ Lovelace 1_000_000 - , protocolParamTxFeePerByte = Lovelace 2_000_000 - , protocolParamTxFeeFixed = Lovelace 1_500_000 +legacyCardanoApiProtocolParameters = ProtocolParameters { protocolParamUTxOCostPerByte = Just $ Coin 1_000_000 + , protocolParamTxFeePerByte = Coin 2_000_000 + , protocolParamTxFeeFixed = Coin 1_500_000 , protocolParamTreasuryCut = 0.1 , protocolParamStakePoolTargetNum = 100 - , protocolParamStakePoolDeposit = Lovelace 1_000_000_000 - , protocolParamStakeAddressDeposit = Lovelace 10_000_000 + , protocolParamStakePoolDeposit = Coin 1_000_000_000 + , protocolParamStakeAddressDeposit = Coin 10_000_000 , protocolParamProtocolVersion = (2, 3) , protocolParamPrices = Just executionUnitPrices , protocolParamPoolRetireMaxEpoch = Cardano.Api.Ledger.EpochInterval 4 , protocolParamPoolPledgeInfluence = 0.54 , protocolParamMonetaryExpansion = 0.23 - , protocolParamMinUTxOValue = Just $ Lovelace 3_000_000 - , protocolParamMinPoolCost = Lovelace 3_500_000 + , protocolParamMinUTxOValue = Just $ Coin 3_000_000 + , protocolParamMinPoolCost = Coin 3_500_000 , protocolParamMaxValueSize = Just 10 , protocolParamMaxTxSize = 3000 , protocolParamMaxTxExUnits = Just executionUnits diff --git a/cardano-api/test/cardano-api-test/Test/Cardano/Api/ProtocolParameters.hs b/cardano-api/test/cardano-api-test/Test/Cardano/Api/ProtocolParameters.hs index 191029f3bc..cc17f5b389 100644 --- a/cardano-api/test/cardano-api-test/Test/Cardano/Api/ProtocolParameters.hs +++ b/cardano-api/test/cardano-api-test/Test/Cardano/Api/ProtocolParameters.hs @@ -46,7 +46,7 @@ tests = ] ] --- | Compares the JSON serialization of cardano-ledger's PParams and cardano-api's ProtocolParameters and +-- | Compares the JSON serialization of cardano-ledger's PParams and cardano-api's ProtocolParameters and -- | ensures that they are the same (except for the agreed changes specified in `patchProtocolParamsJSONOrFail`) protocolParametersSerializeTheSame :: forall era. ToJSON (PParams (ShelleyLedgerEra era)) => CardanoEra era -> Property protocolParametersSerializeTheSame era =