Skip to content

Commit ce78b97

Browse files
cardano-api: 8.29.1.0 -> 8.37.0.0
1 parent c5d58ba commit ce78b97

File tree

24 files changed

+120
-119
lines changed

24 files changed

+120
-119
lines changed

cabal.project

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ repository cardano-haskell-packages
1212

1313
-- See CONTRIBUTING.md for information about when and how to update these.
1414
index-state:
15-
, hackage.haskell.org 2023-12-06T15:07:04Z
16-
, cardano-haskell-packages 2023-12-04T19:04:02Z
15+
, hackage.haskell.org 2024-01-02T15:07:04Z
16+
, cardano-haskell-packages 2024-01-02T19:04:02Z
1717

1818
packages:
1919
hydra-prelude

flake.lock

+50-33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hydra-cardano-api/hydra-cardano-api.cabal

+4-4
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ library
8787
, base >=4.16
8888
, base16-bytestring
8989
, bytestring
90-
, cardano-api >=8.29.1 && <8.30
90+
, cardano-api >=8.37.0 && <8.38
9191
, cardano-binary >=1.7.0 && <1.8
9292
, cardano-crypto-class >=2.1.1 && <2.2
9393
, cardano-ledger-allegra >=1.2.1 && <1.3
@@ -96,9 +96,9 @@ library
9696
, cardano-ledger-babbage >=1.5 && <1.6
9797
, cardano-ledger-binary >=1.2 && <1.3
9898
, cardano-ledger-byron >=1.0.0 && <1.1
99-
, cardano-ledger-core >=1.8 && <1.9
100-
, cardano-ledger-mary >=1.3.1 && <1.4
101-
, cardano-ledger-shelley >=1.7 && <1.8
99+
, cardano-ledger-core >=1.9 && <1.10
100+
, cardano-ledger-mary >=1.4 && <1.5
101+
, cardano-ledger-shelley >=1.8 && <1.9
102102
, containers
103103
, lens
104104
, plutus-ledger-api >=1.15.0.1 && <1.16

hydra-cardano-api/src/Hydra/Cardano/Api.hs

