Skip to content

BespokeAction_Simple

BespokeAction_Simple is an executive mandate that enables the execution of a single, predefined function call to a target contract.

This mandate is the most basic tool for executing external actions. It is configured to call a specific function on a specific contract. When executed, it passes the user’s input directly to that function.

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

  1. TargetContract (address): The address of the contract to call.
  2. FunctionSelector (bytes4): The function selector to call.
  3. Params (string[]): An array of strings describing the input parameters for the UI (e.g., ["uint256 Amount", "address Recipient"]).

When calling the mandate, the input (mandateCalldata) must contain the encoded arguments matching the target function’s signature (excluding the selector).

  1. Assembly

    • Concatenates the configured FunctionSelector with the provided mandateCalldata.
  2. Execution

    • Calls the TargetContract with the assembled data.
function initializeMandate(...) public override
  • Initializes the contract and function.
  • Sets input parameters.
function handleRequest(...) public view virtual override returns (...)
  • Encodes the call.
Chain IDChain NameAddress