Execution logic methods

The execution module enables the execution of arbitrary amount of arbitrary operations via use of multicall and execute.

  • Events:

    DittoExecute(address indexed sender, address indexed target, bytes data, bool success): Emitted when an execution is performed.

  • Errors:

    ExecutionLogic_executeTargetCannotBeAddressThis : Thrown if the target of the execution is the contract itself.

  • Functions:

    • onERC721Received(address, address, uint256, bytes calldata) -> bytes4: Implementation of the ERC721 token receiver interface. Returns a selector to confirm the reception.

    • execute(address target, bytes calldata data) -> (bool, bytes memory): Executes a transaction to a specified target address with the provided data. Ensures the target is not the contract itself, and emits an Execute event. It is payable, non-reentrant, and can only be called by the owner or the vault. The owner of the vault can save any task for deferred execution.

    • multicall(bytes[] calldata data) -> bytes[] memory: Executes multiple calls to the contract itself with a list of provided data. Returns the results of the calls in an array. Only the owner or the vault can call this function. Also, it's possible to pass several execute instructions in a row through a multicall for deferred execution.

Last updated