setIsAllowedToSetFirstController
Contract: JBDirectory
Interface: IJBDirectory
- Step by step
- Code
- Events
- Bug bounty
Set a contract to the list of trusted addresses that can set a controller for any project.
The owner can add addresses which are allowed to change projects' first controllers. These addresses are known and vetted controllers as well as contracts designed to launch new projects. A project can set its own controller without it being on the allow list.
If you would like an address/contract allowlisted, please reach out to the contract owner.
Definition
function setIsAllowedToSetFirstController(address _address, bool _flag)
external
override
onlyOwner { ... }
- Arguments:
_address
is the address to allow or revoke allowance from._flag
is whether allowance is being added or revoked.
- Through the
onlyOwner
modifier, this function can only be accessed by the address that owns this contract. - The function overrides a function definition from the
IJBDirectory
interface. - The function returns nothing.
Body
-
Set the allowlist property for the provided address to the flag's value.
// Set the flag in the allowlist.
isAllowedToSetFirstController[_address] = _flag;Internal references:
-
Emit a
SetIsAllowedToSetFirstController
event with the relevant parameters.emit SetIsAllowedToSetFirstController(_address, _flag, msg.sender);