Skip to content

Commit

Permalink
Propagate TxTotalCollateral and TxReturnCollateral to cardano-cli
Browse files Browse the repository at this point in the history
without integrating total collateral and collatural return functionality
to cardano-cli
  • Loading branch information
Jimbo4350 committed Apr 12, 2022
1 parent ce40420 commit e01d46f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion cardano-api/gen/Gen/Cardano/Api/Typed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ import Hedgehog (Gen, Range)
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range

import Cardano.Api.TxBody (totalAndReturnCollateralSupportedInEra)
import qualified Cardano.Crypto.Hash.Class as CRYPTO
import Cardano.Ledger.SafeHash (unsafeMakeSafeHash)
import Gen.Cardano.Api.Metadata (genTxMetadata)
Expand Down
1 change: 1 addition & 0 deletions cardano-api/src/Cardano/Api.hs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ module Cardano.Api (
certificatesSupportedInEra,
updateProposalSupportedInEra,
scriptDataSupportedInEra,
totalAndReturnCollateralSupportedInEra,

-- ** Fee calculation
transactionFee,
Expand Down
4 changes: 4 additions & 0 deletions cardano-cli/src/Cardano/CLI/Byron/Tx.hs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ txSpendGenesisUTxOByronPBFT gc nId sk (ByronAddress bAddr) outs = do
]
TxInsCollateralNone
outs
TxTotalCollateralNone
TxReturnCollateralNone
(TxFeeImplicit TxFeesImplicitInByronEra)
( TxValidityNoLowerBound
, TxValidityNoUpperBound ValidityNoUpperBoundInByronEra
Expand Down Expand Up @@ -190,6 +192,8 @@ txSpendUTxOByronPBFT nId sk txIns outs = do
]
TxInsCollateralNone
outs
TxTotalCollateralNone
TxReturnCollateralNone
(TxFeeImplicit TxFeesImplicitInByronEra)
( TxValidityNoLowerBound
, TxValidityNoUpperBound ValidityNoUpperBoundInByronEra
Expand Down
4 changes: 4 additions & 0 deletions cardano-cli/src/Cardano/CLI/Shelley/Run/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ runTxBuildRaw (AnyCardanoEra era)
<*> validateTxInsCollateral
era inputsCollateral
<*> validateTxOuts era txouts
<*> pure TxTotalCollateralNone
<*> pure TxReturnCollateralNone
<*> validateTxFee era mFee
<*> ((,) <$> validateTxValidityLowerBound era mLowerBound
<*> validateTxValidityUpperBound era mUpperBound)
Expand Down Expand Up @@ -455,6 +457,8 @@ runTxBuild (AnyCardanoEra era) (AnyConsensusModeParams cModeParams) networkId mS
<$> validateTxIns era txins
<*> validateTxInsCollateral era txinsc
<*> validateTxOuts era txouts
<*> pure TxTotalCollateralNone -- TODO: Babbage era
<*> pure TxReturnCollateralNone -- TODO: Babbage era
<*> validateTxFee era dummyFee
<*> ((,) <$> validateTxValidityLowerBound era mLowerBound
<*> validateTxValidityUpperBound era mUpperBound)
Expand Down

0 comments on commit e01d46f

Please sign in to comment.