// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; /** * @title SOMA Guardable Upgradeable Contract. * @author SOMA.finance * @notice Interface of the {GuardableUpgradeable} contract. */ interface IMultiGuardable { /** * @notice Emitted when the required privileges are updated. * @param id The id in question * @param prevPrivileges The previous required privileges. * @param newPrivileges The new required privileges. * @param sender The message sender that triggered the event. */ event RequiredPrivilegesUpdated(bytes32 id, bytes32 prevPrivileges, bytes32 newPrivileges, address indexed sender); /** * @notice Returns a boolean indicating if `account` has the required privileges. * @param id The id to check against. * @param account The account to check against the required privileges. * @return True if `account` has the required privileges, False otherwise. */ function hasPrivileges(bytes32 id, address account) external view returns (bool); /** * @notice Returns a boolean indicating if `account` has the required privileges. * @param account The account to check against the required privileges. * @return True if `account` has the required privileges, False otherwise. */ function hasPrivileges(address account) external view returns (bool); /** * @notice Returns the required privileges. */ function requiredPrivileges() external view returns (bytes32); /** * @notice Returns the required privileges. * @param id The id to check against. */ function requiredPrivileges(bytes32 id) external view returns (bytes32); /** * @notice Updates the required privileges. * @param id The id to check against. * @param newRequiredPrivileges The new required privileges. * @custom:emits RequiredPrivilegesUpdated * @custom:requirement The message sender must have either the LOCAL_UPDATE_PRIVILEGES_ROLE or the * GLOBAL_UPDATE_PRIVILEGES_ROLE role. * @return True if the update was successful. */ function updateRequiredPrivileges(bytes32 id, bytes32 newRequiredPrivileges) external returns (bool); /** * @notice Updates the required privileges. * @param newRequiredPrivileges The new required privileges. * @custom:emits RequiredPrivilegesUpdated * @custom:requirement The message sender must have either the LOCAL_UPDATE_PRIVILEGES_ROLE or the * GLOBAL_UPDATE_PRIVILEGES_ROLE role. * @return True if the update was successful. */ function updateRequiredPrivileges(bytes32 newRequiredPrivileges) external returns (bool); }