{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
module Cardano.CLI.Legacy.Commands.Governance where
import Cardano.Api
import Cardano.Api.Ledger (Coin)
import Cardano.Api.Shelley
import Cardano.CLI.Types.Common
import Cardano.CLI.Types.Key
import Data.Text (Text)
data LegacyGovernanceCmds
= GovernanceCreateMirCertificateStakeAddressesCmd
(EraInEon ShelleyToBabbageEra)
MIRPot
[StakeAddress]
[Coin]
(File () Out)
| GovernanceCreateMirCertificateTransferToTreasuryCmd
(EraInEon ShelleyToBabbageEra)
Coin
(File () Out)
| GovernanceCreateMirCertificateTransferToReservesCmd
(EraInEon ShelleyToBabbageEra)
Coin
(File () Out)
| GovernanceGenesisKeyDelegationCertificate
(EraInEon ShelleyToBabbageEra)
(VerificationKeyOrHashOrFile GenesisKey)
(VerificationKeyOrHashOrFile GenesisDelegateKey)
(VerificationKeyOrHashOrFile VrfKey)
(File () Out)
| GovernanceUpdateProposal
(File () Out)
EpochNo
[VerificationKeyFile In]
ProtocolParametersUpdate
(Maybe FilePath)
| GovernanceCreatePoll
Text
[Text]
(Maybe Word)
(File GovernancePoll Out)
| GovernanceAnswerPoll
(File GovernancePoll In)
(Maybe Word)
(Maybe (File () Out))
| GovernanceVerifyPoll
(File GovernancePoll In)
(File (Tx ()) In)
(Maybe (File () Out))
deriving Int -> LegacyGovernanceCmds -> ShowS
[LegacyGovernanceCmds] -> ShowS
LegacyGovernanceCmds -> String
(Int -> LegacyGovernanceCmds -> ShowS)
-> (LegacyGovernanceCmds -> String)
-> ([LegacyGovernanceCmds] -> ShowS)
-> Show LegacyGovernanceCmds
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LegacyGovernanceCmds -> ShowS
showsPrec :: Int -> LegacyGovernanceCmds -> ShowS
$cshow :: LegacyGovernanceCmds -> String
show :: LegacyGovernanceCmds -> String
$cshowList :: [LegacyGovernanceCmds] -> ShowS
showList :: [LegacyGovernanceCmds] -> ShowS
Show
renderLegacyGovernanceCmds :: LegacyGovernanceCmds -> Text
renderLegacyGovernanceCmds :: LegacyGovernanceCmds -> Text
renderLegacyGovernanceCmds = \case
GovernanceGenesisKeyDelegationCertificate{} -> Text
"governance create-genesis-key-delegation-certificate"
GovernanceCreateMirCertificateStakeAddressesCmd{} -> Text
"governance create-mir-certificate stake-addresses"
GovernanceCreateMirCertificateTransferToTreasuryCmd{} -> Text
"governance create-mir-certificate transfer-to-treasury"
GovernanceCreateMirCertificateTransferToReservesCmd{} -> Text
"governance create-mir-certificate transfer-to-reserves"
GovernanceUpdateProposal{} -> Text
"governance create-update-proposal"
GovernanceCreatePoll{} -> Text
"governance create-poll"
GovernanceAnswerPoll{} -> Text
"governance answer-poll"
GovernanceVerifyPoll{} -> Text
"governance verify-poll"