ElectionList_Nominate
ElectionList_Nominate is an integration mandate that allows users to self-nominate (or withdraw) from a specific election managed by the ElectionList contract.
Overview
Section titled “Overview”This mandate acts as the registration booth for an election. It interacts with the ElectionList helper contract to add or remove candidates. Unlike the generic Nominate mandate (which operates on a global or single-purpose Nominees list), this mandate is aware of specific election instances identified by their parameters.
Usually, two separate instances of this mandate are deployed for an election system:
- One configured to Nominate (shouldNominate = true).
- One configured to Revoke Nomination (shouldNominate = false).
Configuration
Section titled “Configuration”When adopting an ElectionList_Nominate instance, the following parameters are required:
ElectionList(address): The address of the ElectionList helper contract.shouldNominate(bool): The mode of operation.true: The mandate will nominate the caller.false: The mandate will revoke the caller’s nomination.
Proposing an Action
Section titled “Proposing an Action”When calling the mandate, the inputs must identify the specific election:
Title(string): The title of the election.StartBlock(uint48): The start block of the election.EndBlock(uint48): The end block of the election.
Execution Flow
Section titled “Execution Flow”-
Identification
- Computes the unique
electionIdhash from the inputs and the Powers address.
- Computes the unique
-
Action
- Nominate Mode: Calls
nominate(electionId, caller)on the ElectionList contract. - Revoke Mode: Calls
revokeNomination(electionId, caller)on the ElectionList contract.
- Nominate Mode: Calls
Technical Specifications
Section titled “Technical Specifications”Functions
Section titled “Functions”initializeMandate
Section titled “initializeMandate”function initializeMandate(...) public override- Initializes the ElectionList address and mode.
- Sets input parameters to
(string Title, uint48 StartBlock, uint48 EndBlock).
handleRequest
Section titled “handleRequest”function handleRequest(...) public view override returns (...)- Computes the ID.
- Generates the appropriate call to the ElectionList.
Current Deployments
Section titled “Current Deployments”| Chain ID | Chain Name | Address |
|---|---|---|