GovState

scalus.cardano.ledger.GovState
See theGovState companion object
case class GovState(proposals: Vector[GovActionState], roots: GovRoots, committee: Option[Committee], constitution: Constitution)

The governance state of the tx rules, the Scalus name of the ledger's ConwayGovState (eras/conway/impl/src/Cardano/Ledger/Conway/Governance.hs:361-371), spec [DM-5], D27.

The ledger's current and previous pparams stay in Context.env.params (spec [DM-7]), and the future pparams and the DRep pulser belong to the epoch boundary.

Value parameters

committee

the committee, or None in a state of no confidence

proposals

the active proposals in the order they were made (D28)

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def addProposal(proposal: GovActionState): Option[GovState]

This state with proposal appended, or None when its parent is neither the root of its purpose nor an active proposal of the same purpose, spec [GV-6]. An action without a purpose (TreasuryWithdrawals, InfoAction) has no parent and is always added.

This state with proposal appended, or None when its parent is neither the root of its purpose nor an active proposal of the same purpose, spec [GV-6]. An action without a purpose (TreasuryWithdrawals, InfoAction) has no parent and is always added.

It is proposalsAddAction (eras/conway/impl/src/Cardano/Ledger/Conway/Governance/ Proposals.hs:297-331); the ledger's graph is the list itself, D28.

Attributes

def proposal(id: GovActionId): Option[GovActionState]

The proposal with this id, if it is active.

The proposal with this id, if it is active.

Attributes

def withVote(voter: Voter, actionId: GovActionId, vote: Vote): GovState

This state with vote of voter on the proposal actionId, which replaces an earlier vote of the same voter, spec [GV-14] (proposalsAddVote, eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Proposals.hs:410-430). A committee vote is keyed by the hot credential and a pool vote by the pool id. An unknown actionId leaves the state unchanged.

This state with vote of voter on the proposal actionId, which replaces an earlier vote of the same voter, spec [GV-14] (proposalsAddVote, eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Proposals.hs:410-430). A committee vote is keyed by the hot credential and a pool vote by the pool id. An unknown actionId leaves the state unchanged.

Attributes

This state without the votes of dreps on any proposal, spec [GV-15] (eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Gov.hs:622-639).

This state without the votes of dreps on any proposal, spec [GV-15] (eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Gov.hs:622-639).

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product