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

Make --fee mandatory in legacy transaction build-raw #797

Merged
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
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/Legacy/Commands/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ data LegacyTransactionCmds
-- ^ Transaction lower bound
(Maybe SlotNo)
-- ^ Transaction upper bound
(Maybe Coin)
Coin
-- ^ Tx fee
[(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
-- ^ Certificates with potential script witness
Expand Down
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/Legacy/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ pTransaction envCli =
<*> optional (pMintMultiAsset ManualBalance)
<*> optional pInvalidBefore
<*> optional pLegacyInvalidHereafter
<*> optional pTxFee
<*> pTxFee
<*> many (pCertificateFile ManualBalance )
<*> many (pWithdrawal ManualBalance)
<*> pTxMetadataJsonSchema
Expand Down
5 changes: 2 additions & 3 deletions cardano-cli/src/Cardano/CLI/Legacy/Run/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import Cardano.CLI.Types.Errors.TxValidationError
import Cardano.CLI.Types.Governance

import Data.Function
import Data.Maybe

runLegacyTransactionCmds :: LegacyTransactionCmds -> ExceptT TxCmdError IO ()
runLegacyTransactionCmds = \case
Expand Down Expand Up @@ -135,7 +134,7 @@ runLegacyTransactionBuildRawCmd :: ()
-> Maybe (Value, [ScriptWitnessFiles WitCtxMint]) -- ^ Multi-Asset value with script witness
-> Maybe SlotNo -- ^ Validity lower bound
-> Maybe SlotNo -- ^ Validity upper bound
-> Maybe Coin -- ^ Tx fee
-> Coin -- ^ Tx fee
-> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
-> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
-> TxMetadataJsonSchema
Expand Down Expand Up @@ -176,7 +175,7 @@ runLegacyTransactionBuildRawCmd
runTransactionBuildRawCmd
( Cmd.TransactionBuildRawCmdArgs
sbe mScriptValidity txins readOnlyRefIns txinsc mReturnColl
mTotColl reqSigners txouts mValue mLowBound upperBound (fromMaybe 0 fee) certs wdrls
mTotColl reqSigners txouts mValue mLowBound upperBound fee certs wdrls
metadataSchema scriptFiles metadataFiles mProtocolParamsFile mUpdateProposalFile [] []
outFile
)
Expand Down
4 changes: 2 additions & 2 deletions cardano-cli/test/cardano-cli-golden/files/golden/help.cli
Original file line number Diff line number Diff line change
Expand Up @@ -10319,7 +10319,7 @@ Usage: cardano-cli legacy transaction build-raw
)]
[--invalid-before SLOT]
[--invalid-hereafter SLOT]
[--fee LOVELACE]
--fee LOVELACE
[--certificate-file FILE
[ --certificate-script-file FILE
[
Expand Down Expand Up @@ -11555,7 +11555,7 @@ Usage: cardano-cli transaction build-raw
)]
[--invalid-before SLOT]
[--invalid-hereafter SLOT]
[--fee LOVELACE]
--fee LOVELACE
[--certificate-file FILE
[ --certificate-script-file FILE
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Usage: cardano-cli legacy transaction build-raw
)]
[--invalid-before SLOT]
[--invalid-hereafter SLOT]
[--fee LOVELACE]
--fee LOVELACE
[--certificate-file FILE
[ --certificate-script-file FILE
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Usage: cardano-cli transaction build-raw
)]
[--invalid-before SLOT]
[--invalid-hereafter SLOT]
[--fee LOVELACE]
--fee LOVELACE
[--certificate-file FILE
[ --certificate-script-file FILE
[
Expand Down
Loading