Adopt_Mandates
Adopt_Mandates is a reform mandate that adopts multiple mandates into the Powers protocol in one transaction. Each mandate is assigned a role that controls who can call it.
Overview
Section titled “Overview”This mandate is used to expand a Powers organisation’s governance capabilities by installing new mandates. The caller provides a list of mandate contract addresses and corresponding role IDs, and the mandate generates adoptMandate calls for each one.
Configuration
Section titled “Configuration”This mandate requires no configuration parameters at adoption time.
Proposing an Action
Section titled “Proposing an Action”When calling the mandate, two parameters must be provided:
mandates(address[]): The addresses of the mandate contracts to adopt.roleIds(uint256[]): The role IDs to assign to each mandate.roleIds[i]is the allowed role formandates[i].
Both arrays must be the same length.
Execution Flow
Section titled “Execution Flow”-
Decoding
- Decodes the
mandatesandroleIdsarrays from the input.
- Decodes the
-
Adoption Calls
- For each mandate address, builds a
MandateInitDatastruct with the corresponding role ID and callsIPowers.adoptMandate. - All mandates are adopted with a name of
"Reform mandate"and empty config — these can be configured further after adoption if needed.
- For each mandate address, builds a
Technical Specifications
Section titled “Technical Specifications”Functions
Section titled “Functions”handleRequest
Section titled “handleRequest”function handleRequest(...) public pure override returns (...)- Decodes the mandate addresses and role IDs.
- Returns a batch of
adoptMandatecalls.
Error Conditions
Section titled “Error Conditions”This mandate has no explicit error conditions. Failures will occur at the Powers contract level if any adoption is invalid.
Current Deployments
Section titled “Current Deployments”| Chain ID | Chain Name | Address |
|---|---|---|