Skip to content

Safe_ExecTransaction

Safe_ExecTransaction is an executive mandate that enables the Powers contract to execute arbitrary transactions through a Gnosis Safe it owns.

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.

When adopting a Safe_ExecTransaction instance, the following parameters are required:

  1. InputParams (string[]): A description of the input parameters required for the function call (e.g., ["uint256 amount", "address recipient"]).
  2. FunctionSelector (bytes4): The function selector of the call to be executed on the target contract.
  3. Target (address): The address of the contract to call (e.g., a token contract, another protocol).

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.

  1. Preparation

    • Identifies the Safe Treasury address from the Powers contract.
    • Constructs a signature (v=1) authorizing the transaction as the Powers contract (owner).
  2. Safe Execution

    • Generates a call to Safe.execTransaction.
    • The Safe executes the internal call to Target with data FunctionSelector + mandateCalldata.
    • The operation type is set to Call.
function initializeMandate(...) public override
  • Initializes the mandate configuration.
  • Sets the input parameter descriptions.
function handleRequest(...) public view override returns (...)
  • Constructs the Safe transaction.
  • Encodes the v=1 signature.
Chain IDChain NameAddress