File tree Expand file tree Collapse file tree
cardano-api/src/Cardano/Api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import Cardano.Protocol.Crypto (StandardCrypto)
3737import Cardano.Protocol.TPraos.OCert qualified as Shelley
3838
3939import Data.Word
40+ import GHC.Stack (HasCallStack )
4041
4142-- ----------------------------------------------------------------------------
4243-- Operational certificates
@@ -107,7 +108,8 @@ instance Error OperationalCertIssueError where
107108-- TODO: include key ids
108109
109110issueOperationalCertificate
110- :: VerificationKey KesKey
111+ :: HasCallStack
112+ => VerificationKey KesKey
111113 -> Either
112114 AnyStakePoolSigningKey
113115 (SigningKey GenesisDelegateExtendedKey )
Original file line number Diff line number Diff line change @@ -261,7 +261,8 @@ hashTxBody
261261hashTxBody = L. extractHash . L. hashAnnotated
262262
263263makeKeyWitness
264- :: Era era
264+ :: HasCallStack
265+ => Era era
265266 -> UnsignedTx (LedgerEra era )
266267 -> ShelleyWitnessSigningKey
267268 -> L. WitVKey L. Witness
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ import Data.Sequence.Strict qualified as Seq
143143import Data.Set (Set )
144144import Data.Set qualified as Set
145145import GHC.Exts (IsList (.. ))
146+ import GHC.Stack (HasCallStack )
146147import Lens.Micro
147148
148149makeUnsignedTx
@@ -373,7 +374,8 @@ legacyDatumToDatum OldApi.TxOutDatumNone = Nothing
373374
374375fromLegacyTxOut
375376 :: forall era
376- . IsEra era
377+ . HasCallStack
378+ => IsEra era
377379 => OldApi. TxOut CtxTx era
378380 -> Either DatumDecodingError (TxOut (LedgerEra era ), Map L. DataHash (L. Data (LedgerEra era )))
379381fromLegacyTxOut tOut@ (OldApi. TxOut _ _ d _) = do
Original file line number Diff line number Diff line change @@ -745,7 +745,8 @@ instance Error FeeCalculationError where
745745-- In practice convergence occurs within 2–3 iterations.
746746calcMinFeeRecursive
747747 :: forall era
748- . IsEra era
748+ . HasCallStack
749+ => IsEra era
749750 => L. Addr
750751 -- ^ Change address. Any surplus value (ADA and/or native tokens) is
751752 -- sent to a new output at this address, appended at the end of the
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import Cardano.Slotting.Slot (EpochSize (..))
2525
2626import Data.Time (NominalDiffTime , UTCTime )
2727import Data.Word (Word64 )
28+ import GHC.Stack (HasCallStack )
2829
2930-- ----------------------------------------------------------------------------
3031-- Genesis parameters
@@ -74,7 +75,7 @@ data GenesisParameters era
7475-- Conversion functions
7576--
7677
77- fromShelleyGenesis :: Shelley. ShelleyGenesis -> GenesisParameters ShelleyEra
78+ fromShelleyGenesis :: HasCallStack => Shelley. ShelleyGenesis -> GenesisParameters ShelleyEra
7879fromShelleyGenesis
7980 sg@ Shelley. ShelleyGenesis
8081 { Shelley. sgSystemStart
Original file line number Diff line number Diff line change @@ -545,6 +545,7 @@ fromShelleyRewardAccounts =
545545toConsensusQuery
546546 :: forall block result
547547 . ()
548+ => HasCallStack
548549 => Consensus. CardanoBlock StandardCrypto ~ block
549550 => QueryInMode result
550551 -> Some (Consensus. Query block )
Original file line number Diff line number Diff line change @@ -1518,6 +1518,7 @@ maxShelleyTxInIx = fromIntegral $ maxBound @Word16
15181518{-# DEPRECATED createAndValidateTransactionBody "Use createTransactionBody instead" #-}
15191519createAndValidateTransactionBody
15201520 :: ()
1521+ => HasCallStack
15211522 => ShelleyBasedEra era
15221523 -> TxBodyContent BuildTx era
15231524 -> Either TxBodyError (TxBody era )
@@ -2104,6 +2105,7 @@ mkCommonTxBody sbe txIns txOuts txFee txWithdrawals txAuxData =
21042105makeShelleyTransactionBody
21052106 :: forall era
21062107 . ()
2108+ => HasCallStack
21072109 => ShelleyBasedEra era
21082110 -> TxBodyContent BuildTx era
21092111 -> Either TxBodyError (TxBody era )
Original file line number Diff line number Diff line change @@ -34,13 +34,15 @@ import Data.Map.Strict qualified as Map
3434import Data.Set (Set )
3535import Data.Text qualified as Text
3636import GHC.Exts (IsList (.. ))
37+ import GHC.Stack (HasCallStack )
3738
3839-- | Construct a balanced transaction.
3940-- See Cardano.Api.Query.Internal.Convenience.queryStateForBalancedTx for a
4041-- convenient way of querying the node to get the required arguements
4142-- for constructBalancedTx.
4243constructBalancedTx
4344 :: ()
45+ => HasCallStack
4446 => ShelleyBasedEra era
4547 -> TxBodyContent BuildTx era
4648 -> AddressInEra era
Original file line number Diff line number Diff line change @@ -124,7 +124,8 @@ instance Error (AutoBalanceError era) where
124124 AutoBalanceCalculationError e -> prettyError e
125125
126126estimateOrCalculateBalancedTxBody
127- :: ShelleyBasedEra era
127+ :: HasCallStack
128+ => ShelleyBasedEra era
128129 -> FeeEstimationMode era
129130 -> L. PParams (ShelleyLedgerEra era )
130131 -> TxBodyContent BuildTx era
Original file line number Diff line number Diff line change @@ -1088,6 +1088,7 @@ data WitnessNetworkIdOrByronAddress
10881088makeShelleyBootstrapWitness
10891089 :: forall era
10901090 . ()
1091+ => HasCallStack
10911092 => ShelleyBasedEra era
10921093 -> WitnessNetworkIdOrByronAddress
10931094 -> TxBody era
@@ -1100,6 +1101,7 @@ makeShelleyBootstrapWitness sbe nwOrAddr txBody sk =
11001101makeShelleyBasedBootstrapWitness
11011102 :: forall era
11021103 . ()
1104+ => HasCallStack
11031105 => ShelleyBasedEra era
11041106 -> WitnessNetworkIdOrByronAddress
11051107 -> Ledger. TxBody Ledger. TopTx (ShelleyLedgerEra era )
@@ -1183,6 +1185,7 @@ makeShelleyBasedBootstrapWitness sbe nwOrAddr txbody (ByronSigningKey sk) =
11831185makeShelleyKeyWitness
11841186 :: forall era
11851187 . ()
1188+ => HasCallStack
11861189 => ShelleyBasedEra era
11871190 -> TxBody era
11881191 -> ShelleyWitnessSigningKey
@@ -1193,6 +1196,7 @@ makeShelleyKeyWitness sbe (ShelleyTxBody _ txBody _ _ _ _) =
11931196makeShelleyKeyWitness'
11941197 :: forall era
11951198 . ()
1199+ => HasCallStack
11961200 => ShelleyBasedEra era
11971201 -> L. TxBody L. TopTx (ShelleyLedgerEra era )
11981202 -> ShelleyWitnessSigningKey
@@ -1231,7 +1235,8 @@ toShelleySigningKey key = case key of
12311235 WitnessDRepExtendedKey (DRepExtendedSigningKey sk) -> ShelleyExtendedSigningKey sk
12321236
12331237getShelleyKeyWitnessVerificationKey
1234- :: ShelleySigningKey
1238+ :: HasCallStack
1239+ => ShelleySigningKey
12351240 -> Shelley. VKey Shelley. Witness
12361241getShelleyKeyWitnessVerificationKey (ShelleyNormalSigningKey sk) =
12371242 ( Shelley. asWitness
You can’t perform that action at this time.
0 commit comments