Skip to content

Allow Plutus cost calculation to take offline data instead of querying the node #1079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ test-suite cardano-cli-test
filepath,
hedgehog,
hedgehog-extras,
microlens,
microlens-aeson,
mmorph,
monad-control,
parsec,
Expand Down
10 changes: 10 additions & 0 deletions cardano-cli/src/Cardano/CLI/EraBased/Query/Command.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module Cardano.CLI.EraBased.Query.Command
, QueryTreasuryValueCmdArgs (..)
, QueryLedgerPeerSnapshotCmdArgs (..)
, QueryStakePoolDefaultVoteCmdArgs (..)
, QueryEraHistoryCmdArgs (..)
, renderQueryCmds
, IncludeStake (..)
)
Expand Down Expand Up @@ -78,6 +79,7 @@ data QueryCmds era
| QueryProposalsCmd !(QueryProposalsCmdArgs era)
| QueryLedgerPeerSnapshotCmd !QueryLedgerPeerSnapshotCmdArgs
| QueryStakePoolDefaultVoteCmd !(QueryStakePoolDefaultVoteCmdArgs era)
| QueryEraHistoryCmd !QueryEraHistoryCmdArgs
deriving (Generic, Show)

-- | Fields that are common to most queries
Expand Down Expand Up @@ -265,6 +267,12 @@ data QueryStakePoolDefaultVoteCmdArgs era = QueryStakePoolDefaultVoteCmdArgs
}
deriving Show

data QueryEraHistoryCmdArgs = QueryEraHistoryCmdArgs
{ commons :: !QueryCommons
, mOutFile :: !(Maybe (File () Out))
}
deriving (Generic, Show)

renderQueryCmds :: QueryCmds era -> Text
renderQueryCmds = \case
QueryLeadershipScheduleCmd{} ->
Expand Down Expand Up @@ -321,6 +329,8 @@ renderQueryCmds = \case
"treasury"
QueryStakePoolDefaultVoteCmd{} ->
"query stake-pool-default-vote"
QueryEraHistoryCmd{} ->
"query era-history"

renderTxMempoolQuery :: TxMempoolQuery -> Text
renderTxMempoolQuery = \case
Expand Down
Loading
Loading