diff --git a/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxInfo.hs b/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxInfo.hs index 0eab1bce95f..69bf7678ef8 100644 --- a/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxInfo.hs +++ b/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxInfo.hs @@ -41,6 +41,7 @@ module Cardano.Ledger.Alonzo.TxInfo ( transPolicyID, transAssetName, transMultiAsset, + transMintValue, transValue, transWithdrawals, getWitVKeyHash, diff --git a/eras/babbage/impl/src/Cardano/Ledger/Babbage/TxInfo.hs b/eras/babbage/impl/src/Cardano/Ledger/Babbage/TxInfo.hs index bddb66beace..2f67815456a 100644 --- a/eras/babbage/impl/src/Cardano/Ledger/Babbage/TxInfo.hs +++ b/eras/babbage/impl/src/Cardano/Ledger/Babbage/TxInfo.hs @@ -233,7 +233,7 @@ babbageTxInfoV1 timeRange tx utxo = do { PV1.txInfoInputs = inputs , PV1.txInfoOutputs = outputs , PV1.txInfoFee = Alonzo.transValue (inject @(MaryValue (EraCrypto era)) fee) - , PV1.txInfoMint = Alonzo.transMultiAsset multiAsset + , PV1.txInfoMint = Alonzo.transMintValue (txBody ^. mintTxBodyL) , PV1.txInfoDCert = toList $ fmap (unTxCertV1 . Alonzo.transTxCert) (txBody ^. certsTxBodyL) , PV1.txInfoWdrl = Map.toList (Alonzo.transWithdrawals (txBody ^. withdrawalsTxBodyL)) , PV1.txInfoValidRange = timeRange @@ -247,7 +247,6 @@ babbageTxInfoV1 timeRange tx utxo = do witnesses = tx ^. witsTxL outs = txBody ^. outputsTxBodyL fee = txBody ^. feeTxBodyL - multiAsset = txBody ^. mintTxBodyL datpairs = Map.toList (unTxDats $ witnesses ^. datsTxWitsL) babbageTxInfoV2 :: @@ -278,7 +277,7 @@ babbageTxInfoV2 timeRange tx utxo = do , PV2.txInfoOutputs = outputs , PV2.txInfoReferenceInputs = refInputs , PV2.txInfoFee = Alonzo.transValue (inject @(MaryValue (EraCrypto era)) fee) - , PV2.txInfoMint = Alonzo.transMultiAsset multiAsset + , PV2.txInfoMint = Alonzo.transMintValue (txBody ^. mintTxBodyL) , PV2.txInfoDCert = toList $ fmap (unTxCertV2 . Alonzo.transTxCert) (txBody ^. certsTxBodyL) , PV2.txInfoWdrl = PV2.fromList $ Map.toList (Alonzo.transWithdrawals (txBody ^. withdrawalsTxBodyL)) , PV2.txInfoValidRange = timeRange @@ -293,6 +292,5 @@ babbageTxInfoV2 timeRange tx utxo = do witnesses = tx ^. witsTxL outs = txBody ^. outputsTxBodyL fee = txBody ^. feeTxBodyL - multiAsset = txBody ^. mintTxBodyL datpairs = Map.toList (unTxDats $ witnesses ^. datsTxWitsL) rdmrs = Map.toList (unRedeemers $ witnesses ^. rdmrsTxWitsL) diff --git a/eras/conway/impl/src/Cardano/Ledger/Conway/TxInfo.hs b/eras/conway/impl/src/Cardano/Ledger/Conway/TxInfo.hs index c72ccc6838e..d0ffd8142c6 100644 --- a/eras/conway/impl/src/Cardano/Ledger/Conway/TxInfo.hs +++ b/eras/conway/impl/src/Cardano/Ledger/Conway/TxInfo.hs @@ -114,7 +114,9 @@ conwayTxInfoV3 timeRange tx utxo = do , PV3.txInfoOutputs = outputs , PV3.txInfoReferenceInputs = refInputs , PV3.txInfoFee = Alonzo.transValue (inject @(MaryValue (EraCrypto era)) fee) - , PV3.txInfoMint = Alonzo.transMultiAsset multiAsset + , -- Note that this translation is different from previous Plutus versions, sine we no + -- longer add a zero ADA value to the mint field during translation: + PV3.txInfoMint = Alonzo.transMultiAsset (txBody ^. mintTxBodyL) , PV3.txInfoDCert = toList $ fmap (unTxCertV3 . Alonzo.transTxCert) (txBody ^. certsTxBodyL) , PV3.txInfoWdrl = PV3.fromList $ Map.toList (Alonzo.transWithdrawals (txBody ^. withdrawalsTxBodyL)) , PV3.txInfoValidRange = timeRange @@ -129,6 +131,5 @@ conwayTxInfoV3 timeRange tx utxo = do witnesses = tx ^. witsTxL outs = txBody ^. outputsTxBodyL fee = txBody ^. feeTxBodyL - multiAsset = txBody ^. mintTxBodyL datpairs = Map.toList (unTxDats $ witnesses ^. datsTxWitsL) rdmrs = Map.toList (unRedeemers $ witnesses ^. rdmrsTxWitsL)