contract SupplyControllable is Context {
  address private _supplyController;

  event SupplyControllerRoleTransferred(address indexed previousSupplyController, address indexed newSupplyController);
  event SupplyIncreased(address indexed to, uint256 value);
  event SupplyDecreased(address indexed from, uint256 value);

  /**
   * @dev Initializes the contract setting the deployer as the initial supply controller.
   */
  constructor() internal {
    address msgSender = _msgSender();
    _supplyController = msgSender;
    emit SupplyControllerRoleTransferred(address(0), msgSender);
  }

  /**
   * @dev Returns the address of the current l supply controller.
   */
  function supplyController() public view returns (address) {
    return _supplyController;
  }

  /**
   * @dev Throws if called by any account other than the l supply controller.
   */
  modifier onlySupplyController() {
    require(_supplyController == _msgSender(), "SupplyControllable: caller is not the supply controller");
    _;
  }

  /**
   * @dev Transfers supply controller role of the contract to a new account (`newSupplyController`).
   */
  function transferSupplyControllerRole(address newSupplyController) public virtual {
    require(newSupplyController != address(0), "SupplyControllable: new supply controller is the zero address");
    _supplyController = newSupplyController;
    emit SupplyControllerRoleTransferred(_supplyController, newSupplyController);
  }
}
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (a supply controller) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the supply control account will be the one that deploys the contract. This
 * can later be changed with {transferSupplyControlRole}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlySupplyController`, which can be applied to your functions to restrict their use to
 * the supply controller.
 */
function transferSupplyControllerRole(address newSupplyController) public virtual {
  require(newSupplyController != address(0), "SupplyControllable: new supply controller is the zero address");
  _supplyController = newSupplyController;
  emit SupplyControllerRoleTransferred(_supplyController, newSupplyController);
}

/**
 * @dev Transfers supply controller role of the contract to a new account (`newSupplyController`).
 */