Skip to content

Commit

Permalink
Merge pull request #868 from IntersectMBO/smelc/remove-non-debug-tran…
Browse files Browse the repository at this point in the history
…saction-view

Remove era|legacy transaction view
  • Loading branch information
smelc authored Sep 24, 2024
2 parents a157c49 + 93c194b commit 61dcd88
Show file tree
Hide file tree
Showing 25 changed files with 0 additions and 125 deletions.
2 changes: 0 additions & 2 deletions cardano-cli/src/Cardano/CLI/EraBased/Commands/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ data TransactionCmds era
| TransactionCalculateMinValueCmd !(TransactionCalculateMinValueCmdArgs era)
| TransactionHashScriptDataCmd !TransactionHashScriptDataCmdArgs
| TransactionTxIdCmd !TransactionTxIdCmdArgs
| TransactionViewCmd !TransactionViewCmdArgs

data TransactionBuildRawCmdArgs era = TransactionBuildRawCmdArgs
{ eon :: !(ShelleyBasedEra era)
Expand Down Expand Up @@ -265,4 +264,3 @@ renderTransactionCmds = \case
TransactionCalculateMinValueCmd{} -> "transaction calculate-min-value"
TransactionHashScriptDataCmd{} -> "transaction hash-script-data"
TransactionTxIdCmd{} -> "transaction txid"
TransactionViewCmd{} -> "transaction view"
5 changes: 0 additions & 5 deletions cardano-cli/src/Cardano/CLI/EraBased/Options/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ pTransactionCmds era' envCli =
subParser "txid" $
Opt.info pTransactionId $
Opt.progDesc "Print a transaction identifier."
, Just $
subParser "view" $
Opt.info
(pure $ TransactionViewCmd TransactionViewCmdArgs)
(Opt.progDesc "This command has been removed. Please use \"debug transaction view\" instead.")
]

-- Backwards compatible parsers
Expand Down
15 changes: 0 additions & 15 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ module Cardano.CLI.EraBased.Run.Transaction
, runTransactionPolicyIdCmd
, runTransactionHashScriptDataCmd
, runTransactionTxIdCmd
, runTransactionViewCmd
, runTransactionWitnessCmd
, runTransactionSignWitnessCmd
, toTxOutByronEra
Expand Down Expand Up @@ -80,7 +79,6 @@ import qualified Data.Text.IO as Text
import Data.Type.Equality (TestEquality (..))
import GHC.Exts (IsList (..))
import Lens.Micro ((^.))
import qualified System.Exit as IO
import qualified System.IO as IO

runTransactionCmds :: Cmd.TransactionCmds era -> ExceptT TxCmdError IO ()
Expand All @@ -94,7 +92,6 @@ runTransactionCmds = \case
Cmd.TransactionCalculateMinValueCmd args -> runTransactionCalculateMinValueCmd args
Cmd.TransactionHashScriptDataCmd args -> runTransactionHashScriptDataCmd args
Cmd.TransactionTxIdCmd args -> runTransactionTxIdCmd args
Cmd.TransactionViewCmd args -> runTransactionViewCmd args
Cmd.TransactionPolicyIdCmd args -> runTransactionPolicyIdCmd args
Cmd.TransactionWitnessCmd args -> runTransactionWitnessCmd args
Cmd.TransactionSignWitnessCmd args -> runTransactionSignWitnessCmd args
Expand Down Expand Up @@ -1702,18 +1699,6 @@ runTransactionTxIdCmd

liftIO $ BS.putStrLn $ serialiseToRawBytesHex (getTxId txbody)

runTransactionViewCmd
:: ()
=> Cmd.TransactionViewCmdArgs
-> ExceptT TxCmdError IO ()
runTransactionViewCmd
Cmd.TransactionViewCmdArgs =
liftIO $ do
IO.hPutStrLn
IO.stderr
"Command \"era transaction view\" has been removed. Please use \"debug transaction view\" instead."
IO.exitWith (IO.ExitFailure 1)

-- ----------------------------------------------------------------------------
-- Witness commands
--
Expand Down
2 changes: 0 additions & 2 deletions cardano-cli/src/Cardano/CLI/Legacy/Commands/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ data LegacyTransactionCmds
ScriptDataOrFile
| TransactionTxIdCmd
InputTxBodyOrTxFile
| TransactionViewCmd

