Safe_ExecTransaction
Safe_ExecTransaction is an executive mandate that enables the Powers contract to execute arbitrary transactions through a Gnosis Safe it owns.
Overview
Section titled “Overview”This mandate provides a secure and flexible way for a Powers organization to interact with external protocols or manage assets held in a Gnosis Safe. By leveraging the fact that the Powers contract is an owner of the Safe, it can authorize transactions directly using a pre-approved signature scheme (v=1).
This is commonly used for Treasury management, protocol interactions, or administrative tasks requiring Safe ownership.
Configuration
Section titled “Configuration”When adopting a Safe_ExecTransaction instance, the following parameters are required:
InputParams(string[]): A description of the input parameters required for the function call (e.g.,["uint256 amount", "address recipient"]).FunctionSelector(bytes4): The function selector of the call to be executed on the target contract.Target(address): The address of the contract to call (e.g., a token contract, another protocol).
Proposing an Action
Section titled “Proposing an Action”When calling the mandate, the input data (mandateCalldata) must correspond to the parameters expected by the configured function selector. This data is passed directly as the arguments for the internal transaction.
Execution Flow
Section titled “Execution Flow”-
Preparation
- Identifies the Safe Treasury address from the Powers contract.
- Constructs a signature (
v=1) authorizing the transaction as the Powers contract (owner).
-
Safe Execution
- Generates a call to
Safe.execTransaction. - The Safe executes the internal call to
Targetwith dataFunctionSelector + mandateCalldata. - The operation type is set to
Call.
- Generates a call to
Technical Specifications
Section titled “Technical Specifications”Functions
Section titled “Functions”initializeMandate
Section titled “initializeMandate”function initializeMandate(...) public override- Initializes the mandate configuration.
- Sets the input parameter descriptions.
handleRequest
Section titled “handleRequest”function handleRequest(...) public view override returns (...)- Constructs the Safe transaction.
- Encodes the
v=1signature.
Current Deployments
Section titled “Current Deployments”| Chain ID | Chain Name | Address |
|---|---|---|