From e11df53f1b5b34d93c8a355bee65ab5c57b6eab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Wed, 15 May 2024 18:21:51 +0200 Subject: [PATCH] Continue --- cardano-cli/cardano-cli.cabal | 2 +- cardano-cli/src/Cardano/CLI/EraBased/Run/Genesis.hs | 5 ++--- cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cardano-cli/cardano-cli.cabal b/cardano-cli/cardano-cli.cabal index 4170b5dcc1..9dadeca359 100644 --- a/cardano-cli/cardano-cli.cabal +++ b/cardano-cli/cardano-cli.cabal @@ -203,8 +203,8 @@ library , cardano-crypto-wrapper ^>= 1.5.1 , cardano-data >= 1.1 , cardano-git-rev ^>= 0.2.2 + , cardano-ledger-api , cardano-ledger-byron >= 1.0.1.0 - , cardano-ledger-core , cardano-ping ^>= 0.2.0.13 , cardano-prelude , cardano-slotting ^>= 0.2.0.0 diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Genesis.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Genesis.hs index 27f498511c..b367cd00cc 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Genesis.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Genesis.hs @@ -1177,11 +1177,10 @@ readConwayGenesis fpath = do --TODO: eliminate this and get only the necessary params, and get them in a more -- helpful way rather than requiring them as a local file. readProtocolParameters :: () - => FromJSON (L.PParams (ShelleyLedgerEra era)) => ShelleyBasedEra era -> ProtocolParamsFile -> ExceptT ProtocolParamsError IO (L.PParams (ShelleyLedgerEra era)) -readProtocolParameters _era (ProtocolParamsFile fpath) = do +readProtocolParameters sbe (ProtocolParamsFile fpath) = do pparams <- handleIOExceptT (ProtocolParamsErrorFile . FileIOError fpath) $ LBS.readFile fpath firstExceptT (ProtocolParamsErrorJSON fpath . Text.pack) . hoistEither $ - Aeson.eitherDecode' pparams + shelleyBasedEraConstraints sbe $ Aeson.eitherDecode' pparams diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs index dc114b2f91..03bf00b66b 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs @@ -52,7 +52,7 @@ import Cardano.CLI.Types.Errors.TxCmdError import Cardano.CLI.Types.Errors.TxValidationError import Cardano.CLI.Types.Output (renderScriptCosts) import Cardano.CLI.Types.TxFeature -import qualified Cardano.Ledger.Core.PParams as L +import qualified Cardano.Ledger.Api.PParams as L import qualified Ouroboros.Network.Protocol.LocalStateQuery.Type as Consensus import qualified Ouroboros.Network.Protocol.LocalTxSubmission.Client as Net.Tx