{
    "Function": "slitherConstructorConstantVariables",
    "File": "src/Caller.sol",
    "Parent Contracts": [
        "lib/openzeppelin-contracts/contracts/metatx/ERC2771Context.sol",
        "lib/openzeppelin-contracts/contracts/utils/Context.sol",
        "lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract Caller is EIP712(\"Caller\", \"1\"), ERC2771Context(address(this)) {\n    string internal constant CALL_SIGNED_TYPE_NAME = \"CallSigned(\"\n        \"address sender,address to,bytes data,uint256 value,uint256 nonce,uint256 deadline)\";\n    bytes32 internal immutable callSignedTypeHash = keccak256(bytes(CALL_SIGNED_TYPE_NAME));\n\n    /// @notice Each sender's set of address authorized to make calls on its behalf.\n    // slither-disable-next-line naming-convention\n    mapping(address => EnumerableSet.AddressSet) internal _authorized;\n    /// @notice The nonce which needs to be used in the next EIP-712 message signed by the address.\n    mapping(address => uint256) public nonce;\n\n    /// @notice Emitted when granting the authorization\n    /// of an address to make calls on behalf of the `sender`.\n    /// @param sender The authorizing address.\n    /// @param authorized The authorized address.\n    event Authorized(address indexed sender, address indexed authorized);\n\n    /// @notice Emitted when revoking the authorization\n    /// of an address to make calls on behalf of the `sender`.\n    /// @param sender The authorizing address.\n    /// @param unauthorized The authorized address.\n    event Unauthorized(address indexed sender, address indexed unauthorized);\n\n    /// @notice Grants the authorization of an address to make calls on behalf of the sender.\n    /// @param user The authorized address.\n    function authorize(address user) public {\n        address sender = _msgSender();\n        require(_authorized[sender].add(user), \"Address already is authorized\");\n        emit Authorized(sender, user);\n    }\n\n    /// @notice Revokes the authorization of an address to make calls on behalf of the sender.\n    /// @param user The unauthorized address.\n    function unauthorize(address user) public {\n        address sender = _msgSender();\n        require(_authorized[sender].remove(user), \"Address is not authorized\");\n        emit Unauthorized(sender, user);\n    }\n\n    /// @notice Checks if an address is authorized to make calls on behalf of a sender.\n    /// @param sender The authorizing address.\n    /// @param user The potentially authorized address.\n    /// @return authorized True if `user` is authorized.\n    function isAuthorized(address sender, address user) public view returns (bool authorized) {\n        return _authorized[sender].contains(user);\n    }\n\n    /// @notice Returns all the addresses authorized to make calls on behalf of a sender.\n    /// @param sender The authorizing address.\n    /// @return authorized The list of all the authorized addresses, ordered arbitrarily.\n    /// The list's order may change when sender authorizes or unauthorizes addresses.\n    function allAuthorized(address sender) public view returns (address[] memory authorized) {\n        return _authorized[sender].values();\n    }\n\n    /// @notice Makes a call on behalf of the `sender`.\n    /// Callable only by an address currently `authorize`d by the `sender`.\n    /// Reverts if the call reverts or the called address is not a smart contract.\n    /// This function is payable, any Ether sent to it will be passed in the call.\n    /// @param sender The sender to be set as the message sender of the call as per ERC-2771.\n    /// @param to The called address.\n    /// @param data The calldata to be used for the call.\n    /// @return returnData The data returned by the call.\n    function callAs(address sender, address to, bytes memory data)\n        public\n        payable\n        returns (bytes memory returnData)\n    {\n        require(isAuthorized(sender, _msgSender()), \"Not authorized\");\n        return _call(sender, to, data, msg.value);\n    }\n\n    /// @notice Makes a call on behalf of the `sender`.\n    /// Requires a `sender`'s signature of an ERC-721 message approving the call.\n    /// Reverts if the call reverts or the called address is not a smart contract.\n    /// This function is payable, any Ether sent to it will be passed in the call.\n    /// @param sender The sender to be set as the message sender of the call as per ERC-2771.\n    /// @param to The called address.\n    /// @param data The calldata to be used for the call.\n    /// @param deadline The timestamp until which the message signature is valid.\n    /// @param r The `r` part of the compact message signature as per EIP-2098.\n    /// @param sv The `sv` part of the compact message signature as per EIP-2098.\n    /// @return returnData The data returned by the call.\n    function callSigned(\n        address sender,\n        address to,\n        bytes memory data,\n        uint256 deadline,\n        bytes32 r,\n        bytes32 sv\n    ) public payable returns (bytes memory returnData) {\n        // slither-disable-next-line timestamp\n        require(block.timestamp <= deadline, \"Execution deadline expired\");\n        uint256 currNonce = nonce[sender]++;\n        bytes32 executeHash = keccak256(\n            abi.encode(\n                callSignedTypeHash, sender, to, keccak256(data), msg.value, currNonce, deadline\n            )\n        );\n        address signer = ECDSA.recover(_hashTypedDataV4(executeHash), r, sv);\n        require(signer == sender, \"Invalid signature\");\n        return _call(sender, to, data, msg.value);\n    }\n\n    /// @notice Executes a batch of calls.\n    /// The caller will be set as the message sender of all the calls as per ERC-2771.\n    /// Reverts if any of the calls reverts or any of the called addresses is not a smart contract.\n    /// This function is payable, any Ether sent to it can be used in the batched calls.\n    /// Any unused Ether will stay in this contract,\n    /// anybody will be able to use it in future calls to `callBatched`.\n    /// @param calls The calls to perform.\n    /// @return returnData The data returned by each of the calls.\n    function callBatched(Call[] memory calls) public payable returns (bytes[] memory returnData) {\n        returnData = new bytes[](calls.length);\n        address sender = _msgSender();\n        for (uint256 i = 0; i < calls.length; i++) {\n            Call memory call = calls[i];\n            returnData[i] = _call(sender, call.to, call.data, call.value);\n        }\n    }\n\n    function _call(address sender, address to, bytes memory data, uint256 value)\n        internal\n        returns (bytes memory returnData)\n    {\n        // Encode the message sender as per ERC-2771\n        return Address.functionCallWithValue(to, abi.encodePacked(data, sender), value);\n    }\n}"
}