Skip to main content

Overview

Council elections allow token holders to vote for candidates. The top candidates (by vote amount) become council members. Voting requires locking tokens in the Council contract.

Election Flow

1

Election Starts

An election is initiated (requires EIP-712 signature from the platform). The election has a fixed duration.
2

Voting Period

Token holders approve their tokens to the Council contract, then call voteElection() to vote for candidates. Tokens are locked until the election ends.
3

Election Ends

After endTime, anyone can call claimElectionTokens(). The first caller triggers finalization — top candidates become council members.
4

Claim Tokens

All voters call claimElectionTokens() to retrieve their locked tokens.

Reading Election State

Election State Fields

Voting in an Election

Before voting, you must approve the Council contract to transfer your tokens.

Checking Candidates

Claiming Tokens After Election

After the election ends (block.timestamp > endTime):

Reading Council Members

Events