Skip to content

Commit 761e011

Browse files
committed
Remove legacy governance command group
1 parent a904df9 commit 761e011

File tree

4 files changed

+6
-211
lines changed

4 files changed

+6
-211
lines changed

cardano-cli/src/Cardano/CLI/Legacy/Option.hs

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import Cardano.CLI.Environment
2626
import Cardano.CLI.EraBased.Common.Option
2727
import Cardano.CLI.Legacy.Command
2828
import Cardano.CLI.Legacy.Genesis.Command
29-
import Cardano.CLI.Legacy.Governance.Command
3029
import Cardano.CLI.Parser
3130
import Cardano.CLI.Type.Common
3231
import Cardano.Ledger.BaseTypes (NonZero, knownNonZeroBounded)
@@ -52,86 +51,8 @@ parseLegacyCmds envCli =
5251
, Opt.command "genesis" $
5352
Opt.info (LegacyGenesisCmds <$> pGenesisCmds envCli) $
5453
Opt.progDesc "Genesis block commands"
55-
, Opt.command "governance" $
56-
Opt.info (LegacyGovernanceCmds <$> pGovernanceCmds envCli) $
57-
Opt.progDesc "Governance commands"
5854
]
5955

60-
pGovernanceCmds :: EnvCli -> Parser LegacyGovernanceCmds
61-
pGovernanceCmds envCli =
62-
asum
63-
[ Opt.hsubparser $
64-
commandWithMetavar "create-mir-certificate" $
65-
Opt.info (pLegacyMIRPayStakeAddresses <|> mirCertParsers) $
66-
Opt.progDesc "Create an MIR (Move Instantaneous Rewards) certificate"
67-
, Opt.hsubparser $
68-
commandWithMetavar "create-genesis-key-delegation-certificate" $
69-
Opt.info pGovernanceGenesisKeyDelegationCertificate $
70-
Opt.progDesc "Create a genesis key delegation certificate"
71-
, Opt.hsubparser $
72-
commandWithMetavar "create-update-proposal" $
73-
Opt.info pUpdateProposal $
74-
Opt.progDesc "Create an update proposal"
75-
]
76-
where
77-
mirCertParsers :: Parser LegacyGovernanceCmds
78-
mirCertParsers =
79-
asum
80-
[ Opt.hsubparser $
81-
commandWithMetavar "stake-addresses" $
82-
Opt.info pLegacyMIRPayStakeAddresses $
83-
Opt.progDesc "Create an MIR certificate to pay stake addresses"
84-
, Opt.hsubparser $
85-
commandWithMetavar "transfer-to-treasury" $
86-
Opt.info pLegacyMIRTransferToTreasury $
87-
Opt.progDesc "Create an MIR certificate to transfer from the reserves pot to the treasury pot"
88-
, Opt.hsubparser $
89-
commandWithMetavar "transfer-to-rewards" $
90-
Opt.info pLegacyMIRTransferToReserves $
91-
Opt.progDesc "Create an MIR certificate to transfer from the treasury pot to the reserves pot"
92-
]
93-
94-
pLegacyMIRPayStakeAddresses :: Parser LegacyGovernanceCmds
95-
pLegacyMIRPayStakeAddresses =
96-
GovernanceCreateMirCertificateStakeAddressesCmd
97-
<$> pAnyShelleyToBabbageEra envCli
98-
<*> pMIRPot
99-
<*> some (pStakeAddress Nothing)
100-
<*> some pRewardAmt
101-
<*> pOutputFile
102-
103-
pLegacyMIRTransferToTreasury :: Parser LegacyGovernanceCmds
104-
pLegacyMIRTransferToTreasury =
105-
GovernanceCreateMirCertificateTransferToTreasuryCmd
106-
<$> pAnyShelleyToBabbageEra envCli
107-
<*> pTransferAmt
108-
<*> pOutputFile
109-
110-
pLegacyMIRTransferToReserves :: Parser LegacyGovernanceCmds
111-
pLegacyMIRTransferToReserves =
112-
GovernanceCreateMirCertificateTransferToReservesCmd
113-
<$> pAnyShelleyToBabbageEra envCli
114-
<*> pTransferAmt
115-
<*> pOutputFile
116-
117-
pGovernanceGenesisKeyDelegationCertificate :: Parser LegacyGovernanceCmds
118-
pGovernanceGenesisKeyDelegationCertificate =
119-
GovernanceGenesisKeyDelegationCertificate
120-
<$> pAnyShelleyToBabbageEra envCli
121-
<*> pGenesisVerificationKeyOrHashOrFile
122-
<*> pGenesisDelegateVerificationKeyOrHashOrFile
123-
<*> pVrfVerificationKeyOrHashOrFile
124-
<*> pOutputFile
125-
126-
pUpdateProposal :: Parser LegacyGovernanceCmds
127-
pUpdateProposal =
128-
GovernanceUpdateProposal
129-
<$> pOutputFile
130-
<*> pEpochNoUpdateProp
131-
<*> some pGenesisVerificationKeyFile
132-
<*> pProtocolParametersUpdate
133-
<*> optional pCostModels
134-
13556
pGenesisCmds :: EnvCli -> Parser LegacyGenesisCmds
13657
pGenesisCmds envCli =
13758
asum

