Skip to content

Commit

Permalink
Rename Haskell functions to match new CLI flags names
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Nov 13, 2023
1 parent 469e790 commit e229bf4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
16 changes: 8 additions & 8 deletions cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3049,10 +3049,10 @@ pAlwaysAbstain =
pVoteAnchor :: Parser (VoteUrl, L.SafeHash Crypto.StandardCrypto L.AnchorData)
pVoteAnchor = (,)
<$> (VoteUrl <$> pUrl "anchor-url" "Vote anchor URL")
<*> pVoteHash
<*> pVoteAnchorDataHash

pVoteHash :: Parser (L.SafeHash Crypto.StandardCrypto L.AnchorData)
pVoteHash =
pVoteAnchorDataHash :: Parser (L.SafeHash Crypto.StandardCrypto L.AnchorData)
pVoteAnchorDataHash =
Opt.option readSafeHash $ mconcat
[ Opt.long "anchor-data-hash"
, Opt.metavar "HASH"
Expand Down Expand Up @@ -3169,8 +3169,8 @@ pDRepVerificationKeyFile =
, Opt.completer (Opt.bashCompleter "file")
]

pProposalUrl :: Parser ProposalUrl
pProposalUrl =
pAnchorUrl :: Parser ProposalUrl
pAnchorUrl =
ProposalUrl
<$> pUrl "anchor-url" "Anchor URL"

Expand All @@ -3188,11 +3188,11 @@ pProposalHashSource =
, ProposalHashSourceFile
<$> pFileInDirection "proposal-anchor-metadata-file" "Proposal anchor contents as a text file."
, ProposalHashSourceHash
<$> pProposalHash
<$> pAnchorDataHash
]

pProposalHash :: Parser (L.SafeHash Crypto.StandardCrypto L.AnchorData)
pProposalHash =
pAnchorDataHash :: Parser (L.SafeHash Crypto.StandardCrypto L.AnchorData)
pAnchorDataHash =
Opt.option readSafeHash $ mconcat
[ Opt.long "anchor-data-hash"
, Opt.metavar "HASH"
Expand Down
24 changes: 12 additions & 12 deletions cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ pGovernanceActionNewInfoCmd era = do
<$> pNetwork
<*> pGovActionDeposit
<*> pStakeVerificationKeyOrHashOrFile Nothing
<*> pProposalUrl
<*> pProposalHash
<*> pAnchorUrl
<*> pAnchorDataHash
<*> pFileOutDirection "out-file" "Path to action file to be used later on with build or build-raw "
)
$ Opt.progDesc "Create an info action."
Expand All @@ -90,8 +90,8 @@ pGovernanceActionNewConstitutionCmd era = do
<*> pGovActionDeposit
<*> pStakeVerificationKeyOrHashOrFile Nothing
<*> pPreviousGovernanceAction
<*> pProposalUrl
<*> pProposalHash
<*> pAnchorUrl
<*> pAnchorDataHash
<*> pConstitutionUrl
<*> pConstitutionHashSource
<*> pFileOutDirection "out-file" "Output filepath of the constitution."
Expand Down Expand Up @@ -119,8 +119,8 @@ pUpdateCommitteeCmd eon =
<$> pNetwork
<*> pGovActionDeposit
<*> pStakeVerificationKeyOrHashOrFile Nothing
<*> pProposalUrl
<*> pProposalHash
<*> pAnchorUrl
<*> pAnchorDataHash
<*> many pRemoveCommitteeColdVerificationKeyOrHashOrFile
<*> many
( (,)
Expand All @@ -144,8 +144,8 @@ pGovernanceActionNoConfidenceCmd era = do
<$> pNetwork
<*> pGovActionDeposit
<*> pStakeVerificationKeyOrHashOrFile Nothing
<*> pProposalUrl
<*> pProposalHash
<*> pAnchorUrl
<*> pAnchorDataHash
<*> pTxId "governance-action-tx-id" "Previous txid of `NoConfidence` or `NewCommittee` governance action."
<*> pWord32 "governance-action-index" "Previous tx's governance action index of `NoConfidence` or `NewCommittee` governance action."
<*> pFileOutDirection "out-file" "Output filepath of the no confidence proposal."
Expand All @@ -164,8 +164,8 @@ pUpdateProtocolParametersPostConway conwayOnwards =
<$> pNetwork
<*> pGovActionDeposit
<*> pStakeVerificationKeyOrHashOrFile Nothing
<*> pProposalUrl
<*> pProposalHash
<*> pAnchorUrl
<*> pAnchorDataHash
<*> pPreviousGovernanceAction


Expand Down Expand Up @@ -342,8 +342,8 @@ pGovernanceActionTreasuryWithdrawalCmd era = do
<$> pNetwork
<*> pGovActionDeposit
<*> pStakeVerificationKeyOrHashOrFile (Just "deposit-return")
<*> pProposalUrl
<*> pProposalHash
<*> pAnchorUrl
<*> pAnchorDataHash
<*> many ((,) <$> pStakeVerificationKeyOrHashOrFile (Just "funds-receiving") <*> pTransferAmt)
<*> pFileOutDirection "out-file" "Output filepath of the treasury withdrawal."
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Cardano.CLI.EraBased.Options.Governance.Committee
import Cardano.Api

import Cardano.CLI.EraBased.Commands.Governance.Committee
import Cardano.CLI.EraBased.Options.Common
import Cardano.CLI.EraBased.Options.Common hiding (pAnchorUrl)
import Cardano.CLI.Read
import qualified Cardano.Ledger.BaseTypes as L
import qualified Cardano.Ledger.Crypto as Crypto
Expand Down

0 comments on commit e229bf4

Please sign in to comment.