Skip to content

Commit

Permalink
Remove vote_submit and action_submit commands
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed May 25, 2023
1 parent 8ab9863 commit 2b91133
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 90 deletions.
36 changes: 3 additions & 33 deletions cardano-cli/src/Cardano/CLI/Shelley/Parsers.hs
Expand Up @@ -1160,18 +1160,15 @@ pQueryCmd envCli =
<*> pOperationalCertificateFile
<*> pMaybeOutputFile

pGovernanceVoteCmd :: EnvCli -> Parser GovernanceVoteCmd
pGovernanceVoteCmd envCli =
pGovernanceVoteCmd :: Parser GovernanceVoteCmd
pGovernanceVoteCmd =
asum
[ subParser "create"
$ Opt.info pVoteCreate
$ Opt.progDesc "Create a vote"
, subParser "view"
$ Opt.info pVoteView
$ Opt.progDesc "View a vote"
, subParser "submit"
$ Opt.info pVoteSubmit
$ Opt.progDesc "Submit a vote"
]
where
pVoteCreate :: Parser GovernanceVoteCmd
Expand All @@ -1187,13 +1184,6 @@ pGovernanceVoteCmd envCli =
GovernanceVoteView
<$> pVoteFileIn

pVoteSubmit :: Parser GovernanceVoteCmd
pVoteSubmit =
GovernanceVoteSubmit
<$> pSocketPath envCli
<*> pNetworkId envCli
<*> pVoteFileIn

pVote :: Parser Vote
pVote =
asum
Expand Down Expand Up @@ -1259,9 +1249,6 @@ pGovernanceActionCmd envCli =
, subParser "query"
$ Opt.info pActionQuery
$ Opt.progDesc "Query an on-chain action"
, subParser "submit"
$ Opt.info pActionSubmit
$ Opt.progDesc "Submit an action"
]
where
pActionCreateNoConfidenceMotion :: Parser GovernanceActionCmd
Expand Down Expand Up @@ -1354,14 +1341,6 @@ pGovernanceActionCmd envCli =
<*> pGovernanceActionId
<*> optional pGovernanceActionQueryResultOut

pActionSubmit :: Parser GovernanceActionCmd
pActionSubmit =
GovernanceActionSubmit
<$> pSocketPath envCli
<*> pNetworkId envCli
<*> pActionFileIn
<*> optional pGovernanceActionReceiptOut

pGovernanceActionId :: Parser GovernanceActionId
pGovernanceActionId =
fmap (const GovernanceActionId) $
Expand All @@ -1371,15 +1350,6 @@ pGovernanceActionCmd envCli =
, Opt.help "The governance action id."
]

pGovernanceActionReceiptOut :: Parser (File GovernanceActionReceipt Out)
pGovernanceActionReceiptOut =
fmap File $ Opt.strOption $ mconcat
[ Opt.long "out-file"
, Opt.metavar "FILE"
, Opt.help "Output filepath of the governance action receipt."
, Opt.completer (Opt.bashCompleter "file")
]

pGovernanceActionQueryResultOut :: Parser (File GovernanceActionQueryResult Out)
pGovernanceActionQueryResultOut =
fmap File $ Opt.strOption $ mconcat
Expand Down Expand Up @@ -1473,7 +1443,7 @@ pGovernanceCmd envCli =
pActionCmd = GovernanceActionCmd <$> pGovernanceActionCmd envCli

pVoteCmd :: Parser GovernanceCmd
pVoteCmd = GovernanceVoteCmd <$> pGovernanceVoteCmd envCli
pVoteCmd = GovernanceVoteCmd <$> pGovernanceVoteCmd

pUpdateProposal :: Parser GovernanceCmd
pUpdateProposal = GovernanceUpdateProposal
Expand Down
16 changes: 1 addition & 15 deletions cardano-cli/test/cardano-cli-golden/files/golden/help.cli
Expand Up @@ -81,7 +81,6 @@ Usage: cardano-cli governance action
| create-info
| view
| query
| submit
)

Commands related to governance actions
Expand Down Expand Up @@ -186,14 +185,7 @@ Usage: cardano-cli governance action query --socket-path SOCKET_PATH

Query an on-chain action

Usage: cardano-cli governance action submit --socket-path SOCKET_PATH
(--mainnet | --testnet-magic NATURAL)
--action-file FILE
[--out-file FILE]

Submit an action

Usage: cardano-cli governance vote (create | view | submit)
Usage: cardano-cli governance vote (create | view)

Commands related to governance votes

Expand All @@ -208,12 +200,6 @@ Usage: cardano-cli governance vote view --vote-file FILE

View a vote

Usage: cardano-cli governance vote submit --socket-path SOCKET_PATH
(--mainnet | --testnet-magic NATURAL)
--vote-file FILE

Submit a vote

Usage: cardano-cli governance create-update-proposal --out-file FILE
--epoch EPOCH
(--genesis-verification-key-file FILE)
Expand Down
Expand Up @@ -8,7 +8,6 @@ Usage: cardano-cli governance action
| create-info
| view
| query
| submit
)

Commands related to governance actions
Expand All @@ -31,4 +30,3 @@ Available commands:
create-info Create an info action
view View an action
query Query an on-chain action
submit Submit an action

This file was deleted.

@@ -1,4 +1,4 @@
Usage: cardano-cli governance vote (create | view | submit)
Usage: cardano-cli governance vote (create | view)

Commands related to governance votes

Expand All @@ -8,4 +8,3 @@ Available options:
Available commands:
create Create a vote
view View a vote
submit Submit a vote

This file was deleted.

0 comments on commit 2b91133

Please sign in to comment.