Skip to content

Commit

Permalink
Add goverance info action creation to era based cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimbo4350 committed Aug 17, 2023
1 parent 24b2cb9 commit 9d80eeb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ data GovernanceActionCmds era
| GovernanceActionTreasuryWithdrawal
(ConwayEraOnwards era)
EraBasedTreasuryWithdrawal
| GoveranceActionInfo -- TODO: Conway era - ledger currently provides a placeholder constructor
(ConwayEraOnwards era)
(File () In)
(File () Out)
deriving Show

data EraBasedNewCommittee
Expand Down Expand Up @@ -98,6 +102,9 @@ renderGovernanceActionCmds = \case
GovernanceActionCreateNoConfidence {} ->
"governance action create-no-confidence"

GoveranceActionInfo {} ->
"governance action create-info"

data AnyStakeIdentifier
= AnyStakeKey (VerificationKeyOrHashOrFile StakeKey)
| AnyStakePoolKey (VerificationKeyOrHashOrFile StakePoolKey)
Expand Down
12 changes: 12 additions & 0 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeApplications #-}

module Cardano.CLI.EraBased.Run.Governance.Actions
( runGovernanceActionCmds
Expand Down Expand Up @@ -58,6 +59,17 @@ runGovernanceActionCmds = \case
GovernanceActionCreateNoConfidence cOn noConfidence ->
runGovernanceActionCreateNoConfidence cOn noConfidence

GoveranceActionInfo cOn iFp oFp ->
runGovernanceActionInfo cOn iFp oFp

runGovernanceActionInfo
:: ConwayEraOnwards era
-> File () In
-> File () Out
-> ExceptT GovernanceActionsError IO ()
runGovernanceActionInfo _cOn _iFp _oFp =
liftIO $ print @String "TODO: Conway era - implement runGovernanceActionInfo - ledger currently provides a placeholder constructor"

-- TODO: Conway era - update with new ledger types from cardano-ledger-conway-1.7.0.0
runGovernanceActionCreateNoConfidence
:: ConwayEraOnwards era
Expand Down

0 comments on commit 9d80eeb

Please sign in to comment.