Skip to main content

JBControlled

Git Source

Inherits: IJBControlled

Provides a modifier for contracts with functionality that can only be accessed by a project's controller.

State Variables​

DIRECTORY​

The directory of terminals and controllers for projects.

IJBDirectory public immutable override DIRECTORY;

Functions​

onlyControllerOf​

Only allows the controller of the specified project to proceed.

modifier onlyControllerOf(uint256 projectId);

Parameters

NameTypeDescription
projectIduint256The ID of the project.

constructor​

constructor(IJBDirectory directory);

Parameters

NameTypeDescription
directoryIJBDirectoryA contract storing directories of terminals and controllers for each project.

_onlyControllerOf​

Only allows the controller of the specified project to proceed.

function _onlyControllerOf(uint256 projectId) internal view;

Errors​

JBControlled_ControllerUnauthorized​

error JBControlled_ControllerUnauthorized(address controller);