DRepVotingThresholds
- class cometa.protocol_params.drep_voting_thresholds.DRepVotingThresholds(ptr)[source]
Bases:
objectVoting thresholds for Delegated Representatives (DReps) in governance actions.
Different governance actions have different ratification requirements. These thresholds specify the percentage of the total active voting stake that must be met by DReps who vote Yes for approval.
- classmethod new(motion_no_confidence, committee_normal, committee_no_confidence, update_constitution, hard_fork_initiation, pp_network_group, pp_economic_group, pp_technical_group, pp_governance_group, treasury_withdrawal)[source]
Creates a new DRepVotingThresholds instance.
- Parameters:
motion_no_confidence (UnitInterval) – Threshold for motion of no-confidence.
committee_normal (UnitInterval) – Threshold for electing committee in confidence state.
committee_no_confidence (UnitInterval) – Threshold for electing committee in no-confidence state.
update_constitution (UnitInterval) – Threshold for constitutional updates.
hard_fork_initiation (UnitInterval) – Threshold for hard fork initiation.
pp_network_group (UnitInterval) – Threshold for network group parameter updates.
pp_economic_group (UnitInterval) – Threshold for economic group parameter updates.
pp_technical_group (UnitInterval) – Threshold for technical group parameter updates.
pp_governance_group (UnitInterval) – Threshold for governance group parameter updates.
treasury_withdrawal (UnitInterval) – Threshold for treasury withdrawals.
- Returns:
A new DRepVotingThresholds instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod from_cbor(reader)[source]
Deserializes DRepVotingThresholds from CBOR data.
- Parameters:
reader (CborReader) – A CborReader positioned at the thresholds data.
- Returns:
A new DRepVotingThresholds deserialized from the CBOR data.
- Raises:
CardanoError – If deserialization fails.
- Return type:
- to_cbor(writer)[source]
Serializes the thresholds to CBOR format.
- Parameters:
writer (CborWriter) – A CborWriter to write the serialized data to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None
- property motion_no_confidence: UnitInterval
Threshold for motion of no-confidence.
- property committee_normal: UnitInterval
Threshold for electing committee when in confidence state.
- property committee_no_confidence: UnitInterval
Threshold for electing committee when in no-confidence state.
- property update_constitution: UnitInterval
Threshold for constitutional updates.
- property hard_fork_initiation: UnitInterval
Threshold for hard fork initiation.
- property pp_network_group: UnitInterval
Threshold for network group parameter updates.
- property pp_economic_group: UnitInterval
Threshold for economic group parameter updates.
- property pp_technical_group: UnitInterval
Threshold for technical group parameter updates.
- property pp_governance_group: UnitInterval
Threshold for governance group parameter updates.
- property treasury_withdrawal: UnitInterval
Threshold for treasury withdrawals.
- to_cip116_json(writer)[source]
Serializes this DRep voting thresholds to CIP-116 compliant JSON.
- Parameters:
writer (JsonWriter) – The JsonWriter to write the JSON to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None