ElectionRegistry_Nominate
ElectionRegistry_Nominate is an integration mandate that allows users to self-nominate (or withdraw) from a specific election managed by the ElectionRegistry contract.
Overview
Section titled “Overview”This mandate acts as the registration booth for an election. It interacts with the ElectionRegistry 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 ElectionRegistry_Nominate instance, the following parameters are required:
ElectionRegistry(address): The address of the ElectionRegistry 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, one parameter must be provided:
Title(string): The title of the election. The unique election ID is derived from this title and the Powers contract address.
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 ElectionRegistry contract. - Revoke Mode: Calls
revokeNomination(electionId, caller)on the ElectionRegistry contract.
- Nominate Mode: Calls
Technical Specifications
Section titled “Technical Specifications”Functions
Section titled “Functions”initializeMandate
Section titled “initializeMandate”function initializeMandate(...) public override- Initializes the ElectionRegistry address and mode.
- Sets input parameters to
(string Title).
handleRequest
Section titled “handleRequest”function handleRequest(...) public view override returns (...)- Computes the ID.
- Generates the appropriate call to the ElectionRegistry.
Current Deployments
Section titled “Current Deployments”| Chain ID | Chain Name | Address |
|---|---|---|