ProposalProcedure
- class cometa.proposal_procedures.proposal_procedure.ProposalProcedure(ptr)[source]
Bases:
objectRepresents a governance proposal procedure.
This supports various types of governance actions as defined in CIP-1694.
- classmethod new_parameter_change_action(deposit, reward_address, anchor, action)[source]
Creates a new proposal procedure for a parameter change action.
- Parameters:
deposit (int) – The deposit required to submit the proposal.
reward_address (RewardAddress) – The reward address for deposit return.
anchor (Anchor) – The anchor with additional proposal information.
action (ParameterChangeAction) – The parameter change action.
- Returns:
A new ProposalProcedure instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod new_hard_fork_initiation_action(deposit, reward_address, anchor, action)[source]
Creates a new proposal procedure for a hard fork initiation action.
- Parameters:
deposit (int) – The deposit required to submit the proposal.
reward_address (RewardAddress) – The reward address for deposit return.
anchor (Anchor) – The anchor with additional proposal information.
action (HardForkInitiationAction) – The hard fork initiation action.
- Returns:
A new ProposalProcedure instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod new_treasury_withdrawals_action(deposit, reward_address, anchor, action)[source]
Creates a new proposal procedure for a treasury withdrawals action.
- Parameters:
deposit (int) – The deposit required to submit the proposal.
reward_address (RewardAddress) – The reward address for deposit return.
anchor (Anchor) – The anchor with additional proposal information.
action (TreasuryWithdrawalsAction) – The treasury withdrawals action.
- Returns:
A new ProposalProcedure instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod new_no_confidence_action(deposit, reward_address, anchor, action)[source]
Creates a new proposal procedure for a no confidence action.
- Parameters:
deposit (int) – The deposit required to submit the proposal.
reward_address (RewardAddress) – The reward address for deposit return.
anchor (Anchor) – The anchor with additional proposal information.
action (NoConfidenceAction) – The no confidence action.
- Returns:
A new ProposalProcedure instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod new_update_committee_action(deposit, reward_address, anchor, action)[source]
Creates a new proposal procedure for an update committee action.
- Parameters:
deposit (int) – The deposit required to submit the proposal.
reward_address (RewardAddress) – The reward address for deposit return.
anchor (Anchor) – The anchor with additional proposal information.
action (UpdateCommitteeAction) – The update committee action.
- Returns:
A new ProposalProcedure instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod new_constitution_action(deposit, reward_address, anchor, action)[source]
Creates a new proposal procedure for a new constitution action.
- Parameters:
deposit (int) – The deposit required to submit the proposal.
reward_address (RewardAddress) – The reward address for deposit return.
anchor (Anchor) – The anchor with additional proposal information.
action (NewConstitutionAction) – The new constitution action.
- Returns:
A new ProposalProcedure instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod new_info_action(deposit, reward_address, anchor, action)[source]
Creates a new proposal procedure for an info action.
- Parameters:
deposit (int) – The deposit required to submit the proposal.
reward_address (RewardAddress) – The reward address for deposit return.
anchor (Anchor) – The anchor with additional proposal information.
action (InfoAction) – The info action.
- Returns:
A new ProposalProcedure instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod from_cbor(reader)[source]
Deserializes a ProposalProcedure from CBOR data.
- Parameters:
reader (CborReader) – A CborReader positioned at the proposal procedure data.
- Returns:
A new ProposalProcedure deserialized from the CBOR data.
- Raises:
CardanoError – If deserialization fails.
- Return type:
- to_cbor(writer)[source]
Serializes the proposal procedure to CBOR format.
- Parameters:
writer (CborWriter) – A CborWriter to write the serialized data to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None
- property action_type: GovernanceActionType
The type of governance action.
- Returns:
The GovernanceActionType.
- Raises:
CardanoError – If retrieval fails.
- property reward_address: RewardAddress
The reward address for deposit return.
- Returns:
The RewardAddress.
- property deposit: int
The deposit amount in lovelace.
- Returns:
The deposit amount.
- to_parameter_change_action()[source]
Converts to a ParameterChangeAction if applicable.
- Returns:
The ParameterChangeAction.
- Raises:
CardanoError – If conversion fails.
- Return type:
- to_hard_fork_initiation_action()[source]
Converts to a HardForkInitiationAction if applicable.
- Returns:
The HardForkInitiationAction.
- Raises:
CardanoError – If conversion fails.
- Return type:
- to_treasury_withdrawals_action()[source]
Converts to a TreasuryWithdrawalsAction if applicable.
- Returns:
The TreasuryWithdrawalsAction.
- Raises:
CardanoError – If conversion fails.
- Return type:
- to_no_confidence_action()[source]
Converts to a NoConfidenceAction if applicable.
- Returns:
The NoConfidenceAction.
- Raises:
CardanoError – If conversion fails.
- Return type:
- to_update_committee_action()[source]
Converts to an UpdateCommitteeAction if applicable.
- Returns:
The UpdateCommitteeAction.
- Raises:
CardanoError – If conversion fails.
- Return type:
- to_constitution_action()[source]
Converts to a NewConstitutionAction if applicable.
- Returns:
The NewConstitutionAction.
- Raises:
CardanoError – If conversion fails.
- Return type:
- to_info_action()[source]
Converts to an InfoAction if applicable.
- Returns:
The InfoAction.
- Raises:
CardanoError – If conversion fails.
- Return type:
- get_action()[source]
Gets the underlying governance action based on action type.
- Returns:
The specific governance action instance.
- Raises:
CardanoError – If conversion fails.
- Return type:
ParameterChangeAction | HardForkInitiationAction | TreasuryWithdrawalsAction | NoConfidenceAction | UpdateCommitteeAction | NewConstitutionAction | InfoAction
- to_cip116_json(writer)[source]
Serializes this object to CIP-116 compliant JSON.
- Parameters:
writer (JsonWriter) – The JsonWriter to write the JSON to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None