From ba4fb94c2d0634a230ebf6e082cc7f3c6b9da5c7 Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Tue, 5 Mar 2024 17:53:34 -0700 Subject: [PATCH] Allow an output file to be specified for query pool-state --- .../src/Cardano/CLI/EraBased/Commands/Query.hs | 1 + .../src/Cardano/CLI/EraBased/Options/Query.hs | 1 + .../src/Cardano/CLI/EraBased/Run/Query.hs | 11 +++++++---- .../src/Cardano/CLI/Legacy/Commands/Query.hs | 1 + cardano-cli/src/Cardano/CLI/Legacy/Options.hs | 1 + .../cardano-cli-golden/files/golden/help.cli | 18 ++++++++++++++++++ .../golden/help/allegra_query_pool-params.cli | 2 ++ .../golden/help/allegra_query_pool-state.cli | 2 ++ .../golden/help/alonzo_query_pool-params.cli | 2 ++ .../golden/help/alonzo_query_pool-state.cli | 2 ++ .../golden/help/babbage_query_pool-params.cli | 2 ++ .../golden/help/babbage_query_pool-state.cli | 2 ++ .../golden/help/conway_query_pool-params.cli | 2 ++ .../golden/help/conway_query_pool-state.cli | 2 ++ .../golden/help/latest_query_pool-params.cli | 2 ++ .../golden/help/latest_query_pool-state.cli | 2 ++ .../golden/help/legacy_query_pool-params.cli | 2 ++ .../golden/help/legacy_query_pool-state.cli | 2 ++ .../golden/help/mary_query_pool-params.cli | 2 ++ .../golden/help/mary_query_pool-state.cli | 2 ++ .../files/golden/help/query_pool-params.cli | 2 ++ .../files/golden/help/query_pool-state.cli | 2 ++ .../golden/help/shelley_query_pool-params.cli | 2 ++ .../golden/help/shelley_query_pool-state.cli | 2 ++ 24 files changed, 65 insertions(+), 4 deletions(-) diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Commands/Query.hs b/cardano-cli/src/Cardano/CLI/EraBased/Commands/Query.hs index c794e1858f..d677732e5d 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Commands/Query.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Commands/Query.hs @@ -172,6 +172,7 @@ data QueryPoolStateCmdArgs = QueryPoolStateCmdArgs , networkId :: !NetworkId , allOrOnlyPoolIds :: !(AllOrOnly (Hash StakePoolKey)) , target :: !(Consensus.Target ChainPoint) + , mOutFile :: !(Maybe (File () Out)) } deriving (Generic, Show) data QueryTxMempoolCmdArgs = QueryTxMempoolCmdArgs diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Options/Query.hs b/cardano-cli/src/Cardano/CLI/EraBased/Options/Query.hs index f11cff0ddf..924446ec83 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Options/Query.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Options/Query.hs @@ -228,6 +228,7 @@ pQueryPoolStateCmd era envCli = <*> pNetworkId envCli <*> pAllStakePoolsOrSome <*> pTarget era + <*> pMaybeOutputFile pQueryTxMempoolCmd :: EnvCli -> Parser (QueryCmds era) pQueryTxMempoolCmd envCli = diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs index 6a8821d75d..05d51eaf29 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs @@ -613,6 +613,7 @@ runQueryPoolStateCmd , Cmd.networkId , Cmd.allOrOnlyPoolIds , Cmd.target + , Cmd.mOutFile } = do let localNodeConnInfo = LocalNodeConnectInfo consensusModeParams networkId nodeSocketPath @@ -635,7 +636,7 @@ runQueryPoolStateCmd & onLeft (left . QueryCmdLocalStateQueryError . EraMismatchError) pure $ do - shelleyBasedEraConstraints sbe writePoolState result + shelleyBasedEraConstraints sbe (writePoolState mOutFile) result ) & onLeft (left . QueryCmdAcquireFailure) & onLeft left @@ -939,9 +940,10 @@ writePoolState :: forall era ledgerera. () => ShelleyLedgerEra era ~ ledgerera => L.EraCrypto ledgerera ~ StandardCrypto => L.Era ledgerera - => SerialisedPoolState era + => Maybe (File () Out) + -> SerialisedPoolState era -> ExceptT QueryCmdError IO () -writePoolState serialisedCurrentEpochState = do +writePoolState mOutFile serialisedCurrentEpochState = do PoolState poolState <- pure (decodePoolState serialisedCurrentEpochState) & onLeft (left . QueryCmdPoolStateDecodeError) @@ -960,7 +962,8 @@ writePoolState serialisedCurrentEpochState = do ) ) - liftIO . LBS.putStrLn $ encodePretty poolStates + firstExceptT QueryCmdWriteFileError . newExceptT $ + writeLazyByteStringOutput mOutFile $ encodePretty poolStates writeProtocolState :: ShelleyBasedEra era diff --git a/cardano-cli/src/Cardano/CLI/Legacy/Commands/Query.hs b/cardano-cli/src/Cardano/CLI/Legacy/Commands/Query.hs index 73d8988a26..834c31005f 100644 --- a/cardano-cli/src/Cardano/CLI/Legacy/Commands/Query.hs +++ b/cardano-cli/src/Cardano/CLI/Legacy/Commands/Query.hs @@ -148,6 +148,7 @@ data LegacyQueryPoolStateCmdArgs = LegacyQueryPoolStateCmdArgs , consensusModeParams :: !ConsensusModeParams , networkId :: !NetworkId , allOrOnlyPoolIds :: !(AllOrOnly (Hash StakePoolKey)) + , mOutFile :: !(Maybe (File () Out)) } deriving (Generic, Show) data LegacyQueryTxMempoolCmdArgs = LegacyQueryTxMempoolCmdArgs diff --git a/cardano-cli/src/Cardano/CLI/Legacy/Options.hs b/cardano-cli/src/Cardano/CLI/Legacy/Options.hs index 9572b1696f..fd8c822f8e 100644 --- a/cardano-cli/src/Cardano/CLI/Legacy/Options.hs +++ b/cardano-cli/src/Cardano/CLI/Legacy/Options.hs @@ -726,6 +726,7 @@ pQueryCmds envCli = <*> pConsensusModeParams <*> pNetworkId envCli <*> pAllStakePoolsOrOnly + <*> pMaybeOutputFile pQueryTxMempool :: Parser LegacyQueryCmds pQueryTxMempool = 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 5e616ea991..a25351c0d4 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help.cli @@ -559,6 +559,7 @@ Usage: cardano-cli shelley query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -602,6 +603,7 @@ Usage: cardano-cli shelley query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state @@ -1722,6 +1724,7 @@ Usage: cardano-cli allegra query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -1765,6 +1768,7 @@ Usage: cardano-cli allegra query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state @@ -2883,6 +2887,7 @@ Usage: cardano-cli mary query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -2924,6 +2929,7 @@ Usage: cardano-cli mary query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state @@ -4036,6 +4042,7 @@ Usage: cardano-cli alonzo query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -4079,6 +4086,7 @@ Usage: cardano-cli alonzo query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state @@ -5224,6 +5232,7 @@ Usage: cardano-cli babbage query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -5267,6 +5276,7 @@ Usage: cardano-cli babbage query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state @@ -6679,6 +6689,7 @@ Usage: cardano-cli conway query pool-params --socket-path SOCKET_PATH | (--stake-pool-id STAKE_POOL_ID) ) [--volatile-tip | --immutable-tip] + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -6729,6 +6740,7 @@ Usage: cardano-cli conway query pool-state --socket-path SOCKET_PATH | (--stake-pool-id STAKE_POOL_ID) ) [--volatile-tip | --immutable-tip] + [--out-file FILE] Dump the pool state @@ -8034,6 +8046,7 @@ Usage: cardano-cli latest query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -8077,6 +8090,7 @@ Usage: cardano-cli latest query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state @@ -9051,6 +9065,7 @@ Usage: cardano-cli legacy query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -9094,6 +9109,7 @@ Usage: cardano-cli legacy query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state @@ -10292,6 +10308,7 @@ Usage: cardano-cli query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -10330,6 +10347,7 @@ Usage: cardano-cli query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_query_pool-params.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_query_pool-params.cli index 3cb69397a3..b4ca2cc726 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_query_pool-params.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_query_pool-params.cli @@ -7,6 +7,7 @@ Usage: cardano-cli allegra query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -30,4 +31,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_query_pool-state.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_query_pool-state.cli index d20a2f1ba5..9f2b8a2113 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_query_pool-state.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_query_pool-state.cli @@ -7,6 +7,7 @@ Usage: cardano-cli allegra query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state @@ -28,4 +29,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_query_pool-params.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_query_pool-params.cli index e0008bab89..309e5c2cbd 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_query_pool-params.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_query_pool-params.cli @@ -7,6 +7,7 @@ Usage: cardano-cli alonzo query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -30,4 +31,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_query_pool-state.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_query_pool-state.cli index 1191842dee..5e8a2e4427 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_query_pool-state.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_query_pool-state.cli @@ -7,6 +7,7 @@ Usage: cardano-cli alonzo query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state @@ -28,4 +29,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_query_pool-params.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_query_pool-params.cli index 3f0ee3e848..b4c30491f9 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_query_pool-params.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_query_pool-params.cli @@ -7,6 +7,7 @@ Usage: cardano-cli babbage query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -30,4 +31,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_query_pool-state.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_query_pool-state.cli index 18b9e408e9..2ff5916715 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_query_pool-state.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_query_pool-state.cli @@ -7,6 +7,7 @@ Usage: cardano-cli babbage query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state @@ -28,4 +29,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-params.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-params.cli index 0a2a362704..48484bb160 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-params.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-params.cli @@ -8,6 +8,7 @@ Usage: cardano-cli conway query pool-params --socket-path SOCKET_PATH | (--stake-pool-id STAKE_POOL_ID) ) [--volatile-tip | --immutable-tip] + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -34,4 +35,5 @@ Available options: --volatile-tip Use the volatile tip as a target. (This is the default) --immutable-tip Use the immutable tip as a target. + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-state.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-state.cli index 64b5b2cd65..6df03a7ba8 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-state.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-state.cli @@ -8,6 +8,7 @@ Usage: cardano-cli conway query pool-state --socket-path SOCKET_PATH | (--stake-pool-id STAKE_POOL_ID) ) [--volatile-tip | --immutable-tip] + [--out-file FILE] Dump the pool state @@ -32,4 +33,5 @@ Available options: --volatile-tip Use the volatile tip as a target. (This is the default) --immutable-tip Use the immutable tip as a target. + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-params.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-params.cli index 724fce8818..1db279a3fd 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-params.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-params.cli @@ -7,6 +7,7 @@ Usage: cardano-cli latest query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -30,4 +31,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-state.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-state.cli index 5f35a515e8..977d33d651 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-state.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-state.cli @@ -7,6 +7,7 @@ Usage: cardano-cli latest query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state @@ -28,4 +29,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/legacy_query_pool-params.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/legacy_query_pool-params.cli index 7eb326ffbd..174517858b 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/legacy_query_pool-params.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/legacy_query_pool-params.cli @@ -7,6 +7,7 @@ Usage: cardano-cli legacy query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -30,4 +31,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/legacy_query_pool-state.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/legacy_query_pool-state.cli index c382236bd5..b4340053e1 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/legacy_query_pool-state.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/legacy_query_pool-state.cli @@ -7,6 +7,7 @@ Usage: cardano-cli legacy query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state @@ -28,4 +29,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_query_pool-params.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_query_pool-params.cli index b8e3744e24..8e06143807 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_query_pool-params.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_query_pool-params.cli @@ -7,6 +7,7 @@ Usage: cardano-cli mary query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -30,4 +31,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_query_pool-state.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_query_pool-state.cli index a095e5baa2..7c47aa2910 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_query_pool-state.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_query_pool-state.cli @@ -5,6 +5,7 @@ Usage: cardano-cli mary query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state @@ -26,4 +27,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-params.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-params.cli index 39de86e416..3584ba2374 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-params.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-params.cli @@ -4,6 +4,7 @@ Usage: cardano-cli query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -27,4 +28,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-state.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-state.cli index 0fb3f65245..c0410c77a6 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-state.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-state.cli @@ -4,6 +4,7 @@ Usage: cardano-cli query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state @@ -25,4 +26,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_query_pool-params.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_query_pool-params.cli index f67564d43c..dd93e4c3be 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_query_pool-params.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_query_pool-params.cli @@ -7,6 +7,7 @@ Usage: cardano-cli shelley query pool-params --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] DEPRECATED. Use query pool-state instead. Dump the pool parameters (Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced @@ -30,4 +31,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_query_pool-state.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_query_pool-state.cli index a1abff2c4d..f7db5c900d 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_query_pool-state.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_query_pool-state.cli @@ -7,6 +7,7 @@ Usage: cardano-cli shelley query pool-state --socket-path SOCKET_PATH ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--out-file FILE] Dump the pool state @@ -28,4 +29,5 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --out-file FILE Optional output file. Default is to write to stdout. -h,--help Show this help text