Revoke Accounts Role ID
RevokeAccountsRoleId is an electoral mandate that revokes a specific role from all accounts that currently hold it.
Overview
Section titled “Overview”This mandate acts as a “reset button” or a dissolution mechanism for a specific role. When executed, it iterates through every account that holds the configured role and revokes it. This is useful for:
- Dissolving a committee or working group.
- Resetting role assignments before a new election cycle.
- Emergency revocation of a compromised group.
Configuration
Section titled “Configuration”When adopting a RevokeAccountsRoleId instance, the following parameters are required:
RoleId(uint256): The role ID that will be revoked from all holders.InputParams(string[]): An array of strings defining the input parameters for the mandate (e.g.,["string Reason"]).- These parameters are displayed in the UI to prompt the caller for information (like a reason for the reset).
- The values provided by the caller are included in the action data (and hash) but are not used in the execution logic itself. They serve as an on-chain record of the context.
Proposing an Action
Section titled “Proposing an Action”When calling the mandate, the inputs depend on the InputParams configuration.
- If
InputParamsis empty, no arguments are needed. - If
InputParamsis set (e.g.,["string Reason"]), the caller must provide the corresponding values.
Execution Flow
Section titled “Execution Flow”-
State Retrieval
- Queries the Powers contract to get the total count of accounts holding the target
RoleId. - Retrieves the address of every current role holder.
- Queries the Powers contract to get the total count of accounts holding the target
-
Revocation
- Iterates through the list of role holders.
- Generates a
revokeRolecall for each account. - Returns the batch of revocation calls for execution.
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 the
inputParamsfor the UI based on the configuration.
handleRequest
Section titled “handleRequest”function handleRequest(...) public view override returns (...)- Fetches all role holders.
- Constructs the batch revocation logic.
Error Conditions
Section titled “Error Conditions”- No Action
- If there are no current holders of the role, the mandate returns empty arrays (no execution actions), effectively doing nothing but recording the call.
Current Deployments
Section titled “Current Deployments”| Chain ID | Chain Name | Address |
|---|---|---|