Skip to content

Commit

Permalink
Integration work for node 8.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jasagredo committed Nov 16, 2023
1 parent a3d4a04 commit 16c4e08
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 13 deletions.
13 changes: 11 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/Byron/Parsers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/Byron/Tx.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down
4 changes: 2 additions & 2 deletions cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 :: ()
Expand Down
4 changes: 2 additions & 2 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/Json/Friendly.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 :: ()
Expand Down
4 changes: 2 additions & 2 deletions cardano-cli/src/Cardano/CLI/Types/Output.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 16c4e08

Please sign in to comment.