HardForkInitiationAction
- class cometa.proposal_procedures.hard_fork_initiation_action.HardForkInitiationAction(ptr)[source]
Bases:
objectRepresents a hard fork initiation governance action.
This action initiates a non-backwards compatible upgrade of the network. It requires a preceding software update and specifies the target protocol version for the hard fork.
- classmethod new(protocol_version, governance_action_id=None)[source]
Creates a new hard fork initiation action.
- Parameters:
protocol_version (ProtocolVersion) – The target protocol version for the hard fork.
governance_action_id (GovernanceActionId | None) – Optional ID of a previous governance action that this action depends on.
- Returns:
A new HardForkInitiationAction instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod from_cbor(reader)[source]
Deserializes a HardForkInitiationAction from CBOR data.
- Parameters:
reader (CborReader) – A CborReader positioned at the action data.
- Returns:
A new HardForkInitiationAction deserialized from the CBOR data.
- Raises:
CardanoError – If deserialization fails.
- Return type:
- to_cbor(writer)[source]
Serializes the action to CBOR format.
- Parameters:
writer (CborWriter) – A CborWriter to write the serialized data to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None
- property protocol_version: ProtocolVersion
The target protocol version for the hard fork.
- Returns:
The ProtocolVersion.
- property governance_action_id: GovernanceActionId | None
The optional governance action ID that this action depends on.
- Returns:
The GovernanceActionId if present, None otherwise.
- 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