//SPDX-License-Identifier: MIT pragma solidity ~0.8.17; import "@openzeppelin/contracts/access/Ownable.sol"; contract Controllable is Ownable { mapping(address => bool) public controllers; event ControllerChanged(address indexed controller, bool active); function setController(address controller, bool active) public onlyOwner { controllers[controller] = active; emit ControllerChanged(controller, active); } modifier onlyController() { require( controllers[msg.sender], "Controllable: Caller is not a controller" ); _; } }