Skip to content
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

Implement command "query proposals" #984

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Nov 28, 2024

Changelog

- description: |
    Implement the `query proposals` command
# uncomment types applicable to the change:
  type:
  - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - refactoring    # QoL changes
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Solves #903

How to trust this PR

Tested with cardano-testnet: https://github.com/IntersectMBO/cardano-node/commits/smelc/test-query-proposals/

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@smelc smelc added the next-update Needs a dependency to be updated to be merged label Nov 28, 2024
@smelc smelc force-pushed the smelc/cl/implement-query-proposals branch from bf6f494 to 29eae83 Compare November 28, 2024 16:57
pAllOrOnlyGovActionIds
:: ()
=> ConwayEraOnwards era
-> Parser (AllOrOnly (L.GovActionId (L.StandardCrypto)))

Check warning

Code scanning / HLint

Redundant bracket Warning

cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs:3489:39-56: Warning: Redundant bracket
  
Found:
  (L.StandardCrypto)
  
Perhaps:
  L.StandardCrypto
-> Parser (AllOrOnly (L.GovActionId (L.StandardCrypto)))
pAllOrOnlyGovActionIds era = pAll <|> pOnly
where
pOnly = Only <$> (pGovActionIds era)

Check notice

Code scanning / HLint

Redundant bracket Note

cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs:3492:20-38: Suggestion: Redundant bracket
  
Found:
  Only <$> (pGovActionIds era)
  
Perhaps:
  Only <$> pGovActionIds era
:: forall era
. ()
=> ConwayEraOnwards era
-> Parser [L.GovActionId (L.StandardCrypto)]

Check warning

Code scanning / HLint

Redundant bracket Warning

cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs:3504:28-45: Warning: Redundant bracket
  
Found:
  (L.StandardCrypto)
  
Perhaps:
  L.StandardCrypto
pLedgerGovernanceAction = uncurry L.GovActionId <$> pairParser

pairParser :: Parser (L.TxId L.StandardCrypto, L.GovActionIx)
pairParser = (bimap toShelleyTxId L.GovActionIx) <$> pGovernanceActionId

Check notice

Code scanning / HLint

Redundant bracket Note

cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs:3511:16-50: Suggestion: Redundant bracket
  
Found:
  (bimap toShelleyTxId L.GovActionIx) <$> pGovernanceActionId
  
Perhaps:
  bimap toShelleyTxId L.GovActionIx <$> pGovernanceActionId
<$> pSocketPath envCli
<*> pConsensusModeParams
<*> pNetworkId envCli
<*> (pAllOrOnlyGovActionIds w)

Check notice

Code scanning / HLint

Redundant bracket Note

cardano-cli/src/Cardano/CLI/EraBased/Options/Query.hs:547:11-36: Suggestion: Redundant bracket
  
Found:
  QueryCommitteeMembersStateCmdArgs w <$> (pQueryCommons era envCli)
  
Perhaps:
  QueryCommitteeMembersStateCmdArgs w <$> pQueryCommons era envCli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next-update Needs a dependency to be updated to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant