Skip to content

Commit

Permalink
Remove --byron-era flag from legacy transaction build command because…
Browse files Browse the repository at this point in the history
… it never worked
  • Loading branch information
newhoggy committed Oct 22, 2023
1 parent 296aae8 commit 7f89dcd
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 19 deletions.
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 @@ -53,7 +53,7 @@ data LegacyTransactionCmds
-- | Like 'TransactionBuildRaw' but without the fee, and with a change output.
| TransactionBuildCmd
SocketPath
AnyCardanoEra
(EraInEon ShelleyBasedEra)
AnyConsensusModeParams
NetworkId
(Maybe ScriptValidity) -- ^ Mark script as expected to pass or fail validation
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 @@ -309,7 +309,7 @@ pTransaction envCli =
pTransactionBuild =
TransactionBuildCmd
<$> pSocketPath envCli
<*> pLegacyCardanoEra envCli
<*> pLegacyShelleyBasedEra envCli
<*> pConsensusModeParams
<*> pNetworkId envCli
<*> optional pScriptValidity
Expand Down
10 changes: 3 additions & 7 deletions cardano-cli/src/Cardano/CLI/Legacy/Run/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import Cardano.CLI.Types.Errors.TxCmdError
import Cardano.CLI.Types.Governance

import Control.Monad.Trans.Except
import Control.Monad.Trans.Except.Extra

runLegacyTransactionCmds :: LegacyTransactionCmds -> ExceptT TxCmdError IO ()
runLegacyTransactionCmds = \case
Expand Down Expand Up @@ -64,7 +63,7 @@ runLegacyTransactionCmds = \case

runLegacyTransactionBuildCmd :: ()
=> SocketPath
-> AnyCardanoEra
-> EraInEon ShelleyBasedEra
-> AnyConsensusModeParams
-> NetworkId
-> Maybe ScriptValidity
Expand All @@ -91,14 +90,11 @@ runLegacyTransactionBuildCmd :: ()
-> TxBuildOutputOptions
-> ExceptT TxCmdError IO ()
runLegacyTransactionBuildCmd
socketPath (AnyCardanoEra era)
socketPath (EraInEon sbe)
consensusModeParams nid mScriptValidity mOverrideWits txins readOnlyRefIns
reqSigners txinsc mReturnColl mTotCollateral txouts changeAddr mValue mLowBound
mUpperBound certs wdrls metadataSchema scriptFiles metadataFiles mUpProp voteFiles
proposalFiles outputOptions = do

AnyShelleyBasedEra sbe <- forEraInEon era (left TxCmdByronEra) (pure . AnyShelleyBasedEra)

proposalFiles outputOptions =
runTransactionBuildCmd
( Cmd.TransactionBuildCmdArgs sbe socketPath
consensusModeParams nid mScriptValidity mOverrideWits txins readOnlyRefIns
Expand Down
6 changes: 2 additions & 4 deletions cardano-cli/test/cardano-cli-golden/files/golden/help.cli
Original file line number Diff line number Diff line change
Expand Up @@ -9350,8 +9350,7 @@ Usage: cardano-cli legacy transaction build-raw
Please note the order of some cmd options is crucial. If used incorrectly may produce undesired tx body. See nested [] notation above for details.[0;22;23;24m

Usage: cardano-cli legacy transaction build --socket-path SOCKET_PATH
[ --byron-era
| --shelley-era
[ --shelley-era
| --allegra-era
| --mary-era
| --alonzo-era
Expand Down Expand Up @@ -10616,8 +10615,7 @@ Usage: cardano-cli transaction build-raw
Please note the order of some cmd options is crucial. If used incorrectly may produce undesired tx body. See nested [] notation above for details.[0;22;23;24m

Usage: cardano-cli transaction build --socket-path SOCKET_PATH
[ --byron-era
| --shelley-era
[ --shelley-era
| --allegra-era
| --mary-era
| --alonzo-era
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Usage: cardano-cli legacy transaction build --socket-path SOCKET_PATH
[ --byron-era
| --shelley-era
[ --shelley-era
| --allegra-era
| --mary-era
| --alonzo-era
Expand Down Expand Up @@ -134,7 +133,6 @@ Available options:
CARDANO_NODE_SOCKET_PATH environment variable. The
argument is optional if CARDANO_NODE_SOCKET_PATH is
defined and mandatory otherwise.
--byron-era Specify the Byron era
--shelley-era Specify the Shelley era
--allegra-era Specify the Allegra era
--mary-era Specify the Mary era
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Usage: cardano-cli transaction build --socket-path SOCKET_PATH
[ --byron-era
| --shelley-era
[ --shelley-era
| --allegra-era
| --mary-era
| --alonzo-era
Expand Down Expand Up @@ -127,7 +126,6 @@ Available options:
CARDANO_NODE_SOCKET_PATH environment variable. The
argument is optional if CARDANO_NODE_SOCKET_PATH is
defined and mandatory otherwise.
--byron-era Specify the Byron era
--shelley-era Specify the Shelley era
--allegra-era Specify the Allegra era
--mary-era Specify the Mary era
Expand Down

0 comments on commit 7f89dcd

Please sign in to comment.