Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cardano-api: 10.8 #1822

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 47 additions & 47 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion hydra-cardano-api/hydra-cardano-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ library
, aeson >=2
, base >=4.16
, bytestring
, cardano-api ^>=10.6
, cardano-api ^>=10.8
, cardano-api:gen
, cardano-binary
, cardano-crypto-class
Expand Down
6 changes: 0 additions & 6 deletions hydra-cardano-api/src/Hydra/Cardano/Api.hs
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,6 @@ pattern TxAuxScripts{txAuxScripts'} <-
-- ** TxBody

type TxBody = Cardano.Api.TxBody Era
{-# COMPLETE TxBody #-}

pattern TxBody :: TxBodyContent ViewTx -> TxBody
pattern TxBody{txBodyContent} <-
Cardano.Api.TxBody txBodyContent
{-# COMPLETE TxBody #-}

createAndValidateTransactionBody :: TxBodyContent BuildTx -> Either TxBodyError TxBody
createAndValidateTransactionBody = Cardano.Api.createTransactionBody shelleyBasedEra
Expand Down
2 changes: 1 addition & 1 deletion hydra-cardano-api/src/Hydra/Cardano/Api/Pretty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ renderTxWithUTxO utxo (Tx body _wits) =
where
Api.ShelleyTxBody _lbody scripts scriptsData _auxData _validity = body
outs = txOuts content
TxBody content = body
content = getTxBodyContent body

inputLines =
"== INPUTS (" <> show (length (txIns content)) <> ")"
Expand Down
2 changes: 1 addition & 1 deletion hydra-cardano-api/src/Hydra/Cardano/Api/Tx.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ utxoProducedByTx tx =
zip [0 ..] (txOuts body)
<&> bimap (mkTxIn tx) toCtxUTxOTxOut
where
TxBody body = getTxBody tx
body = getTxBodyContent $ getTxBody tx

-- * Type Conversions

Expand Down
4 changes: 2 additions & 2 deletions hydra-cardano-api/src/Hydra/Cardano/Api/TxIn.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ withWitness txIn =

-- | Access inputs of a transaction, as an ordered list.
txIns' :: Tx era -> [TxIn]
txIns' (getTxBody -> txBody) =
let TxBody TxBodyContent{txIns} = txBody
txIns' (getTxBodyContent . getTxBody -> txBodyContent) =
let TxBodyContent{txIns} = txBodyContent
in fst <$> txIns

-- | Access inputs of a transaction, as an ordered set.
Expand Down
4 changes: 2 additions & 2 deletions hydra-cardano-api/src/Hydra/Cardano/Api/TxOut.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import PlutusLedgerApi.V3 qualified as Plutus
-- * Extras

txOuts' :: Tx era -> [TxOut CtxTx era]
txOuts' (getTxBody -> txBody) =
let TxBody TxBodyContent{txOuts} = txBody
txOuts' (getTxBodyContent . getTxBody -> txBody) =
let TxBodyContent{txOuts} = txBody
in txOuts

-- | Modify a 'TxOut' to set the minimum ada on the value.
Expand Down
Loading
Loading