Governor_ExecuteProposal
Governor_ExecuteProposal is an executive mandate that enables the execution of governance proposals on a configured Governor contract. It provides a mechanism to execute proposals that have succeeded in the governance process.
Overview
Section titled “Overview”This mandate provides a mechanism to:
- Execute governance proposals that have succeeded
- Validate proposal state before execution
- Execute proposal actions directly
- Integrate with standard governance frameworks
- Track proposal execution
Configuration
Section titled “Configuration”When adopting a Governor_ExecuteProposal instance, one parameter must be provided:
governorContract(address): The address of the Governor contract to execute proposals on
Proposing an Action
Section titled “Proposing an Action”When calling the mandate, four parameters must be provided:
targets(address[]): Array of target contract addresses for the proposalvalues(uint256[]): Array of ETH values to send with each callcalldatas(bytes[]): Array of encoded function call datadescription(string): Human-readable description of the proposal
Execution Flow
Section titled “Execution Flow”-
Parameter Validation
- Verifies governor contract is configured
- Validates proposal parameters
- Checks array length consistency
- Ensures description is not empty
-
Proposal Validation
- Gets proposal ID from governor contract
- Validates proposal exists
- Checks proposal state is “Succeeded”
- Ensures proposal is ready for execution
-
Proposal Execution
- Returns proposal actions for direct execution
- Bypasses governor contract execution
- Executes actions directly
-
State Management
- Records proposal execution
- Updates governance state
- Tracks execution history
Technical Specifications
Section titled “Technical Specifications”State Variables
Section titled “State Variables”mapping(bytes32 mandateHash => address governorContract) public governorContracts;Functions
Section titled “Functions”initializeMandate
Section titled “initializeMandate”function initializeMandate( uint16 index, string memory nameDescription, bytes memory inputParams, bytes memory config) public override- Initializes mandate with configuration parameters
- Sets up Governor contract address
- Configures proposal execution parameters
handleRequest
Section titled “handleRequest”function handleRequest( address caller, address powers, uint16 mandateId, bytes memory mandateCalldata, uint256 nonce) public view virtual override returns ( uint256 actionId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas)- Processes the proposal execution request
- Validates proposal parameters and state
- Prepares proposal actions for execution
- Returns execution data
Error Conditions
Section titled “Error Conditions”-
Configuration Errors
- “Governor_ExecuteProposal: Governor contract not configured”
- Invalid governor contract address
-
Parameter Errors
- “Governor_ExecuteProposal: No targets provided”
- “Governor_ExecuteProposal: Targets and values length mismatch”
- “Governor_ExecuteProposal: Targets and calldatas length mismatch”
- “Governor_ExecuteProposal: Description cannot be empty”
-
Proposal Errors
- “Governor_ExecuteProposal: Proposal not found”
- “Governor_ExecuteProposal: Proposal not succeeded”
- Invalid proposal state
-
Validation Errors
- Zero address governor contract
- Empty targets array
- Mismatched array lengths
- Empty description
Current Deployments
Section titled “Current Deployments”| Chain ID | Chain Name | Address |
|---|---|---|
| 421614 | Arbitrum Sepolia | 0xa797799EE0C6FA7d9b76eF52e993288a04982267 |
| 11155420 | Optimism Sepolia | 0xa797799EE0C6FA7d9b76eF52e993288a04982267 |
| 11155111 | Ethereum Sepolia | 0xa797799EE0C6FA7d9b76eF52e993288a04982267 |