diff --git a/cardano-cli/src/Cardano/CLI/Legacy/Commands/Query.hs b/cardano-cli/src/Cardano/CLI/Legacy/Commands/Query.hs index abb24a926a..8535727dee 100644 --- a/cardano-cli/src/Cardano/CLI/Legacy/Commands/Query.hs +++ b/cardano-cli/src/Cardano/CLI/Legacy/Commands/Query.hs @@ -1,8 +1,24 @@ {-# LANGUAGE DataKinds #-} +{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} module Cardano.CLI.Legacy.Commands.Query ( LegacyQueryCmds (..) + , LegacyQueryLeadershipScheduleCmdArgs (..) + , LegacyQueryProtocolParametersCmdArgs (..) + , LegacyQueryConstitutionHashCmdArgs (..) + , LegacyQueryTipCmdArgs (..) + , LegacyQueryStakePoolsCmdArgs (..) + , LegacyQueryStakeDistributionCmdArgs (..) + , LegacyQueryStakeAddressInfoCmdArgs (..) + , LegacyQueryUTxOCmdArgs (..) + , LegacyQueryLedgerStateCmdArgs (..) + , LegacyQueryProtocolStateCmdArgs (..) + , LegacyQueryStakeSnapshotCmdArgs (..) + , LegacyQueryKesPeriodInfoCmdArgs (..) + , LegacyQueryPoolStateCmdArgs (..) + , LegacyQueryTxMempoolCmdArgs (..) + , LegacyQuerySlotNumberCmdArgs (..) , renderLegacyQueryCmds ) where @@ -13,112 +29,158 @@ import Cardano.CLI.Types.Key import Data.Text (Text) import Data.Time.Clock +import GHC.Generics -data LegacyQueryCmds = - QueryLeadershipSchedule - SocketPath - AnyConsensusModeParams - NetworkId - GenesisFile - (VerificationKeyOrHashOrFile StakePoolKey) - (SigningKeyFile In) - EpochLeadershipSchedule - (Maybe (File () Out)) - | QueryProtocolParameters' - SocketPath - AnyConsensusModeParams - NetworkId - (Maybe (File () Out)) - | QueryConstitutionHash - SocketPath - AnyConsensusModeParams - NetworkId - (Maybe (File () Out)) - | QueryTip - SocketPath - AnyConsensusModeParams - NetworkId - (Maybe (File () Out)) - | QueryStakePools' - SocketPath - AnyConsensusModeParams - NetworkId - (Maybe (File () Out)) - | QueryStakeDistribution' - SocketPath - AnyConsensusModeParams - NetworkId - (Maybe (File () Out)) - | QueryStakeAddressInfo - SocketPath - AnyConsensusModeParams - StakeAddress - NetworkId - (Maybe (File () Out)) - | QueryUTxO' - SocketPath - AnyConsensusModeParams - QueryUTxOFilter - NetworkId - (Maybe (File () Out)) - | QueryDebugLedgerState' - SocketPath - AnyConsensusModeParams - NetworkId - (Maybe (File () Out)) - | QueryProtocolState' - SocketPath - AnyConsensusModeParams - NetworkId - (Maybe (File () Out)) - | QueryStakeSnapshot' - SocketPath - AnyConsensusModeParams - NetworkId - (AllOrOnly [Hash StakePoolKey]) - (Maybe (File () Out)) - | QueryKesPeriodInfo - SocketPath - AnyConsensusModeParams - NetworkId - (File () In) - -- ^ Node operational certificate - (Maybe (File () Out)) - | QueryPoolState' - SocketPath - AnyConsensusModeParams - NetworkId - [Hash StakePoolKey] - | QueryTxMempool - SocketPath - AnyConsensusModeParams - NetworkId - TxMempoolQuery - (Maybe (File () Out)) - | QuerySlotNumber - SocketPath - AnyConsensusModeParams - NetworkId - UTCTime - deriving Show +data LegacyQueryCmds + = QueryLeadershipScheduleCmd !LegacyQueryLeadershipScheduleCmdArgs + | QueryProtocolParametersCmd !LegacyQueryProtocolParametersCmdArgs + | QueryConstitutionHashCmd !LegacyQueryConstitutionHashCmdArgs + | QueryTipCmd !LegacyQueryTipCmdArgs + | QueryStakePoolsCmd !LegacyQueryStakePoolsCmdArgs + | QueryStakeDistributionCmd !LegacyQueryStakeDistributionCmdArgs + | QueryStakeAddressInfoCmd !LegacyQueryStakeAddressInfoCmdArgs + | QueryUTxOCmd !LegacyQueryUTxOCmdArgs + | QueryLedgerStateCmd !LegacyQueryLedgerStateCmdArgs + | QueryProtocolStateCmd !LegacyQueryProtocolStateCmdArgs + | QueryStakeSnapshotCmd !LegacyQueryStakeSnapshotCmdArgs + | QueryKesPeriodInfoCmd !LegacyQueryKesPeriodInfoCmdArgs + | QueryPoolStateCmd !LegacyQueryPoolStateCmdArgs + | QueryTxMempoolCmd !LegacyQueryTxMempoolCmdArgs + | QuerySlotNumberCmd !LegacyQuerySlotNumberCmdArgs + deriving (Generic, Show) + +data LegacyQueryLeadershipScheduleCmdArgs = LegacyQueryLeadershipScheduleCmdArgs + !SocketPath + !AnyConsensusModeParams + !NetworkId + !GenesisFile + !(VerificationKeyOrHashOrFile StakePoolKey) + !(SigningKeyFile In) + !EpochLeadershipSchedule + !(Maybe (File () Out)) + deriving (Generic, Show) + +data LegacyQueryProtocolParametersCmdArgs = LegacyQueryProtocolParametersCmdArgs + !SocketPath + !AnyConsensusModeParams + !NetworkId + !(Maybe (File () Out)) + deriving (Generic, Show) + +data LegacyQueryConstitutionHashCmdArgs = LegacyQueryConstitutionHashCmdArgs + !SocketPath + !AnyConsensusModeParams + !NetworkId + !(Maybe (File () Out)) + deriving (Generic, Show) + +data LegacyQueryTipCmdArgs = LegacyQueryTipCmdArgs + !SocketPath + !AnyConsensusModeParams + !NetworkId + !(Maybe (File () Out)) + deriving (Generic, Show) + +data LegacyQueryStakePoolsCmdArgs = LegacyQueryStakePoolsCmdArgs + !SocketPath + !AnyConsensusModeParams + !NetworkId + !(Maybe (File () Out)) + deriving (Generic, Show) + +data LegacyQueryStakeDistributionCmdArgs = LegacyQueryStakeDistributionCmdArgs + !SocketPath + !AnyConsensusModeParams + !NetworkId + !(Maybe (File () Out)) + deriving (Generic, Show) + +data LegacyQueryStakeAddressInfoCmdArgs = LegacyQueryStakeAddressInfoCmdArgs + !SocketPath + !AnyConsensusModeParams + !StakeAddress + !NetworkId + !(Maybe (File () Out)) + deriving (Generic, Show) + +data LegacyQueryUTxOCmdArgs = LegacyQueryUTxOCmdArgs + !SocketPath + !AnyConsensusModeParams + !QueryUTxOFilter + !NetworkId + !(Maybe (File () Out)) + deriving (Generic, Show) + +data LegacyQueryLedgerStateCmdArgs = LegacyQueryLedgerStateCmdArgs + !SocketPath + !AnyConsensusModeParams + !NetworkId + !(Maybe (File () Out)) + deriving (Generic, Show) + +data LegacyQueryProtocolStateCmdArgs = LegacyQueryProtocolStateCmdArgs + !SocketPath + !AnyConsensusModeParams + !NetworkId + !(Maybe (File () Out)) + deriving (Generic, Show) + +data LegacyQueryStakeSnapshotCmdArgs = LegacyQueryStakeSnapshotCmdArgs + !SocketPath + !AnyConsensusModeParams + !NetworkId + !(AllOrOnly [Hash StakePoolKey]) + !(Maybe (File () Out)) + deriving (Generic, Show) + +data LegacyQueryKesPeriodInfoCmdArgs = LegacyQueryKesPeriodInfoCmdArgs + !SocketPath + !AnyConsensusModeParams + !NetworkId + !(File () In) + -- ^ Node operational certificate + !(Maybe (File () Out)) + deriving (Generic, Show) + +data LegacyQueryPoolStateCmdArgs = LegacyQueryPoolStateCmdArgs + !SocketPath + !AnyConsensusModeParams + !NetworkId + ![Hash StakePoolKey] + deriving (Generic, Show) + +data LegacyQueryTxMempoolCmdArgs = LegacyQueryTxMempoolCmdArgs + !SocketPath + !AnyConsensusModeParams + !NetworkId + !TxMempoolQuery + !(Maybe (File () Out)) + deriving (Generic, Show) + +data LegacyQuerySlotNumberCmdArgs = LegacyQuerySlotNumberCmdArgs + !SocketPath + !AnyConsensusModeParams + !NetworkId + !UTCTime + deriving (Generic, Show) renderLegacyQueryCmds :: LegacyQueryCmds -> Text renderLegacyQueryCmds = \case - QueryLeadershipSchedule {} -> "query leadership-schedule" - QueryProtocolParameters' {} -> "query protocol-parameters " - QueryConstitutionHash {} -> "query constitution-hash " - QueryTip {} -> "query tip" - QueryStakePools' {} -> "query stake-pools" - QueryStakeDistribution' {} -> "query stake-distribution" - QueryStakeAddressInfo {} -> "query stake-address-info" - QueryUTxO' {} -> "query utxo" - QueryDebugLedgerState' {} -> "query ledger-state" - QueryProtocolState' {} -> "query protocol-state" - QueryStakeSnapshot' {} -> "query stake-snapshot" - QueryKesPeriodInfo {} -> "query kes-period-info" - QueryPoolState' {} -> "query pool-state" - QueryTxMempool _ _ _ query _ -> "query tx-mempool" <> renderTxMempoolQuery query - QuerySlotNumber {} -> "query slot-number" + QueryLeadershipScheduleCmd {} -> "query leadership-schedule" + QueryProtocolParametersCmd {} -> "query protocol-parameters " + QueryConstitutionHashCmd {} -> "query constitution-hash " + QueryTipCmd {} -> "query tip" + QueryStakePoolsCmd {} -> "query stake-pools" + QueryStakeDistributionCmd {} -> "query stake-distribution" + QueryStakeAddressInfoCmd {} -> "query stake-address-info" + QueryUTxOCmd {} -> "query utxo" + QueryLedgerStateCmd {} -> "query ledger-state" + QueryProtocolStateCmd {} -> "query protocol-state" + QueryStakeSnapshotCmd {} -> "query stake-snapshot" + QueryKesPeriodInfoCmd {} -> "query kes-period-info" + QueryPoolStateCmd {} -> "query pool-state" + QueryTxMempoolCmd (LegacyQueryTxMempoolCmdArgs _ _ _ query _) -> "query tx-mempool" <> renderTxMempoolQuery query + QuerySlotNumberCmd {} -> "query slot-number" where renderTxMempoolQuery query = case query of diff --git a/cardano-cli/src/Cardano/CLI/Legacy/Options.hs b/cardano-cli/src/Cardano/CLI/Legacy/Options.hs index b222ddfe60..f27e4d78fa 100644 --- a/cardano-cli/src/Cardano/CLI/Legacy/Options.hs +++ b/cardano-cli/src/Cardano/CLI/Legacy/Options.hs @@ -844,48 +844,54 @@ pQueryCmds envCli = where pQueryProtocolParameters :: Parser LegacyQueryCmds pQueryProtocolParameters = - QueryProtocolParameters' - <$> pSocketPath envCli - <*> pConsensusModeParams - <*> pNetworkId envCli - <*> pMaybeOutputFile + fmap QueryProtocolParametersCmd $ + LegacyQueryProtocolParametersCmdArgs + <$> pSocketPath envCli + <*> pConsensusModeParams + <*> pNetworkId envCli + <*> pMaybeOutputFile pQueryConstitutionHash :: Parser LegacyQueryCmds pQueryConstitutionHash = - QueryConstitutionHash - <$> pSocketPath envCli - <*> pConsensusModeParams - <*> pNetworkId envCli - <*> pMaybeOutputFile + fmap QueryConstitutionHashCmd $ + LegacyQueryConstitutionHashCmdArgs + <$> pSocketPath envCli + <*> pConsensusModeParams + <*> pNetworkId envCli + <*> pMaybeOutputFile pQueryTip :: Parser LegacyQueryCmds pQueryTip = - QueryTip - <$> pSocketPath envCli - <*> pConsensusModeParams - <*> pNetworkId envCli - <*> pMaybeOutputFile + fmap QueryTipCmd $ + LegacyQueryTipCmdArgs + <$> pSocketPath envCli + <*> pConsensusModeParams + <*> pNetworkId envCli + <*> pMaybeOutputFile pQueryUTxO :: Parser LegacyQueryCmds pQueryUTxO = - QueryUTxO' - <$> pSocketPath envCli - <*> pConsensusModeParams - <*> pQueryUTxOFilter - <*> pNetworkId envCli - <*> pMaybeOutputFile + fmap QueryUTxOCmd $ + LegacyQueryUTxOCmdArgs + <$> pSocketPath envCli + <*> pConsensusModeParams + <*> pQueryUTxOFilter + <*> pNetworkId envCli + <*> pMaybeOutputFile pQueryStakePools :: Parser LegacyQueryCmds pQueryStakePools = - QueryStakePools' - <$> pSocketPath envCli - <*> pConsensusModeParams - <*> pNetworkId envCli - <*> pMaybeOutputFile + fmap QueryStakePoolsCmd $ + LegacyQueryStakePoolsCmdArgs + <$> pSocketPath envCli + <*> pConsensusModeParams + <*> pNetworkId envCli + <*> pMaybeOutputFile pQueryStakeDistribution :: Parser LegacyQueryCmds pQueryStakeDistribution = - QueryStakeDistribution' + fmap QueryStakeDistributionCmd $ + LegacyQueryStakeDistributionCmdArgs <$> pSocketPath envCli <*> pConsensusModeParams <*> pNetworkId envCli @@ -893,7 +899,8 @@ pQueryCmds envCli = pQueryStakeAddressInfo :: Parser LegacyQueryCmds pQueryStakeAddressInfo = - QueryStakeAddressInfo + fmap QueryStakeAddressInfoCmd $ + LegacyQueryStakeAddressInfoCmdArgs <$> pSocketPath envCli <*> pConsensusModeParams <*> pFilterByStakeAddress @@ -902,7 +909,8 @@ pQueryCmds envCli = pQueryLedgerState :: Parser LegacyQueryCmds pQueryLedgerState = - QueryDebugLedgerState' + fmap QueryLedgerStateCmd $ + LegacyQueryLedgerStateCmdArgs <$> pSocketPath envCli <*> pConsensusModeParams <*> pNetworkId envCli @@ -910,11 +918,12 @@ pQueryCmds envCli = pQueryProtocolState :: Parser LegacyQueryCmds pQueryProtocolState = - QueryProtocolState' - <$> pSocketPath envCli - <*> pConsensusModeParams - <*> pNetworkId envCli - <*> pMaybeOutputFile + fmap QueryProtocolStateCmd $ + LegacyQueryProtocolStateCmdArgs + <$> pSocketPath envCli + <*> pConsensusModeParams + <*> pNetworkId envCli + <*> pMaybeOutputFile pAllStakePoolsOrOnly :: Parser (AllOrOnly [Hash StakePoolKey]) pAllStakePoolsOrOnly = pAll <|> pOnly @@ -928,29 +937,32 @@ pQueryCmds envCli = pQueryStakeSnapshot :: Parser LegacyQueryCmds pQueryStakeSnapshot = - QueryStakeSnapshot' - <$> pSocketPath envCli - <*> pConsensusModeParams - <*> pNetworkId envCli - <*> pAllStakePoolsOrOnly - <*> pMaybeOutputFile + fmap QueryStakeSnapshotCmd $ + LegacyQueryStakeSnapshotCmdArgs + <$> pSocketPath envCli + <*> pConsensusModeParams + <*> pNetworkId envCli + <*> pAllStakePoolsOrOnly + <*> pMaybeOutputFile pQueryPoolState :: Parser LegacyQueryCmds pQueryPoolState = - QueryPoolState' - <$> pSocketPath envCli - <*> pConsensusModeParams - <*> pNetworkId envCli - <*> many (pStakePoolVerificationKeyHash Nothing) + fmap QueryPoolStateCmd $ + LegacyQueryPoolStateCmdArgs + <$> pSocketPath envCli + <*> pConsensusModeParams + <*> pNetworkId envCli + <*> many (pStakePoolVerificationKeyHash Nothing) pQueryTxMempool :: Parser LegacyQueryCmds pQueryTxMempool = - QueryTxMempool - <$> pSocketPath envCli - <*> pConsensusModeParams - <*> pNetworkId envCli - <*> pTxMempoolQuery - <*> pMaybeOutputFile + fmap QueryTxMempoolCmd $ + LegacyQueryTxMempoolCmdArgs + <$> pSocketPath envCli + <*> pConsensusModeParams + <*> pNetworkId envCli + <*> pTxMempoolQuery + <*> pMaybeOutputFile where pTxMempoolQuery :: Parser TxMempoolQuery pTxMempoolQuery = asum @@ -966,38 +978,41 @@ pQueryCmds envCli = ] pLeadershipSchedule :: Parser LegacyQueryCmds pLeadershipSchedule = - QueryLeadershipSchedule - <$> pSocketPath envCli - <*> pConsensusModeParams - <*> pNetworkId envCli - <*> pGenesisFile "Shelley genesis filepath" - <*> pStakePoolVerificationKeyOrHashOrFile Nothing - <*> pVrfSigningKeyFile - <*> pWhichLeadershipSchedule - <*> pMaybeOutputFile + fmap QueryLeadershipScheduleCmd $ + LegacyQueryLeadershipScheduleCmdArgs + <$> pSocketPath envCli + <*> pConsensusModeParams + <*> pNetworkId envCli + <*> pGenesisFile "Shelley genesis filepath" + <*> pStakePoolVerificationKeyOrHashOrFile Nothing + <*> pVrfSigningKeyFile + <*> pWhichLeadershipSchedule + <*> pMaybeOutputFile pKesPeriodInfo :: Parser LegacyQueryCmds pKesPeriodInfo = - QueryKesPeriodInfo - <$> pSocketPath envCli - <*> pConsensusModeParams - <*> pNetworkId envCli - <*> pOperationalCertificateFile - <*> pMaybeOutputFile + fmap QueryKesPeriodInfoCmd $ + LegacyQueryKesPeriodInfoCmdArgs + <$> pSocketPath envCli + <*> pConsensusModeParams + <*> pNetworkId envCli + <*> pOperationalCertificateFile + <*> pMaybeOutputFile pQuerySlotNumber :: Parser LegacyQueryCmds pQuerySlotNumber = - QuerySlotNumber - <$> pSocketPath envCli - <*> pConsensusModeParams - <*> pNetworkId envCli - <*> pUtcTimestamp - where - pUtcTimestamp = - convertTime <$> (Opt.strArgument . mconcat) - [ Opt.metavar "TIMESTAMP" - , Opt.help "UTC timestamp in YYYY-MM-DDThh:mm:ssZ format" - ] + fmap QuerySlotNumberCmd $ + LegacyQuerySlotNumberCmdArgs + <$> pSocketPath envCli + <*> pConsensusModeParams + <*> pNetworkId envCli + <*> pUtcTimestamp + where + pUtcTimestamp = + convertTime <$> (Opt.strArgument . mconcat) + [ Opt.metavar "TIMESTAMP" + , Opt.help "UTC timestamp in YYYY-MM-DDThh:mm:ssZ format" + ] -- TODO: Conway era - move to Cardano.CLI.Conway.Parsers diff --git a/cardano-cli/src/Cardano/CLI/Legacy/Run/Query.hs b/cardano-cli/src/Cardano/CLI/Legacy/Run/Query.hs index e6f5f75548..5d3ee24dd3 100644 --- a/cardano-cli/src/Cardano/CLI/Legacy/Run/Query.hs +++ b/cardano-cli/src/Cardano/CLI/Legacy/Run/Query.hs @@ -22,35 +22,50 @@ import Data.Time.Clock runLegacyQueryCmds :: LegacyQueryCmds -> ExceptT QueryCmdError IO () runLegacyQueryCmds = \case - QueryLeadershipSchedule mNodeSocketPath consensusModeParams network shelleyGenFp poolid vrkSkeyFp whichSchedule outputAs -> + QueryLeadershipScheduleCmd + (LegacyQueryLeadershipScheduleCmdArgs mNodeSocketPath consensusModeParams network shelleyGenFp poolid vrkSkeyFp whichSchedule outputAs) -> runLegacyQueryLeadershipScheduleCmd mNodeSocketPath consensusModeParams network shelleyGenFp poolid vrkSkeyFp whichSchedule outputAs - QueryProtocolParameters' mNodeSocketPath consensusModeParams network mOutFile -> + QueryProtocolParametersCmd + (LegacyQueryProtocolParametersCmdArgs mNodeSocketPath consensusModeParams network mOutFile) -> runLegacyQueryProtocolParametersCmd mNodeSocketPath consensusModeParams network mOutFile - QueryConstitutionHash mNodeSocketPath consensusModeParams network mOutFile -> + QueryConstitutionHashCmd + (LegacyQueryConstitutionHashCmdArgs mNodeSocketPath consensusModeParams network mOutFile) -> runLegacyQueryConstitutionHashCmd mNodeSocketPath consensusModeParams network mOutFile - QueryTip mNodeSocketPath consensusModeParams network mOutFile -> + QueryTipCmd + (LegacyQueryTipCmdArgs mNodeSocketPath consensusModeParams network mOutFile) -> runLegacyQueryTipCmd mNodeSocketPath consensusModeParams network mOutFile - QueryStakePools' mNodeSocketPath consensusModeParams network mOutFile -> + QueryStakePoolsCmd + (LegacyQueryStakePoolsCmdArgs mNodeSocketPath consensusModeParams network mOutFile) -> runLegacyQueryStakePoolsCmd mNodeSocketPath consensusModeParams network mOutFile - QueryStakeDistribution' mNodeSocketPath consensusModeParams network mOutFile -> + QueryStakeDistributionCmd + (LegacyQueryStakeDistributionCmdArgs mNodeSocketPath consensusModeParams network mOutFile) -> runLegacyQueryStakeDistributionCmd mNodeSocketPath consensusModeParams network mOutFile - QueryStakeAddressInfo mNodeSocketPath consensusModeParams addr network mOutFile -> + QueryStakeAddressInfoCmd + (LegacyQueryStakeAddressInfoCmdArgs mNodeSocketPath consensusModeParams addr network mOutFile) -> runLegacyQueryStakeAddressInfoCmd mNodeSocketPath consensusModeParams addr network mOutFile - QueryDebugLedgerState' mNodeSocketPath consensusModeParams network mOutFile -> + QueryLedgerStateCmd + (LegacyQueryLedgerStateCmdArgs mNodeSocketPath consensusModeParams network mOutFile) -> runLegacyQueryLedgerStateCmd mNodeSocketPath consensusModeParams network mOutFile - QueryStakeSnapshot' mNodeSocketPath consensusModeParams network allOrOnlyPoolIds mOutFile -> + QueryStakeSnapshotCmd + (LegacyQueryStakeSnapshotCmdArgs mNodeSocketPath consensusModeParams network allOrOnlyPoolIds mOutFile) -> runLegacyQueryStakeSnapshotCmd mNodeSocketPath consensusModeParams network allOrOnlyPoolIds mOutFile - QueryProtocolState' mNodeSocketPath consensusModeParams network mOutFile -> + QueryProtocolStateCmd + (LegacyQueryProtocolStateCmdArgs mNodeSocketPath consensusModeParams network mOutFile) -> runLegacyQueryProtocolStateCmd mNodeSocketPath consensusModeParams network mOutFile - QueryUTxO' mNodeSocketPath consensusModeParams qFilter networkId mOutFile -> + QueryUTxOCmd + (LegacyQueryUTxOCmdArgs mNodeSocketPath consensusModeParams qFilter networkId mOutFile) -> runLegacyQueryUTxOCmd mNodeSocketPath consensusModeParams qFilter networkId mOutFile - QueryKesPeriodInfo mNodeSocketPath consensusModeParams network nodeOpCert mOutFile -> + QueryKesPeriodInfoCmd + (LegacyQueryKesPeriodInfoCmdArgs mNodeSocketPath consensusModeParams network nodeOpCert mOutFile) -> runLegacyQueryKesPeriodInfoCmd mNodeSocketPath consensusModeParams network nodeOpCert mOutFile - QueryPoolState' mNodeSocketPath consensusModeParams network poolid -> + QueryPoolStateCmd + (LegacyQueryPoolStateCmdArgs mNodeSocketPath consensusModeParams network poolid) -> runLegacyQueryPoolStateCmd mNodeSocketPath consensusModeParams network poolid - QueryTxMempool mNodeSocketPath consensusModeParams network op mOutFile -> + QueryTxMempoolCmd + (LegacyQueryTxMempoolCmdArgs mNodeSocketPath consensusModeParams network op mOutFile) -> runLegacyQueryTxMempoolCmd mNodeSocketPath consensusModeParams network op mOutFile - QuerySlotNumber mNodeSocketPath consensusModeParams network utcTime -> + QuerySlotNumberCmd + (LegacyQuerySlotNumberCmdArgs mNodeSocketPath consensusModeParams network utcTime) -> runLegacyQuerySlotNumberCmd mNodeSocketPath consensusModeParams network utcTime runLegacyQueryConstitutionHashCmd :: ()