MandatePackage
MandatePackage is a reform mandate that installs a curated bundle of mandates into a Powers organisation in one transaction. After all mandates have been adopted, the package revokes itself — it is designed as a one-time deployment tool.
Overview
Section titled “Overview”This mandate is intended to be deployed by a developer and then adopted by a Powers organisation (typically via Adopt_Mandates). When executed, it installs its bundled mandates and then calls revokeMandate on itself, cleaning up after use.
The specific set of mandates it installs is defined in the getNewMandates function, which can be overridden in subclasses to create custom packages. The base implementation installs three mandates:
- StatementOfIntent — For community proposals (role 1, quorum 20%, majority 66%, 1200 block voting period).
- Veto — For admins to veto proposals (role 0, requires the StatementOfIntent action to be fulfilled first).
- OpenAction — For executing approved proposals (role 2, quorum 20%, majority 66%, requires StatementOfIntent fulfilled and Veto not fulfilled).
Configuration
Section titled “Configuration”This mandate takes no configuration at adoption time. The mandate addresses it installs are passed to the constructor at deployment:
mandateAddresses[0]— OpenAction mandate addressmandateAddresses[1]— StatementOfIntent mandate address
Proposing an Action
Section titled “Proposing an Action”This mandate requires no input parameters. The caller simply executes it to trigger the bundle installation.
Execution Flow
Section titled “Execution Flow”-
Bundle Generation
- Calls
getNewMandatesto produce theMandateInitDatafor each mandate to install. - Uses the current
mandateCounterto correctly sequence mandate IDs.
- Calls
-
Adoption
- Generates
adoptMandatecalls for each mandate in the bundle.
- Generates
-
Self-Revocation
- Appends a final
revokeMandatecall targeting itself, removing the package from the Powers contract after use.
- Appends a final
Technical Specifications
Section titled “Technical Specifications”Functions
Section titled “Functions”getNewMandates
Section titled “getNewMandates”function getNewMandates(address[] memory mandateAddresses, address powers, uint16 mandateCount) public view virtual returns (PowersTypes.MandateInitData[] memory)- Builds the mandate init data for the bundle.
- Can be overridden in subclasses to create different packages.
handleRequest
Section titled “handleRequest”function handleRequest(...) public view override returns (...)- Calls
getNewMandates. - Returns adoption calls plus the final self-revocation call.
Current Deployments
Section titled “Current Deployments”| Chain ID | Chain Name | Address |
|---|---|---|