cardano-cli/test/cardano-cli-golden/Test/Golden/Shelley/TextEnvelope/Certificates/GenesisKeyDelegation.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ hprop_golden_shelleyGenesisKeyDelegationCertificate =
9393
-- Create genesis key delegation certificate
9494
void $
9595
execCardanoCLI
96-
[ "legacy"
96+
[ "compatible"
97+
, "babbage"
9798
, "governance"
9899
, "create-genesis-key-delegation-certificate"
99-
, "--babbage-era"
100100
, "--genesis-verification-key-file"
101101
, genesisVerKeyFilePath
102102
, "--genesis-delegate-verification-key-file"

cardano-cli/test/cardano-cli-golden/files/golden/help.cli

Lines changed: 0 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -524,134 +524,6 @@ Usage: cardano-cli legacy Legacy commands
524524

525525
Legacy commands
526526

527-
Usage: cardano-cli legacy governance
528-
( create-mir-certificate
529-
| create-genesis-key-delegation-certificate
530-
| create-update-proposal
531-
)
532-
533-
Governance commands
534-
535-
Usage: cardano-cli legacy governance create-mir-certificate
536-
( [ --shelley-era
537-
| --allegra-era
538-
| --mary-era
539-
| --alonzo-era
540-
| --babbage-era
541-
]
542-
( --reserves
543-
| --treasury
544-
)
545-
(--stake-address ADDRESS)
546-
(--reward LOVELACE)
547-
--out-file FILEPATH
548-
| stake-addresses
549-
| transfer-to-treasury
550-
| transfer-to-rewards
551-
)
552-
553-
Create an MIR (Move Instantaneous Rewards) certificate
554-
555-
Usage: cardano-cli legacy governance create-mir-certificate stake-addresses
556-
[ --shelley-era
557-
| --allegra-era
558-
| --mary-era
559-
| --alonzo-era
560-
| --babbage-era
561-
]
562-
( --reserves
563-
| --treasury
564-
)
565-
(--stake-address ADDRESS)
566-
(--reward LOVELACE)
567-
--out-file FILEPATH
568-
569-
Create an MIR certificate to pay stake addresses
570-
571-
Usage: cardano-cli legacy governance create-mir-certificate transfer-to-treasury
572-
[ --shelley-era
573-
| --allegra-era
574-
| --mary-era
575-
| --alonzo-era
576-
| --babbage-era
577-
]
578-
--transfer LOVELACE
579-
--out-file FILEPATH
580-
581-
Create an MIR certificate to transfer from the reserves pot to the treasury
582-
pot
583-
584-
Usage: cardano-cli legacy governance create-mir-certificate transfer-to-rewards
585-
[ --shelley-era
586-
| --allegra-era
587-
| --mary-era
588-
| --alonzo-era
589-
| --babbage-era
590-
]
591-
--transfer LOVELACE
592-
--out-file FILEPATH
593-
594-
Create an MIR certificate to transfer from the treasury pot to the reserves
595-
pot
596-
597-
Usage: cardano-cli legacy governance create-genesis-key-delegation-certificate
598-
[ --shelley-era
599-
| --allegra-era
600-
| --mary-era
601-
| --alonzo-era
602-
| --babbage-era
603-
]
604-
( --genesis-verification-key STRING
605-
| --genesis-verification-key-file FILEPATH
606-
| --genesis-verification-key-hash STRING
607-
)
608-
( --genesis-delegate-verification-key STRING
609-
| --genesis-delegate-verification-key-file FILEPATH
610-
| --genesis-delegate-verification-key-hash STRING
611-
)
612-
( --vrf-verification-key STRING
613-
| --vrf-verification-key-file FILEPATH
614-
| --vrf-verification-key-hash STRING
615-
)
616-
--out-file FILEPATH
617-
618-
Create a genesis key delegation certificate
619-
620-
Usage: cardano-cli legacy governance create-update-proposal --out-file FILEPATH
621-
--epoch NATURAL
622-
(--genesis-verification-key-file FILEPATH)
623-
[--protocol-major-version MAJOR
624-
--protocol-minor-version MINOR]
625-
[--decentralization-parameter RATIONAL]
626-
[ --extra-entropy HEX
627-
| --reset-extra-entropy
628-
]
629-
[--max-block-header-size WORD16]
630-
[--max-block-body-size WORD32]
631-
[--max-tx-size WORD32]
632-
[--min-fee-constant LOVELACE]
633-
[--min-fee-linear LOVELACE]
634-
[--min-utxo-value NATURAL]
635-
[--key-reg-deposit-amt NATURAL]
636-
[--pool-reg-deposit NATURAL]
637-
[--min-pool-cost NATURAL]
638-
[--pool-retirement-epoch-interval WORD32]
639-
[--number-of-pools WORD16]
640-
[--pool-influence RATIONAL]
641-
[--monetary-expansion RATIONAL]
642-
[--treasury-expansion RATIONAL]
643-
[--price-execution-steps RATIONAL
644-
--price-execution-memory RATIONAL]
645-
[--max-tx-execution-units (INT, INT)]
646-
[--max-block-execution-units (INT, INT)]
647-
[--max-value-size INT]
648-
[--collateral-percent INT]
649-
[--max-collateral-inputs INT]
650-
[--utxo-cost-per-byte LOVELACE]
651-
[--cost-model-file FILE]
652-
653-
Create an update proposal
654-
655527
Usage: cardano-cli legacy genesis
656528
( key-gen-genesis
657529
| key-gen-delegate

cardano-cli/test/cardano-cli-test/Test/Cli/Compatible/Transaction/Build.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,11 @@ hprop_compatible_shelley_create_update_proposal = propertyOnce $ H.moduleWorkspa
9494
-- reference transaction
9595
_ <-
9696
execCardanoCLI $
97-
[ "legacy"
97+
[ "compatible"
98+
, eraName
9899
, "governance"
99-
, "create-update-proposal"
100+
, "action"
101+
, "create-protocol-parameters-update"
100102
]
101103
<> args
102104
<> [ "--out-file"

0 commit comments

Comments
 (0)