+6-6
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ import Cardano.Api as X hiding (
6767
Witness (..),
6868
createAndValidateTransactionBody,
6969
defaultTxBodyContent,
70+
fromLedgerValue,
7071
makeShelleyKeyWitness,
7172
policyId,
7273
queryEraHistory,
@@ -76,6 +77,7 @@ import Cardano.Api as X hiding (
7677
scriptLanguageSupportedInEra,
7778
signShelleyTransaction,
7879
toLedgerUTxO,
80+
toLedgerValue,
7981
)
8082
import Cardano.Api.Byron as X (
8183
Address (..),
@@ -94,10 +96,8 @@ import Cardano.Api.Shelley as X (
9496
VerificationKey (..),
9597
fromAlonzoCostModels,
9698
fromAlonzoPrices,
97-
fromConsensusPointInMode,
9899
fromPlutusData,
99100
toAlonzoPrices,
100-
toConsensusPointInMode,
101101
toPlutusData,
102102
toShelleyNetwork,
103103
)
@@ -372,10 +372,10 @@ pattern TxBody{txBodyContent} <-
372372
{-# COMPLETE TxBody #-}
373373

374374
createAndValidateTransactionBody :: TxBodyContent BuildTx -> Either TxBodyError TxBody
375-
createAndValidateTransactionBody = Cardano.Api.createAndValidateTransactionBody cardanoEra
375+
createAndValidateTransactionBody = Cardano.Api.createAndValidateTransactionBody shelleyBasedEra
376376

377377
defaultTxBodyContent :: TxBodyContent BuildTx
378-
defaultTxBodyContent = Cardano.Api.defaultTxBodyContent cardanoEra
378+
defaultTxBodyContent = Cardano.Api.defaultTxBodyContent shelleyBasedEra
379379

380380
-- ** TxBodyContent
381381

@@ -595,14 +595,14 @@ pattern TxOut :: AddressInEra -> Value -> TxOutDatum ctx -> ReferenceScript -> T
595595
pattern TxOut{txOutAddress, txOutValue, txOutDatum, txOutReferenceScript} <-
596596
Cardano.Api.TxOut
597597
txOutAddress
598-
(TxOutValue MaryEraOnwardsBabbage txOutValue)
598+
(TxOutValueShelleyBased ShelleyBasedEraBabbage (Extras.fromLedgerValue -> txOutValue))
599599
txOutDatum
600600
txOutReferenceScript
601601
where
602602
TxOut addr value datum ref =
603603
Cardano.Api.TxOut
604604
addr
605-
(TxOutValue MaryEraOnwardsBabbage value)
605+
(TxOutValueShelleyBased ShelleyBasedEraBabbage (Extras.toLedgerValue value))
606606
datum
607607
ref
608608

hydra-cardano-api/src/Hydra/Cardano/Api/Hash.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Hydra.Cardano.Api.Hash where
22

33
import Hydra.Cardano.Api.Prelude
44

5-
import Cardano.Ledger.Alonzo.TxInfo qualified as Ledger
5+
import Cardano.Ledger.Alonzo.Plutus.TxInfo qualified as Ledger
66
import Cardano.Ledger.Keys qualified as Ledger
77
import Cardano.Ledger.SafeHash (unsafeMakeSafeHash)
88
import Cardano.Ledger.Shelley.Scripts qualified as Ledger

hydra-cardano-api/src/Hydra/Cardano/Api/PlutusScript.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ module Hydra.Cardano.Api.PlutusScript where
44

55
import Hydra.Cardano.Api.Prelude
66

7-
import Cardano.Ledger.Alonzo.Language qualified as Ledger
87
import Cardano.Ledger.Alonzo.Scripts qualified as Ledger
8+
import Cardano.Ledger.Plutus.Language qualified as Ledger
99
import Data.ByteString.Short qualified as SBS
1010
import PlutusLedgerApi.Common qualified as Plutus
1111
import Test.QuickCheck (listOf)

hydra-cardano-api/src/Hydra/Cardano/Api/PolicyId.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Hydra.Cardano.Api.PolicyId where
44

55
import Hydra.Cardano.Api.Prelude
66

7-
import Cardano.Ledger.Alonzo.TxInfo qualified as Ledger
7+
import Cardano.Ledger.Alonzo.Plutus.TxInfo qualified as Ledger
88
import Cardano.Ledger.Hashes qualified as Ledger
99
import Cardano.Ledger.Mary.Value qualified as Ledger
1010
import Hydra.Cardano.Api.ScriptHash ()

hydra-cardano-api/src/Hydra/Cardano/Api/ScriptData.hs

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ module Hydra.Cardano.Api.ScriptData where
44

55
import Hydra.Cardano.Api.Prelude
66

7-
import Cardano.Api.Byron (TxBody (..))
8-
import Cardano.Ledger.Alonzo.Scripts.Data qualified as Ledger
97
import Cardano.Ledger.Alonzo.TxWits qualified as Ledger
108
import Cardano.Ledger.Era qualified as Ledger
9+
import Cardano.Ledger.Plutus.Data qualified as Ledger
1110
import Codec.Serialise (deserialiseOrFail, serialise)
1211
import Control.Arrow (left)
1312
import Data.Aeson (Value (String), withText)
@@ -55,7 +54,6 @@ lookupScriptData ::
5554
Tx era ->
5655
TxOut CtxUTxO era ->
5756
Maybe HashableScriptData
58-
lookupScriptData (Tx ByronTxBody{} _) _ = Nothing
5957
lookupScriptData (Tx (ShelleyTxBody _ _ _ scriptsData _ _) _) (TxOut _ _ datum _) =
6058
case datum of
6159
TxOutDatumNone ->

hydra-cardano-api/src/Hydra/Cardano/Api/Tx.hs

+1-5
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,10 @@ utxoProducedByTx tx =
4545
TxBody body = getTxBody tx
4646

4747
-- | Get explicit fees allocated to a transaction.
48-
--
49-
-- NOTE: this function is partial and throws if given a Byron transaction for
50-
-- which fees are necessarily implicit.
51-
txFee' :: HasCallStack => Tx era -> Lovelace
48+
txFee' :: Tx era -> Lovelace
5249
txFee' (getTxBody -> TxBody body) =
5350
case txFee body of
5451
TxFeeExplicit _ y -> y
55-
TxFeeImplicit _ -> error "impossible: TxFeeImplicit on non-Byron transaction."
5652

5753
-- * Type Conversions
5854

hydra-cardano-api/src/Hydra/Cardano/Api/TxBody.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ module Hydra.Cardano.Api.TxBody where
22

33
import Hydra.Cardano.Api.Prelude
44

5-
import Cardano.Ledger.Alonzo.Scripts.Data qualified as Ledger
65
import Cardano.Ledger.Alonzo.TxWits qualified as Ledger
76
import Cardano.Ledger.Babbage.Tx qualified as Ledger
87
import Cardano.Ledger.BaseTypes (strictMaybeToMaybe)
98
import Cardano.Ledger.Core qualified as Ledger
9+
import Cardano.Ledger.Plutus.Data qualified as Ledger
1010
import Data.List (find)
1111
import Data.Map qualified as Map
1212
import Hydra.Cardano.Api.PlutusScript (fromLedgerScript)

hydra-cardano-api/src/Hydra/Cardano/Api/TxIn.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ module Hydra.Cardano.Api.TxIn where
44

55
import Hydra.Cardano.Api.Prelude
66

7-
import Cardano.Ledger.Alonzo.TxInfo qualified as Ledger
87
import Cardano.Ledger.BaseTypes qualified as Ledger
98
import Cardano.Ledger.Binary qualified as Ledger
9+
import Cardano.Ledger.Plutus.TxInfo qualified as Ledger
1010
import Cardano.Ledger.TxIn qualified as Ledger
1111
import Data.ByteString qualified as BS
1212
import Data.Set qualified as Set

0 commit comments

Comments
 (0)