ExternalAction_Flexible
ExternalAction_Flexible is an executive mandate that submits a governance request to an external Powers contract. Unlike ExternalAction_Simple, the target Powers address and mandate ID are provided by the caller at execution time, not fixed in configuration.
Overview
Section titled “Overview”This mandate is the most flexible form of cross-contract governance action. The caller specifies which external Powers contract and which mandate to target at the moment of execution. This allows a single mandate instance to route requests to different external contracts depending on the situation.
Note: the calling Powers contract must hold the correct role on the target Powers instance to be permitted to call the target mandate.
Configuration
Section titled “Configuration”When adopting an ExternalAction_Flexible instance, the following parameter is required:
Params(string[]): UI hints describing any additional input parameters the user must provide beyondPowersTargetandMandateIdTarget. These extra params are passed as the calldata to the target mandate.
Proposing an Action
Section titled “Proposing an Action”When calling the mandate, the following inputs must be provided:
PowersTarget(address): The address of the external Powers contract to call.MandateIdTarget(uint16): The mandate ID on the target Powers contract to submit the request to.- Additional parameters as defined in
Params— these become the calldata forwarded to the target mandate.
Execution Flow
Section titled “Execution Flow”-
Decoding
- Decodes
PowersTarget,MandateIdTarget, and the remainingcallDatafrom the provided input.
- Decodes
-
Request Assembly
- Encodes a call to
IPowers.request(mandateIdTarget, callData, nonce, "")targetingPowersTarget.
- Encodes a call to
-
Execution
- Submits the request to the specified external Powers instance.
Technical Specifications
Section titled “Technical Specifications”Functions
Section titled “Functions”initializeMandate
Section titled “initializeMandate”function initializeMandate(...) public override- Sets input parameters to
[address PowersTarget, uint16 MandateIdTarget]prepended to the configuredParams.
handleRequest
Section titled “handleRequest”function handleRequest(...) public view virtual override returns (...)- Decodes the target address, mandate ID, and calldata from user input.
- Builds and returns the
requestcall.
Error Conditions
Section titled “Error Conditions”This mandate has no explicit error conditions. Failures will occur at the target Powers contract if the request is invalid or the calling contract lacks the required role.
Current Deployments
Section titled “Current Deployments”| Chain ID | Chain Name | Address |
|---|---|---|