-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add governance action deposits to stake-address-info query #1024
base: master
Are you sure you want to change the base?
Conversation
stakeVoteDelegatees <- monoidForEraInEonA era $ \ceo -> | ||
easyRunQuery (queryStakeVoteDelegatees ceo stakeAddr) | ||
govActionStates :: (Seq.Seq (L.GovActionState (ShelleyLedgerEra era))) <- | ||
easyRunQuery $ queryProposals ceo $ Set.empty |
Check notice
Code scanning / HLint
Redundant $ Note
Found:
queryProposals ceo $ Set.empty
Perhaps:
queryProposals ceo Set.empty
@@ -970,17 +971,30 @@ callQueryStakeAddressInfoCmd | |||
(stakeRewardAccountBalances, stakePools) <- | |||
easyRunQuery (queryStakeAddresses sbe stakeAddr networkId) | |||
|
|||
beo <- requireEon BabbageEra era | |||
ceo <- requireEon ConwayEra era |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this will throw an error when we're in era < Conway. I think we should hide the command for eras < Conway in pQueryStakeAddressInfoCmd
parser and add ConwayEraOnwards era
field to QueryStakeAddressInfoCmdArgs
.
(I'm not sure why it wasn't hidden for < Babbage in the first place 🤔)
I'm also wondering if it's not used in hardforking tests, may be worth double checking with @mkoura .
|
||
stakeVoteDelegatees <- monoidForEraInEonA era $ \ceo -> | ||
easyRunQuery (queryStakeVoteDelegatees ceo stakeAddr) | ||
govActionStates :: (Seq.Seq (L.GovActionState (ShelleyLedgerEra era))) <- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field could be made optional and only show up in eras > Conway. This way the query would still be usable in Babbage.
@@ -1028,6 +1043,7 @@ writeStakeAddressInfo | |||
, "voteDelegation" .= fmap friendlyDRep mDRep | |||
, "rewardAccountBalance" .= mBalance | |||
, "delegationDeposit" .= mDeposit | |||
, "govActionDeposits" .= [gaDeposits] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why a map is wrapped in a list?
@@ -1028,6 +1043,7 @@ writeStakeAddressInfo | |||
, "voteDelegation" .= fmap friendlyDRep mDRep | |||
, "rewardAccountBalance" .= mBalance | |||
, "delegationDeposit" .= mDeposit | |||
, "govActionDeposits" .= [gaDeposits] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the caseShelleyToBabbageOrConwayEraOnwards
now becomes useless, because babbage branch becomes dead code.
Changelog
Context
Resolves #954
Requires IntersectMBO/cardano-api#730
How to trust this PR
The query now includes a map of (GovActionIds, Deposit) assocoated to the stake address:
or empty if it is not associated to any
Checklist