renderLegacyTransactionCmds :: LegacyTransactionCmds -> Text
renderLegacyTransactionCmds = \case
Expand All @@ -150,4 +149,3 @@ renderLegacyTransactionCmds = \case
TransactionCalculateMinValueCmd{} -> "transaction calculate-min-value"
TransactionHashScriptDataCmd{} -> "transaction hash-script-data"
TransactionTxIdCmd{} -> "transaction txid"
TransactionViewCmd{} -> "transaction view"
7 changes: 0 additions & 7 deletions cardano-cli/src/Cardano/CLI/Legacy/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,6 @@ pTransaction envCli =
, subParser
"txid"
(Opt.info pTransactionId $ Opt.progDesc "Print a transaction identifier.")
, subParser "view" $
Opt.info pTransactionView $
Opt.progDesc "This command has been removed. Please use \"debug transaction view\" instead."
]
where
-- Backwards compatible parsers
Expand Down Expand Up @@ -488,10 +485,6 @@ pTransaction envCli =
TransactionTxIdCmd
<$> pInputTxOrTxBodyFile

pTransactionView :: Parser LegacyTransactionCmds
pTransactionView =
pure TransactionViewCmd

pNodeCmds :: Parser LegacyNodeCmds
pNodeCmds =
asum
Expand Down
7 changes: 0 additions & 7 deletions cardano-cli/src/Cardano/CLI/Legacy/Run/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ runLegacyTransactionCmds = \case
runLegacyTransactionHashScriptDataCmd scriptDataOrFile
TransactionTxIdCmd txinfile ->
runLegacyTransactionTxIdCmd txinfile
TransactionViewCmd ->
runLegacyTransactionViewCmd
TransactionPolicyIdCmd sFile ->
runLegacyTransactionPolicyIdCmd sFile
TransactionWitnessCmd txBodyfile witSignData mbNw outFile ->
Expand Down Expand Up @@ -514,11 +512,6 @@ runLegacyTransactionTxIdCmd txfile =
txfile
)

runLegacyTransactionViewCmd :: ExceptT TxCmdError IO ()
runLegacyTransactionViewCmd =
runTransactionViewCmd
Cmd.TransactionViewCmdArgs

runLegacyTransactionWitnessCmd
:: ()
=> TxBodyFile In
Expand Down
45 changes: 0 additions & 45 deletions cardano-cli/test/cardano-cli-golden/files/golden/help.cli
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,6 @@ Usage: cardano-cli shelley transaction
| calculate-min-required-utxo
| hash-script-data
| txid
| view
)

Transaction commands.
Expand Down Expand Up @@ -1081,10 +1080,6 @@ Usage: cardano-cli shelley transaction txid

Print a transaction identifier.

Usage: cardano-cli shelley transaction view

This command has been removed. Please use "debug transaction view" instead.

Usage: cardano-cli allegra
( address
| key
Expand Down Expand Up @@ -1902,7 +1897,6 @@ Usage: cardano-cli allegra transaction
| calculate-min-required-utxo
| hash-script-data
| txid
| view
)

Transaction commands.
Expand Down Expand Up @@ -2151,10 +2145,6 @@ Usage: cardano-cli allegra transaction txid

Print a transaction identifier.

Usage: cardano-cli allegra transaction view

This command has been removed. Please use "debug transaction view" instead.

Usage: cardano-cli mary
( address
| key
Expand Down Expand Up @@ -2964,7 +2954,6 @@ Usage: cardano-cli mary transaction
| calculate-min-required-utxo
| hash-script-data
| txid
| view
)

Transaction commands.
Expand Down Expand Up @@ -3211,10 +3200,6 @@ Usage: cardano-cli mary transaction txid

Print a transaction identifier.

Usage: cardano-cli mary transaction view

This command has been removed. Please use "debug transaction view" instead.

Usage: cardano-cli alonzo
( address
| key
Expand Down Expand Up @@ -4037,7 +4022,6 @@ Usage: cardano-cli alonzo transaction
| calculate-min-required-utxo
| hash-script-data
| txid
| view
)

Transaction commands.
Expand Down Expand Up @@ -4286,10 +4270,6 @@ Usage: cardano-cli alonzo transaction txid

Print a transaction identifier.

Usage: cardano-cli alonzo transaction view

This command has been removed. Please use "debug transaction view" instead.

Usage: cardano-cli babbage
( address
| key
Expand Down Expand Up @@ -5135,7 +5115,6 @@ Usage: cardano-cli babbage transaction
| calculate-min-required-utxo
| hash-script-data
| txid
| view
)

Transaction commands.
Expand Down Expand Up @@ -5641,10 +5620,6 @@ Usage: cardano-cli babbage transaction txid

Print a transaction identifier.

Usage: cardano-cli babbage transaction view

This command has been removed. Please use "debug transaction view" instead.

Usage: cardano-cli conway
( address
| key
Expand Down Expand Up @@ -6952,7 +6927,6 @@ Usage: cardano-cli conway transaction
| calculate-min-required-utxo
| hash-script-data
| txid
| view
)

Transaction commands.
Expand Down Expand Up @@ -7550,10 +7524,6 @@ Usage: cardano-cli conway transaction txid

Print a transaction identifier.

Usage: cardano-cli conway transaction view

This command has been removed. Please use "debug transaction view" instead.

Usage: cardano-cli latest
( address
| key
Expand Down Expand Up @@ -8397,7 +8367,6 @@ Usage: cardano-cli latest transaction
| calculate-min-required-utxo
| hash-script-data
| txid
| view
)

Transaction commands.
Expand Down Expand Up @@ -8903,10 +8872,6 @@ Usage: cardano-cli latest transaction txid

Print a transaction identifier.

Usage: cardano-cli latest transaction view

This command has been removed. Please use "debug transaction view" instead.

Usage: cardano-cli legacy Legacy commands

Legacy commands - DEPRECATED - will be removed in the future
Expand Down Expand Up @@ -9570,7 +9535,6 @@ Usage: cardano-cli legacy transaction
| calculate-min-required-utxo
| hash-script-data
| txid
| view
)

Transaction commands
Expand Down Expand Up @@ -9994,10 +9958,6 @@ Usage: cardano-cli legacy transaction txid

Print a transaction identifier.

Usage: cardano-cli legacy transaction view

This command has been removed. Please use "debug transaction view" instead.

Usage: cardano-cli legacy key
( verification-key
| non-extended-key
Expand Down Expand Up @@ -10843,7 +10803,6 @@ Usage: cardano-cli transaction
| calculate-min-required-utxo
| hash-script-data
| txid
| view
)

Transaction commands
Expand Down Expand Up @@ -11253,10 +11212,6 @@ Usage: cardano-cli transaction txid

Print a transaction identifier.

Usage: cardano-cli transaction view

This command has been removed. Please use "debug transaction view" instead.

Usage: cardano-cli key
( verification-key
| non-extended-key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Usage: cardano-cli allegra transaction
| calculate-min-required-utxo
| hash-script-data
| txid
| view
)

Transaction commands.
Expand All @@ -36,5 +35,3 @@ Available commands:
output.
hash-script-data Calculate the hash of script data.
txid Print a transaction identifier.
view This command has been removed. Please use "debug
transaction view" instead.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Usage: cardano-cli alonzo transaction
| calculate-min-required-utxo
| hash-script-data
| txid
| view
)

Transaction commands.
Expand All @@ -36,5 +35,3 @@ Available commands:
output.
hash-script-data Calculate the hash of script data.
txid Print a transaction identifier.
view This command has been removed. Please use "debug
transaction view" instead.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Usage: cardano-cli babbage transaction
| calculate-min-required-utxo
| hash-script-data
| txid
| view
)

Transaction commands.
Expand Down Expand Up @@ -44,5 +43,3 @@ Available commands:
output.
hash-script-data Calculate the hash of script data.
txid Print a transaction identifier.
view This command has been removed. Please use "debug
transaction view" instead.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Usage: cardano-cli conway transaction
| calculate-min-required-utxo
| hash-script-data
| txid
| view
)

Transaction commands.
Expand Down Expand Up @@ -44,5 +43,3 @@ Available commands:
output.
hash-script-data Calculate the hash of script data.
txid Print a transaction identifier.
view This command has been removed. Please use "debug
transaction view" instead.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Usage: cardano-cli latest transaction
| calculate-min-required-utxo
| hash-script-data
| txid
| view
)

Transaction commands.
Expand Down Expand Up @@ -44,5 +43,3 @@ Available commands:
output.
hash-script-data Calculate the hash of script data.
txid Print a transaction identifier.
view This command has been removed. Please use "debug
transaction view" instead.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Usage: cardano-cli legacy transaction
| calculate-min-required-utxo
| hash-script-data
| txid
| view
)

Transaction commands
Expand Down Expand Up @@ -40,5 +39,3 @@ Available commands:
output.
hash-script-data Calculate the hash of script data.
txid Print a transaction identifier.
view This command has been removed. Please use "debug
transaction view" instead.

This file was deleted.

Loading

0 comments on commit 61dcd88

Please sign in to comment.