diff --git a/cabal.project b/cabal.project index 5c176c9171..fbeaaa271d 100644 --- a/cabal.project +++ b/cabal.project @@ -13,8 +13,8 @@ repository cardano-haskell-packages -- See CONTRIBUTING for information about these, including some Nix commands -- you need to run if you change them index-state: - , hackage.haskell.org 2023-08-08T19:56:09Z - , cardano-haskell-packages 2023-11-10T12:47:36Z + , hackage.haskell.org 2023-11-09T23:50:15Z + , cardano-haskell-packages 2023-11-15T14:27:11Z packages: cardano-cli @@ -43,3 +43,12 @@ write-ghc-environment-files: always -- IMPORTANT -- Do NOT add more source-repository-package stanzas here unless they are strictly -- temporary! Please read the section in CONTRIBUTING about updating dependencies. + +source-repository-package + type: git + location: https://github.com/input-output-hk/cardano-api + tag: 8be3f4da0763a118e8188d044ab60353322a8fcb + --sha256: 0vlwk48rg0aa8gbbgwj6nc6h0hwswfjd5zjx9y2x17lkpnbpmr47 + subdir: + cardano-api + cardano-api-gen diff --git a/cardano-cli/cardano-cli.cabal b/cardano-cli/cardano-cli.cabal index 6f7a689379..479ab90192 100644 --- a/cardano-cli/cardano-cli.cabal +++ b/cardano-cli/cardano-cli.cabal @@ -206,7 +206,7 @@ library , binary , bytestring , canonical-json - , cardano-api ^>= 8.31.0.0 + , cardano-api ^>= 8.32.0.0 , cardano-binary , cardano-crypto , cardano-crypto-class ^>= 2.1.2 diff --git a/cardano-cli/src/Cardano/CLI/Byron/Parsers.hs b/cardano-cli/src/Cardano/CLI/Byron/Parsers.hs index ff6b1250f1..135180b0e5 100644 --- a/cardano-cli/src/Cardano/CLI/Byron/Parsers.hs +++ b/cardano-cli/src/Cardano/CLI/Byron/Parsers.hs @@ -293,7 +293,7 @@ parseTxOut = pLovelaceTxOut l = if l > (maxBound :: Word64) then error $ show l <> " lovelace exceeds the Word64 upper bound" - else TxOutValueByron ByronEraOnlyByron . Lovelace $ toInteger l + else TxOutValueByron . Lovelace $ toInteger l readerFromAttoParser :: Atto.Parser a -> Opt.ReadM a readerFromAttoParser p = diff --git a/cardano-cli/src/Cardano/CLI/Byron/Tx.hs b/cardano-cli/src/Cardano/CLI/Byron/Tx.hs index a70be26fdf..615975dece 100644 --- a/cardano-cli/src/Cardano/CLI/Byron/Tx.hs +++ b/cardano-cli/src/Cardano/CLI/Byron/Tx.hs @@ -244,7 +244,7 @@ nodeSubmitTx nodeSocketPath network gentx = do localNodeNetworkId = network, localConsensusModeParams = CardanoModeParams (EpochSlots 21600) } - res <- liftIO $ submitTxToNodeLocal connctInfo (TxInByronSpecial ByronEraOnlyByron gentx) + res <- liftIO $ submitTxToNodeLocal connctInfo (TxInByronSpecial gentx) case res of Net.Tx.SubmitSuccess -> liftIO $ Text.putStrLn "Transaction successfully submitted." Net.Tx.SubmitFail reason -> diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs b/cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs index 55de5b44d0..6fa35ed0a0 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs @@ -2966,9 +2966,9 @@ pMinCommitteeSize = , Opt.help "TODO" ] -pCommitteeTermLength :: Parser Natural +pCommitteeTermLength :: Parser EpochNo pCommitteeTermLength = - Opt.option Opt.auto $ mconcat + fmap EpochNo $ Opt.option Opt.auto $ mconcat [ Opt.long "committee-term-length" , Opt.metavar "INT" , Opt.help "TODO" diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs index 04476164d3..fc623ab060 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs @@ -1049,7 +1049,7 @@ printUtxo sbe txInOutTuple = printableValue :: TxOutValue era -> Text printableValue = \case - TxOutValueByron _ (Lovelace i) -> Text.pack $ show i + TxOutValueByron (Lovelace i) -> Text.pack $ show i TxOutValueShelleyBased sbe2 val -> renderValue $ Api.fromLedgerValue sbe2 val runQueryStakePoolsCmd :: () diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs index d7280bed46..94e4d157be 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs @@ -699,9 +699,9 @@ toTxOutValueInAnyEra -> Either TxCmdError (TxOutValue era) toTxOutValueInAnyEra era val = caseByronOrShelleyBasedEra - (\w -> + (\_ -> case valueToLovelace val of - Just l -> return (TxOutValueByron w l) + Just l -> return (TxOutValueByron l) Nothing -> txFeatureMismatchPure era TxFeatureMultiAssetOutputs ) (\sbe -> diff --git a/cardano-cli/src/Cardano/CLI/Json/Friendly.hs b/cardano-cli/src/Cardano/CLI/Json/Friendly.hs index 9f14a99723..338fc0e7ad 100644 --- a/cardano-cli/src/Cardano/CLI/Json/Friendly.hs +++ b/cardano-cli/src/Cardano/CLI/Json/Friendly.hs @@ -566,7 +566,7 @@ friendlyMintValue = \case friendlyTxOutValue :: TxOutValue era -> Aeson.Value friendlyTxOutValue = \case - TxOutValueByron _ lovelace -> friendlyLovelace $ toShelleyLovelace lovelace + TxOutValueByron lovelace -> friendlyLovelace $ toShelleyLovelace lovelace TxOutValueShelleyBased sbe v -> friendlyLedgerValue sbe v friendlyLedgerValue :: () diff --git a/cardano-cli/src/Cardano/CLI/Types/Output.hs b/cardano-cli/src/Cardano/CLI/Types/Output.hs index d9ba4b9039..5c906dd643 100644 --- a/cardano-cli/src/Cardano/CLI/Types/Output.hs +++ b/cardano-cli/src/Cardano/CLI/Types/Output.hs @@ -157,11 +157,11 @@ data QueryTipLocalStateOutput = QueryTipLocalStateOutput } deriving Show -- | A key-value pair difference list for encoding a JSON object. -(..=) :: (KeyValue kv, ToJSON v) => Aeson.Key -> v -> [kv] -> [kv] +(..=) :: (KeyValue e kv, ToJSON v) => Aeson.Key -> v -> [kv] -> [kv] (..=) n v = (n .= v:) -- | A key-value pair difference list for encoding a JSON object where Nothing encodes absence of the key-value pair. -(..=?) :: (KeyValue kv, ToJSON v) => Aeson.Key -> Maybe v -> [kv] -> [kv] +(..=?) :: (KeyValue e kv, ToJSON v) => Aeson.Key -> Maybe v -> [kv] -> [kv] (..=?) n mv = case mv of Just v -> (n .= v:) Nothing -> id