Skip to main content

onlyController

Contract: JBControllerUtility​‌

Only allows the controller of the specified project to proceed.

Definition

modifier onlyController(uint256 _projectId) { ... }
  • Arguments:
    • _projectId is the ID of the project.
  • The modifier function can be used by any internal function.

Body

  1. Make sure the message's sender is the project's controller.

    if (address(directory.controllerOf(_projectId)) != msg.sender) revert CONTROLLER_UNAUTHORIZED();

    Internal references:

    External references:

  2. Continue the rest of the function.

    _;