contracts/interfaces/IERC6551Executable.sol 1.1 K raw
1
// SPDX-License-Identifier: MIT
2
pragma solidity ^0.8.20;
3
4
/// @dev the ERC-165 identifier for this interface is `0x74420f4c`
5
interface IERC6551Executable {
6
    /**
7
     * @dev Executes a low-level operation if the caller is a valid signer on the account
8
     *
9
     * Reverts and bubbles up error if operation fails
10
     *
11
     * @param to        The target address of the operation
12
     * @param value     The Ether value to be sent to the target
13
     * @param data      The encoded operation calldata
14
     * @param operation A value indicating the type of operation to perform
15
     *
16
     * Accounts implementing this interface MUST accept the following operation parameter values:
17
     * - 0 = CALL
18
     * - 1 = DELEGATECALL
19
     * - 2 = CREATE
20
     * - 3 = CREATE2
21
     *
22
     * Accounts implementing this interface MAY support additional operations or restrict a signer's
23
     * ability to execute certain operations
24
     *
25
     * @return The result of the operation
26
     */
27
    function execute(
28
        address to,
29
        uint256 value,
30
        bytes calldata data,
31
        uint256 operation
32
    ) external payable returns (bytes memory);
33
}