diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Commands/Governance/Actions.hs b/cardano-cli/src/Cardano/CLI/EraBased/Commands/Governance/Actions.hs index 93ef067130..4979e25576 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Commands/Governance/Actions.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Commands/Governance/Actions.hs @@ -1,10 +1,13 @@ {-# LANGUAGE DataKinds #-} +{-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} +{-# LANGUAGE StandaloneDeriving #-} module Cardano.CLI.EraBased.Commands.Governance.Actions ( AnyStakeIdentifier(..) , GovernanceActionCmds(..) , EraBasedNewConstitution(..) + , EraBasedTreasuryWithdrawal(..) , renderGovernanceActionCmds ) where @@ -22,9 +25,14 @@ data GovernanceActionCmds era EraBasedNewConstitution | GovernanceActionProtocolParametersUpdate (ShelleyBasedEra era) + EpochNo + [VerificationKeyFile In] (EraBasedProtocolParametersUpdate era) (File () Out) - deriving Show + | GovernanceActionTreasuryWithdrawal + (ConwayEraOnwards era) + EraBasedTreasuryWithdrawal + deriving Show data EraBasedNewConstitution = EraBasedNewConstitution @@ -34,6 +42,16 @@ data EraBasedNewConstitution , encFilePath :: File () Out } deriving Show +data EraBasedTreasuryWithdrawal where + EraBasedTreasuryWithdrawal + :: Lovelace -- ^ Deposit + -> AnyStakeIdentifier -- ^ Return address + -> [(AnyStakeIdentifier, Lovelace)] + -> File () Out + -> EraBasedTreasuryWithdrawal + +deriving instance Show EraBasedTreasuryWithdrawal + renderGovernanceActionCmds :: GovernanceActionCmds era -> Text renderGovernanceActionCmds = \case GovernanceActionCreateConstitution {} -> @@ -42,6 +60,8 @@ renderGovernanceActionCmds = \case GovernanceActionProtocolParametersUpdate {} -> "governance action create-protocol-parameters-update" + GovernanceActionTreasuryWithdrawal {} -> + "governance action create-treasury-withdrawal" data AnyStakeIdentifier = AnyStakeKey (VerificationKeyOrHashOrFile StakeKey) diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs b/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs index d932383054..fc2a9185df 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} @@ -11,6 +12,7 @@ import Cardano.Api.Shelley import Cardano.CLI.EraBased.Commands.Governance.Actions import Cardano.CLI.EraBased.Options.Common +import Cardano.CLI.Types.Common import Cardano.Ledger.BaseTypes (NonNegativeInterval) import qualified Cardano.Ledger.BaseTypes as Ledger @@ -31,6 +33,7 @@ pGovernanceActionCmds era = ) [ pGovernanceActionNewConstitution era , pGovernanceActionProtocolParametersUpdate era + , pGovernanceActionTreasuryWithdrawal era ] @@ -72,27 +75,39 @@ pGovernanceActionProtocolParametersUpdate era = case sbe of ShelleyBasedEraShelley -> GovernanceActionProtocolParametersUpdate sbe - <$> dpGovActionProtocolParametersUpdate ShelleyBasedEraShelley + <$> pEpochNoUpdateProp + <*> pProtocolParametersUpdateGenesisKeys sbe + <*> dpGovActionProtocolParametersUpdate ShelleyBasedEraShelley <*> pOutputFile ShelleyBasedEraAllegra -> GovernanceActionProtocolParametersUpdate sbe - <$> dpGovActionProtocolParametersUpdate ShelleyBasedEraAllegra + <$> pEpochNoUpdateProp + <*> pProtocolParametersUpdateGenesisKeys sbe + <*> dpGovActionProtocolParametersUpdate ShelleyBasedEraAllegra <*> pOutputFile ShelleyBasedEraMary -> GovernanceActionProtocolParametersUpdate sbe - <$> dpGovActionProtocolParametersUpdate ShelleyBasedEraMary + <$> pEpochNoUpdateProp + <*> pProtocolParametersUpdateGenesisKeys sbe + <*> dpGovActionProtocolParametersUpdate ShelleyBasedEraMary <*> pOutputFile ShelleyBasedEraAlonzo -> GovernanceActionProtocolParametersUpdate sbe - <$> dpGovActionProtocolParametersUpdate ShelleyBasedEraAlonzo + <$> pEpochNoUpdateProp + <*> pProtocolParametersUpdateGenesisKeys sbe + <*> dpGovActionProtocolParametersUpdate ShelleyBasedEraAlonzo <*> pOutputFile ShelleyBasedEraBabbage -> GovernanceActionProtocolParametersUpdate sbe - <$> dpGovActionProtocolParametersUpdate ShelleyBasedEraBabbage + <$> pEpochNoUpdateProp + <*> pProtocolParametersUpdateGenesisKeys sbe + <*> dpGovActionProtocolParametersUpdate ShelleyBasedEraBabbage <*> pOutputFile ShelleyBasedEraConway -> GovernanceActionProtocolParametersUpdate sbe - <$> dpGovActionProtocolParametersUpdate ShelleyBasedEraConway + <$> pEpochNoUpdateProp + <*> pProtocolParametersUpdateGenesisKeys sbe + <*> dpGovActionProtocolParametersUpdate ShelleyBasedEraConway <*> pOutputFile convertToLedger :: (a -> b) -> Parser (Maybe a) -> Parser (StrictMaybe b) @@ -174,7 +189,19 @@ pIntroducedInBabbagePParams = IntroducedInBabbagePParams <$> convertToLedger (CoinPerByte . toShelleyLovelace) (optional pUTxOCostPerByte) -dpGovActionProtocolParametersUpdate :: ShelleyBasedEra era -> Parser (EraBasedProtocolParametersUpdate era) +-- Not necessary in Conway era onwards +pProtocolParametersUpdateGenesisKeys :: ShelleyBasedEra era -> Parser [VerificationKeyFile In] +pProtocolParametersUpdateGenesisKeys sbe = + case sbe of + ShelleyBasedEraShelley -> many pGenesisVerificationKeyFile + ShelleyBasedEraAllegra -> many pGenesisVerificationKeyFile + ShelleyBasedEraMary -> many pGenesisVerificationKeyFile + ShelleyBasedEraAlonzo -> many pGenesisVerificationKeyFile + ShelleyBasedEraBabbage -> many pGenesisVerificationKeyFile + ShelleyBasedEraConway -> empty + +dpGovActionProtocolParametersUpdate + :: ShelleyBasedEra era -> Parser (EraBasedProtocolParametersUpdate era) dpGovActionProtocolParametersUpdate = \case ShelleyBasedEraShelley -> ShelleyEraBasedProtocolParametersUpdate @@ -207,3 +234,21 @@ dpGovActionProtocolParametersUpdate = \case <$> pCommonProtocolParameters <*> pAlonzoOnwardsPParams <*> pIntroducedInBabbagePParams + +pGovernanceActionTreasuryWithdrawal :: CardanoEra era -> Maybe (Parser (GovernanceActionCmds era)) +pGovernanceActionTreasuryWithdrawal = + featureInEra Nothing (\cOn -> Just $ + subParser "create-treasury-withdrawal" + $ Opt.info (pCmd cOn) + $ Opt.progDesc "Create a treasury withdrawal.") + where + pCmd :: ConwayEraOnwards era -> Parser (GovernanceActionCmds era) + pCmd cOn = + fmap (GovernanceActionTreasuryWithdrawal cOn) $ + EraBasedTreasuryWithdrawal + <$> pGovActionDeposit + <*> pAnyStakeIdentifier + <*> many ((,) <$> pAnyStakeIdentifier <*> pTransferAmt) + <*> pFileOutDirection "out-file" "Output filepath of the treasury withdrawal." + + diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs index b1dc19bc68..e92205c9ae 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs @@ -1,5 +1,6 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} +{-# LANGUAGE TupleSections #-} module Cardano.CLI.EraBased.Run.Governance.Actions ( runGovernanceActionCmds @@ -24,6 +25,7 @@ import Data.Text.Encoding.Error data GovernanceActionsError = GovernanceActionsCmdWriteFileError (FileError ()) | GovernanceActionsCmdReadFileError (FileError InputDecodeError) + | GovernanceActionsCmdReadTextEnvelopeFileError (FileError TextEnvelopeError) | GovernanceActionsCmdNonUtf8EncodedConstitution UnicodeException @@ -34,8 +36,11 @@ runGovernanceActionCmds = \case GovernanceActionCreateConstitution cOn newConstitution -> runGovernanceActionCreateConstitution cOn newConstitution - GovernanceActionProtocolParametersUpdate sbe eraBasedProtocolParametersUpdate ofp -> - runGovernanceActionCreateProtocolParametersUpdate sbe eraBasedProtocolParametersUpdate ofp + GovernanceActionProtocolParametersUpdate sbe eNo genKeys eraBasedProtocolParametersUpdate ofp -> + runGovernanceActionCreateProtocolParametersUpdate sbe eNo genKeys eraBasedProtocolParametersUpdate ofp + + GovernanceActionTreasuryWithdrawal cOn treasuryWithdrawal -> + runGovernanceActionTreasuryWithdrawal cOn treasuryWithdrawal runGovernanceActionCreateConstitution :: () => ConwayEraOnwards era @@ -43,16 +48,7 @@ runGovernanceActionCreateConstitution :: () -> ExceptT GovernanceActionsError IO () runGovernanceActionCreateConstitution cOn (EraBasedNewConstitution deposit anyStake constit outFp) = do - stakeKeyHash - <- case anyStake of - AnyStakeKey stake -> - firstExceptT GovernanceActionsCmdReadFileError - . newExceptT $ readVerificationKeyOrHashOrFile AsStakeKey stake - - AnyStakePoolKey stake -> do - StakePoolKeyHash t <- firstExceptT GovernanceActionsCmdReadFileError - . newExceptT $ readVerificationKeyOrHashOrFile AsStakePoolKey stake - return $ StakeKeyHash $ coerceKeyRole t + stakeKeyHash <- readStakeKeyHash anyStake case constit of ConstitutionFromFile fp -> do @@ -79,16 +75,66 @@ runGovernanceActionCreateConstitution cOn (EraBasedNewConstitution deposit anySt runGovernanceActionCreateProtocolParametersUpdate :: () => ShelleyBasedEra era + -> EpochNo + -> [VerificationKeyFile In] + -- ^ Genesis verification keys -> EraBasedProtocolParametersUpdate era -> File () Out -> ExceptT GovernanceActionsError IO () -runGovernanceActionCreateProtocolParametersUpdate sbe eraBasedPParams oFp = do +runGovernanceActionCreateProtocolParametersUpdate sbe expEpoch genesisVerKeys eraBasedPParams oFp = do + genVKeys <- sequence + [ firstExceptT GovernanceActionsCmdReadTextEnvelopeFileError . newExceptT + $ readFileTextEnvelope (AsVerificationKey AsGenesisKey) vkeyFile + | vkeyFile <- genesisVerKeys + ] + let updateProtocolParams = createEraBasedProtocolParamUpdate sbe eraBasedPParams apiUpdateProtocolParamsType = fromLedgerPParamsUpdate sbe updateProtocolParams + genKeyHashes = fmap verificationKeyHash genVKeys -- TODO: Update EraBasedProtocolParametersUpdate to require genesis delegate keys -- depending on the era - -- TODO: Require expiration epoch no - upProp = makeShelleyUpdateProposal apiUpdateProtocolParamsType [] (error "runGovernanceActionCreateProtocolParametersUpdate") + upProp = makeShelleyUpdateProposal apiUpdateProtocolParamsType genKeyHashes expEpoch firstExceptT GovernanceActionsCmdWriteFileError . newExceptT $ writeLazyByteStringFile oFp $ textEnvelopeToJSON Nothing upProp + +readStakeKeyHash :: AnyStakeIdentifier -> ExceptT GovernanceActionsError IO (Hash StakeKey) +readStakeKeyHash anyStake = + case anyStake of + AnyStakeKey stake -> + firstExceptT GovernanceActionsCmdReadFileError + . newExceptT $ readVerificationKeyOrHashOrFile AsStakeKey stake + + AnyStakePoolKey stake -> do + StakePoolKeyHash t <- firstExceptT GovernanceActionsCmdReadFileError + . newExceptT $ readVerificationKeyOrHashOrFile AsStakePoolKey stake + return $ StakeKeyHash $ coerceKeyRole t + +runGovernanceActionTreasuryWithdrawal + :: ConwayEraOnwards era + -> EraBasedTreasuryWithdrawal + -> ExceptT GovernanceActionsError IO () +runGovernanceActionTreasuryWithdrawal cOn (EraBasedTreasuryWithdrawal deposit returnAddr treasuryWithdrawal outFp) = do + returnKeyHash <- readStakeKeyHash returnAddr + withdrawals <- sequence [ (,ll) <$> stakeIdentifiertoCredential stakeIdentifier + | (stakeIdentifier,ll) <- treasuryWithdrawal + ] + let sbe = conwayEraOnwardsToShelleyBasedEra cOn + proposal = createProposalProcedure sbe deposit returnKeyHash (TreasuryWithdrawal withdrawals) + + firstExceptT GovernanceActionsCmdWriteFileError . newExceptT + $ conwayEraOnwardsConstraints cOn + $ writeFileTextEnvelope outFp Nothing proposal + +stakeIdentifiertoCredential :: AnyStakeIdentifier -> ExceptT GovernanceActionsError IO StakeCredential +stakeIdentifiertoCredential anyStake = + case anyStake of + AnyStakeKey stake -> do + hash <- firstExceptT GovernanceActionsCmdReadFileError + . newExceptT $ readVerificationKeyOrHashOrFile AsStakeKey stake + return $ StakeCredentialByKey hash + AnyStakePoolKey stake -> do + StakePoolKeyHash t <- firstExceptT GovernanceActionsCmdReadFileError + . newExceptT $ readVerificationKeyOrHashOrFile AsStakePoolKey stake + -- TODO: Conway era - don't use coerceKeyRole + return . StakeCredentialByKey $ StakeKeyHash $ coerceKeyRole t diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help.cli index f29bae560a..c9f038bf9a 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help.cli @@ -118,7 +118,8 @@ Usage: cardano-cli shelley governance action create-protocol-parameters-update Governance action commands. -Usage: cardano-cli shelley governance action create-protocol-parameters-update +Usage: cardano-cli shelley governance action create-protocol-parameters-update --epoch EPOCH + [--genesis-verification-key-file FILE] [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -247,7 +248,8 @@ Usage: cardano-cli allegra governance action create-protocol-parameters-update Governance action commands. -Usage: cardano-cli allegra governance action create-protocol-parameters-update +Usage: cardano-cli allegra governance action create-protocol-parameters-update --epoch EPOCH + [--genesis-verification-key-file FILE] [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -376,7 +378,8 @@ Usage: cardano-cli mary governance action create-protocol-parameters-update Governance action commands. -Usage: cardano-cli mary governance action create-protocol-parameters-update +Usage: cardano-cli mary governance action create-protocol-parameters-update --epoch EPOCH + [--genesis-verification-key-file FILE] [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -505,7 +508,8 @@ Usage: cardano-cli alonzo governance action create-protocol-parameters-update Governance action commands. -Usage: cardano-cli alonzo governance action create-protocol-parameters-update +Usage: cardano-cli alonzo governance action create-protocol-parameters-update --epoch EPOCH + [--genesis-verification-key-file FILE] [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -641,7 +645,8 @@ Usage: cardano-cli babbage governance action create-protocol-parameters-update Governance action commands. -Usage: cardano-cli babbage governance action create-protocol-parameters-update +Usage: cardano-cli babbage governance action create-protocol-parameters-update --epoch EPOCH + [--genesis-verification-key-file FILE] [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -794,6 +799,7 @@ Usage: cardano-cli conway governance committee key-hash --verification-key-file Usage: cardano-cli conway governance action ( create-constitution | create-protocol-parameters-update + | create-treasury-withdrawal ) Governance action commands. @@ -813,7 +819,7 @@ Usage: cardano-cli conway governance action create-constitution --governance-act Create a constitution. -Usage: cardano-cli conway governance action create-protocol-parameters-update +Usage: cardano-cli conway governance action create-protocol-parameters-update --epoch EPOCH [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -841,6 +847,27 @@ Usage: cardano-cli conway governance action create-protocol-parameters-update Create a protocol parameters update. +Usage: cardano-cli conway governance action create-treasury-withdrawal --governance-action-deposit NATURAL + ( --stake-pool-verification-key STRING + | --cold-verification-key-file FILE + | --stake-pool-id STAKE_POOL_ID + | --stake-verification-key STRING + | --stake-verification-key-file FILE + | --stake-key-hash HASH + ) + [ + ( --stake-pool-verification-key STRING + | --cold-verification-key-file FILE + | --stake-pool-id STAKE_POOL_ID + | --stake-verification-key STRING + | --stake-verification-key-file FILE + | --stake-key-hash HASH + ) + --transfer LOVELACE] + --out-file FILE + + Create a treasury withdrawal. + Usage: cardano-cli conway governance drep key-gen Delegate Representative commands. @@ -954,7 +981,8 @@ Usage: cardano-cli latest governance action create-protocol-parameters-update Governance action commands. -Usage: cardano-cli latest governance action create-protocol-parameters-update +Usage: cardano-cli latest governance action create-protocol-parameters-update --epoch EPOCH + [--genesis-verification-key-file FILE] [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -1107,6 +1135,7 @@ Usage: cardano-cli experimental governance committee key-hash --verification-key Usage: cardano-cli experimental governance action ( create-constitution | create-protocol-parameters-update + | create-treasury-withdrawal ) Governance action commands. @@ -1126,7 +1155,7 @@ Usage: cardano-cli experimental governance action create-constitution --governan Create a constitution. -Usage: cardano-cli experimental governance action create-protocol-parameters-update +Usage: cardano-cli experimental governance action create-protocol-parameters-update --epoch EPOCH [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -1154,6 +1183,27 @@ Usage: cardano-cli experimental governance action create-protocol-parameters-upd Create a protocol parameters update. +Usage: cardano-cli experimental governance action create-treasury-withdrawal --governance-action-deposit NATURAL + ( --stake-pool-verification-key STRING + | --cold-verification-key-file FILE + | --stake-pool-id STAKE_POOL_ID + | --stake-verification-key STRING + | --stake-verification-key-file FILE + | --stake-key-hash HASH + ) + [ + ( --stake-pool-verification-key STRING + | --cold-verification-key-file FILE + | --stake-pool-id STAKE_POOL_ID + | --stake-verification-key STRING + | --stake-verification-key-file FILE + | --stake-key-hash HASH + ) + --transfer LOVELACE] + --out-file FILE + + Create a treasury withdrawal. + Usage: cardano-cli experimental governance drep key-gen Delegate Representative commands. diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_governance_action_create-protocol-parameters-update.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_governance_action_create-protocol-parameters-update.cli index 550bd8c5d1..962aad950f 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_governance_action_create-protocol-parameters-update.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_governance_action_create-protocol-parameters-update.cli @@ -1,4 +1,5 @@ -Usage: cardano-cli allegra governance action create-protocol-parameters-update +Usage: cardano-cli allegra governance action create-protocol-parameters-update --epoch EPOCH + [--genesis-verification-key-file FILE] [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -24,6 +25,10 @@ Usage: cardano-cli allegra governance action create-protocol-parameters-update Create a protocol parameters update. Available options: + --epoch EPOCH The epoch number in which the update proposal is + valid. + --genesis-verification-key-file FILE + Filepath of the genesis verification key. --min-fee-constant LOVELACE The constant factor for the minimum fee calculation. --min-fee-linear LOVELACE diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_governance_action_create-protocol-parameters-update.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_governance_action_create-protocol-parameters-update.cli index 20487c1e64..9b68525f58 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_governance_action_create-protocol-parameters-update.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_governance_action_create-protocol-parameters-update.cli @@ -1,4 +1,5 @@ -Usage: cardano-cli alonzo governance action create-protocol-parameters-update +Usage: cardano-cli alonzo governance action create-protocol-parameters-update --epoch EPOCH + [--genesis-verification-key-file FILE] [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -31,6 +32,10 @@ Usage: cardano-cli alonzo governance action create-protocol-parameters-update Create a protocol parameters update. Available options: + --epoch EPOCH The epoch number in which the update proposal is + valid. + --genesis-verification-key-file FILE + Filepath of the genesis verification key. --min-fee-constant LOVELACE The constant factor for the minimum fee calculation. --min-fee-linear LOVELACE diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_governance_action_create-protocol-parameters-update.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_governance_action_create-protocol-parameters-update.cli index 6cf4136264..16f80b1cf2 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_governance_action_create-protocol-parameters-update.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_governance_action_create-protocol-parameters-update.cli @@ -1,4 +1,5 @@ -Usage: cardano-cli babbage governance action create-protocol-parameters-update +Usage: cardano-cli babbage governance action create-protocol-parameters-update --epoch EPOCH + [--genesis-verification-key-file FILE] [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -27,6 +28,10 @@ Usage: cardano-cli babbage governance action create-protocol-parameters-update Create a protocol parameters update. Available options: + --epoch EPOCH The epoch number in which the update proposal is + valid. + --genesis-verification-key-file FILE + Filepath of the genesis verification key. --min-fee-constant LOVELACE The constant factor for the minimum fee calculation. --min-fee-linear LOVELACE diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action.cli index 2d1f8b4b6f..2f0f93661f 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action.cli @@ -1,6 +1,7 @@ Usage: cardano-cli conway governance action ( create-constitution | create-protocol-parameters-update + | create-treasury-withdrawal ) Governance action commands. @@ -12,3 +13,5 @@ Available commands: create-constitution Create a constitution. create-protocol-parameters-update Create a protocol parameters update. + create-treasury-withdrawal + Create a treasury withdrawal. diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_create-protocol-parameters-update.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_create-protocol-parameters-update.cli index e947ec9575..ac7149fe0b 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_create-protocol-parameters-update.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_create-protocol-parameters-update.cli @@ -1,4 +1,4 @@ -Usage: cardano-cli conway governance action create-protocol-parameters-update +Usage: cardano-cli conway governance action create-protocol-parameters-update --epoch EPOCH [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -27,6 +27,8 @@ Usage: cardano-cli conway governance action create-protocol-parameters-update Create a protocol parameters update. Available options: + --epoch EPOCH The epoch number in which the update proposal is + valid. --min-fee-constant LOVELACE The constant factor for the minimum fee calculation. --min-fee-linear LOVELACE diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_create-treasury-withdrawal.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_create-treasury-withdrawal.cli new file mode 100644 index 0000000000..11d4851065 --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_create-treasury-withdrawal.cli @@ -0,0 +1,53 @@ +Usage: cardano-cli conway governance action create-treasury-withdrawal --governance-action-deposit NATURAL + ( --stake-pool-verification-key STRING + | --cold-verification-key-file FILE + | --stake-pool-id STAKE_POOL_ID + | --stake-verification-key STRING + | --stake-verification-key-file FILE + | --stake-key-hash HASH + ) + [ + ( --stake-pool-verification-key STRING + | --cold-verification-key-file FILE + | --stake-pool-id STAKE_POOL_ID + | --stake-verification-key STRING + | --stake-verification-key-file FILE + | --stake-key-hash HASH + ) + --transfer LOVELACE] + --out-file FILE + + Create a treasury withdrawal. + +Available options: + --governance-action-deposit NATURAL + Deposit required to submit a governance action. + --stake-pool-verification-key STRING + Stake pool verification key (Bech32 or hex-encoded). + --cold-verification-key-file FILE + Filepath of the stake pool verification key. + --stake-pool-id STAKE_POOL_ID + Stake pool ID/verification key hash (either + Bech32-encoded or hex-encoded). Zero or more + occurences of this option is allowed. + --stake-verification-key STRING + Stake verification key (Bech32 or hex-encoded). + --stake-verification-key-file FILE + Filepath of the staking verification key. + --stake-key-hash HASH Stake verification key hash (hex-encoded). + --stake-pool-verification-key STRING + Stake pool verification key (Bech32 or hex-encoded). + --cold-verification-key-file FILE + Filepath of the stake pool verification key. + --stake-pool-id STAKE_POOL_ID + Stake pool ID/verification key hash (either + Bech32-encoded or hex-encoded). Zero or more + occurences of this option is allowed. + --stake-verification-key STRING + Stake verification key (Bech32 or hex-encoded). + --stake-verification-key-file FILE + Filepath of the staking verification key. + --stake-key-hash HASH Stake verification key hash (hex-encoded). + --transfer LOVELACE The amount to transfer. + --out-file FILE Output filepath of the treasury withdrawal. + -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/experimental_governance_action.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/experimental_governance_action.cli index 386180813c..d2da83a7d7 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/experimental_governance_action.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/experimental_governance_action.cli @@ -1,6 +1,7 @@ Usage: cardano-cli experimental governance action ( create-constitution | create-protocol-parameters-update + | create-treasury-withdrawal ) Governance action commands. @@ -12,3 +13,5 @@ Available commands: create-constitution Create a constitution. create-protocol-parameters-update Create a protocol parameters update. + create-treasury-withdrawal + Create a treasury withdrawal. diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/experimental_governance_action_create-protocol-parameters-update.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/experimental_governance_action_create-protocol-parameters-update.cli index 0b9cb8f616..2d50e73f03 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/experimental_governance_action_create-protocol-parameters-update.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/experimental_governance_action_create-protocol-parameters-update.cli @@ -1,4 +1,4 @@ -Usage: cardano-cli experimental governance action create-protocol-parameters-update +Usage: cardano-cli experimental governance action create-protocol-parameters-update --epoch EPOCH [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -27,6 +27,8 @@ Usage: cardano-cli experimental governance action create-protocol-parameters-upd Create a protocol parameters update. Available options: + --epoch EPOCH The epoch number in which the update proposal is + valid. --min-fee-constant LOVELACE The constant factor for the minimum fee calculation. --min-fee-linear LOVELACE diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/experimental_governance_action_create-treasury-withdrawal.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/experimental_governance_action_create-treasury-withdrawal.cli new file mode 100644 index 0000000000..d1c245f551 --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/experimental_governance_action_create-treasury-withdrawal.cli @@ -0,0 +1,53 @@ +Usage: cardano-cli experimental governance action create-treasury-withdrawal --governance-action-deposit NATURAL + ( --stake-pool-verification-key STRING + | --cold-verification-key-file FILE + | --stake-pool-id STAKE_POOL_ID + | --stake-verification-key STRING + | --stake-verification-key-file FILE + | --stake-key-hash HASH + ) + [ + ( --stake-pool-verification-key STRING + | --cold-verification-key-file FILE + | --stake-pool-id STAKE_POOL_ID + | --stake-verification-key STRING + | --stake-verification-key-file FILE + | --stake-key-hash HASH + ) + --transfer LOVELACE] + --out-file FILE + + Create a treasury withdrawal. + +Available options: + --governance-action-deposit NATURAL + Deposit required to submit a governance action. + --stake-pool-verification-key STRING + Stake pool verification key (Bech32 or hex-encoded). + --cold-verification-key-file FILE + Filepath of the stake pool verification key. + --stake-pool-id STAKE_POOL_ID + Stake pool ID/verification key hash (either + Bech32-encoded or hex-encoded). Zero or more + occurences of this option is allowed. + --stake-verification-key STRING + Stake verification key (Bech32 or hex-encoded). + --stake-verification-key-file FILE + Filepath of the staking verification key. + --stake-key-hash HASH Stake verification key hash (hex-encoded). + --stake-pool-verification-key STRING + Stake pool verification key (Bech32 or hex-encoded). + --cold-verification-key-file FILE + Filepath of the stake pool verification key. + --stake-pool-id STAKE_POOL_ID + Stake pool ID/verification key hash (either + Bech32-encoded or hex-encoded). Zero or more + occurences of this option is allowed. + --stake-verification-key STRING + Stake verification key (Bech32 or hex-encoded). + --stake-verification-key-file FILE + Filepath of the staking verification key. + --stake-key-hash HASH Stake verification key hash (hex-encoded). + --transfer LOVELACE The amount to transfer. + --out-file FILE Output filepath of the treasury withdrawal. + -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_governance_action_create-protocol-parameters-update.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_governance_action_create-protocol-parameters-update.cli index e383eab62f..0729f2d35a 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_governance_action_create-protocol-parameters-update.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_governance_action_create-protocol-parameters-update.cli @@ -1,4 +1,5 @@ -Usage: cardano-cli latest governance action create-protocol-parameters-update +Usage: cardano-cli latest governance action create-protocol-parameters-update --epoch EPOCH + [--genesis-verification-key-file FILE] [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -27,6 +28,10 @@ Usage: cardano-cli latest governance action create-protocol-parameters-update Create a protocol parameters update. Available options: + --epoch EPOCH The epoch number in which the update proposal is + valid. + --genesis-verification-key-file FILE + Filepath of the genesis verification key. --min-fee-constant LOVELACE The constant factor for the minimum fee calculation. --min-fee-linear LOVELACE diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_governance_action_create-protocol-parameters-update.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_governance_action_create-protocol-parameters-update.cli index 0a1664b670..f553c5f4f2 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_governance_action_create-protocol-parameters-update.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_governance_action_create-protocol-parameters-update.cli @@ -1,4 +1,5 @@ -Usage: cardano-cli mary governance action create-protocol-parameters-update +Usage: cardano-cli mary governance action create-protocol-parameters-update --epoch EPOCH + [--genesis-verification-key-file FILE] [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -24,6 +25,10 @@ Usage: cardano-cli mary governance action create-protocol-parameters-update Create a protocol parameters update. Available options: + --epoch EPOCH The epoch number in which the update proposal is + valid. + --genesis-verification-key-file FILE + Filepath of the genesis verification key. --min-fee-constant LOVELACE The constant factor for the minimum fee calculation. --min-fee-linear LOVELACE diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_governance_action_create-protocol-parameters-update.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_governance_action_create-protocol-parameters-update.cli index 612ab1cd18..f0b2447e12 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_governance_action_create-protocol-parameters-update.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_governance_action_create-protocol-parameters-update.cli @@ -1,4 +1,5 @@ -Usage: cardano-cli shelley governance action create-protocol-parameters-update +Usage: cardano-cli shelley governance action create-protocol-parameters-update --epoch EPOCH + [--genesis-verification-key-file FILE] [--min-fee-constant LOVELACE] [--min-fee-linear LOVELACE] [--max-block-body-size NATURAL] @@ -24,6 +25,10 @@ Usage: cardano-cli shelley governance action create-protocol-parameters-update Create a protocol parameters update. Available options: + --epoch EPOCH The epoch number in which the update proposal is + valid. + --genesis-verification-key-file FILE + Filepath of the genesis verification key. --min-fee-constant LOVELACE The constant factor for the minimum fee calculation. --min-fee-linear LOVELACE