Skip to content

Commit

Permalink
Merge pull request #470 from input-output-hk/smelc/prefix-stake-verif…
Browse files Browse the repository at this point in the history
…ication-key-flags-with-deposit-return

governance action: prefix stake-verification-key/stake-key arguments with --deposit-return
  • Loading branch information
smelc authored Nov 22, 2023
2 parents 4c67eb5 + 29f1c6a commit 49b74c9
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pGovernanceActionNewInfoCmd era = do
Cmd.GovernanceActionInfoCmdArgs eon
<$> pNetwork
<*> pGovActionDeposit
<*> pStakeVerificationKeyOrHashOrFile Nothing
<*> pStakeVerificationKeyOrHashOrFile (Just "deposit-return")
<*> pAnchorUrl
<*> pAnchorDataHash
<*> pFileOutDirection "out-file" "Path to action file to be used later on with build or build-raw "
Expand All @@ -88,7 +88,7 @@ pGovernanceActionNewConstitutionCmd era = do
Cmd.GovernanceActionCreateConstitutionCmdArgs eon
<$> pNetwork
<*> pGovActionDeposit
<*> pStakeVerificationKeyOrHashOrFile Nothing
<*> pStakeVerificationKeyOrHashOrFile (Just "deposit-return")
<*> pPreviousGovernanceAction
<*> pAnchorUrl
<*> pAnchorDataHash
Expand Down Expand Up @@ -118,7 +118,7 @@ pUpdateCommitteeCmd eon =
Cmd.GoveranceActionUpdateCommitteeCmdArgs eon
<$> pNetwork
<*> pGovActionDeposit
<*> pStakeVerificationKeyOrHashOrFile Nothing
<*> pStakeVerificationKeyOrHashOrFile (Just "deposit-return")
<*> pAnchorUrl
<*> pAnchorDataHash
<*> many pRemoveCommitteeColdVerificationKeyOrHashOrFile
Expand All @@ -143,7 +143,7 @@ pGovernanceActionNoConfidenceCmd era = do
Cmd.GovernanceActionCreateNoConfidenceCmdArgs eon
<$> pNetwork
<*> pGovActionDeposit
<*> pStakeVerificationKeyOrHashOrFile Nothing
<*> pStakeVerificationKeyOrHashOrFile (Just "deposit-return")
<*> pAnchorUrl
<*> pAnchorDataHash
<*> pTxId "governance-action-tx-id" "Previous txid of `NoConfidence` or `NewCommittee` governance action."
Expand All @@ -163,7 +163,7 @@ pUpdateProtocolParametersPostConway conwayOnwards =
Cmd.UpdateProtocolParametersConwayOnwards conwayOnwards
<$> pNetwork
<*> pGovActionDeposit
<*> pStakeVerificationKeyOrHashOrFile Nothing
<*> pStakeVerificationKeyOrHashOrFile (Just "deposit-return")
<*> pAnchorUrl
<*> pAnchorDataHash
<*> pPreviousGovernanceAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import qualified Test.Cardano.CLI.Util as H
import Test.Cardano.CLI.Util

import Hedgehog (Property)
import qualified Hedgehog.Extras.Test.Base as H
import qualified Hedgehog.Extras.Test.Golden as H
import qualified Hedgehog.Extras as H
import qualified Hedgehog.Extras.Test.Golden as H

