Self Select
SelfSelect is an electoral mandate that allows users to freely claim a specific role. This is useful for open membership organizations or for onboarding users to a “Member” role.
Overview
Section titled “Overview”This mandate provides a permissionless entry point into a role. Any account can call this mandate to assign the configured role to themselves, provided they do not already hold it. It is the simplest form of onboarding.
Configuration
Section titled “Configuration”When adopting a SelfSelect instance, the following parameter is required:
RoleId(uint256): The role ID that users can claim.
Proposing an Action
Section titled “Proposing an Action”This mandate does not require any input parameters. When called, it attempts to assign the role to the caller.
Execution Flow
Section titled “Execution Flow”-
Validation
- Checks if the caller already holds the configured
RoleId. - If the caller already has the role, the transaction reverts to prevent redundant assignments.
- Checks if the caller already holds the configured
-
Assignment
- If the check passes, the mandate generates an
assignRolecall targeting the caller and theRoleId. - The role is immediately assigned.
- If the check passes, the mandate generates an
Technical Specifications
Section titled “Technical Specifications”Functions
Section titled “Functions”initializeMandate
Section titled “initializeMandate”function initializeMandate( uint16 index, string memory nameDescription, bytes memory inputParams, bytes memory config) public override- Initializes the target role ID.
- Sets input parameters to empty.
handleRequest
Section titled “handleRequest”function handleRequest(...) public view override returns (...)- Validates the user’s current status.
- Returns the assignment call.
Error Conditions
Section titled “Error Conditions”- Validation Errors
- “Account already has role.”: The caller is already a member of the role.
Current Deployments
Section titled “Current Deployments”| Chain ID | Chain Name | Address |
|---|---|---|