-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ch/transaction-view-json
- Loading branch information
Showing
211 changed files
with
2,544 additions
and
2,277 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
cardano-cli/src/Cardano/CLI/EraBased/Commands/Governance/Poll.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{-# LANGUAGE DataKinds #-} | ||
{-# LANGUAGE LambdaCase #-} | ||
|
||
module Cardano.CLI.EraBased.Commands.Governance.Poll | ||
( GovernancePollCmds(..) , renderGovernancePollCmds) where | ||
|
||
import Cardano.Api | ||
import Cardano.Api.Shelley | ||
|
||
import Data.Text (Text) | ||
|
||
data GovernancePollCmds era | ||
= GovernanceCreatePoll -- ^ Create a SPO poll | ||
(BabbageEraOnwards era) {- TODO smelc, use BabbageEraOnly here instead -} | ||
Text -- ^ Prompt | ||
[Text] -- ^ Choices | ||
(Maybe Word) -- ^ Nonce | ||
(File GovernancePoll Out) | ||
| GovernanceAnswerPoll -- ^ Answer a SPO poll | ||
(BabbageEraOnwards era) {- TODO smelc, use BabbageEraOnly here instead -} | ||
(File GovernancePoll In) -- ^ Poll file | ||
(Maybe Word) -- ^ Answer index | ||
(Maybe (File () Out)) -- ^ Tx file | ||
| GovernanceVerifyPoll -- ^ Verify answer to a given SPO poll | ||
(BabbageEraOnwards era) {- TODO smelc, use BabbageEraOnly here instead -} | ||
(File GovernancePoll In) -- Poll file | ||
(File (Tx ()) In) -- Tx file | ||
(Maybe (File () Out)) -- Tx file | ||
|
||
|
||
renderGovernancePollCmds :: () | ||
=> GovernancePollCmds era | ||
-> Text | ||
renderGovernancePollCmds = \case | ||
GovernanceCreatePoll {} -> "governance create-poll" | ||
GovernanceAnswerPoll {} -> "governance answer-poll" | ||
GovernanceVerifyPoll {} -> "governance verify-poll" |
Oops, something went wrong.