Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data RatifyState era = RatifyState {
- rsEnactState ∷ !(EnactState era)
- rsEnacted ∷ !(Seq (GovActionState era))
- rsExpired ∷ !(Set (GovActionId (EraCrypto era)))
- rsDelayed ∷ !Bool
- committeeAccepted ∷ ConwayEraPParams era ⇒ RatifyEnv era → RatifyState era → GovActionState era → Bool
- committeeAcceptedRatio ∷ ∀ era. Map (Credential 'ColdCommitteeRole (EraCrypto era)) EpochNo → Map (Credential 'HotCommitteeRole (EraCrypto era)) Vote → CommitteeState era → EpochNo → Rational
- spoAccepted ∷ ConwayEraPParams era ⇒ RatifyEnv era → RatifyState era → GovActionState era → Bool
- spoAcceptedRatio ∷ ∀ era. RatifyEnv era → GovActionState era → Rational
- dRepAccepted ∷ ConwayEraPParams era ⇒ RatifyEnv era → RatifyState era → GovActionState era → Bool
- dRepAcceptedRatio ∷ ∀ era. RatifyEnv era → Map (Credential 'DRepRole (EraCrypto era)) Vote → GovAction era → Rational
- prevActionAsExpected ∷ GovActionState era → GovRelation StrictMaybe era → Bool
- validCommitteeTerm ∷ ConwayEraPParams era ⇒ GovAction era → PParams era → EpochNo → Bool
- withdrawalCanWithdraw ∷ GovAction era → Coin → Bool
Documentation
data RatifyState era Source #
RatifyState | |
|
Instances
committeeAccepted ∷ ConwayEraPParams era ⇒ RatifyEnv era → RatifyState era → GovActionState era → Bool Source #
committeeAcceptedRatio ∷ ∀ era. Map (Credential 'ColdCommitteeRole (EraCrypto era)) EpochNo → Map (Credential 'HotCommitteeRole (EraCrypto era)) Vote → CommitteeState era → EpochNo → Rational Source #
spoAccepted ∷ ConwayEraPParams era ⇒ RatifyEnv era → RatifyState era → GovActionState era → Bool Source #
spoAcceptedRatio ∷ ∀ era. RatifyEnv era → GovActionState era → Rational Source #
Final ratio for totalAcceptedStakePoolsRatio
we want is: t = y / (s - a)
Where:
* y
- total delegated stake that voted Yes
* a
- total delegated stake that voted Abstain
* s
- total delegated stake
For HardForkInitiation
all SPOs that didn't vote are considered as
No
votes. Whereas, for all other GovAction
s, SPOs that didn't
vote are considered as Abstain
votes.
No
votes are not counted.
dRepAccepted ∷ ConwayEraPParams era ⇒ RatifyEnv era → RatifyState era → GovActionState era → Bool Source #
dRepAcceptedRatio ∷ ∀ era. RatifyEnv era → Map (Credential 'DRepRole (EraCrypto era)) Vote → GovAction era → Rational Source #
prevActionAsExpected ∷ GovActionState era → GovRelation StrictMaybe era → Bool Source #
Check that the previous governance action id specified in the proposal does match the last one of the same purpose that was enacted.
validCommitteeTerm ∷ ConwayEraPParams era ⇒ GovAction era → PParams era → EpochNo → Bool Source #
Orphan instances
(ConwayEraPParams era, Embed (EraRule "ENACT" era) (ConwayRATIFY era), State (EraRule "ENACT" era) ~ EnactState era, Environment (EraRule "ENACT" era) ~ (), Signal (EraRule "ENACT" era) ~ EnactSignal era) ⇒ STS (ConwayRATIFY era) Source # | |
type State (ConwayRATIFY era) Source # type Signal (ConwayRATIFY era) Source # type Environment (ConwayRATIFY era) Source # type BaseM (ConwayRATIFY era) ∷ Type → Type Source # type Event (ConwayRATIFY era) Source # type PredicateFailure (ConwayRATIFY era) Source # initialRules ∷ [InitialRule (ConwayRATIFY era)] Source # transitionRules ∷ [TransitionRule (ConwayRATIFY era)] Source # assertions ∷ [Assertion (ConwayRATIFY era)] Source # renderAssertionViolation ∷ AssertionViolation (ConwayRATIFY era) → String Source # | |
EraGov era ⇒ Embed (ConwayENACT era) (ConwayRATIFY era) Source # | |
wrapFailed ∷ PredicateFailure (ConwayENACT era) → PredicateFailure (ConwayRATIFY era) Source # wrapEvent ∷ Event (ConwayENACT era) → Event (ConwayRATIFY era) Source # |