hprop_golden_governance_action_create_constitution :: Property
hprop_golden_governance_action_create_constitution =
Expand Down Expand Up @@ -41,7 +40,7 @@ hprop_golden_governance_action_create_constitution =
, "--anchor-data-hash", "c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745"
, "--anchor-url", proposalHash
, "--governance-action-deposit", "10"
, "--stake-verification-key-file", stakeAddressVKeyFile
, "--deposit-return-stake-verification-key-file", stakeAddressVKeyFile
, "--out-file", actionFile
, "--constitution-url", "constitution-dummy-url"
, "--constitution-hash", constitutionHash
Expand Down Expand Up @@ -82,7 +81,7 @@ hprop_golden_conway_governance_action_view_constitution_json =
, "--anchor-data-hash", proposalHash
, "--anchor-url", "proposal-dummy-url"
, "--governance-action-deposit", "10"
, "--stake-verification-key-file", stakeAddressVKeyFile
, "--deposit-return-stake-verification-key-file", stakeAddressVKeyFile
, "--out-file", actionFile
, "--constitution-url", "http://my-great-constitution.rocks"
, "--constitution-hash", constitutionHash
Expand All @@ -106,7 +105,7 @@ hprop_golden_conway_governance_action_view_update_committee_yaml =
[ "conway", "governance", "action", "update-committee"
, "--mainnet"
, "--governance-action-deposit", "10"
, "--stake-verification-key-file", stakeAddressVKeyFile
, "--deposit-return-stake-verification-key-file", stakeAddressVKeyFile
, "--anchor-url", "proposal-dummy-url"
, "--anchor-data-hash", "c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745"
, "--quorum", "0.61"
Expand All @@ -132,7 +131,7 @@ hprop_golden_conway_governance_action_view_create_info_json_outfile =
[ "conway", "governance", "action", "create-info"
, "--testnet"
, "--governance-action-deposit", "10"
, "--stake-verification-key-file", stakeAddressVKeyFile
, "--deposit-return-stake-verification-key-file", stakeAddressVKeyFile
, "--anchor-url", "proposal-dummy-url"
, "--anchor-data-hash", "c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745"
, "--out-file", actionFile
Expand All @@ -158,7 +157,7 @@ hprop_golden_governanceActionCreateNoConfidence =
[ "conway", "governance", "action", "create-no-confidence"
, "--mainnet"
, "--governance-action-deposit", "10"
, "--stake-verification-key-file", stakeAddressVKeyFile
, "--deposit-return-stake-verification-key-file", stakeAddressVKeyFile
, "--anchor-url", "proposal-dummy-url"
, "--anchor-data-hash", "c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745"
, "--governance-action-index", "5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ hprop_golden_governanceUpdateCommittee =
void $ execCardanoCLI
[ "conway", "governance", "action", "update-committee"
, "--testnet", "--governance-action-deposit", "0"
, "--stake-verification-key-file", stakeVkey
, "--deposit-return-stake-verification-key-file", stakeVkey
, "--anchor-url", "http://dummy"
, "--anchor-data-hash", proposalHash
, "--add-cc-cold-verification-key-file", coldCCVkey1
Expand Down
30 changes: 15 additions & 15 deletions cardano-cli/test/cardano-cli-golden/files/golden/help.cli
Original file line number Diff line number Diff line change
Expand Up @@ -5915,9 +5915,9 @@ Usage: cardano-cli conway governance action create-constitution
| --testnet
)
--governance-action-deposit NATURAL
( --stake-verification-key STRING
| --stake-verification-key-file FILE
| --stake-key-hash HASH
( --deposit-return-stake-verification-key STRING
| --deposit-return-stake-verification-key-file FILE
| --deposit-return-stake-key-hash HASH
)
[--governance-action-tx-id TXID
--governance-action-index WORD32]
Expand All @@ -5934,9 +5934,9 @@ Usage: cardano-cli conway governance action update-committee
| --testnet
)
--governance-action-deposit NATURAL
( --stake-verification-key STRING
| --stake-verification-key-file FILE
| --stake-key-hash HASH
( --deposit-return-stake-verification-key STRING
| --deposit-return-stake-verification-key-file FILE
| --deposit-return-stake-key-hash HASH
)
--anchor-url TEXT
--anchor-data-hash HASH
Expand All @@ -5959,9 +5959,9 @@ Usage: cardano-cli conway governance action update-committee

Usage: cardano-cli conway governance action create-info (--mainnet | --testnet)
--governance-action-deposit NATURAL
( --stake-verification-key STRING
| --stake-verification-key-file FILE
| --stake-key-hash HASH
( --deposit-return-stake-verification-key STRING
| --deposit-return-stake-verification-key-file FILE
| --deposit-return-stake-key-hash HASH
)
--anchor-url TEXT
--anchor-data-hash HASH
Expand All @@ -5974,9 +5974,9 @@ Usage: cardano-cli conway governance action create-no-confidence
| --testnet
)
--governance-action-deposit NATURAL
( --stake-verification-key STRING
| --stake-verification-key-file FILE
| --stake-key-hash HASH
( --deposit-return-stake-verification-key STRING
| --deposit-return-stake-verification-key-file FILE
| --deposit-return-stake-key-hash HASH
)
--anchor-url TEXT
--anchor-data-hash HASH
Expand All @@ -5991,9 +5991,9 @@ Usage: cardano-cli conway governance action create-protocol-parameters-update
| --testnet
)
--governance-action-deposit NATURAL
( --stake-verification-key STRING
| --stake-verification-key-file FILE
| --stake-key-hash HASH
( --deposit-return-stake-verification-key STRING
| --deposit-return-stake-verification-key-file FILE
| --deposit-return-stake-key-hash HASH
)
--anchor-url TEXT
--anchor-data-hash HASH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Usage: cardano-cli conway governance action create-constitution
| --testnet
)
--governance-action-deposit NATURAL
( --stake-verification-key STRING
| --stake-verification-key-file FILE
| --stake-key-hash HASH
( --deposit-return-stake-verification-key STRING
| --deposit-return-stake-verification-key-file FILE
| --deposit-return-stake-key-hash HASH
)
[--governance-action-tx-id TXID
--governance-action-index WORD32]
Expand All @@ -22,11 +22,12 @@ Available options:
--testnet Use the testnet magic id.
--governance-action-deposit NATURAL
Deposit required to submit a governance action.
--stake-verification-key STRING
--deposit-return-stake-verification-key STRING
Stake verification key (Bech32 or hex-encoded).
--stake-verification-key-file FILE
--deposit-return-stake-verification-key-file FILE
Filepath of the staking verification key.
--stake-key-hash HASH Stake verification key hash (hex-encoded).
--deposit-return-stake-key-hash HASH
Stake verification key hash (hex-encoded).
--governance-action-tx-id TXID
Previous txid of the governance action.
--governance-action-index WORD32
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Usage: cardano-cli conway governance action create-info (--mainnet | --testnet)
--governance-action-deposit NATURAL
( --stake-verification-key STRING
| --stake-verification-key-file FILE
| --stake-key-hash HASH
( --deposit-return-stake-verification-key STRING
| --deposit-return-stake-verification-key-file FILE
| --deposit-return-stake-key-hash HASH
)
--anchor-url TEXT
--anchor-data-hash HASH
Expand All @@ -15,11 +15,12 @@ Available options:
--testnet Use the testnet magic id.
--governance-action-deposit NATURAL
Deposit required to submit a governance action.
--stake-verification-key STRING
--deposit-return-stake-verification-key STRING
Stake verification key (Bech32 or hex-encoded).
--stake-verification-key-file FILE
--deposit-return-stake-verification-key-file FILE
Filepath of the staking verification key.
--stake-key-hash HASH Stake verification key hash (hex-encoded).
--deposit-return-stake-key-hash HASH
Stake verification key hash (hex-encoded).
--anchor-url TEXT Anchor URL
--anchor-data-hash HASH Proposal anchor data hash (obtain it with
"cardano-cli conway governance hash ...")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Usage: cardano-cli conway governance action create-no-confidence
| --testnet
)
--governance-action-deposit NATURAL
( --stake-verification-key STRING
| --stake-verification-key-file FILE
| --stake-key-hash HASH
( --deposit-return-stake-verification-key STRING
| --deposit-return-stake-verification-key-file FILE
| --deposit-return-stake-key-hash HASH
)
--anchor-url TEXT
--anchor-data-hash HASH
Expand All @@ -20,11 +20,12 @@ Available options:
--testnet Use the testnet magic id.
--governance-action-deposit NATURAL
Deposit required to submit a governance action.
--stake-verification-key STRING
--deposit-return-stake-verification-key STRING
Stake verification key (Bech32 or hex-encoded).
--stake-verification-key-file FILE
--deposit-return-stake-verification-key-file FILE
Filepath of the staking verification key.
--stake-key-hash HASH Stake verification key hash (hex-encoded).
--deposit-return-stake-key-hash HASH
Stake verification key hash (hex-encoded).
--anchor-url TEXT Anchor URL
--anchor-data-hash HASH Proposal anchor data hash (obtain it with
"cardano-cli conway governance hash ...")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Usage: cardano-cli conway governance action create-protocol-parameters-update
| --testnet
)
--governance-action-deposit NATURAL
( --stake-verification-key STRING
| --stake-verification-key-file FILE
| --stake-key-hash HASH
( --deposit-return-stake-verification-key STRING
| --deposit-return-stake-verification-key-file FILE
| --deposit-return-stake-key-hash HASH
)
--anchor-url TEXT
--anchor-data-hash HASH
Expand Down Expand Up @@ -61,11 +61,12 @@ Available options:
--testnet Use the testnet magic id.
--governance-action-deposit NATURAL
Deposit required to submit a governance action.
--stake-verification-key STRING
--deposit-return-stake-verification-key STRING
Stake verification key (Bech32 or hex-encoded).
--stake-verification-key-file FILE
--deposit-return-stake-verification-key-file FILE
Filepath of the staking verification key.
--stake-key-hash HASH Stake verification key hash (hex-encoded).
--deposit-return-stake-key-hash HASH
Stake verification key hash (hex-encoded).
--anchor-url TEXT Anchor URL
--anchor-data-hash HASH Proposal anchor data hash (obtain it with
"cardano-cli conway governance hash ...")
Expand Down
Loading

0 comments on commit 49b74c9

Please sign in to comment.