Vote

class cometa.voting_procedures.vote.Vote(value)[source]

Bases: IntEnum

Represents possible voting choices in a Cardano voting procedure.

In the Cardano governance system, participants can cast votes on proposals using one of three options: No, Yes, or Abstain.

NO = 0

Represents a ‘No’ vote - the voter is against the proposal.

YES = 1

Represents a ‘Yes’ vote - the voter supports the proposal.

ABSTAIN = 2

Represents an ‘Abstain’ vote - the voter neither supports nor opposes.

to_string()[source]

Returns a human-readable string representation of this vote.

Returns:

A string representation of the vote.

Return type:

str

Example

>>> from cometa.voting_procedures import Vote
>>> vote = Vote.YES
>>> vote.to_string()
'Yes'