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

stake-address registration-certificate: do not allow key-reg-deposit-amt before conway #509

Merged
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
10 changes: 5 additions & 5 deletions cardano-cli/src/Cardano/CLI/EraBased/Options/StakeAddress.hs
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,18 @@ pStakeAddressRegistrationCertificateCmd :: ()
pStakeAddressRegistrationCertificateCmd era = do
forEraInEonMaybe era $ \sbe ->
caseShelleyToBabbageOrConwayEraOnwards
(\shelleyToBabbage -> subParser "registration-certificate"
(const $ subParser "registration-certificate"
$ Opt.info
( StakeAddressRegistrationCertificateCmd (shelleyToBabbageEraToShelleyBasedEra shelleyToBabbage)
( StakeAddressRegistrationCertificateCmd sbe
<$> pStakeIdentifier
<*> optional pKeyRegistDeposit
Copy link
Contributor

@Jimbo4350 Jimbo4350 Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not pure Nothing for Shelley to Babbage??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum yeah really smart, I hadn't thought of lifting over the value type rather than the Parser type 👍

Done the change.

<*> pure Nothing
<*> pOutputFile
)
desc
)
(\conwayOnwards -> subParser "registration-certificate"
(const $ subParser "registration-certificate"
$ Opt.info
( StakeAddressRegistrationCertificateCmd (conwayEraOnwardsToShelleyBasedEra conwayOnwards)
( StakeAddressRegistrationCertificateCmd sbe
<$> pStakeIdentifier
<*> fmap Just pKeyRegistDeposit
<*> pOutputFile
Expand Down
6 changes: 0 additions & 6 deletions cardano-cli/test/cardano-cli-golden/files/golden/help.cli
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,6 @@ Usage: cardano-cli shelley stake-address registration-certificate
| --stake-script-file FILE
| --stake-address ADDRESS
)
[--key-reg-deposit-amt NATURAL]
--out-file FILE

Create a stake address registration certificate
Expand Down Expand Up @@ -1831,7 +1830,6 @@ Usage: cardano-cli allegra stake-address registration-certificate
| --stake-script-file FILE
| --stake-address ADDRESS
)
[--key-reg-deposit-amt NATURAL]
--out-file FILE

Create a stake address registration certificate
Expand Down Expand Up @@ -2982,7 +2980,6 @@ Usage: cardano-cli mary stake-address registration-certificate
| --stake-script-file FILE
| --stake-address ADDRESS
)
[--key-reg-deposit-amt NATURAL]
--out-file FILE

Create a stake address registration certificate
Expand Down Expand Up @@ -4133,7 +4130,6 @@ Usage: cardano-cli alonzo stake-address registration-certificate
| --stake-script-file FILE
| --stake-address ADDRESS
)
[--key-reg-deposit-amt NATURAL]
--out-file FILE

Create a stake address registration certificate
Expand Down Expand Up @@ -5316,7 +5312,6 @@ Usage: cardano-cli babbage stake-address registration-certificate
| --stake-script-file FILE
| --stake-address ADDRESS
)
[--key-reg-deposit-amt NATURAL]
--out-file FILE

Create a stake address registration certificate
Expand Down Expand Up @@ -8001,7 +7996,6 @@ Usage: cardano-cli latest stake-address registration-certificate
| --stake-script-file FILE
| --stake-address ADDRESS
)
[--key-reg-deposit-amt NATURAL]
--out-file FILE

Create a stake address registration certificate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Usage: cardano-cli allegra stake-address registration-certificate
| --stake-script-file FILE
| --stake-address ADDRESS
)
[--key-reg-deposit-amt NATURAL]
--out-file FILE

Create a stake address registration certificate
Expand All @@ -16,7 +15,5 @@ Available options:
Filepath of the staking verification key.
--stake-script-file FILE Filepath of the staking script.
--stake-address ADDRESS Target stake address (bech32 format).
--key-reg-deposit-amt NATURAL
Key registration deposit amount.
--out-file FILE The output file.
-h,--help Show this help text
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Usage: cardano-cli alonzo stake-address registration-certificate
| --stake-script-file FILE
| --stake-address ADDRESS
)
[--key-reg-deposit-amt NATURAL]
--out-file FILE

Create a stake address registration certificate
Expand All @@ -16,7 +15,5 @@ Available options:
Filepath of the staking verification key.
--stake-script-file FILE Filepath of the staking script.
--stake-address ADDRESS Target stake address (bech32 format).
--key-reg-deposit-amt NATURAL
Key registration deposit amount.
--out-file FILE The output file.
-h,--help Show this help text
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Usage: cardano-cli babbage stake-address registration-certificate
| --stake-script-file FILE
| --stake-address ADDRESS
)
[--key-reg-deposit-amt NATURAL]
--out-file FILE

Create a stake address registration certificate
Expand All @@ -16,7 +15,5 @@ Available options:
Filepath of the staking verification key.
--stake-script-file FILE Filepath of the staking script.
--stake-address ADDRESS Target stake address (bech32 format).
--key-reg-deposit-amt NATURAL
Key registration deposit amount.
--out-file FILE The output file.
-h,--help Show this help text
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Usage: cardano-cli latest stake-address registration-certificate
| --stake-script-file FILE
| --stake-address ADDRESS
)
[--key-reg-deposit-amt NATURAL]
--out-file FILE

Create a stake address registration certificate
Expand All @@ -16,7 +15,5 @@ Available options:
Filepath of the staking verification key.
--stake-script-file FILE Filepath of the staking script.
--stake-address ADDRESS Target stake address (bech32 format).
--key-reg-deposit-amt NATURAL
Key registration deposit amount.
--out-file FILE The output file.
-h,--help Show this help text
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Usage: cardano-cli mary stake-address registration-certificate
| --stake-script-file FILE
| --stake-address ADDRESS
)
[--key-reg-deposit-amt NATURAL]
--out-file FILE

Create a stake address registration certificate
Expand All @@ -16,7 +15,5 @@ Available options:
Filepath of the staking verification key.
--stake-script-file FILE Filepath of the staking script.
--stake-address ADDRESS Target stake address (bech32 format).
--key-reg-deposit-amt NATURAL
Key registration deposit amount.
--out-file FILE The output file.
-h,--help Show this help text
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Usage: cardano-cli shelley stake-address registration-certificate
| --stake-script-file FILE
| --stake-address ADDRESS
)
[--key-reg-deposit-amt NATURAL]
--out-file FILE

Create a stake address registration certificate
Expand All @@ -16,7 +15,5 @@ Available options:
Filepath of the staking verification key.
--stake-script-file FILE Filepath of the staking script.
--stake-address ADDRESS Target stake address (bech32 format).
--key-reg-deposit-amt NATURAL
Key registration deposit amount.
--out-file FILE The output file.
-h,--help Show this help text