vote.move

empty_status (public func)

Creates an empty voting status information.

empty_participants (public func)

Creates an empty voter participant information.

make_VotingEvidence (public func)

// func parameter
ctx[TxContext]: transaction information (auto-filled)
is_agree[bool]: vote in favor (true) or against (false)

Generates a token object to be provided to the person who voted.

is_votestatus_enable (public func)

// func parameter
vote_status[VoteStatus]: vote status structure

Checks whether voting is currently allowed.

is_voted (public func)

// func parameter
participants [VecMap<address, Participant>]: map containing information of all
votersparticipant[Participant]: address information of the current voter

Checks if a vote has already been cast.

participant (public func)

// func parameter
participant [Participant]: voter information structure

Provides detailed information about the voter.

votestatus_period_check

// func parameter
vote_status[VoteStatus]: voting status information
clock_vote[Clock]: current time information (fixed at 0x6)

Checks if the voting period is currently active.

vote_counting (public func)

// func parameter
participants [VecMap<address, Participant>]: map containing information of all voters

Provides the voting results, including: Number of votes in favor, Number of votes against, Total number of voters, Final voting outcome

voting (public func)

// func parameter
participants [VecMap<address, Participant>]: map containing information of all voters
participant [Participant]: address information of the current voter
clock_vote[Clock]: current time information (fixed at 0x6)
is_agree[bool]: indicates whether the vote is in favor (true) or against (false)

The voter proceeds with casting their vote.

votestatus_enable (public func)

// func parameter
vote_status[VoteStatus]: voting status information
enable [bool]: indicates whether voting is enabled
vote_start_ts[u64]: voting start time (UTC / ms)
vote_end_ts[u64]: voting end time (UTC / ms)

Sets the status information for the voting functionality.

Last updated