Skip to content

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.

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.

This mandate requires no configuration parameters at adoption time.

When calling the mandate, two parameters must be provided:

  1. mandates (address[]): The addresses of the mandate contracts to adopt.
  2. roleIds (uint256[]): The role IDs to assign to each mandate. roleIds[i] is the allowed role for mandates[i].

Both arrays must be the same length.

  1. Decoding

    • Decodes the mandates and roleIds arrays from the input.
  2. Adoption Calls

    • For each mandate address, builds a MandateInitData struct with the corresponding role ID and calls IPowers.adoptMandate.
    • All mandates are adopted with a name of "Reform mandate" and empty config — these can be configured further after adoption if needed.
function handleRequest(...) public pure override returns (...)
  • Decodes the mandate addresses and role IDs.
  • Returns a batch of adoptMandate calls.

This mandate has no explicit error conditions. Failures will occur at the Powers contract level if any adoption is invalid.

Chain IDChain NameAddress